Task description:
I want to create new civ with UA that will let to save cultural building in captured city.
Problem description:
I want to create list of cultural building in the city before capturing. In this why I will be able to add it later. The problem is how to trigger function just before capturing. I think that I can monitor all move or attack of this civ units but maybe there is some better solution.
Question:
1) How to trigger function before city capturing?
2) Do you know other method to save building in the city captured by given civ?
3) What is name of function that decide to destroy or not to destroy building in captured city? I think that it is core game function but I could be mistaken.
4) Do you have any example of use RunCombatSim event?
EDIT:
I just have found this info:
I think that i can use it. Maybe this even is triggered before building destroying
I want to create new civ with UA that will let to save cultural building in captured city.
Problem description:
I want to create list of cultural building in the city before capturing. In this why I will be able to add it later. The problem is how to trigger function just before capturing. I think that I can monitor all move or attack of this civ units but maybe there is some better solution.
Question:
1) How to trigger function before city capturing?
2) Do you know other method to save building in the city captured by given civ?
3) What is name of function that decide to destroy or not to destroy building in captured city? I think that it is core game function but I could be mistaken.
4) Do you have any example of use RunCombatSim event?
EDIT:
I just have found this info:
I would use Events.SerialEventCityCaptured, which passes: hexPos, playerID, cityID, and newPlayerID.
You can see an example of it in action in CivsAlive.lua in the Mongol Scenario.
I'm not sure if this fires when the capture isn't observed by the player tho, unfortunately some SerialEvents don't.
GameEvents.CityCaptureComplete
http://forums.civfanatics.com/archive/index.php/t-452749.html
I think that i can use it. Maybe this even is triggered before building destroying