Max Civ Increaser

I find the title interesting: Would it be possible to make the SDK-limit accessible from python or XML? This way, mods could automatically adjust the limit depending on the size of the map (or whatever) without fiddling with the SDK.
 
Your right Dale this is getting excesive their are now what 5 posts asking exactly the same question,

SCROLL AND READ YOU IDIOTS :mad: :mad: :mad:
 
Teg_Navanis said:
I find the title interesting: Would it be possible to make the SDK-limit accessible from python or XML? This way, mods could automatically adjust the limit depending on the size of the map (or whatever) without fiddling with the SDK.

You're looking at a few issues, and from first thought, a few of them should be possible. Perhaps there are some repercussions I don't know about, but...

1.) Can a map-maker simply change the limit using their map without modifying the sdk?

No. Unless the end-player already had the necessary changes in the SDK that allows a map to interface correctly with a player-limit-changing piece in the map's script. However, that could easily be resolved by saying "This map requires the use of the Magical MaxPlayerChange Mod" But, then again, who really likes to do that for a map that is designed specifically for either vanilla warlords or a mod that might not come with that change?

2.) Can the SDK be modded to allow mod's to change the limit, say through an XML value?

Typically, the SDK controls this number by a simple #define. The problem is that this number is used to control the size of some fixed-length arrays, so changing the #define (say, by making it into an inline function) from say 18 to 20 might result in problems with using player 19 and 20, since some array may eventually look for index 19 and only have a length of 18. This could be simply overcome so long as whatever part of the mod (like a mod in GlobalDefines) that actually reads the value is read before ANY of these arrays need to be created. I'm not sure about the possiblity of this since I don't know where the first of these arrays are created.

3.) Can the SDK be modded to allow mod's to change the limit, say through a python function during the game?

This would require a ton of work. The problem is that many arrays are created statically, so the number is fixed once used (presumably when the application or game starts). To enlargen it, you would need to make a new array that's larger, copy the old values in, and then set up the new ones in the new array.

To make things easier for the programmer, the static arrays would best be changed to either dynamic arrays, or even better a more element-adding-friendly structure like a linked list or hash map. However, you might take a search efficiency or memory usage hit. I have no idea on what scale.
 
Thanks for your thoughts. That any such map/mod would require the use of a modded DLL was clear to me, but you convinced me that any python approach could easily not work since the array is probably already used before the python code kicks in.
 
Back
Top Bottom