So here is the thing: CIV.EXE contains a routine dedicated to spawning a Civ, whose main task of this routine is setting up a Civ's various initial data (tax/science rates, diplomatic status, unit counts, city counts, map visibility, etc.)
In particular, this routine also determines the
Civ's starting position and, more importantly,
whether a Civ should be re-spawned at all.
The
algorithm to determine the starting position is as follows,
incrementing a loop counter while trying to find the position (initially 0):
- Choose a map square (X,Y) randomly
- If loopCounter = 2000, terminate loop in failure: no suitable starting position found...
- Else if it's an ocean square, loop back to 1.
- Else if the selected square's current land value is smaller than (12 - loopCounter/32), loop back to 1.; current land value includes the 'city shrouds' that cancels land values around existing cities
- Else if the distance to the closest enemy city (or settler for turn 0) is smaller than (10 - loopCounter/64), loop back to 1.
- Else if the square's continent's buildable squares are fewer than (32 - gameTurn/16), loop back to 1.
- Else if the square's continent already contains cities, and current year is after 0, loop back to 1.
- Else if the square contains a tribal hut, loop back to 1.
- Else: yay a suitable starting position was found!
There is plenty to say about the algorithm above, but for our current concern the most important fact is that if
no starting position was found after 2000 attempts, then the Civ will simply not be spawned at all.
Why is this important? Because in the code
after this loop, there is more code that will
arbitrarily set the loop counter to 2000, even if a suitable starting position was found: if the value of
Civ Identity / Leader Graphics matches the Civs identify flag then set loopCounter to 2000; here, "match" means that the Civ ID value is below 8 and the Civ ID flag is 0, or the Civ ID value is above 8 and the flag is 1
[/list]
Finally, the routine ends up checking whether the current
game turn is greater than 350-(50*difficulty) or
loopCounter = 2000, in which case it
does NOT re-spawn the Civ and sets its
Active Flag to 0.
Conclusion: while it is possible to enable Civ re-spawn more than 1 time by just playing with the SVE data elements Civ Identity / Leader Graphics, Civs identify flag and Active Flag, the above conditions show that
it does not guarantee that a Civ will be able to re-spawn.
Also, it must be noted that
this routine is called only from a limited number of places, most notably
whenever a City is destroyed (famine, capture, attack, etc.). In other words, this trick cannot re-spawn Civs
from the dead, it must edited into the SVE
before a Civ is actually destroyed, so that CIV will go through the re-spawn check immediately.
Here is the procedure:
after a Civ is destroyed and respawned once, toggle its identity flag, which conveniently enough, happens to be
stored in the last short of the SVE data (first byte only):
- White Civs:
- If Romans were destroyed and Russians were respawned: flag = flag + 2 (0x2) to have Romans respawn again
- If Russians were destroyed and Romans were respawned: flag = flag - 2 (0x2) to have Russians respawn again
- Green Civs:
- If Babylonians were destroyed and Zulus were respawned: flag = flag + 4 (0x4) to have Babylonians respawn again
- If Zulus were destroyed and Babylonians were respawned: flag = flag - 4 (0x4) to have Zulus respawn again
- Blue Civs:
- If German were destroyed and French were respawned: flag = flag + 8 (0x8) to have German respawn again
- If French were destroyed and German were respawned: flag = flag - 8 (0x8) to have French respawn again
- Yellow Civs:
- If Egyptians were destroyed and Aztecs were respawned: flag = flag + 16 (0x10) to have Egyptians respawn again
- If Aztecs were destroyed and Egyptians were respawned: flag = flag - 16 (0x10) to have Aztecs respawn again
- Cyan Civs:
- If Americans were destroyed and Chinese were respawned: flag = flag + 32 (0x20) to have Americans respawn again
- If Chinese were destroyed and Americans were respawned: flag = flag - 32 (0x20) to have Chinese respawn again
- Pink Civs:
- If Greek were destroyed and English were respawned: flag = flag + 64 (0x40) to have Greek respawn again
- If English were destroyed and Greek were respawned: flag = flag - 64 (0x40) to have English respawn again
- Gray Civs:
- If Indians were destroyed and Mongols were respawned: flag = flag + 128 (0x80) to have Indians respawn again
- If Mongols were destroyed and Indians were respawned: flag = flag - 128 (0x80) to have Mongols respawn again
Now,
all the above is just theory, and needs to be tested. Also, as everyone can see, there is plenty of room for patching the CIV.EXE code above to make re-spawns more frequent... This is really distracting me from what I
should be doing in JCivED right now