Castle Vox Map Editor Error?

Synchronized-turns strategy. Calling all teamers.
Post Reply
Terragon
Lux Newbie
Posts: 2
Joined: Wed Nov 30, 2011 12:23 pm

Castle Vox Map Editor Error?

Post by Terragon » Wed Nov 30, 2011 12:31 pm

Hey! I recently bought this game, and am trying to make a map in the editor. I made several maps already, which worked fine. And then tried to make a map using the hex field. I saved it and loaded it later and got this error:
Error trying to load map file.

If you want to draw over an image, use the menu command: Load Background Image

java.lang.Exception: Error in country 'null': You are using an <id> that is too high (2414). Note that the country ids must start at 0 not 1.
A cuoldn't fix it, so I gave up on that map. Today I started making another one, and got the same message after trying to load it. Any help would be greatly appreciated! Thanks

EDIT: I've gone back, and I think what seems to be causing the error is this: If i delete some hexes out of the middle of the map, and then save and load it, it doesn't want to work.

User avatar
drSnuggles
Luxer
Posts: 303
Joined: Wed Feb 04, 2009 2:14 pm
Location: Germany
Contact:

Post by drSnuggles » Wed Nov 30, 2011 6:20 pm

Hi Terragon and welcome to Vox. :)

You're right with your assumption. This error is caused by deleting (and creating new) countries, because the ID chain can get interrupted. I don't know under what circumstances it exactly happens, but it's more likely the more you delete (and re-create). The programmer (dustin) would have to further comment. It's actually an old error. :wink:
If you open a map file (.voxb, plain XML) with a text editor, you can see a country defined as follows (example):

Code: Select all

<country>
		<id>31</id>
		<name>Fort Kent</name>
		<initialOwner>1</initialOwner>
		<income>1</income>
		<unit>
		<adjoining>33,32,29,28,27</adjoining>
		<armylocation>941,625</armylocation>
		<voxPoints>940,173 948,197 901,205</voxPoints>
		<polygon>877,592 878,591 906,585 940,592 990,595 1005,601 1003,637 994,650 981,662 972,663 959,656 946,658 936,664 927,660 903,637 894,626 878,599</polygon>
</country>
Important here related to this problem are the parts <id> (country ID itself) and <adjoining> (IDs of connected countries). All countries have to be set up in an uninterrupted chain which is normally done by the map editor and saved to the .voxb file. For instance, 31 countries need to have IDs 0..30.

If you get this error, it can only be fixed by manually editing the .voxb file and correcting the ID chain, a likely annoying task.
Sadly, there's no handy fix to correct it, but if you know how it's caused (and you do now), you may avoid it and even correct it yourself, should there be no other way left.

Looking forward to see a map of yours uploaded for review to be later available for online play. :)

User avatar
Lupus ferox
Creator of Maps
Posts: 668
Joined: Fri Nov 23, 2007 4:51 pm

Post by Lupus ferox » Sat Dec 03, 2011 3:56 am

I had this once in the extreme great britain map. But one rainy saturday afternoon was sufficient to correct it manually.... ;-)

User avatar
drSnuggles
Luxer
Posts: 303
Joined: Wed Feb 04, 2009 2:14 pm
Location: Germany
Contact:

Post by drSnuggles » Sat Dec 03, 2011 9:03 am

Many thanks for not asking mapLAB to correct it. :)

Terragon
Lux Newbie
Posts: 2
Joined: Wed Nov 30, 2011 12:23 pm

Post by Terragon » Tue Dec 20, 2011 1:28 pm

Thank you very much for your answers! This looks like it will be a daunting task, but it will be worth it with all the time I put into my most recent map. Again, I appreciate your help!

Post Reply