I'll combine the modders information about the new climate system with the answers to Valkrionns questions.
I had been planning on waiting to merge until you released the new system (suppose I should have stuck to that plan...), but I need it to implement the White Hand religion.
Took me long enough to finally implement it. Hope we get the kinks out fast. A White Hand religion sounds really interesting. At the moment climateforming is a civilization dependent feature only, but it should be easy enough to link it to a religion.
A few questions about the system... How close is it to the chart you had posted a while back? And how easy is it to add a new terrain type to the chart?
I decided the system was to complex with three variables, so I cut it down to two: Temperature and Humidity. Here is the new chart:
The
default entries are the start temperatures and humidities I assign to all plots matching the criteria for a certain terrain class before the beginning of a game. Currently each climate matches a particular terrain class, but this doesn't have to be this way. There could be two or more temperate climates for example, with both having the grass terrain class as their typical terrain class.
To add a new climate is easy. You only have to take care there are absolutey no overlappings with other climates. Personally I'm thinking about splitting the Arid climate in two: Cold Arid and Hot Arid. I'll us this as an example further below.
Need to set at least one value to Wasteland, for the D'tesh.
Is Wasteland a kind of Hell Terrain? Or a totally new kind of Terrain?
------------
New XML Files:
1. CIV4TerrainClassInfos.xml:
Here is an example for an entry in there: The default temperature and humidity values I've mentioned already and the natural and hell terrain tag are there to help me keep track of terrains belonging together in an easy way. There is also a new terrain class tag in CIV4TerrainInfos.xml telling each terrain whic terrain class it belongs to.
Code:
<TerrainClassInfo>
<Type>TERRAINCLASS_DESERT</Type>
<iDefaultTemperature>4</iDefaultTemperature>
<iDefaultHumidity>0</iDefaultHumidity>
<NaturalTerrain>TERRAIN_DESERT</NaturalTerrain>
<HellTerrain>TERRAIN_BURNING_SANDS</HellTerrain>
</TerrainClassInfo>
The default temperature and humidity values I've mentioned already and the natural and hell terrain tag are there to help me keep track of terrains belonging together in an easy way. There is also a new terrain class tag in CIV4TerrainInfos.xml telling each terrain which terrain class it belongs to.
2. CIV4ClimateZoneInfos.xml:
An entry in there might look like this one for an arid climate:
Code:
<ClimateZoneInfo>
<Type>CLIMATEZONE_ARID</Type>
<Description>TXT_KEY_CLIMATEZONE_ARID</Description>
<iMaxHumidity>0</iMaxHumidity>
<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
<ClimateZoneInfo>
- <Type>: unique climate id string
- <Description>: informal climate name
- <iMinTemperature>: lower temperature limit for climate (defaults to -∞

- <iMaxTemperature>: upper temperature limit for climate (defaults to +∞

- <iMinHumidity>: lower humidty limit for climate (defaults to -∞

- <iMaxHumidity>: upper limit for climate (defaults to +∞

- <bOceanicClimate>: true if climate is valid for water plots only (defaults to false, which means land plots only)
- <TerrainClass>: the typical terrain class for this climate
If a plot's climate has to change, because the plot's temperature or humidty doesn't match the old climate any more for some reason the plot's terrain will change too, if the new climate, which matches the new temperature and humidity, is linked to another terrain class than the previous climate.
Example: Say you want to split the Arid climate into Cold Arid and Hot Arid. the two new climates should look like this then:
Code:
<ClimateZoneInfo>
<Type>CLIMATEZONE_COLD_ARID</Type>
<Description>TXT_KEY_CLIMATEZONE_COLD_ARID</Description>
[COLOR="Blue"]<iMaxTemperature>3</iMaxTemperature>[/COLOR]
<iMaxHumidity>0</iMaxHumidity>
<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
</ClimateZoneInfo>
<ClimateZoneInfo>
<Type>CLIMATEZONE_HOT_ARID</Type>
<Description>TXT_KEY_CLIMATEZONE_HOT_ARID</Description>
[COLOR="Blue"]<iMinTemperature>4</iMinTemperature>[/COLOR]
<iMaxHumidity>0</iMaxHumidity>
<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
</ClimateZoneInfo>
Be careful not to create gaps or overlappings between climates. It will break the system. Use a matrix like and draw your plans to be on the save side.
New Tags in other XML files:
1. CIV4TerrainInfos.xml:
- <TerrainClass>: the Terrain Class this Terrain belongs to
2. CIV4CivilizationInfos.xml:
- <FormClimateZoneType>: defines which climate the territory of this civ will turn into over time as long as they keep this territory
Global Defines:
TEMPERATURE_THRESHOLD and HUMIDITY_THRESHOLD: define how many turns are necessary to change a plot's temperature and/or humidity by one point on standard speed. Currently set to 10. Scales with game speed.
Python:
There is a function available called
onClimateChange which will be called each time a climate changes to another climate in the file
CvFlavourInterface.py. I'm using it for transforming the plot features according to the new Climate, but you can essentially use it for anything you want to happen after a climate change.
Things one could do with this: (with and without some more additions)
- No explicit Terrain changes via spell etc necessary any more. Just change "blindly" the temperature or humidity of a plot and let the climate system decide what we get. Example: Scorch could increase the temperature permanently one point instead of explicitly encoding what happens to which terrain.
- Other civs besides the Illians climateforming their territory. Malakim to Hot Arid for example. (Valkrionn)
- A religion changing the climate of a civs territory. (Valkrionn)
- Dynamically changing polar ice caps or sheets of ice in Illian waters by using the temperatures assigned to ocean plots for this.
- Slowly bringing back the winter. There is no need to restrict climate changes to owned territory.
Any questions?