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

How to edit congresses?

Discussion in 'Civ4 - Rhye's and Fall of Civilization' started by DrZomboss, Dec 15, 2014.

  1. DrZomboss

    DrZomboss Brrrainz Gourmet

    Joined:
    Mar 21, 2012
    Messages:
    369
    Location:
    Tervuren, Belgium
    This is the question. I've wanted congresses to appear much earlier and tried changing the tech in Congresses.py from con.iNationalism to con.iAlphabet but it doesn't seem to work? Any help?
    Spoiler :
     
  2. wolfigor

    wolfigor Chieftain

    Joined:
    Mar 2, 2006
    Messages:
    1,395
    Location:
    Oslo, Norway
    I haven't read this forum for long time... I see I am a couple of months late in replying to this question.

    If I read the code correctly the appearance of congresses is set to the discovery by anybody of Nationalism.
    The key piece of code is the last of what you posted:

    if (iTech == con.iNationalism):
    self.setCivsWithNationalism(self.getCivsWithNation alism() + 1)


    you could just change the line to record the discovery of any other tech.
    For example:

    if (iTech == con.iCodeOfLaws):
    self.setCivsWithNationalism(self.getCivsWithNation alism() + 1)

    It's not the cleanest way but it should work out (at least for a test): congresses will then start appearing after the discovery of iCodeOfLaws (and after the human player start playing).

    For the list of tech constants, look at the file Const.py where you can find the constants for all other techs.



    If you want to connect the start of congresses to something else (date, turn, build of a wonder, or anything else) then the code will be a bit more complex (not a lot, but obviously more than changing a constant).
     

Share This Page