Governments in Exile

Quintillus

Archiving Civ3 Content
Moderator
Supporter
Joined
Mar 17, 2007
Messages
8,404
Location
Ohio
A few weeks ago I discovered an interesting condition you could achieve by modifying savegames: you could set a civilization's capital to a foreign city. For convenience, I'll term the government of a civilization whose capital is in a foreign city as a 'government in exile'.

In such a situation, it appears that corruption is lowest in cities closest to the foreign city that is the seat of government. Forbidden Palaces do still have an effect when the government is in exile.

My early experiments have been with modifying the game in real time while Civ is running, rather than modifying the BIQ. Thus I am not sure if the following will hold up with SAV modifications, but thus far moving the capital to a foreign city has not destroyed the original palace, either when I move my own capital or when I move another civ's capital. Palace-building rules seem to apply just as they do in a standard game - of course if you make the Palace unbuildable, the civ can't move its government back to its own turf.

I have not yet experimented with what happens if the city where the government-in-exile is located is captured.

Diplomacy can be conducted normally with a civ whose government is in exile, at least if an embassy is already in place. I haven't experimented with whether an embassy can be established if you didn't already have one when the government went into exile.

I do not know of a way to create a government in exile in a BIQ file, as there appears to be no variable that stores the capital in the BIQ (none of the unknowns in the Custom Player Data appear to, unfortunately). So it appears that it must be done by modifying SAVs, or modifying the game's data while it is running.

Also noteworthy is that it appears that it takes one turn to recalculate the corruption effects. I've attached two SAV files here. In the first (NoEndTurnYet), I have not ended the turn after moving China's capital to Tokyo, and there is still zero corruption in Chunking. In the second one, I have ended a turn, and corruption lowest closest to Tokyo, although still quite low in Foochow and Hankow. However, if you load the first SAV and manually reassign a laborer (or sell the courthouse) in Chunking, corruption is recalculated and you get much higher corruption. This seems to indicate that Civ is storing the corruption amounts in the SAV files.

If anyone is interested in pursuing this in more detail, I can do further experiments or post how to move capitals by using hex editing so further editing can be done oneself.
 
for all these questions "original" refers to the civ that owned the city before exile. Some of them may be obvious but I don't see the answer spelled out in your post. sorry if I'm thick-headed.

  1. Does the exiled city change civs or does it remain owned by the original civ?
  2. What happens to units in the city that belong to the original civ?
  3. Does exiling cause war with or impact diplomatic attitudes of the original civ?
  4. If the original civ is in a state of war with a third civ does sending the government into exile trigger a state of war with the third civ?
 
Good questions, I've answered them to the best of my ability without constructing more test cases tonight.

for all these questions "original" refers to the civ that owned the city before exile. Some of them may be obvious but I don't see the answer spelled out in your post. sorry if I'm thick-headed.

  1. Does the exiled city change civs or does it remain owned by the original civ?


  1. It remains owned by the original civ. So if Poland had an exiled government in London, London would remain a British city (Britain being the 'original' civ).

    [*]What happens to units in the city that belong to the original civ?

    My spies tell me that the units in the city are still there. I've yet to create a test case where it's easy for me to invade the city that hosts a government in exile, but I have no reason to believe the units wouldn't fight at this point.

    [*]Does exiling cause war with or impact diplomatic attitudes of the original civ?

    I doubt the diplomatic system would account for this, but I haven't tested this in particular.

    [*]If the original civ is in a state of war with a third civ does sending the government into exile trigger a state of war with the third civ?

Not sure, as I haven't tested this case. However, I don't think it will have any effect on diplomacy, because you can have your government exiled to a city that belongs to a civilization with whom you are at war.
 
I decided to see if I could add this to the editor today. Initially I'd thought I'd done this via BIQ modification. That was not the case (which also explains why I couldn't find the BIQ files for this). It took awhile to figure out what was going on, so I decided to update the documentation here for the future.

You can do this via editing the save files. To do so, look for the LEAD section in the SAV file in the hex editor. Note that the SAV file must be decompressed; if it is not (by default, only autosaves and not-fully-patched Vanilla games aren't compressed), you can use the BIQ Decompressor to decompress them. Look for the string LEAD (all caps). The first section you find will likely be followed by a low number (31 or less) in hexadecimal. This is a copy of the LEAD from the BIQ, and is not the version you want. The next LEAD will have a much higher number after it in hex, such as 0x159C. This is the LEAD section for the barbarians in the save file. The next one will be for the first non-barbarian player, and the one after that for the second, etc. You want to modify the one for the appropriate civilization.

Once you find the bits you are looking for, they will look something like this:

4C 45 41 44 9C 15 00 00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00

The 4C 45 41 44 9C corresponds to LEAD in ASCII. 0x159C is the length of this LEAD section (remember, the save file is in little-endian format, like the x86 CPU, so you have to reverse the bytes to get it in traditional reading format). 04 is the player in question. 01 is the actual civilization ID (corresponding to the RACE section of the SAV). The next 8 bytes correspond to an unknown variable, and the civ's power. Finally, the last five bytes here, 0x05, is a pointer to the city ID of this player's capital. In this scenario, that started out as 03 00 00 00, and I changed the capital to the 6th city instead.

Normally, this points to one of their cities. However, you can change it to point to any valid city ID, even if it is controlled by someone else. This will move the capital of the civilization in question to that city. After one turn in-game, corruption calculations will reflect that. Thus, you can effectively create a government in exile.

I believe the way I figured out which city had which ID was using the BIC tab of my editor (the first one), exporting the cities, and counting down the list of cities until I found the one I wished to switch it to (using a text editor to search for a recurring header in the resulting file can speed this up a bit). Then convert that number into hex, and plug it in to the appropriate LEAD section in the SAV file using the hex editor. Easy, right? Well, maybe not exactly easy, but at least now it's written up somewhat.

As there is no corresponding place to change this in the BIQ, this functionality won't be coming to the editor in the near future. In the more-distant future, it's possible that it might come as an option to use on new save files (that is, start the game from the BIQ, save it, apply the change to the save file, and reload the save).
 
Maybe that could be used for scenarios. How does the AI behave when its capital city is in enemy hands? For example, what happens when that city is conquered (a) by that civ whose capital it really is or (b) when it is conquered by a third party?
 
Top Bottom