1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    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

    Mar 21, 2012
    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 Emperor

    Mar 2, 2006
    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