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

Modmodding Q&A Thread

Discussion in 'Rhye's and Fall - Dawn of Civilization' started by Leoreth, Dec 14, 2013.

  1. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,101
    Gender:
    Male
    Location:
    Faraway
    Neither. "is" means that it is the same object instance, which is not always the case for instances representing the same player. "==" is not defined for CyPlayer instances so it falls back to "is" as well.

    To answer the question: kTriggeredData.ePlayer already is the player ID you are looking for, there is no need to go from there to CyPlayer first and then back to the player ID. But more generally, you can always get the player ID with CyPlayer.getID.
     
    MacAurther likes this.
  2. MacAurther

    MacAurther Chieftain

    Joined:
    Feb 2, 2013
    Messages:
    27
    Ah, of course! That was pretty silly of me. Thanks, Leoreth! :)

    In the case that I actually do need to go from CyPlayer to player ID, I thank you!
     
    Leoreth likes this.
  3. Cole98

    Cole98 AKA CerebralPolicy

    Joined:
    Feb 10, 2012
    Messages:
    135
    Gender:
    Male
    Location:
    Salmon Arm, Canada
    Will this period condition work?

    Code:
        if iEngland in [iCiv, iOwnerCiv]:
            #if England retains New York and Boston after American Revolution, New England is assigned to Canada
            if city.at(30,48) and city.at(31,50) and (year() < year(1800) and year() != year (1802)):
                setPeriod(iCanada, iPeriodCanadaExpanded)
            else:
                setPeriod(iCanada, -1)
     
  4. Leoreth

    Leoreth Friend Next Door Moderator

    Joined:
    Aug 23, 2009
    Messages:
    35,101
    Gender:
    Male
    Location:
    Faraway
    What event are you handling here?
     
  5. MrFeline

    MrFeline Chieftain

    Joined:
    Sep 9, 2012
    Messages:
    31
    This might be the wrong thread, but I was messing with the Settlermaps file and I foolishly didn't make a backup. Is there a place I could download the correct settlermap file?
     
  6. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,897
    Location:
    The city of the original vlaai
    If you are using git, you can use that to revert your changes.

    If you used the installer, use the link below to get to the online repository with the file set to the state used in version 1.16.3. You can navigate to the settlermaps in there.
    https://github.com/dguenms/Dawn-of-Civilization/tree/v1.16.3
     
  7. Cosmos1985

    Cosmos1985 King

    Joined:
    Sep 20, 2008
    Messages:
    668
    Location:
    Aarhus, Denmark
    How tough is it to change the spawn date of a civ? I mean, one thing is just changing the spawn year, but obviously starting techs and so on would have to be adjusted as well. I'd really love to spawn the Dutch earlier, but even just the basic thing (I thought) of another spawn year - and all other things being the same - I could'nt get to work. After changing the spawn year in the files I now get a "you have been defeated" popup when loading the map as them. Anyone has experience with this, who might be able to help?

    Do note, I am one step above complete moron when it comes to modding and changing files :shifty:
     
  8. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,897
    Location:
    The city of the original vlaai
    IIRC you must also edit the "lCivOrder" list in consts.py. The civs are ordered chronologically in this list. Make sure that this list matches the new Dutch spawn year. It is the first list in consts.py, so it should be easy to find.

    It is possible that some more changes are required though. It has been a while since I changed some civ spawning.
     

Share This Page