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

[CNM] A python question...

Discussion in 'Civ4 - Rhye's and Fall of Civilization' started by BenZL43, Oct 4, 2011.

  1. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    Hi all :)
    Wanna ask about this python code in the community-edit CNM..
    (The one that usi add era-based CNM)

    Spoiler :

    if (iOwner == iJapan):
    cityName = tCityMap_J[gc.getPlayer(iOwner).getCurrentEra() - 1][67-city.getY()][city.getX()]


    On this code,
    Do the Japanese only look this code only when about to found a new city, or at any era change, it'll change?

    For Example

    Japan built Edo at Renaissance Era.
    Does it turn to Toukyou at Industrial Era, or they keep Edo as it is?
     
  2. Leoreth

    Leoreth 古典部の会員 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,460
    Gender:
    Male
    Location:
    Kamiyama
    Hard to say without the context of the rest of the file, but it looks as if there's a city name map for every era now, and this bit of code only looks into the right one every time a city is founded. That can't influence how the city is renamed later on.

    So applying your scenario, the Edo plot would contain "Edo" in the medieval city name map, but "Toukyou" in the modern map, however, if you found a city there in the medieval era it's called "Edo" and stays that way unless there are other mechanics that take care of it. In Rhye's CNM, this is achieved by the "onTechDiscovered" method.
     
  3. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    Hmm..
    Thanks

    Without using the onTechDiscovered or similar method,
    Can it be modified to include change to city name according to era?
     
  4. Leoreth

    Leoreth 古典部の会員 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,460
    Gender:
    Male
    Location:
    Kamiyama
    Well I don't know how the files you're using works. But if you want to have something based on era, onTechAcquired is usually the way to go (because you can only advance in era via techs).
     
  5. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    Okay then.
    Thanks for the info ;)
     

Share This Page