Page 1 of 1

defaults.xml terrain and temperature values?

Posted: Wed Nov 27, 2019 12:12 am
by Fishbreath
I haven't come across a description of what the values for terrain and temperature mean. Is there a key available?

RE: defaults.xml terrain and temperature values?

Posted: Wed Nov 27, 2019 7:02 am
by Veitikka
The values are:

Terrain:
1 Summer
2 Winter
3 Jungle
4 Desert
5 Autumn (late)
6 Barren
7 Spring
8 Autumn (early)

Temperature:
0 Extreme cold
1 Cold
2 Cool
3 Warm
4 Hot
5 Extreme hot

RE: defaults.xml terrain and temperature values?

Posted: Wed Nov 27, 2019 10:37 am
by Fishbreath
Thanks!

Are the day length values assumed to be for the 1st, or for some other point during the month? Does it matter?

RE: defaults.xml terrain and temperature values?

Posted: Fri Nov 29, 2019 6:36 am
by Veitikka
This is how I've calculated them.

1. Go to https://suncalc.org and find your location. For each month, select the 21st day.

2. Copy the 'Dawn', 'Sunrise', and 'Sunset' values. Round them up or down to the closest full minute. Calculate the number of seconds (hours*3600+minutes*60). For example:

Dawn 5:31:24 -> 5:31 -> 19860
Sunrise 6:13:33 -> 6:14 -> 22440
Sunset 18:30:59 -> 18:31 -> 66660

3. Calculate the defaults.xml 'twilightLength', 'dayLength', and 'sunriseTime' values. For example:

twilightLength = Sunrise - Dawn = 2580
dayLength = Sunset - Sunrise = 44220
sunriseTime = Dawn = 19860