1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Making additions to Armageddon Counter increasing events

Discussion in 'Civ4 - Fall from Heaven' started by ShimonSays, Sep 22, 2020.

  1. ShimonSays

    ShimonSays Chieftain

    Joined:
    Mar 27, 2020
    Messages:
    14
    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.
     
  2. black_imperator

    black_imperator Emperor

    Joined:
    Dec 4, 2005
    Messages:
    1,706
    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
     
  3. ShimonSays

    ShimonSays Chieftain

    Joined:
    Mar 27, 2020
    Messages:
    14
    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?
     
  4. black_imperator

    black_imperator Emperor

    Joined:
    Dec 4, 2005
    Messages:
    1,706
    yes, it's correct, though the onImprovementDestroyed will launch each time an improvement is destroyed, regardless of the reason ( so, not only during pillages)
     
  5. ShimonSays

    ShimonSays Chieftain

    Joined:
    Mar 27, 2020
    Messages:
    14
    So something like this should work?

    Code:
        def onUnitPillage(self, argsList):
    
            if iImprovement == gc.getInfoTypeForString('IMPROVEMENT_CITY_RUINS'):
                CyGame().changeGlobalCounter(2)
     
  6. black_imperator

    black_imperator Emperor

    Joined:
    Dec 4, 2005
    Messages:
    1,706
    yeah, that should work
     

Share This Page