weather_system_modding_reference

Weather System Modding Reference

Every mod in Hard Times can specify a weather descriptor file which will affect the kind of gaming experience you will face in the game, according to weather effects.
For example you could easily create polar or tropical scenarios by modifing such a file.
Before anything let's locate our weather descriptor file:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\WeatherDescriptor.json

Open it and you will find something like this:

{
  "weatherCheckInterval": 60,
  "weatherCheckIntervalError": 30,
  "weatherMonths": [
	{
	  /*JANUARY*/
	  "monthId": 31,
	  "sunriseHour": 7,
	  "sunriseMinute": 30,
	  "sunsetHour": 16,
	  "sunsetMinute": 30,
	  "minTemperature": -10,
	  "maxTemperature": 5,
	  "snowProbability": 30,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	},
	{
	  /*FEBRUARY*/
	  "monthId": 59,
	  "sunriseHour": 7,
	  "sunriseMinute": 0,
	  "sunsetHour": 17,
	  "sunsetMinute": 0,
	  "minTemperature": -10,
	  "maxTemperature": 10,
	  "snowProbability": 25,
	  "stormProbability": 20,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	},
	{
	  /*MARCH*/
	  "monthId": 90,
	  "sunriseHour": 6,
	  "sunriseMinute": 30,
	  "sunsetHour": 17,
	  "sunsetMinute": 30,
	  "minTemperature": 0,
	  "maxTemperature": 15,
	  "snowProbability": 20,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	},
	{
	  /*APRIL*/
	  "monthId": 120,
	  "sunriseHour": 6,
	  "sunriseMinute": 0,
	  "sunsetHour": 18,
	  "sunsetMinute": 0,
	  "minTemperature": 5,
	  "maxTemperature": 18,
	  "snowProbability": 0,
	  "stormProbability": 5,
	  "rainProbability": 15,
	  "heatstrokeProbability": 1
	},
	{
	  /*MAY*/
	  "monthId": 151,
	  "sunriseHour": 5,
	  "sunriseMinute": 30,
	  "sunsetHour": 18,
	  "sunsetMinute": 30,
	  "minTemperature": 10,
	  "maxTemperature": 20,
	  "snowProbability": 0,
	  "stormProbability": 15,
	  "rainProbability": 15,
	  "heatstrokeProbability": 0
	},
	{
	  /*JUNE*/
	  "monthId": 181,
	  "sunriseHour": 5,
	  "sunriseMinute": 0,
	  "sunsetHour": 19,
	  "sunsetMinute": 0,
	  "minTemperature": 10,
	  "maxTemperature": 12,
	  "snowProbability": 0,
	  "stormProbability": 5,
	  "rainProbability": 10,
	  "heatstrokeProbability": 5
	},
	{
	  /*JULY*/
	  "monthId": 212,
	  "sunriseHour": 4,
	  "sunriseMinute": 30,
	  "sunsetHour": 19,
	  "sunsetMinute": 30,
	  "minTemperature": 15,
	  "maxTemperature": 25,
	  "snowProbability": 0,
	  "stormProbability": 5,
	  "rainProbability": 5,
	  "heatstrokeProbability": 15
	},
	{
	  /*AUGUST*/
	  "monthId": 243,
	  "sunriseHour": 5,
	  "sunriseMinute": 30,
	  "sunsetHour": 19,
	  "sunsetMinute": 0,
	  "minTemperature": 18,
	  "maxTemperature": 25,
	  "snowProbability": 0,
	  "stormProbability": 1,
	  "rainProbability": 5,
	  "heatstrokeProbability": 30
	},
	{
	  /*SEPTEMBER*/
	  "monthId": 273,
	  "sunriseHour": 6,
	  "sunriseMinute": 0,
	  "sunsetHour": 18,
	  "sunsetMinute": 30,
	  "minTemperature": 15,
	  "maxTemperature": 20,
	  "snowProbability": 0,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 5
	},
	{
	  /*OCTOBER*/
	  "monthId": 304,
	  "sunriseHour": 6,
	  "sunriseMinute": 30,
	  "sunsetHour": 18,
	  "sunsetMinute": 0,
	  "minTemperature": 5,
	  "maxTemperature": 15,
	  "snowProbability": 5,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	},
	{
	  /*NOVEMBER*/
	  "monthId": 334,
	  "sunriseHour": 7,
	  "sunriseMinute": 0,
	  "sunsetHour": 17,
	  "sunsetMinute": 30,
	  "minTemperature": 0,
	  "maxTemperature": 10,
	  "snowProbability": 10,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	},
	{
	  /*DECEMBER*/
	  "monthId": 365,
	  "sunriseHour": 7,
	  "sunriseMinute": 30,
	  "sunsetHour": 17,
	  "sunsetMinute": 0,
	  "minTemperature": 0,
	  "maxTemperature": 5,
	  "snowProbability": 20,
	  "stormProbability": 15,
	  "rainProbability": 30,
	  "heatstrokeProbability": 0
	}
  ]
}

It's easy to locate the single months data which contains all the directives needed to alter the weather in game.
Let's look at each single entry in a single month:

"monthId": 31,

Since we took january as an example we found it has a monthId that equals to 31. It is just the number of the last day of the month, count absolutely from the beginning of the year. You should not tackle with this value and leave it as it is. OK?!?

"sunriseHour": 7,
"sunriseMinute": 30,
"sunsetHour": 16,
"sunsetMinute": 30,

Ok, those are easy and quite obvious. Those values are reflecting the hour and minute in which the sun is expected to rise and fall. Thus giving us the possibility to alter the day/night ratio of every single month.

"minTemperature": -10,
"maxTemperature": 5,

Those are obvious too, aren't they? Min and max temperature control the overall temperature dynamics of the month. Please keep in mind that those values are not rigid values and will be affected by hour of the day (resulting in lower temperatures, more close to the lower border, during the night, for example).

"snowProbability": 30,
"stormProbability": 15,
"rainProbability": 30,
"heatstrokeProbability": 0

Last batch of properties to examine are related to the possible weather events in Hard Times. They just express percentual probabilities of the occurrence of any single event during the month we are configuring. Values are expressed in percentual probabilities.

You could leave a comment if you were logged in.
  • weather_system_modding_reference.txt
  • Last modified: 2019/01/15 03:46
  • by thorfinio