A_Wandering_Man
Chieftain
I'm currently theory-crafting a new mod wherein I'd like the UA to trigger off of a city being puppeted after being captured. I think I know how to do the "back-end" of this; implementing the effect through a dummy policy or dummy building, since I've done that a few times before, but I'm not sure how I would go about writing the Lua to check for when this happens. I've been looking through the API and it seems like there's something called
...which seems to be close to what I'm looking for.
I'm wondering if anyone knows if:
1) this event triggers before or after the player/AI chooses to annex/raze/puppet a city?
2) this could be combined with "City.IsPuppet" in some way to get the effect I desire?
Alternatively, would it be possible to check when "City.SetPuppet" is used, and trigger the event off that (presumably also using something to check that it's the correct player)?
Code:
GameEvents.CityCaptureComplete
I'm wondering if anyone knows if:
1) this event triggers before or after the player/AI chooses to annex/raze/puppet a city?
2) this could be combined with "City.IsPuppet" in some way to get the effect I desire?
Alternatively, would it be possible to check when "City.SetPuppet" is used, and trigger the event off that (presumably also using something to check that it's the correct player)?