problems with new map sizes (ARG!)

blitzkrieg1980

Octobrist
Joined
Aug 29, 2006
Messages
4,899
Location
New Jersey, USA
So I'm trying to create a new map size (Giant). I really only wanted it to be about double the size of a Huge map.

I copy/pasted the data for Huge in the XML file (CIV4WorldInfo.xml)

I did all the changes:
<Type>WORLDSIZE_GIANT</Type>
<Description>TXT_KEY_WORLD_GIANT</Description>
<iDefaultPlayers>18</iDefaultPlayers>
<iGridWidth>64</iGridWidth>
<iGridHeight>40</iGridHeight>

And left everything else (not interested in ridiculous requirements for Ironworks/Oxford/etc)

I edited the text file to include my Giant map and I even added the giant map size to all the map categories in the Interface/WorldPickerInfos.xml file.

However, no matter which map script I choose, I always get a completely filled map when using my Giant size. In other words, there are no seas, lakes, or any water tiles at all. There are rivers, but no bodies of water. The tiles are all land tiles. Why is this happening? I cannot see why this is happening. Does anyone have any clue?
 
I'm not sure what the python exceptions are. Maybe I've strayed further from my skills than I thought!

Do I need to activate python exceptions? How would I do so?

Thanks for your response brotha.
 
Okay, thanks again, The_J. It's working for most of the mapscripts. However, when I try to use Earth2 mapscript, it's giving me this error while the game initializes:

Spoiler :

Traceback (most recent call list)

File Earth2 line 1127 in generatePlotTypes
File Earth2 line 97 in gereatePlotsByRegion

key error
CvPythonExceptions.WorldSizeTypes.NUM_WORLDSIZE_TYPES


Any idea how to fix this? Thanks so much for all your help!

EDIT:
Wow! Windows 7 truly has the worst broken POS search function in the history of Windows... doesn't it?! I am unable to locate any files with the CvPythonExceptions.WorldSizeTypes.NUM_WORLDSIZE_TYPES because the windows 7 search function sucks a big one. Can anyone just point me at the file where the NUM_WORLDSIZE_TYPES is defined so I can try to fix this ridiculous issue?
 
Doesn't have anything to do with the search function, that stuff is defined in the earth2 mapscript itself ;).

First in line 54,
PHP:
    grid_sizes = {
        WorldSizeTypes.WORLDSIZE_DUEL:      (10,6),
        WorldSizeTypes.WORLDSIZE_TINY:      (15,9),
        WorldSizeTypes.WORLDSIZE_SMALL:     (20,12),
        WorldSizeTypes.WORLDSIZE_STANDARD:  (25,15),
        WorldSizeTypes.WORLDSIZE_LARGE:     (30,18),
        WorldSizeTypes.WORLDSIZE_HUGE:      (40,24)
    }

and later in line 89:
PHP:
        sizevalues = {
            WorldSizeTypes.WORLDSIZE_DUEL:      (3,2,1),
            WorldSizeTypes.WORLDSIZE_TINY:      (3,2,1),
            WorldSizeTypes.WORLDSIZE_SMALL:     (4,2,1),
            WorldSizeTypes.WORLDSIZE_STANDARD:  (4,2,1),
            WorldSizeTypes.WORLDSIZE_LARGE:     (4,2,1),
            WorldSizeTypes.WORLDSIZE_HUGE:      (5,2,1)
            }

You have to add the right values for new world size there too, else the game will try to get the values from the dll or exe (don't know), which will then fail, like you can see.
 
In CyEnumsInterface.cpp the DLL defined a bunch of constants for Python to use. If you don't override them, you get what it defined for you.

Code:
	python::enum_<WorldSizeTypes>("WorldSizeTypes")
		.value("NO_WORLDSIZE", NO_WORLDSIZE)
		.value("WORLDSIZE_DUEL", WORLDSIZE_DUEL)
		.value("WORLDSIZE_TINY", WORLDSIZE_TINY)
		.value("WORLDSIZE_SMALL", WORLDSIZE_SMALL)
		.value("WORLDSIZE_STANDARD", WORLDSIZE_STANDARD)
		.value("WORLDSIZE_LARGE", WORLDSIZE_LARGE)
		.value("WORLDSIZE_HUGE", WORLDSIZE_HUGE)
		.value("NUM_WORLDSIZE_TYPES", NUM_WORLDSIZE_TYPES)
		;

The actual string "CvPythonExceptions.WorldSizeTypes.NUM_WORLDSIZE_TYPES" is not likely to actually appear anywhere in any file, Python or C++. I would expect it to be built on the fly somewhere as needed, at least with the "CvPythonExceptions." prefix - without that you would probably find some matches. Generalizing it more to just look for "NUM_WORLDSIZE_TYPES" would typically be the way to go for something like this.
 
Thank you both for your help. I was able to change the settings in Earth2 and Earth3 by adding the NUM_WORLDSIZE_TYPES and defining the size as 60, 36. A nice big world without going too crazy. It works fine.

Earth3 still throws an exception. Something about 'TRUE' has not been declared. Doesn't matter as the mapscript still works.
 
Earth3 still throws an exception. Something about 'TRUE' has not been declared. Doesn't matter as the mapscript still works.

Change the 'TRUE' to 'True' (casing matters). This is the word Python knows.
 
Back
Top Bottom