How to make a pre 600AD civ spawn in the 600AD scenario?

Bonci

King
Joined
Oct 22, 2005
Messages
799
Location
Tridentum - Italia
I'm trying to make Rome spawn after 600AD but when I start the game i lose at the first turn...for the normal 3000BC scenario I don't get errors...
I changed all the possible in consts.py and i compiled a new DLL with the changed spawn date...
Now I'm scanning the code of Riseandfall.py but i can't find where the problem is...
the only thing I found is this:
Code:
                if (gc.getPlayer(0).isPlayable()):
                        iFirstSpawn = iGreece
                else:
                        iFirstSpawn = iKhmer
                for iLoopCiv in range(iFirstSpawn, iNumMajorPlayers):
                        if (iGameTurn >= con.tBirth[iLoopCiv] - 2 and iGameTurn <= con.tBirth[iLoopCiv] + 6):
                                self.initBirth(iGameTurn, con.tBirth[iLoopCiv], iLoopCiv)
does it mean that I have to give rome a new id bigger than the khmer one? or is there a simpler way?

Thanks in advance for your answers and sorry for my bad english *_*
 
I also noticed that when I start a 3000BC game with the changed start date I get all the "A new civ is born" popups after the former roman spawn date
 
I wouldn't know anything about the subject at hand, but I know that others have successfully changed spawn dates. The lack of responses could indicate that it would be nigh impossible to know what the problem is given the sparse information presented. So I suggest you post all of the code concerning the new spawn date with your edits clearly marked. This way the folks who do know how to achieve what your trying to do would be able to pinpoint the cause of your problem.

Just a suggestion. And good luck! :goodjob:
 
Do you want to spawn these civs after 600 AD, or have them on the board at 600 AD?

If it's the latter, look at what's done for China and Japan; the civ needs to have units in the WB save, they need to be set to playable in that save, and they need to be given techs in the 600 AD start.
If it's the former, you need to set the civ playable in the WB save, and you need entirely new code that can handle two different spawn dates. The best way to handle this somewhere is to create a function somewhere (suggested name: something like getBirthTurn) and replace all references to tBirth with calls to that function. Also, you'll want to give the civs different starting techs in the two scenarios, so the tech-granting code in RiseAndFall needs to be aware of that.
 
but I know that others have successfully changed spawn dates.
As far as I know no one has removed a civ from the 3000BC and spawned it after 600AD (koreans and celts spawn before 600AD and for byzantium they created a new scenario) or am I missing something? :confused:

So I suggest you post all of the code concerning the new spawn date with your edits clearly marked.
mmm then I'll try to add some information as soon as possible

And good luck!
thank you :)

Do you want to spawn these civs after 600 AD, or have them on the board at 600 AD?
I want to spawn the civ after 600AD but i don't care if it can spawn in the 3000BC too (i'm going to remove that scenario to prevent a world without the Roman civilization O_O)
is there somewhere a function or a code line that i can change to set a civ playable in the 600AD scenario?
I found only this but i already changed it
Code:
tIsActiveOnLateStart = 
(0,0,1,0,0,0,0,1(this is for Rome),1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)

the fact is that i can start a game with rome in the 600AD scenario (so the wb save is set) but i lose immediately
 
The actual spawn turn also has to be changed in the DLL, the required code is in CvRhyes.cpp.

You should also change the Roman faction's "isPlayable" tag to 1 in the world builder save.

Aside from that, I don't know which other parts of the code have to be thought of.
 
I didn't test it, but did you try something like that:
Code:
                if (gc.getPlayer(0).isPlayable()):
                        iFirstSpawn = iGreece
                else:
                        iFirstSpawn = iKhmer
                for iLoopCiv in range(iFirstSpawn, iNumMajorPlayers):
                        if (iGameTurn >= con.tBirth[iLoopCiv] - 2 and iGameTurn <= con.tBirth[iLoopCiv] + 6):
                                self.initBirth(iGameTurn, con.tBirth[iLoopCiv], iLoopCiv)
                [COLOR="Red"]if (not gc.getPlayer(0).isPlayable()):
                        if (iGameTurn >= con.tBirth[iRome] - 2 and iGameTurn <= con.tBirth[iRome] + 6):
                                self.initBirth(iGameTurn, con.tBirth[iRome], iRome)[/COLOR]
It should run "initBirth" for Rome in the late start, then. Theoretically *g*
 
I tryed your suggestion Leoreth but it doesn't work :(

So I'm going to post what i exactly changed in the code
In CvRhyes.cpp
Code:
int startingTurn[27] = {0, 0, 0, 0, 50, 84, 86, 371 (here for rome), 97, 121, 145, 177, 183, 187, 193, 196, 203, 205, 207, 213, 220, 234, 236, 240, 241, 249, 346}; //332 for 1733
for the DLL

then in Consts.py
Code:
tBirth = (
0, #3000BC
0, #3000BC
0, #3000BC
0, #3000BC
50, #1600BC
84, #844BC
86, #814BC
371, #Rome
97, #660BC
121, #300BC
145, #60AD
177, #551AD
183, #622AD
187, #657AD
193, #718AD
196, #751AD
203, #829AD
205, #843AD
207, #860AD
213, #922AD
220, #989AD
234, #1128AD
236, #1150AD
240, #1190AD
241, #1195AD
249, #1280AD (1071AD)
346, #1775AD #332 for 1733AD
0,
0,
0,
0,
0)
for the spawn year and
Code:
tIsActiveOnLateStart = (
0, 
0,
1,
0,
0,
0,
0,
1,#Rome
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1)
to enable Rome in the 600AD scenario

in the wbs :
Code:
BeginPlayer
	LeaderType=LEADER_AUGUSTUS
	CivType=CIVILIZATION_ROME                 
	Team=7                 
	PlayableCiv=1               
	Handicap=HANDICAP_PRINCE                 
EndPlayer

I also edited other parts but i don't think they can have any impact...
 
I also edited other parts but i don't think they can have any impact...
I believe the word "think" is key here.

I might not know anything about the subject at hand, but I know from experience that its the thing you don't think could possibly be the culprit that in the end will be the cause of the problem. (Something similar actually happened to me over the weekend. I ended up spending my entire Saturday debugging and my entire Sunday rewriting code. :rolleyes: I haven't had time yet to check if my code will even work. :p)

So if no one can point out the problem based on the information you've supplied, I suggest you start fresh (but save your current work, obviously) and only focus on getting this one single issue straightened out. And only when you've succeeded, add those other changes one at the time.

I realize I'm suggesting you redo all of your work, but chances are that you will not only solve your problem, but also reveal the mystery of why it didn't work the first time. There could be a valuable lesson in there for you - and us - to learn.
 
So if no one can point out the problem based on the information you've supplied, I suggest you start fresh

I've done how you suggested and now i have only the changes listed above...but the result is the same :sad:
sadly at the moment i have no time to spend on this so i think that i'm going to abandon the project (for time reasons and because if someone :mischief: is going to mod a civ spam my mod would become useless :p)

I'm also staring at your avatar :eek: :love:
 
I've done how you suggested and now i have only the changes listed above...but the result is the same :sad:
Ok, then it wasn't any of the other code. Too bad I can't help you with this. :(

sadly at the moment i have no time to spend on this so i think that i'm going to abandon the project (for time reasons and because if someone :mischief: is going to mod a civ spam my mod would become useless :p)
Oh, don't count on any Civ spam modmod any time soon. Unless someone else takes the initiative, that is... :p

I'm also staring at your avatar :eek: :love:
:lol: If you wanna see more, click on the link in my current signature, below. :goodjob:

(I know, Lena is adorable. Make sure to spread the love - its a viral thing.)
 
I also must admit that your posts are even better with the new avatar :love:
 
Enjoy it while it lasts. :D

My avatar is showing where my mind is at the moment. Before I was focusing on making a Russia mod-scenario and that would explain the Kremlin avatar (or Saint Basil's Cathedral as I've renamed it). I think it will be one of the UHV requirements for Russia - or it will have something to do with the new Russian UP. I'm not working on it currently, though.

And right now I'm gearing up for the madness that is the annual Eurovision Song Contest, and as you might expect I have a favorite! :D (Last year it was Regina from B&H and the year before it was Vânia Fernandes from Portugal.) Actually, it was love at first sight as I knew the song was a winner the moment I heard the first few beats. Well, hopefully next years host city will be Berlin (or Hanover?)!
 
Well, as Lower-Saxonian patriot, I'd favor Hannover, but it's going to be Berlin, I think :)
 
Top Bottom