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

Technical documentation

Discussion in 'Rhye's and Fall: The Sword of Islam' started by embryodead, Jun 28, 2011.

  1. Linkman226

    Linkman226 #anarchy

    Joined:
    Sep 14, 2007
    Messages:
    2,493
    Edead, does your setFlag method used in DynamicCivs.py also change the flag wielded by units? It doesn't seem to in my mod, and I believe I transferred everything correctly.
     
  2. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Yes, but the effect is not visible immediately, which is why it isn't used to switch flags during gameplay. Despite using all the "dirty" calls like setFlagDirty, the flag updates if it's under fog of war, or after you reload a savegame.
     
  3. Linkman226

    Linkman226 #anarchy

    Joined:
    Sep 14, 2007
    Messages:
    2,493
    It isn't used to switch flags during gameplay? I don't see that anywhere in the code, it just says to switch the flag...
     
  4. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    You said it doesn't work for you and I'm saying why. Let me rephrase it - it doesn't work for flags of already rendered units. SoI only changes flags of dead civs, which have no units.
     
  5. Linkman226

    Linkman226 #anarchy

    Joined:
    Sep 14, 2007
    Messages:
    2,493
    Ah I see. Thanks.
     
  6. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    For some reason, the region map gets screwed up and it gets compiled with the SoI map, even though I have my own region map that compiled just fine until I replaced Yemen with my own civ, and the SoI map is nowhere to be found in the code. I think the city art map is having issues also. Any ideas on what might be causing this? :confused:
     
  7. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    Please explain what are you doing. Did you use SoI as a base, replaced something, etc.? I simply don't understand the above sentence at all.
     
  8. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    Yeah, I'm using it as a base. My plan has been to simply replace the names of the civs in the DLL, for the moment. I'm also adding the leaderheads as I go, along with changing the names in the XML and python. Basically I'm just replacing one civ at a time.

    For some reason, my own region and city art maps aren't showing up correctly anymore, but the city names map I made still works. I recognized some of the region shapes to be from SoI, hence my confusion. I think the city art map is completely garbled, though.

    At first I thought it had to do with adding Yemen specifically, but I replaced a few more civs and had no extra trouble.

    What I don't understand is why it's not using the maps that I put in CvRhyes...
     
  9. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    OK, well, sorry if the question is too basic, but, did you actually compile & copy the DLL? City maps are in Python so changing them gives instant results, whereas changing CvRhyes does nothing until the DLL is rebuilt. The files in CvGameCoreDLL folder aren't used by the game.
     
  10. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    Yup. It generally works fine other than that (and the numerous bugs I've managed to accumulate lol).

    I forgot about that, makes sense :hammer2:
     
  11. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    If you got rid of SoI's maps from CvRhyes, recompiled the DLL, then there's simply no way for the provinces/city art maps come from SoI. Double check if the DLL you are using is the one you've just built etc.

    If the maps are completely garbled, make sure they match the actual map size. If the map is 100x60, arrays has to be 100x60 as well etc.

    Make sure you haven't copy'n'pasted something in the wrong place, like pasting region map in province map or settlers' map place. That could give the results you've described as well.
     
  12. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    I know it sounds bizzare, but the regions and city art maps worked fine up until I switched out Yemen. I did add text keys for the civs that replaced Malwa and Buyids though...
     
  13. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    In such cases you're kind of left with revert and repeat. If you can't, you've just learned why you need version control even for one-man projects ;)
     
  14. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    Apparently, the SDK was the one thing I didn't back up. Frick. I did the maps in excel, based on yours, though, so I didn't really lose that much. It shouldn't be too bad to fix, but :wallbash:

    Any idea when SoI .3.6 will come out? I don't want to make too many changes and then my SDK becomes obsolete...
     
  15. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    There are updates on SVN, but the public release of 0.4 is planned for December.
     
  16. hangman

    hangman almost-scientist

    Joined:
    Dec 31, 2010
    Messages:
    776
    Location:
    New Yoronavirus
    Alright, got it back to working without having to revert :)

    Turns out I had changed the number of civs to 40 and didn't add to the entries in CvRhyes.
     
  17. blizzrd

    blizzrd Micromanager

    Joined:
    Dec 27, 2005
    Messages:
    3,738
    Location:
    Melbourne, Australia
    Yay! Looking forward to it.
     
  18. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,038
    Location:
    Toronto
    I'm also working on a SoI conversion and right now I'm trying to change the start date of the mod to 300BC and the start dates of the civs. here's what I've changed, starting from regular SoI:

    Spoiler :
    changed start date in WB to -300

    changed starting years in CvRhyes and recompiled

    changed tBirth in Consts.py

    in line 540 of RiseAndFall.py, changed a "> 0" to "!= 0"


    everything works* except that if you play as a civ that starts after the 1st turn but before 0 BC/AD, you are defeated on the 1st turn.

    *
    Spoiler :
    everything works means you can play as any of the civs that start on the first turn or any that start after 0 BC/AD and also the post-start, pre-zero civs spawn correctly and you can switch to them as normal.

    for the record, these are the spawn years:
    byantines, makurian, abbasids, chauhan, malwa, samanids, armenia, yemen, buyids, gujarat 300BC, ghaznavids 270BC, fatimids 260BC, sindh 230BC, georgia 220BC, seljuks 170BC, turks 80BC, khwarezm 30BC, antioch 50AD, outremer 100AD, zengids 200AD, ghorids 225AD, oman 250AD, ayyubid 270AD, mamluks 320AD, ottoman 500AD, bahmanid 550AD, timurids 600AD, akkoyunlu 620AD, safavid 630AD, portugal 700AD, mughal 710AD
     
  19. embryodead

    embryodead Caliph

    Joined:
    Jan 1, 2003
    Messages:
    5,179
    Location:
    basement
    1. Change iStartYear in Consts.py to -300 if you didn't already

    2. In RiseAndFall.py -> createEarlyStartingUnits
    Update this part in the same way you did before, i.e. change > to !=
    Code:
    if tBirth[iHuman] > 0:
    There could be more, but it looks pt. 2 is at fault

    I'll update it accordingly since there's no good reason to use > instead of !=
     
  20. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,210
    Gender:
    Male
    Location:
    Canada
    I've added a couple extra Leaderheads, but I was wondering how I make them appear in-game at a certain date?

    Also I thought I added the civilopedia entry for one of the LH's into CIV4GameText_MEM_Civilizations.xml, but nothing appears in the in-game civilopedia...
     

Share This Page