DarkScythe
Hunkalicious Holo
- Joined
- May 6, 2014
- Messages
- 804
You could iterate through the players' Cities to figure that one out.
Problem is that City ID's are not unique, and it's dangerous to store their game objects through save games I believe, so your only option then is to manually build an ID through some combination of player ID and city ID, then use string substitution afterward to figure out which city to look for when you go over it again.
I also have no idea if CityConstructed fires when a building is given directly through Lua, although again, when given through Lua you should be able to modify the function to also add pertinent details to the same table.
Problem is that City ID's are not unique, and it's dangerous to store their game objects through save games I believe, so your only option then is to manually build an ID through some combination of player ID and city ID, then use string substitution afterward to figure out which city to look for when you go over it again.
I also have no idea if CityConstructed fires when a building is given directly through Lua, although again, when given through Lua you should be able to modify the function to also add pertinent details to the same table.