changing civ birthdates

srpt

Deist
Joined
May 10, 2010
Messages
2,038
Location
Toronto
I'm working on a mod of RFC and I want to move the Indian start date forward to some time around 2000-1500BC. I've made changes in RiseAndFall.py and Consts.py and when Indian is AI-controlled everything works fine but when I try to play them myself the "autoplay turns remaining" screen comes up and sticks on the first turn. I can get out of that by opening and closing an advisor screen, but then I'm defeated and the game ends, presumably because I have no units or cities. I also found a reference to start turns in CvRhyes in the CvGameCoreDLL folder and changed that but it did not fix the problem. Can anyone tell me what else I need to change?
 
Starting turns in CvRhyes need updating, that is correct, but CvGameCoreDLL folder contains C++ sources of the DLL, they do nothing on their own. In order for the changes there to take effect you need to run a compiler and rebuild the DLL.

Here's a tutorial on how to setup the SDK needed to build a new DLL: http://modiki.civfanatics.com/index.php/How_to_Install_the_SDK

EDIT: If you have problems finding Visual Studio 2008, try this (it's just the installer, download is free from Microsoft).
 
Okay my dll is compiling just fine now thanks to Afar but I'm still getting the same problem, ie the later Indian start works for the AI but a human player is defeated on the first turn as the auto-play does not run. I changed everything that seemed relevant in CvRhyes. What else do I need to do to make the auto-play work?
 
You have to make another change in the DLL. There is a file called CvGame.cpp , where you can find a switch for each civ. (line 2228)

Here you will find the line:

case INDIA:
break;

you will have to delete the "break;", as this should only be there for civs that exist at the beginning of the scenario.
 
I made that change and the auto-play still does not run. I've compared my source files to other mods and can't see the problem. It does know there are 25 auto-turns to go.
 
Have you assigned some starting units to India in case it's human in RiseAndFall.py? And have you changed the WBS?
 
for the record, these are the changes I've made, starting with a fresh copy of RFCMarathon:

in Python/Conts: line 166 civ birth date changed to -2250

in Python/RiseAndFall: line 733 iFirstSpawn = India

in CvGameCoreDLL/CvRhyes: line 13 int startingTurnYear changed to -2250 plus changes in lines 16-21

in CvGameCoreDLL/CvGame: line 2233 deleted "break;" after India


the section in RiseAndFall "def create4000BCstartingunits" (line 2987) is confusing to me since the units it lists are not the ones that appear in the game.

I'm not sure what changes I need to make to the WBS file.

Thanks again
 
The units listed in "def create4000BCstartingunits" are never seen in the game, but they have to be there, or you'll get instantly killed. It doesn't really matter which unit you assign, just look at the other civs there.

In the WBS, you need to delete the entry of the Indian player in the "BeginTeam/EndTeam" sections. As Ashoka is the second one, you have to delete this whole entry:

BeginTeam
Tech=TECH_MYSTICISM
Tech=TECH_MINING
EndTeam

and add

BeginTeam
EndTeam

where he comes now. If you didn't change his position, just delete everything between BeginTeam and EndTeam.
 
Now it is giving me the 4000BC units on turn zero. I have left India where it is in the sequence of civs, is that ok?
 
You have to change its position at least in CvGame.cpp, because if it now just says

case INDIA:
case BABYLONIA:
break;

or something similar, it will just do what the entry below it does. You have to position India somewhere else, where it does what every civ that spawns later than at the beginning does.
 
Thanks it works now. Very satisfying I've been trying to get that change in for months. Perhaps I should write it up as an instruction?
 
Back
Top Bottom