Repository navigation
Weather and Time
A production line can depend on the weather or on the time of day. With a weather dependency it runs faster or slower, with a time dependency it stops completely at times.
A stopped line consumes nothing, produces nothing and costs no running expenses either — unlike missing ingredients, where operation continues and is only waiting for material. Outside opening hours the point also no longer puts out pallets. When a line is stopped, it hands its share of the shared throughput capacity over to the remaining lines.
In the recipe, the player sees one line per condition above the ingredients, and the current weather factor in the info box. When the line is stopped, the production menu names the reason instead of "running": Outside opening hours, Wrong season, Wrong month or Not enough weather.
All attributes exist both on <productions> (default for all lines of the production point) and on <production> (overrides the default for this one line).
| Attribute | Default | Meaning |
|---|---|---|
modes |
empty | List of modes, separated by spaces |
startHours / endHours
|
0 / 24
|
Opening hours, several time windows separated by spaces |
seasons |
1 2 3 4 |
Seasons: 1 spring, 2 summer, 3 autumn, 4 winter |
months |
1 to 12
|
Months of the game period, 1 is March |
weatherFactor |
1 |
Scales the final weather factor, values above 1 are also allowed |
minPower |
0 |
Lower limit: what the line still manages even in the worst weather |
maxPower |
1 |
Upper limit of the natural factor |
Possible values for modes: hourly, seasonal, monthly, limitBoosters, sun, night, rain, wind, temp, tempNegative. Upper/lower case does not matter, an unknown name is reported as an XML error on load.
A setting that does not restrict anything is not shown in the recipe: opening hours covering the whole day, all four seasons or all twelve months.
hourly, seasonal and monthly have no factor — they stop the line outside their period.
-
hourlyevaluatesstartHours/endHours. Several time windows are listed in pairs side by side:startHours="8 16" endHours="12 20"gives two shifts with a lunch break. -
seasonalevaluatesseasons. -
monthlyevaluatesmonths. Month 1 is March, matching the start of the game period.
Factor = clamp(NaturalFactor, minPower, maxPower) * weatherFactor
Several weather modes on the same line multiply. The maximum output of a line is therefore maxPower * weatherFactor, its base load minPower * weatherFactor. If the factor drops to 0, the line stops with the status "Not enough weather".
| Mode | Natural factor | Source in the game |
|---|---|---|
sun |
0 to 1 | Brightness curve of the map, normalized to its own maximum, damped according to the weather: sun 1.0 / partly cloudy 0.75 / cloudy 0.45 / rain, snow, hail, thunderstorm, tornado 0.2 |
night |
0 to 1 | the same with the moon curve |
rain |
0 to 1 | strongest value of rain, snow and hail; vanilla knows the levels 0.1 (drizzle), 0.45, 0.7 and 1 |
wind |
0.27 to 1.87 in normal weather, up to 4.5 in a storm, 8 in a tornado | Wind speed divided by 15; vanilla weather is between 4 and 28, storm between 38 and 68, tornado at 120 |
temp |
0 to 1.36 | Temperature divided by 25, below 0 degrees the factor is 0; the vanilla maps range from −11 to +34 degrees |
tempNegative |
0 to 1.55 | (20 minus temperature) divided by 20; off from 20 degrees, full at 0 degrees, 1.55 at −11 degrees |
The maxPower cap matters mainly for wind and temp — without it, a storm would multiply production. Sun and rain are never above 1 on their own.
This mode has nothing to do with weather and time, it only changes how boosters count: instead of all available boosters multiplying, only one counts and is consumed. Which one is decided by boostMode — with MOST the strongest, with LEAST the weakest, with ASC the first and with DESC the last in the order of the recipe.
A storage can fill or empty through the weather independently of any production line — a rain barrel, for example, collects even when no production at all is switched on at the point. The attributes are on the <capacity> element:
| Attribute | Default | Meaning |
|---|---|---|
weatherModes |
empty | One weather mode (sun, night, rain, wind, temp, tempNegative), empty or false switches it off |
weatherAmount |
0 |
Amount per hour at full weather factor, negative values are a weather-dependent loss |
weatherFactor |
1 |
Scales the amount |
Here the natural factor is always limited to 0 to 1, there is no minPower/maxPower. The stock stays between 0 and the storage capacity.
<!-- Solar dryer: runs only during the day, fastest at noon, not at all at night -->
<production id="solarDryer" modes="sun" cyclesPerHour="60" costsPerActiveHour="1">
<!-- Bakery with two shifts and a lunch break in between -->
<production id="bakery" modes="hourly" startHours="8 16" endHours="12 20" cyclesPerHour="60" costsPerActiveHour="1">
<!-- Ice house: the colder the better, stops from 20 degrees -->
<production id="iceHouse" modes="tempNegative" cyclesPerHour="30" costsPerActiveHour="1">
<!-- Windmill with base load: 20 percent even when there is no wind, at most double in a storm -->
<production id="windMill" modes="wind" minPower="0.2" maxPower="2" cyclesPerHour="60" costsPerActiveHour="1">
<!-- Fresh from the harvest only in summer and only from May to August -->
<production id="summerJam" modes="seasonal monthly" seasons="2" months="3 4 5 6" cyclesPerHour="60" costsPerActiveHour="1">
<!-- Rain barrel: 2000 liters per hour in full rain, correspondingly less in drizzle -->
<capacity fillType="WATER" capacity="60000" weatherModes="rain" weatherAmount="2000"/>-
The seasons are now numbered 1 to 4 instead of 0 to 3, matching the engine's constants. A
0is reported as an XML error, so that old recipes taken over directly stand out instead of silently shifting. -
maxPoweris new. - The sun and wind formulas were rebuilt, so the numbers differ from FS22.
A server admin can switch off weather and time dependency for the whole savegame. Every line then runs around the clock at full rate, and the condition lines disappear from the recipe display. Your own XML is not affected and takes effect again as soon as the switch is turned back — see Settings.