No Annexing Puppet Cities

Chrisy15

Flower, Beautiful
Joined
Jul 9, 2015
Messages
2,137
Hi, I've been making a Civ, but I've run into an issue.
Part of my civ's UA is that they found puppet cities, and I was wanting to make it so that these cannot be annexed which I assumed that I could do with Firaxis' <NoAnnexing> tag. And so, I used CL's Austrailia code to make the civ found puppet cities... but then I found that <NoAnnexing> also prevents settlers from founding cities. Therefore, does anyone know a way that I can block players from annexing puppet cities (or even better, only blocking the annexation of puppets that the civ has founded, and so captured cities can still be annexed). Thanks in advance.
 
http://steamcommunity.com/sharedfiles/filedetails/?id=533734169
You can look at the code from my most recent Civ which founds puppet cities (even the capital) and keeps them that way until certain conditions are met. But be warned, the Civ's Lua is an ~1800 line monstrosity. Doing a trait like this without a DLL mod isn't for the faint of heart.

The gist of it is:
  • You will want to make two dummy technologies and set them as PrereqTech and ObsoleteTech for your civ's trait
  • You will need code to grant your Civ the ObsoleteTech when the player has a Settler selected, or when an AI player of the Civ has a living Settler unit, and remove it and grant the PrereqTech in any other instance
  • Probably a good idea to make sure that AnnexCityPopup.lua is caught and killed when the player is playing the Civ. There is code in my Neptune civ for how to do this.
 
Yeah, maybe not then. I've decided that it doesn't play very well anyway, and so I'll just stick with them founding puppets. Thanks for the help, though. Hopefully it'll help someone.
 
Back
Top Bottom