Difference between revisions of "Lightning Component"
DeamonHunter (Talk | contribs) m (Fix redlink.) |
DeamonHunter (Talk | contribs) (Update Page.) |
||
(One intermediate revision by the same user not shown) | |||
Line 29: | Line 29: | ||
</pre> | </pre> | ||
− | "baseDistance" is how far away the lightning will spawn. "baseDistanceSpread" is how much additional random distance that is added or subtracted from the base distance. "strikeInterval" is how many seconds between lightning strikes. "strikeIntervalSpread" is how much additional random time that is added or subtracted from the base time. "distantThunderSounds" is a list of [[Sound|Sounds]] that will be used when the lightning is spawned more than 1000 units away. "nearThunderSounds" is a list of [[Sound|Sounds]] that will be used when the lightning is spawned less than 1000 units away. | + | [[#"baseDistance"]] is how far away the lightning will spawn. [[#"baseDistanceSpread"]] is how much additional random distance that is added or subtracted from the base distance. [[#"strikeInterval"]] is how many seconds between lightning strikes. [[#"strikeIntervalSpread"]] is how much additional random time that is added or subtracted from the base time. [[#"distantThunderSounds"]] is a list of [[Sound|Sounds]] that will be used when the lightning is spawned more than 1000 units away. [[#"nearThunderSounds"]] is a list of [[Sound|Sounds]] that will be used when the lightning is spawned less than 1000 units away. |
With that, this component is complete. | With that, this component is complete. | ||
Line 43: | Line 43: | ||
− | + | == "baseDistance" == | |
− | '''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 52: | Line 52: | ||
− | + | == "baseDistanceSpread" == | |
− | '''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 62: | Line 62: | ||
== "distantThunderSounds" == | == "distantThunderSounds" == | ||
− | '''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 71: | Line 71: | ||
== "nearThunderSounds" == | == "nearThunderSounds" == | ||
− | '''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 79: | Line 79: | ||
− | + | == "strikeInterval" == | |
− | '''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 88: | Line 88: | ||
− | + | == "strikeIntervalSpread" == | |
− | '''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. |
Latest revision as of 05:12, 14 December 2017
Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.
On this page, we go over the Lightning component, signified by the following;
"lightning": { =Content= }
Lightning components are used to add lightning to Weather. In addition to adding lightning, this component allows you to customise the lightning to a degree.
Contents
When and How to use
Lightning component should be added to any weather that should have lightning added to it. Such as storms.
To start off with first, you will need to create a Weather. Once that is done, you can add the following below the last property of the file;
"lightning": { "baseDistance": 1000.0, "baseDistanceSpread": 900.0, "strikeInterval": 25.0, "strikeIntervalSpread": 5.0, "distantThunderSounds": [ "staxel.sounds.RollingThunder" ], "nearThunderSounds": [ "staxel.sounds.NearThunder" ] }
#"baseDistance" is how far away the lightning will spawn. #"baseDistanceSpread" is how much additional random distance that is added or subtracted from the base distance. #"strikeInterval" is how many seconds between lightning strikes. #"strikeIntervalSpread" is how much additional random time that is added or subtracted from the base time. #"distantThunderSounds" is a list of Sounds that will be used when the lightning is spawned more than 1000 units away. #"nearThunderSounds" is a list of Sounds that will be used when the lightning is spawned less than 1000 units away.
With that, this component is complete.
Config Options
All config options must be inside the body of;
"lightning": { =Config Here= }
"baseDistance"
Valid options (Float): A positive decimal number
Default Value: No default value is specified. Always need to provide your own.
This is the base amount of distance the lightning will occur at.
"baseDistanceSpread"
Valid options (Float): A positive decimal number
Default Value: No default value is specified. Always need to provide your own.
This is the additional amount of random distance that is to be added or subtracted from base distance.
"distantThunderSounds"
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 lightning sounds that will be used when the lightning is greater than 1000 units away.
"nearThunderSounds"
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 lightning sounds that will be used when the lightning is lesser than 1000 units away.
"strikeInterval"
Valid options (Float): A positive decimal number
Default Value: No default value is specified. Always need to provide your own.
This is the amount of seconds between lightning strikes.
"strikeIntervalSpread"
Valid options (Float): A positive decimal number
Default Value: No default value is specified. Always need to provide your own.
This is the additional amount of random time that is to be added or subtracted from base time.