Firework Component

From wiki
Revision as of 01:15, 21 November 2017 by DeamonHunter (Talk | contribs) (Update formatting.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.


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.