View Full Version : Modding Years per Turn by Era


Tussilago
Jul 20, 2009, 06:53 AM
Hello, sorry if this has been asked before.

The era years per turn on Normal is set up like this, I think:

Early: 40
Classical: 25
Medieval: 10
Renaissance: 5
Industrial: 2
Modern: 1

Would it be possible to make a simple mod whereas the years per turn of different eras are exchanged, like this for instance?

Early: 25
Classical: 10
Medieval: 10
Renaissance: 5
Industrial: 2
Modern: 1

The fact that the game always appear to lag behind historically is my biggest gripe with it (next to the weird religions system). Generally, inventions and cultural institutions that belong in the Classical Era have to wait until medieval times to become realized etc and this issue cannot be fixed by choosing to play Epic or Marathon games, since the designers have destroyed those alternatives by making everything built and researched take forever.

cephalo
Jul 20, 2009, 07:50 AM
There's an XML file that controls this. I *think* it's called EraInfos.xml or somthing.

Tussilago
Jul 20, 2009, 11:46 AM
Thankyou, I'll look into it. Knowing it's likely possible to do this is what's most important.
:)

Tholish
Jul 21, 2009, 06:28 AM
In GlobalDefines you have this. Lets say its set to 0. The real one is -4000

<Define>
<DefineName>START_YEAR</DefineName>
<iDefineIntVal>0</iDefineIntVal>
</Define>


In GameSpeedInfos, you have a bunch of these for each speed. They add up to the total number of turns and years. For simplicity lets say you only have one gamespeed and only one increment.


<GameTurnInfo>
<iMonthIncrement>120</iMonthIncrement>
<iTurnsPerIncrement>100</iTurnsPerIncrement>
</GameTurnInfo>


So, your game will start in year 0 and end in year 1000, lasting 100 turns, each of 10 years.

Now, in EraInfos you have a tag like this for each era. This is the one for Ancient:


<iStartPercent>0</iStartPercent>


This is how far along in the game that era starts. This is important only for custom starts in later eras. So, if for your FirstMillenium mod you set your ClassicalEra to start at 10 percent, your Medieval at 15 percent, your Renaissance at 45 percent, your Industrial at 65 percent, and your modern at 80 percent. So, in this simplified case if you started a custom game in the Industrial that would be the year 650 (turn 65, or 65 percent of the 1000 years of total game time).

In reality it is a bit more complex, you have to mutiply months per increment times increments and add up all of them for a given speed, then find what percent of total game time that is, add it to start year, and thus find out what year a given era will start at on a given speed.

You can manipulate percentage or total number of game turns, but if you manipulate total number of game turns you are going to have to change all the other stuff in gamespeed info, about how fast things build and how fast research proceeds. Be wary of inflation.

Tussilago
Aug 10, 2009, 09:47 AM
In GlobalDefines you have this. Lets say its set to 0. The real one is -4000

<Define>
<DefineName>START_YEAR</DefineName>
<iDefineIntVal>0</iDefineIntVal>
</Define>


In GameSpeedInfos, you have a bunch of these for each speed. They add up to the total number of turns and years. For simplicity lets say you only have one gamespeed and only one increment.


<GameTurnInfo>
<iMonthIncrement>120</iMonthIncrement>
<iTurnsPerIncrement>100</iTurnsPerIncrement>
</GameTurnInfo>


So, your game will start in year 0 and end in year 1000, lasting 100 turns, each of 10 years.

Now, in EraInfos you have a tag like this for each era. This is the one for Ancient:


<iStartPercent>0</iStartPercent>


This is how far along in the game that era starts. This is important only for custom starts in later eras. So, if for your FirstMillenium mod you set your ClassicalEra to start at 10 percent, your Medieval at 15 percent, your Renaissance at 45 percent, your Industrial at 65 percent, and your modern at 80 percent. So, in this simplified case if you started a custom game in the Industrial that would be the year 650 (turn 65, or 65 percent of the 1000 years of total game time).

In reality it is a bit more complex, you have to mutiply months per increment times increments and add up all of them for a given speed, then find what percent of total game time that is, add it to start year, and thus find out what year a given era will start at on a given speed.

You can manipulate percentage or total number of game turns, but if you manipulate total number of game turns you are going to have to change all the other stuff in gamespeed info, about how fast things build and how fast research proceeds. Be wary of inflation.

Wow, talk about complicated. I'm impressed with your modding lore. Will have to chew over this and well digest it. Thanks!
:)