Difference between revisions of "Fireworks Launcher Component"
DeamonHunter (Talk | contribs) m (→"launchEffect": fix redlink) |
DeamonHunter (Talk | contribs) m (Updated to new section) |
||
(6 intermediate revisions 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 Fireworks Launcher | + | On this page, we go over the Fireworks Launcher Component, signified by the following; |
<pre> | <pre> | ||
"fireworksLauncher": { | "fireworksLauncher": { | ||
Line 8: | Line 8: | ||
} | } | ||
</pre> | </pre> | ||
− | Fireworks Launcher | + | Fireworks Launcher Components are used to add customisation to the functionality of the Launcher Tile. This component includes some aesthetic and functional changes. This component also complements the [[Firework Component]], which provides information for items to explode, but is not required. |
= When and How to use = | = When and How to use = | ||
− | Fireworks Launcher | + | Fireworks Launcher Component is needed whenever you want to make an Firework Launcher. Specifically, an Fireworks Launcher Component is needed whenever a [[Tile]] has it [[Tile#"tileStateKind"]] equal to "staxel.tileState.FireworksLauncher". Otherwise Fireworks Launcher component will do nothing. |
To start off with first, you will need to create a [[Tile]] with [[Tile#"tileStateKind"]] equal to "staxel.tileState.FireworksLauncher". Once that is done, you can add the following below the last property of the file; | To start off with first, you will need to create a [[Tile]] with [[Tile#"tileStateKind"]] equal to "staxel.tileState.FireworksLauncher". Once that is done, you can add the following below the last property of the file; | ||
Line 41: | Line 41: | ||
This file can end up looking large, but it is basically two parts. | This file can end up looking large, but it is basically two parts. | ||
− | The first part is customisation of the tile itself. "fuseOffset" is the offset that the fuse effect will appear at. "fuseEffect" is the code to the [[Effects]] that plays for the fuse. "countdownOffset" is the offset that the countdown number will appear at. "interactCountdown" is whether or not the countdown will start on interacting with the tile or whether it will start when placed. (True for interact, false for placing.) | + | The first part is customisation of the tile itself. "fuseOffset" is the offset that the fuse effect will appear at. "fuseEffect" is the code to the [[Effect|Effects]] that plays for the fuse. "countdownOffset" is the offset that the countdown number will appear at. "interactCountdown" is whether or not the countdown will start on interacting with the tile or whether it will start when placed. (True for interact, false for placing.) |
− | The second part is contained within "fireworks". Fireworks is essentially a list of items that have additional properties for launching them. Inside one of the list items, "item" is a blob that is meant to choose an item to spawn. Look at [[Items# | + | The second part is contained within "fireworks". Fireworks is essentially a list of items that have additional properties for launching them. Inside one of the list items, "item" is a blob that is meant to choose an item to spawn. Look at [[Items#How to Spawn an Item]] for more information. "quantity" is how many of these items you want to spawn. "countdownSeconds" is how many seconds before the item is spawned. "countdownSecondsSpread" is the additional time randomly added, not subtracted, from "countdownSeconds". "launchVelocity", is the direction you want to launch the item in. "launchVelocitySpread" is the random amount of additional speed to be added. "launchOffset" is the offset for where the item will be initially spawned. "flightSeconds" is how much time the item should be flying up into the air. "flightSecondsSpread" is the additional amount of random time added or subtracted from "flightSeconds". |
With that, this component is complete. You may want to also look into [[Firework Component]] for making items/tiles go into the Firework. | With that, this component is complete. You may want to also look into [[Firework Component]] for making items/tiles go into the Firework. | ||
Line 57: | Line 57: | ||
== "countdownOffset" == | == "countdownOffset" == | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</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 66: | Line 66: | ||
== "fuseOffset" == | == "fuseOffset" == | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</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 75: | Line 75: | ||
== "fuseEffect" == | == "fuseEffect" == | ||
− | '''Valid options (String): <code>A string that is pointing to the code of an [[Effect]]</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that is pointing to the code of an [[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 81: | Line 81: | ||
This is the effect that will get played as the fuse. | This is the effect that will get played as the fuse. | ||
+ | |||
== "interactCountdown" == | == "interactCountdown" == | ||
− | '''Valid options (Bool): <code>True or False</code>''' | + | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False.</code>''' |
− | '''Default Value:''' False. | + | '''Default Value:''' If not specified, will default to False. |
Line 116: | Line 117: | ||
=== "countdownSeconds" === | === "countdownSeconds" === | ||
− | '''Valid options (Float): <code>A positive decimal number</code>''' | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>''' |
'''Default Value:''' If not specified, will not have a countdown. (Spawn Immediately) | '''Default Value:''' If not specified, will not have a countdown. (Spawn Immediately) | ||
Line 125: | Line 126: | ||
=== "countdownSecondsSpread" === | === "countdownSecondsSpread" === | ||
− | '''Valid options (Float): <code>A positive decimal number</code>''' | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>''' |
'''Default Value:''' If not specified, will not have any variance. | '''Default Value:''' If not specified, will not have any variance. | ||
Line 134: | Line 135: | ||
=== "flightSeconds" === | === "flightSeconds" === | ||
− | '''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 140: | Line 141: | ||
This is the amount of seconds that the item will fly upwards. Will only work if the item has a [[Firework Component]]. | This is the amount of seconds that the item will fly upwards. Will only work if the item has a [[Firework Component]]. | ||
+ | |||
=== "flightSecondsSpread" === | === "flightSecondsSpread" === | ||
− | '''Valid options (Float): <code>A positive decimal number</code>''' | + | '''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>''' |
'''Default Value:''' If not specified, will not have any variance. | '''Default Value:''' If not specified, will not have any variance. | ||
− | This is the maximum amount of seconds that can be randomly added to "flightSeconds". Will only work if the item has a [[ | + | This is the maximum amount of seconds that can be randomly added to "flightSeconds". Will only work if the item has a [[Firework Component]] |
=== "item" === | === "item" === | ||
− | '''Valid options (Spawn Item): <code>See [[Items# | + | '''Valid options (Spawn Item): <code>See [[Items#How to Spawn an Item]] for more information.</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. | ||
This is the item that will be spawned in. If the item has a Fireworks component, it will do extra things but it is not needed. | This is the item that will be spawned in. If the item has a Fireworks component, it will do extra things but it is not needed. | ||
− | |||
=== "launchEffect" === | === "launchEffect" === | ||
− | '''Valid options (String): <code>A string that is pointing to the code of an [[Effect]]</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that is pointing to the code of an [[Effect]].</code>''' |
'''Default Value:''' If not specified, will play no effect. | '''Default Value:''' If not specified, will play no effect. | ||
Line 165: | Line 166: | ||
This is the effect that will get played as the item is launched. | This is the effect that will get played as the item is launched. | ||
+ | |||
=== "launchEffectOffset" === | === "launchEffectOffset" === | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' |
'''Default Value:''' If not specified, will just have a zero vector. | '''Default Value:''' If not specified, will just have a zero vector. | ||
Line 176: | Line 178: | ||
=== "launchOffset" === | === "launchOffset" === | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' |
'''Default Value:''' If not specified, will just have a zero vector. | '''Default Value:''' If not specified, will just have a zero vector. | ||
Line 185: | Line 187: | ||
=== "launchVelocity" === | === "launchVelocity" === | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' |
'''Default Value:''' If not specified, will just have a zero vector. | '''Default Value:''' If not specified, will just have a zero vector. | ||
Line 194: | Line 196: | ||
=== "launchVelocitySpread" === | === "launchVelocitySpread" === | ||
− | '''Valid options (Vector 3 - Double): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' | + | '''Valid options ([[Modding_Key_Terms#Vector 3|Vector 3]] - [[Modding_Key_Terms#Double|Double]]): <code>{"x": 0.0, "y": 0.0, "z": 0.0}</code>''' |
'''Default Value:''' If not specified, will just have a zero vector (No variance). | '''Default Value:''' If not specified, will just have a zero vector (No variance). | ||
Line 200: | Line 202: | ||
This is the additional amount of random speed that will be added to the launch velocity. | This is the additional amount of random speed that will be added to the launch velocity. | ||
+ | |||
+ | |||
+ | === "quantity" === | ||
+ | '''Valid options ([[Modding_Key_Terms#Integer|Integer]]): <code>A positive integer number.</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will spawn 1 item. | ||
+ | |||
+ | |||
+ | This is the number of items, of this type, that the launcher will spawn. |
Latest revision as of 05:04, 5 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 Fireworks Launcher Component, signified by the following;
"fireworksLauncher": { =Content= }
Fireworks Launcher Components are used to add customisation to the functionality of the Launcher Tile. This component includes some aesthetic and functional changes. This component also complements the Firework Component, which provides information for items to explode, but is not required.
Contents
When and How to use
Fireworks Launcher Component is needed whenever you want to make an Firework Launcher. Specifically, an Fireworks Launcher Component is needed whenever a Tile has it Tile#"tileStateKind" equal to "staxel.tileState.FireworksLauncher". Otherwise Fireworks Launcher component will do nothing.
To start off with first, you will need to create a Tile with Tile#"tileStateKind" equal to "staxel.tileState.FireworksLauncher". Once that is done, you can add the following below the last property of the file;
"fireworksLauncher": { "fuseOffset": {"x": 0.5, "y": 0.0, "z": 0.5}, "fuseEffect": "staxel.effect.generic.FireworkActivate", "countdownOffset": {"x": 0.5, "y": 1.25, "z": 0.5}, "interactCountdown": true, "fireworks": [ { "item": { "kind": "staxel.item.CraftItem", "code": "staxel.item.generic.FireworkRed" }, "quantity": 3, "countdownSeconds": 3.0, "countdownSecondsSpread": 0.5, "launchVelocity": {"x": 0.0, "y": 50.0, "z": 0.0}, "launchVelocitySpread": {"x": 13.0, "y": 0.0, "z": 13.0}, "launchOffset": {"x": 0.5, "y": 1.5, "z": 0.5}, "flightSeconds": 1.5, "flightSecondsSpread": 0.1 }, ] },
This file can end up looking large, but it is basically two parts.
The first part is customisation of the tile itself. "fuseOffset" is the offset that the fuse effect will appear at. "fuseEffect" is the code to the Effects that plays for the fuse. "countdownOffset" is the offset that the countdown number will appear at. "interactCountdown" is whether or not the countdown will start on interacting with the tile or whether it will start when placed. (True for interact, false for placing.)
The second part is contained within "fireworks". Fireworks is essentially a list of items that have additional properties for launching them. Inside one of the list items, "item" is a blob that is meant to choose an item to spawn. Look at Items#How to Spawn an Item for more information. "quantity" is how many of these items you want to spawn. "countdownSeconds" is how many seconds before the item is spawned. "countdownSecondsSpread" is the additional time randomly added, not subtracted, from "countdownSeconds". "launchVelocity", is the direction you want to launch the item in. "launchVelocitySpread" is the random amount of additional speed to be added. "launchOffset" is the offset for where the item will be initially spawned. "flightSeconds" is how much time the item should be flying up into the air. "flightSecondsSpread" is the additional amount of random time added or subtracted from "flightSeconds".
With that, this component is complete. You may want to also look into Firework Component for making items/tiles go into the Firework.
Config Options
All config options must be inside the body of;
"fireworksLauncher": { =Config Here= }
"countdownOffset"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: No default value is specified. Always need to provide your own.
This is the offset of the countdown display before the first item fires off.
"fuseOffset"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: No default value is specified. Always need to provide your own.
This is the offset of the fuse effect before the first item fires off.
"fuseEffect"
Valid options (String): A string that is pointing to the code of an Effect
Default Value: No default value is specified. Always need to provide your own.
This is the effect that will get played as the fuse.
"interactCountdown"
Valid options (Bool): True or False.
Default Value: If not specified, will default to False.
This is whether or not the countdown will start on interact. If false, countdown will immediately start on place.
"fireworks"
This is a list of items that contain a bunch of special properties. THis will commonly look like;
"fireworks": [ { "item": { "kind": "staxel.item.CraftItem", "code": "staxel.item.generic.FireworkRed" }, "quantity": 3, "countdownSeconds": 3.0, "countdownSecondsSpread": 0.5, "launchVelocity": {"x": 0.0, "y": 50.0, "z": 0.0}, "launchVelocitySpread": {"x": 13.0, "y": 0.0, "z": 13.0}, "launchOffset": {"x": 0.5, "y": 1.5, "z": 0.5}, "flightSeconds": 1.5, "flightSecondsSpread": 0.1 }, { =Content= } ]
"countdownSeconds"
Valid options (Float): A positive decimal number.
Default Value: If not specified, will not have a countdown. (Spawn Immediately)
This is the amount of seconds before spawning the item to launch.
"countdownSecondsSpread"
Valid options (Float): A positive decimal number.
Default Value: If not specified, will not have any variance.
This is the maximum amount of seconds that can be randomly added to "countdownSeconds".
"flightSeconds"
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 that the item will fly upwards. Will only work if the item has a Firework Component.
"flightSecondsSpread"
Valid options (Float): A positive decimal number.
Default Value: If not specified, will not have any variance.
This is the maximum amount of seconds that can be randomly added to "flightSeconds". Will only work if the item has a Firework Component
"item"
Valid options (Spawn Item): See Items#How to Spawn an Item for more information.
Default Value: No default value is specified. Always need to provide your own.
This is the item that will be spawned in. If the item has a Fireworks component, it will do extra things but it is not needed.
"launchEffect"
Valid options (String): A string that is pointing to the code of an Effect.
Default Value: If not specified, will play no effect.
This is the effect that will get played as the item is launched.
"launchEffectOffset"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: If not specified, will just have a zero vector.
This is the offset of the launch effect as the item is launched.
"launchOffset"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: If not specified, will just have a zero vector.
This is the offset of the launch where the item will be spawned.
"launchVelocity"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: If not specified, will just have a zero vector.
This is the amount of speed the item will be given when spawned.
"launchVelocitySpread"
Valid options (Vector 3 - Double): {"x": 0.0, "y": 0.0, "z": 0.0}
Default Value: If not specified, will just have a zero vector (No variance).
This is the additional amount of random speed that will be added to the launch velocity.
"quantity"
Valid options (Integer): A positive integer number.
Default Value: If not specified, will spawn 1 item.
This is the number of items, of this type, that the launcher will spawn.