How to avoid "World Unit" from being given as free unit in later start?

tucoow

Chieftain
Joined
May 1, 2008
Messages
52
Location
A pasture, somewhere GMT+8
I've searched the forum with key word "world unit" but found no description about this so I decide to post this question here.

I like the "Drifa the Withe Dragon" in mod FfH very much, so i put it (and some other units, "Fiacra the North Wind" etc) in regular CIV4 BTS games by editing the XMLs. I make them each a "World Unit, 1 allowed", with pre-requested tech of meditation, and pre-requested building of a world wonder "The stag hide" (also from mod FfH, requires mediation).

This works fine in early start, and it adds much fun to the game. But I also find that when I start a game in later era, say "Classic era", these "World Unit" are given as free units when the game starts, and with numbers beyond "1 allowed".

I guess when the engine starts a game it gives the units with highest strength in that era to the players; but it "forgets" to check pre-requested building and max global instance etc.

Is there any way to correct this? Thanks!
 
I guess when the engine starts a game it gives the units with highest strength in that era to the players; but it "forgets" to check pre-requested building and max global instance etc.

To solve that, that wold requires a SDK change.After taken a look at the code, I'm not sure of why the max number of units is not taken in count (but I guess this is because the game is not final initialized so the number of units created for a class return always 0). The buildings are not taken in count.

If you don't want to change the SDK function, putting a bonus requirement or remove the unitAIs "UNITAI_CITY_DEFENSE" and "UNITAI_EXPLORE" for these units should work.(NoUnitAI tag)

Tcho !
 
Back
Top Bottom