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

How to: Change a 3000BC civ's start date in RFC

Discussion in 'Rhye's and Fall Modmods' started by srpt, Jan 24, 2011.

  1. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,025
    Location:
    Toronto
    I'm working on a RFC modmod with a historical accuracy theme. One of my first ideas was to move the Indian start date forward to about 2000-1500 BC to reflect the start of the Vedic/Aryan civilization. This turned out to be quite involved, with changes made to the python, WBS (worldbuilder save) and C++ /DLL. Thanks to Asaf, embryodead and Jarkov, I eventually succeeded. Here's what I did: (note in this example the Indian spawn is changed to 2250 BC, I can't remember why I chose that date, but it does make one more change necessary since they become the 1st new civ to spawn after the game start. Also note that I made this change for the 3000 BC only scenario and I started from an unmodded RFCEpic/Marathon copy)



    1. Python changes.

    Code:
    In Assets/Python/Consts:
    
    line 166: tBirth for India changed from "-3000" to "-2250"
    
    Code:
    In Assets/Python/RiseAndFall:
    
    line 733 change:
    
    iFirstSpawn = iGreece
    
    to:
    
    iFirstSpawn = iIndia
    
    line 2627 add:
    
    if (iCiv == iIndia):
    	utils.makeUnit(con.iSettler, iCiv, tPlot, 2)
    	utils.makeUnit(con.iArcher, iCiv, tPlot, 2)
    	utils.makeUnit(con.iChariot, iCiv, tPlot, 2)
    
    lines 2996-7 (after the above change is made) remove:
    
    utils.makeUnit(iSettler, iIndia, tCapitals[iIndia], 1)
    utils.makeUnit(iWarrior, iIndia, tCapitals[iIndia], 1)
    
    line 3002 (after the above changes are made) add:
    
    if ( pIndia.isHuman() ):
    	utils.makeUnit(iSettler, iIndia, tCapitals[iIndia], 1)
    	utils.makeUnit(iScout, iIndia, tCapitals[iIndia], 1)


    2. WBS changes. (note these changes are made by opening the WBS with a text editor)

    Code:
    delete lines 32-33, the Indian team reference.
    

    3. C++/DLL changes

    First you need to be able to compile the C++ files into a new DLL. Thankfully there's a great up-to-date method from Asaf here: http://forums.civfanatics.com/showthread.php?t=405444 . It worked for me the first time I tried it, after many failures with older tutorials. Once you have the compiler working, make the following changes in the C++ files:

    Code:
    In CvGameCoreDLL/CvRhyes:
    
    line 13:
    
    startingTurnYear for India changed to -2250
    
    lines 16-21: other changes to make the scenario launcher display the correct starting date and estimated loading time, hard to describe but easy to figure out by looking at it.
    Code:
    In CvGame:
    
    line 2233:
    
    move "case INDIA:" down below all the civs with "break;" after them, just above Greece, and delete the "break;" line following it
    After making these changes, recompile the DLL.

    And thats it. I hope this was relatively clear. Please let me know if you have problems with it. Also as you can see I have not posted much and don't know much about forum protocols and such so I hope I'm posting this properly and in the right place. Apologies if I'm not.
     
  2. J. pride

    J. pride Chieftain

    Joined:
    Feb 23, 2011
    Messages:
    788
    Did u know how to change their spawn location??
     
  3. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,025
    Location:
    Toronto
    thats much easier. everything is in Consts.py.

    tCapitals, lines 442 and after, defines the spawn location and tCoreAreas, lines 512 and after, defines the flip zone. as long as you only make minor changes you don't have to worry about changing anything else
     
  4. J. pride

    J. pride Chieftain

    Joined:
    Feb 23, 2011
    Messages:
    788
    Im guessing that u have changed the Indian spawn date but have u changed theur location

    Thnx for the help:hatsoff:
     
  5. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,025
    Location:
    Toronto
    yes I moved them to the Patliputra area but my India map is also different, with more plains and forest and less jungle, so its a better starting location than it would be on a regular RFC map.
     
  6. J. pride

    J. pride Chieftain

    Joined:
    Feb 23, 2011
    Messages:
    788
    How did that turn out for u??

    And can u update those files Plz? (the most i ever modded was change city names)

    Plus im sure that these files wud be helpful in other mods too
     

Share This Page