Effect

From wiki
Jump to: navigation, search

In Staxel, *.effect files are used to specify a couple of parameters to be used when an action is triggered. Inside of effects there are;

  • A list of sounds to be played.
  • A list of particles to be created
  • An emote that can be played

Along with other options for how particles and other things are displayed.


Creating a *.effect file

Creating an effect is fairly easy, as this file does not create anything on its own. It's more of a collection of other files that are specified together. The full file however looks like;

{
  "code": "mods.yourmodname.effectname",
  "builder" : "staxel.effect.builder.Effect",
  "particles" : [ ],
  "sounds" : [ ],
  "emote" : "",
  "dirtTileOffset" : false,
  "objectTileStateOffset" : false,
  "objectTileStateColor" : false,
  "dirtTileColor" : false,
  "dirtTilePlantInteractParticleColor" : false,
  "dockTileRotation" : false
}

And you can place whatever particles/sound codes in the lists and whatever emote code into the emote parameter. When you have one of those you can then place, you can then now specify this effect in other files, such as the *.tile files.


Config Options

"code"

Valid options (String): A unique string which Effect this object is.

Default Value: No default value is specified. Always need to provide your own.


A string containing the code of the Effect the blob will be referring to.


"builder"

Valid options (String): A string represented pointing to a builder.

Default Value: No default value is specified. Always need to provide your own.


A string containing a value which tells Staxel's code how to treat the effect. The only one in affect in effect files is "staxel.effect.builder.Effect".


"particles"

Valid options (List of Strings): A list of strings that contain Particle System codes.

Default Value: Null or nothing specified.


A list of strings containing the particles that will be spawned when used.


"sounds"

Valid options (List of Strings): A list of strings that contain Sound codes.

Default Value: Null or nothing specified.


A list of strings containing the sounds that will be spawned when used.


"emote"

Valid options (String): A string which points to an Emote code

Default Value: No default value however leaving it as an empty string (i.e. leaving it as "") is fine.


A string that points to an emote that will also be triggered along with this effect.


"dirtTileOffset"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not this effect will be offset when used on a tile of the type of dirt?


"objectTileStateOffset"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not this effect will be offset when used on a tile with a tile State.


"dirtTileColor"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not the particles will be changed to the dirt tile's colour.


"objectTileStateColor"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not the particles will be changed to the tile state's colour.


"dirtTilePlantInteractParticleColor"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not the particles will be changed to the dirt tile's interaction colour.


"dockTileRotation"

Valid options (Bool): True or False.

Default Value: If not specified, will default to False.


This value specifies whether or not this particles will be changed reflect the dock's rotation in a tile state entity.