Difference between revisions of "Firework Component"
DeamonHunter (Talk | contribs) m (Spelling error.) |
DeamonHunter (Talk | contribs) (Update formatting.) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
[[: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. | [[: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 Firework | + | On this page, we go over the Firework Component, signified by the following; |
<pre> | <pre> | ||
"firework": { | "firework": { | ||
Line 8: | Line 8: | ||
} | } | ||
</pre> | </pre> | ||
− | Firework | + | Firework Components are used to help out tiles that have the [[Fireworks Launcher Component]]. It specifies the individual rockets' properties which mainly include the explosion. |
= When and How to use = | = When and How to use = | ||
− | Firework | + | Firework Components should be used on any item that will act as a firework. That is, most items that will be spawned by the [[Fireworks Launcher Component]]. |
To create this component you would use the following; | To create this component you would use the following; | ||
Line 23: | Line 23: | ||
</pre> | </pre> | ||
− | There are three properties. The first, "explodeEffect" is a code to the [[ | + | There are three properties. The first, "explodeEffect" is a code to the [[Effect]] that will play when the item explodes. The second, "flightEffect" is the effect it will play while flying upwards. The third and final, is how long the explosion will last in microseconds. Leave this at -1 for the default time. |
And that is all for the firework component. | And that is all for the firework component. | ||
Line 37: | Line 37: | ||
== "explodeEffect" == | == "explodeEffect" == | ||
− | '''Valid options (String): <code>A string containing the code to a [[ | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Effect]].</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 46: | Line 46: | ||
== "explodeLingerTime" == | == "explodeLingerTime" == | ||
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#Integer|Integer]]): <code>A positive integer number.</code>''' |
− | '''Default Value:''' | + | '''Default Value:''' If not specified will linger the default amount of time. (1 second.) |
Line 55: | Line 55: | ||
== "flightEffect" == | == "flightEffect" == | ||
− | '''Valid options (String): <code>A string containing the code to a [[ | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Effect]].</code>''' |
− | '''Default Value:''' | + | '''Default Value:''' If not specified, will play no effect while flying. |
This is the effect that will play when it flies up into the air. | This is the effect that will play when it flies up into the air. |
Latest revision as of 00:15, 21 November 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 Firework Component, signified by the following;
"firework": { =Content= }
Firework Components are used to help out tiles that have the Fireworks Launcher Component. It specifies the individual rockets' properties which mainly include the explosion.
Contents
When and How to use
Firework Components should be used on any item that will act as a firework. That is, most items that will be spawned by the Fireworks Launcher Component.
To create this component you would use the following;
"firework": { "explodeEffect": "staxel.effect.generic.FireworkGreen", "flightEffect": "staxel.effect.generic.FireworkGreen", "explodeLingerTime": -1 }
There are three properties. The first, "explodeEffect" is a code to the Effect that will play when the item explodes. The second, "flightEffect" is the effect it will play while flying upwards. The third and final, is how long the explosion will last in microseconds. Leave this at -1 for the default time.
And that is all for the firework component.
Config Options
All config options must be inside the body of;
"pricing": { =Config Here= }
"explodeEffect"
Valid options (String): A string containing the code to a Effect.
Default Value: No default value is specified. Always need to provide your own.
This is the effect that will play when it explodes.
"explodeLingerTime"
Valid options (Integer): A positive integer number.
Default Value: If not specified will linger the default amount of time. (1 second.)
This is how long, in microseconds, that the explosion will stay around.
"flightEffect"
Valid options (String): A string containing the code to a Effect.
Default Value: If not specified, will play no effect while flying.
This is the effect that will play when it flies up into the air.