Making additions to Armageddon Counter increasing events

ShimonSays

Chieftain
Joined
Mar 27, 2020
Messages
23
Hello, I was wondering just where do I start for adding in more things that increase the armageddon counter? I was hoping to make it so that pillaging city ruins increases the AC more and that pillaging villages/towns also increase the AC similarly.
 
Depending on which action you want to tweak, you'll have to search either in the xml or through python.
In the case of pillaging, you'll need to modify onUnitPillage in CvEventManager.py
 
Depending on which action you want to tweak, you'll have to search either in the xml or through python.
In the case of pillaging, you'll need to modify onUnitPillage in CvEventManager.py
Ok, cool, is the code that changes the AC CyGame().changeGlobalCounter? I think I found the code that seems to alter the AC when certain improvements are destroyed, def onImprovementDestroyed is the right area correct?
 
So something like this should work?

Code:
    def onUnitPillage(self, argsList):

        if iImprovement == gc.getInfoTypeForString('IMPROVEMENT_CITY_RUINS'):
            CyGame().changeGlobalCounter(2)
 
Top Bottom