Difference between revisions of "Weather"
DeamonHunter (Talk | contribs) (Initial commit.) |
DeamonHunter (Talk | contribs) (Remove nightTransitionLines cause they are no longer done by weathers.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
"watersCropsNotificationCode" : "staxel.notifications.weatherRainyAlreadyWatered", | "watersCropsNotificationCode" : "staxel.notifications.weatherRainyAlreadyWatered", | ||
"chance" : 2.0, | "chance" : 2.0, | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
"dialoguePools" : [ "staxel.dialoguePool.RainyDay" ], | "dialoguePools" : [ "staxel.dialoguePool.RainyDay" ], | ||
"backgroundAmbienceSound" : "staxel.sounds.ambience.Rain", | "backgroundAmbienceSound" : "staxel.sounds.ambience.Rain", | ||
Line 37: | Line 31: | ||
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. | 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 [[ | + | 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. 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|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 [[Particles|Particle Spawner]] that it will use for the particles falling. "groundParticles" is the [[Particles|Particle Spawner]] that it will use for making impacts on the ground. "skyColors" is the code of a [[Value Images|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. | The second part is the part that may require more fiddling. "backgroundAmbienceSound" is the [[Sound|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 [[Particles|Particle Spawner]] that it will use for the particles falling. "groundParticles" is the [[Particles|Particle Spawner]] that it will use for making impacts on the ground. "skyColors" is the code of a [[Value Images|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. | 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. | ||
+ | |||
+ | |||
+ | = Useful components = | ||
+ | Weather does not have many components. But it has it's own component type. At this current point, only 1 component is used for weather. | ||
+ | |||
+ | == [[Lightning Component]] == | ||
+ | This component is used to create lightning throughout this weather. It specifies sounds, and how often the lightning will strike. | ||
+ | |||
+ | For more information on how to use the ambience component, head to [[Lightning Component#When and How to use]]. | ||
= Config Options = | = Config Options = | ||
== "code" == | == "code" == | ||
− | '''Valid options (String): <code>A unique string which weather this object is.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A unique string which weather this object is.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 55: | Line 58: | ||
== "airParticles" == | == "airParticles" == | ||
− | '''Valid options (String): <code>A unique string which contains the code of a [[Particles|Particle Spawner]].</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A unique string which contains the code of a [[Particles|Particle Spawner]].</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 64: | Line 67: | ||
== "backgroundAmbienceSound" == | == "backgroundAmbienceSound" == | ||
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string which contains the code of a [[Sound]].</code>''' |
− | '''Default Value:''' If not | + | '''Default Value:''' If not specified, will not play any sounds all day. (Does not include Day and Night sounds.) |
Line 73: | Line 76: | ||
== "chance" == | == "chance" == | ||
− | '''Valid options (Float): <code>A positive decimal number.</code>''' | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 82: | Line 85: | ||
== "dayAmbienceSounds" == | == "dayAmbienceSounds" == | ||
− | '''Valid options (List of Strings): <code>A list of strings each pointing to a [[Sound]] code.</code>''' | + | '''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of strings each pointing to a [[Sound]] code.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 88: | Line 91: | ||
These are the ambience sounds that will be used during daytime. Each sound must have an [[Ambience Component]] in order to work properly. | These are the ambience sounds that will be used during daytime. Each sound must have an [[Ambience Component]] in order to work properly. | ||
+ | |||
+ | |||
+ | == "dayMusic" == | ||
+ | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string which contains the code of a [[Sound]].</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will play the default day soundtracks. | ||
+ | |||
+ | |||
+ | This is the music that will play at day. | ||
== "dialoguePools" == | == "dialoguePools" == | ||
− | '''Valid options (List of Strings): <code>A list of strings each pointing to a [[Dialogue Pools|Dialogue Pool]] code.</code>''' | + | '''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of strings each pointing to a [[Dialogue Pools|Dialogue Pool]] code.</code>''' |
− | '''Default Value:''' | + | '''Default Value:''' If not specified, Villagers will not mention the weather. |
Line 100: | Line 112: | ||
== "icon" == | == "icon" == | ||
− | '''Valid options (String): <code>A unique string which contains the path to an image file.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the path to an image file.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 109: | Line 121: | ||
== "groundParticles" == | == "groundParticles" == | ||
− | '''Valid options (String): <code>A unique string which contains the code of a [[Particles|Particle Spawner]].</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the code of a [[Particles|Particle Spawner]].</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 115: | Line 127: | ||
This will be the particle spawner which creates the particles in the ground. These particles may not line up with the air particles. | This will be the particle spawner which creates the particles in the ground. These particles may not line up with the air particles. | ||
+ | |||
+ | |||
+ | == "isSunnyWeather" == | ||
+ | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' | ||
+ | |||
+ | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
+ | |||
+ | |||
+ | Whether or not this whether can be counted as sunny. | ||
== "nightAmbienceSounds" == | == "nightAmbienceSounds" == | ||
− | '''Valid options (List of Strings): <code>A list of strings each pointing to a [[Sound]] code.</code>''' | + | '''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of strings each pointing to a [[Sound]] code.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 126: | Line 147: | ||
− | == " | + | == "nightMusic" == |
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string which contains the code of a [[Sound]].</code>''' |
− | '''Default Value:''' | + | '''Default Value:''' If not specified, will play the default night soundtracks. |
+ | |||
+ | |||
+ | This is the music that will play at night. | ||
+ | |||
+ | |||
+ | == "seasons" == | ||
+ | '''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of strings that contain the seasons.</code>''' | ||
+ | |||
+ | '''Default Value:''' if not specified, will default to all seasons. | ||
− | This is the list of | + | This is the list of seasons this weather can be activated in, without being forced. (By weather commands and such.) |
== "skyBoxTexture" == | == "skyBoxTexture" == | ||
− | '''Valid options (String): <code>A unique string which contains the path to an image file.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the path to an image file.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 145: | Line 175: | ||
== "skyColors" == | == "skyColors" == | ||
− | '''Valid options (String): <code>A unique string which contains the code of a [[Value Image]] file.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the code of a [[Value Image]] file.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 154: | Line 184: | ||
== "skyTexture" == | == "skyTexture" == | ||
− | '''Valid options (String): <code>A unique string which contains the path to an image file.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the path to an image file.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 163: | Line 193: | ||
== "sunVisible" == | == "sunVisible" == | ||
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 172: | Line 202: | ||
== "watersCrops" == | == "watersCrops" == | ||
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 178: | Line 208: | ||
Whether or not crops will count as watered on the next day transition. | Whether or not crops will count as watered on the next day transition. | ||
+ | |||
+ | |||
+ | == "watersCropsNotificationCode" == | ||
+ | '''Valid options ([[Modding_Key_Terms#String|Strings]]): <code>A unique string which contains the code of a [[Notification]].</code>''' | ||
+ | |||
+ | '''Default Value:''' Only needed if watersCrops is true. Must be used if this is the case. | ||
+ | |||
+ | |||
+ | This is the notification that will get used if the player tries to water crops during this weather. |
Latest revision as of 07:20, 8 February 2018
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 Useful components
- 3 Config Options
- 3.1 "code"
- 3.2 "airParticles"
- 3.3 "backgroundAmbienceSound"
- 3.4 "chance"
- 3.5 "dayAmbienceSounds"
- 3.6 "dayMusic"
- 3.7 "dialoguePools"
- 3.8 "icon"
- 3.9 "groundParticles"
- 3.10 "isSunnyWeather"
- 3.11 "nightAmbienceSounds"
- 3.12 "nightMusic"
- 3.13 "seasons"
- 3.14 "skyBoxTexture"
- 3.15 "skyColors"
- 3.16 "skyTexture"
- 3.17 "sunVisible"
- 3.18 "watersCrops"
- 3.19 "watersCropsNotificationCode"
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, "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. 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.
Useful components
Weather does not have many components. But it has it's own component type. At this current point, only 1 component is used for weather.
Lightning Component
This component is used to create lightning throughout this weather. It specifies sounds, and how often the lightning will strike.
For more information on how to use the ambience component, head to Lightning Component#When and How to use.
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 (String): A string which contains the code of a Sound.
Default Value: If not specified, 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.
"dayMusic"
Valid options (String): A string which contains the code of a Sound.
Default Value: If not specified, will play the default day soundtracks.
This is the music that will play at day.
"dialoguePools"
Valid options (List of Strings): A list of strings each pointing to a Dialogue Pool code.
Default Value: If not specified, Villagers will not mention the weather.
These are the dialogue pools that villagers will use during the weather.
"icon"
Valid options (Strings): 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 (Strings): 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.
"isSunnyWeather"
Valid options (Bool): True or False
Default Value: No default value is specified. Always need to provide your own.
Whether or not this whether can be counted as sunny.
"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.
"nightMusic"
Valid options (String): A string which contains the code of a Sound.
Default Value: If not specified, will play the default night soundtracks.
This is the music that will play at night.
"seasons"
Valid options (List of Strings): A list of strings that contain the seasons.
Default Value: if not specified, will default to all seasons.
This is the list of seasons this weather can be activated in, without being forced. (By weather commands and such.)
"skyBoxTexture"
Valid options (Strings): 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 (Strings): 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 (Strings): 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.
"watersCropsNotificationCode"
Valid options (Strings): A unique string which contains the code of a Notification.
Default Value: Only needed if watersCrops is true. Must be used if this is the case.
This is the notification that will get used if the player tries to water crops during this weather.