Worker cap [Slowdown turn related]

sloul

Chieftain
Joined
Nov 2, 2012
Messages
29
Hello everybody,



I've poster this same topic in ''technical support'' < CIV 4 forums, but so far no answers.
I also wanted to share it here as I know not everybody check t.s. forums.
If my idea is correct/good it might help a lot of people, so here was my question/idea:



Hello everybody,

I'm new to CIV4, I in fact bought the game in order to play Fall From Heaven mods.
Though I fell in love for those mods I stoped 3 mid games because of the AI turns taking too much time (1-2 min a turn).
At this point, im pretty sad, I love the game, but can't afford to wait that time between turns.

Anyway, I made some research and got to the conclusion that this problem is well known, also rade the thread on these forums about fixing tips (pagefile and stuff).
But I found something pretty interesting: http://forums.2kgames.com/showthread...-some-evidence
After runing some tests the author concluded that the main reason of the turns being so slow might be the AI workers.


My idea is to add a worker cap, I was thinking about 4 or 5 per civ.
Is there any way to do that with XML files?
If yes, would there be additional change to do with FFH mods?
When I think of it there are many kind of workers in FFH (golems, elven workers etc.).


Thanks for your answers.
original thread: http://forums.civfanatics.com/showthread.php?p=11962699#post11962699



After making the initial thread, could not wisthand the fact that I couldn't touch the game, so instead I made a new game on ''standard'' map size and so far it is ok.
400+ turns and the waiting time is 30seconds < I can handle that :D
Though I love playing huge maps in 4x.
 
I think there might be the same issue on CIV IV this is worth the try.
If anyone reading this thread happens to know a way to cap/limit a certain kind of unit, please let me know.
 
If anyone reading this thread happens to know a way to cap/limit a certain kind of unit, please let me know.

In

Beyond the Sword\Mods\Fall from Heaven 2\Assets\XML\Units\CIV4UnitClassInfos.xml

There's a

<UnitClassInfo>
<Type>UNITCLASS_WORKER</Type>
<Description>TXT_KEY_UNIT_WORKER</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier>0</iInstanceCostModifier>
<DefaultUnit>UNIT_WORKER</DefaultUnit>
</UnitClassInfo>

That's the unit class, so golems and elven workers are already counted for (they're also unitclass_worker).

iMaxPlayerInstances variable governs the capping per player. Setting it to 4, for example, would allow everyone to build no more then 4 workers.
 
Ok, next game im going to try huge map with this and see what happens hitting the 400's turns.
Thanks Lone Wolf.
 
if the AI has 1 worker or 100, it makes little difference because AI doesn't calculate values for every individual worker. 2kgames forum has more trolls than clan of embers
 
What processor do you have? Must be an ancient single or dual core. Even with Gulftown I barely experienced slowdown with 30 AI, and with Sandy Bridge slowdown is negligible even after 1000 turns on marathon.
 
Top Bottom