Nah, iCivType will most often be -1 in the early game where there's still unused player slots to pick from.I fixed it so it won't crash, but it doesn't answer why I have never seen it before now. That might be indicative of another problem.
<Define>There is no limit to wonders, if you play with unlimited wonders.
This wonder count display always is here though.
Which is turned off/ignored if you use the Unlimited Wonders option.<Define>
<DefineName>MAX_WORLD_WONDERS_PER_CITY</DefineName>
<iDefineIntVal>14</iDefineIntVal>
</Define>
@LumenAngel
/edit
Okay I had a look again, you are just running out of memory. I can crash your game just be scrolling around the whole map. I am going to start working on memory usage straight away, but I can guarantee any time scale.
This depends on culture level - look at bottom of each culture level entry in culture level infos xml (its in gameinfo folder).Last I saw, if you Do Not have Unlimited Wonders On, you get 4 per city. Has this changed?
You have pushed the limits and now the piper has come asking for his pay.Exactly what happend this morning... Was searching for a resssource on the map -> crash when scrolling.
Even with graphism on low
Don't be premature, I didn't really start to look at it yet. I have so far determined that only 500MB or so of usage is allocated through the DLL (250MB of it is just arrays of ints!), such that even if we can shave off ALL allocation from the mod itself it would not be satisfactory. Instead I think we need to concentrate on improving the behaviour of the paging. Currently it appears to not be aggressive enough in freeing memory (it doesn't seem to do it at all in fact). The first thing I'm going to look at is this, I am also going to add warnings about low memory, and force the paging to free memory when it is low if such a thing is possible (I didn't look at the paging code at all yet).Your game will most likely Not recover.
Traceback (most recent call last):
File "CvWBInterface", line 230, in writeDesc
File "CvWBDesc", line 1545, in write
File "CvWBDesc", line 1193, in write
File "CvWBDesc", line 809, in write
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u01eb' in position 17: ordinal not in range(256)
ERR: Python function writeDesc failed, module CvWBInterface
Your Magic notwithstanding, And based on history of the past performances of this Mod, his game is basically over.Don't be premature, I didn't really start to look at it yet. I have so far determined that only 500MB or so of usage is allocated through the DLL (250MB of it is just arrays of ints!), such that even if we can shave off ALL allocation from the mod itself it would not be satisfactory. Instead I think we need to concentrate on improving the behaviour of the paging. Currently it appears to not be aggressive enough in freeing memory (it doesn't seem to do it at all in fact). The first thing I'm going to look at is this, I am also going to add warnings about low memory, and force the paging to free memory when it is low if such a thing is possible (I didn't look at the paging code at all yet).
K, I know what's wrong and how to fix it. May have time for it today.@Toffer90 I got this python error, when I loaded one of saves.
Don't be premature, I didn't really start to look at it yet. I have so far determined that only 500MB or so of usage is allocated through the DLL (250MB of it is just arrays of ints!), such that even if we can shave off ALL allocation from the mod itself it would not be satisfactory. Instead I think we need to concentrate on improving the behaviour of the paging. Currently it appears to not be aggressive enough in freeing memory (it doesn't seem to do it at all in fact). The first thing I'm going to look at is this, I am also going to add warnings about low memory, and force the paging to free memory when it is low if such a thing is possible (I didn't look at the paging code at all yet).
@Thunderbrd left options like this one, as those are his work in progress.About saving memory.
There are some broken unused Features in C2C like the
GAMEOPTION_STRENGTH_IN_NUMBERS. That option alone uses ~140 byte per unit without ever beeing used.
I will check out this feature. If it is required for large maps we should enable it automatically for these maps I guess?When playing on big maps the Viewports feature should be enabled to reduce the memory usage.
Well we can call directly the function the exe is using when it deallocates these things (I guess it does this at exit at least). Of course if they aren't exposed via the DLL interface this is more difficult, but the exe code isn't changing again so function offsets and parameters are fixed. Probably this specifically will be very difficult, I need to look into the code to see what is happening before I can comment further really.There's no way to tell the exe to clear it's memory from no longer needed textures or models and such things.
Based on the memory tracking I added (not committed yet) we haven't got much scope for solving this problem with our own data. It has to be a systemic fix to over allocating graphics memory it looks like. If that is viewports then great, we just need to make sure they work and make sure they are used. Otherwise I will be looking into other more esoteric fixes as indicated above!That option alone uses ~140 byte per unit without ever beeing used.
I will check out this feature. If it is required for large maps we should enable it automatically for these maps I guess?