Annex City States

If you liked this item, please rate it up on Steam Workshop page.

Author: Dazz Aephiex

Last revision: 24 May, 2021 at 15:14 UTC

File size: 11.26 KB

On Steam Workshop

Description:

Ever pondered why you cannot just annex your vessel City-States without stomping on your friendship? One Great Merchant that does the job is just not enough? You are at right place.

If you are a Suzerain of a City-State and you have 15 or more Envoys in it, you can directly annex it via a City-State diplomacy button. The AI cannot use this feature. The button replaces the Declare War button.

Technical Details
  • Currently there is no API to transfer a City to another player. The annexation is implemented by destroying the original city and creating a new one with the same name, population, buildings and districts. Thus, the City-State annexed this way cannot be "revived" by liberating the city or targeted by a City-State independence emergency, and is by technical a city you originally found.
  • Another difference with a certain Great Merchant is that, all units of the City-States are preserved and they now serve you. Again, there is no API to transfer units, so they are just killed and new units of the same type of yours just spawn where they were, and all information aside from unit type and position are lost, including XP, promotions, corp / army status, and current HP.
  • My Annex button replaces Declare War button if all conditions are met, rather than being a new button on its own, because otherwise this mod will have to overwrite the whole City-State interaction panel, becoming incompatible with other mods that does so. Let’s say, who conquer a City-State by force when they can just annex it outright at no cost with a single mouse click. Besides, if you truly wish so, you can just make your units attack them and choose declare war in the popup window.

Inspiration
  • At first I tried to make a diplomatic button that does the job, but adding new City-State interaction buttons requires overwriting the entire City-State interaction panel, thus giving up this plan and instead tried to make a spy operation that does the job, only for the game not supporting custom spy operations. Let’s move back to the first plan and what’s worse, the game does not have API for city ownership changing.
  • I nearly gave it up before I saw someone mentioned Tully’s annex city-state mod, but I didn’t find the mentioned mod, nor did I find the mentioned person. I found someone in CivFanatics forum though, who posted some interesting scripts and said he wrote them, but I still don’t find any thread that seem like an annex city-state mod he posted. Finally I gave it a try and subscribed his mod, A Song of Ice and Fire, only for the city-state annexation as a leader’s unique ability, and the so-called Tully’s annex city-state mod is not a thing.
  • I pondered why didn’t he post a mod that solely does the job and nothing else. For what reason, I decided to borrow his code and complete this mod.
  • I later changed how it was implemented. It’s no longer a new button on its own, instead it replaces the Declare War button if all conditions are met. This made this mod compatible even with A Song of Ice and Fire.
  • Since the script isn’t my creation, if the original author calls me to take this mod down, I will take it down and leave it to my private usage.

Quirks
  • Since much is done in an instant, it takes a while for the game to handle the annexation.