1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    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,379
    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