Weather
Weather is also modifiable in Staxel. Modifying weather allows you to;
- Spawn different particles
- Have different day and night sounds
- Affect the sky
- Water crops
Adjusting weather can allow you to create more weather types in your world.
Contents
- 1 Creating a *.weather file
- 2 Config Options
- 2.1 "code"
- 2.2 "airParticles"
- 2.3 "backgroundAmbienceSound"
- 2.4 "chance"
- 2.5 "dayAmbienceSounds"
- 2.6 "dialoguePools"
- 2.7 "icon"
- 2.8 "groundParticles"
- 2.9 "nightAmbienceSounds"
- 2.10 "nightTransitionFlavourLineCodes"
- 2.11 "skyBoxTexture"
- 2.12 "skyColors"
- 2.13 "skyTexture"
- 2.14 "sunVisible"
- 2.15 "watersCrops"
Creating a *.weather file
Weather files contain a number of properties but will be fairly simple to adjust. The main properties are listed below;
{ "code" : "staxel.weather.Rainy", "icon" : "staxel/weathers/RainyIcon.png", "watersCrops" : true, "watersCropsNotificationCode" : "staxel.notifications.weatherRainyAlreadyWatered", "chance" : 2.0, "nightTransitionFlavourLineCodes" : [ "staxel.nightTransition.Line1", "staxel.nightTransition.Line2", "staxel.nightTransition.Line3", "staxel.nightTransition.Line4", ], "dialoguePools" : [ "staxel.dialoguePool.RainyDay" ], "backgroundAmbienceSound" : "staxel.sounds.ambience.Rain", "sunVisible" : false, "airParticles" : "staxel.particle.weather.Rainy", "groundParticles" : "staxel.particle.weather.RainyGround", "skyColors" : "staxel.valueImage.SkyColorsRainy", "skyTexture" : "staxel/sky/skycolorstrip_rainy", "skyBoxTexture" : "staxel/sky/Skybox" }
There are two major parts to this file. The first part mostly deals with how the world will react to the weather, and the second part is how the weather will look.
For the first part, the properties are as follows. "code" is the unique value for this weather. Most of the time you will go with the folder path but replacing "\" with ".". "icon" is the path to the image that will represent what your weather is. "watersCrops" is whether or not the weather will water the crops for you. "watersCropsNotificationCode" is the Notification for when you try to water during this weather. "chance" is a number representing how common this weather should be. It actual chances works as follows, chance/TotalChance
. "nightTransitionFlavourLineCodes" is a list of Translation lines that will show up on the night transition. And finally "dialoguePools" are Dialogue Pools which villagers will use during this weather.
The second part is the part that may require more fiddling. "backgroundAmbienceSound" is the Sound Group that it will use as ambience. This Sound Group must have an Ambience Component on it in order to work. "sunVisible" is weather or not the sun will be visible in this weather. "airParticles" is the Particle Spawner that it will use for the particles falling. "groundParticles" is the Particle Spawner that it will use for making impacts on the ground. "skyColors" is the code of a Value Image file. This will contain the colour that the sky will use. "skyTexture" is the path to the image that will be used as the additionally texture to colour the sky, depending on time. "skyBoxTexture" contains the path of an images (6 images total) to use as the sky texture.
With this completed, you now have a new weather. Sadly the only way to test this, currently, would be to advance time every single day.
Config Options
"code"
Valid options (String): A unique string which weather this object is.
Default Value: No default value is specified. Always need to provide your own.
A string containing the code of the weather the blob will be referring to.
"airParticles"
Valid options (String): A unique string which contains the code of a Particle Spawner.
Default Value: No default value is specified. Always need to provide your own.
This will be the particle spawner which creates the particles in the air. These particles do not affect the ground, but may not pass through it.
"backgroundAmbienceSound"
Valid options (Strings): A string which contains the code of a Sound.
Default Value: If not supplied, will not play any sounds all day. (Does not include Day and Night sounds.)
This is the ambience sound that will be used all day. The sound must have an Ambience Component in order to work properly.
"chance"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the relative chance of this weather spawning. The actual chance of this weather spawning is given by chance/TotalChance
"dayAmbienceSounds"
Valid options (List of Strings): A list of strings each pointing to a Sound code.
Default Value: No default value is specified. Always need to provide your own.
These are the ambience sounds that will be used during daytime. Each sound must have an Ambience Component in order to work properly.
"dialoguePools"
Valid options (List of Strings): A list of strings each pointing to a Dialogue Pool code.
Default Value: Can be omitted. Villagers will not mention the weather.
These are the dialogue pools that villagers will use during the weather.
"icon"
Valid options (String): A unique string which contains the path to an image file.
Default Value: No default value is specified. Always need to provide your own.
This is the image that will be used to represent the weather on the HUD.
"groundParticles"
Valid options (String): A unique string which contains the code of a Particle Spawner.
Default Value: No default value is specified. Always need to provide your own.
This will be the particle spawner which creates the particles in the ground. These particles may not line up with the air particles.
"nightAmbienceSounds"
Valid options (List of Strings): A list of strings each pointing to a Sound code.
Default Value: No default value is specified. Always need to provide your own.
These are the ambience sounds that will be used during nighttime. Each sound must have an Ambience Component in order to work properly.
"nightTransitionFlavourLineCodes"
Valid options (List of Strings): A list of strings that contain Translation codes.
Default Value: No default value is specified. Always need to provide your own.
This is the list of translation codes that will be used in order to display flavour lines on the night transition.
"skyBoxTexture"
Valid options (String): A unique string which contains the path to an image file.
Default Value: No default value is specified. Always need to provide your own.
This is the image that will be used to texture the sky. In actuality, there will be six image, each of them needed to be suffixed by one of the following, "xn", "xp", yn", "yp", "zn", "zp". Each of these correspond to a direction. Check out the skybox images in /Staxel.Content/Staxel/Sky/
to see what these look like.
"skyColors"
Valid options (String): A unique string which contains the code of a Value Image file.
Default Value: No default value is specified. Always need to provide your own.
This is the value image that will be used to colour the sky differently throughout the day. Check out the value images in /Staxel.Content/Staxel/Sky/
to see what these look like.
"skyTexture"
Valid options (String): A unique string which contains the path to an image file.
Default Value: No default value is specified. Always need to provide your own.
This is the image that will be used to show the initial colours of the sky as well as the ambient lighting.
"sunVisible"
Valid options (bool): True or False
Default Value: No default value is specified. Always need to provide your own.
Whether or not the sun can be visible.
"watersCrops"
Valid options (bool): True or False
Default Value: No default value is specified. Always need to provide your own.
Whether or not crops will count as watered on the next day transition.