So, I have a small problem, and no real clue where I should look at, so I hope that somebody has maybe an idea or a small hint.
I've been working on a small mod component.
As a part, it includes a victory, for which you have to destroy a civ.
The function to trigger the victory is run after a city has been captured, and looks if the desired civilization is dead or not. In case it's dead, the victory is triggered.
At first, I put the code in Python after onCityAcquired. The result: Interface locks up, and the game partially freezes. The victory is triggered, but I don't get the popup which tells me my victory. Neither I get the regular popup, which asks me if I want to keep or raze the city. My suspicion: The popups (or the lacking answer to one of them or both) somehow interfere with each other, and neither works.
-> I moved the code after onCityAcquiredAndKept and onCityRazed. That works. Besides for auto razing. In that case I get the same behaviour like before, the interface locks up.
Now my suspicion is again, that due to some hack there should be somehow also a popup, but the Firaxians supressed it, and this causes now somehow problems.
It would be good to know if someone could give me an insight into that, or at least an idea where else I could look in the files to see anything regarding that.
And in case this doesn't work: Does anyone know under which circumstances onCityLost is triggered? Because I guess I could move the code else to this part.
I've been working on a small mod component.
As a part, it includes a victory, for which you have to destroy a civ.
The function to trigger the victory is run after a city has been captured, and looks if the desired civilization is dead or not. In case it's dead, the victory is triggered.
At first, I put the code in Python after onCityAcquired. The result: Interface locks up, and the game partially freezes. The victory is triggered, but I don't get the popup which tells me my victory. Neither I get the regular popup, which asks me if I want to keep or raze the city. My suspicion: The popups (or the lacking answer to one of them or both) somehow interfere with each other, and neither works.
-> I moved the code after onCityAcquiredAndKept and onCityRazed. That works. Besides for auto razing. In that case I get the same behaviour like before, the interface locks up.
Now my suspicion is again, that due to some hack there should be somehow also a popup, but the Firaxians supressed it, and this causes now somehow problems.
It would be good to know if someone could give me an insight into that, or at least an idea where else I could look in the files to see anything regarding that.
And in case this doesn't work: Does anyone know under which circumstances onCityLost is triggered? Because I guess I could move the code else to this part.