Difference between revisions of "Tile Replacer Component"
DeamonHunter (Talk | contribs) (Created page with "Category:Component Modding Category:Component Modding are all optional Items are fairly broad in their types. Each type has it's own p...") |
DeamonHunter (Talk | contribs) (Initial commit. (Accidental push before)) |
||
Line 1: | Line 1: | ||
[[Category:Component Modding]] | [[Category:Component Modding]] | ||
− | [[:Category:Component Modding]] are all optional | + | [[: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. |
− | + | ||
− | Replacer Items are all | + | On this page, we go over the "Tile Replacer" component, signified by the property "tileReplacer". Tile Replacer components are specifically for the item type, [[Replacers(Tile Transforming Items)]], providing all of the information needed to swap around weapons. |
+ | |||
+ | |||
+ | = When and How to use = | ||
+ | Tile Replacer components are, in most cases, only used to complement the [[Replacers(Tile_Transforming_Items)|Replacers]]. In other cases, this component is not used at all. | ||
+ | |||
+ | |||
+ | As this component is only ever used in one case, the information needed to create a Tile Replacer and this component is over at [[Replacers(Tile_Transforming_Items)#Creating a Replacer Item|this page]]. | ||
+ | |||
+ | |||
+ | = Config Options = | ||
+ | All config options must be inside the body of; | ||
<pre> | <pre> | ||
− | " | + | "replacerTile": { |
+ | Config Here | ||
+ | } | ||
</pre> | </pre> | ||
− | + | == "notificationTile" == | |
+ | '''Valid options (String): <code>A string which contains the code of the [[Tile]] used in the error [[Notifications|Notification]]</code>''' | ||
− | + | '''Default Value:''' Can be omitted. But when omitted, the error will be "Try placing on ". | |
− | + | A string containing the Tile which the error will use. Specifically it will print out this tile's name in the error. | |
− | + | ||
− | |||
− | |||
− | + | == "tiles" == | |
− | + | This property actually contains a list of blobs. A common input to the property will look like the following; | |
− | + | <pre> | |
− | + | "tiles": [ | |
− | + | { | |
− | + | "toReplaceTile": "staxel.tile.dirt.Dirt", | |
− | + | "replaceWithTile": "staxel.tile.fairyVillage.FairyGrassLayer.1", | |
− | + | "applyColouration": true | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}, | }, | ||
+ | { | ||
+ | "toReplaceTile": "staxel.tile.dirt.Dirt.tilled", | ||
+ | "replaceWithTile": "staxel.tile.fairyVillage.FairyGrassLayer.1", | ||
+ | "applyColouration": true | ||
+ | } | ||
+ | ], | ||
</pre> | </pre> | ||
− | |||
+ | === "toReplaceTile" === | ||
+ | '''Valid options (String): <code>The code to an [[Tile]] file</code>''' | ||
− | + | '''Default Value:''' No default value is specified. Always need to provide your own. | |
− | + | ||
− | = | + | A string containing which tile you want to replace. |
− | The | + | |
+ | |||
+ | === "replaceWithTile" === | ||
+ | '''Valid options (String): <code>The code to an [[Tile]] file</code>''' | ||
+ | |||
+ | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
+ | |||
+ | |||
+ | A string containing which tile you want to replace with. | ||
+ | |||
+ | |||
+ | === "applyColouration" === | ||
+ | '''Valid options (Bool): <code>True or False</code>''' | ||
+ | |||
+ | '''Default Value:''' False. No colouration is applied on place. | ||
+ | |||
− | + | This should be true if the replacing tile has the property [[Tile#"palette"]] non-blank and/or [[Tile#"smoothRecolorationOnPlace"]] to true. This allows it to recolour when placed. In all other cases it should be false. |
Revision as of 02:58, 11 July 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 "Tile Replacer" component, signified by the property "tileReplacer". Tile Replacer components are specifically for the item type, Replacers(Tile Transforming Items), providing all of the information needed to swap around weapons.
Contents
When and How to use
Tile Replacer components are, in most cases, only used to complement the Replacers. In other cases, this component is not used at all.
As this component is only ever used in one case, the information needed to create a Tile Replacer and this component is over at this page.
Config Options
All config options must be inside the body of;
"replacerTile": { Config Here }
"notificationTile"
Valid options (String): A string which contains the code of the Tile used in the error Notification
Default Value: Can be omitted. But when omitted, the error will be "Try placing on ".
A string containing the Tile which the error will use. Specifically it will print out this tile's name in the error.
"tiles"
This property actually contains a list of blobs. A common input to the property will look like the following;
"tiles": [ { "toReplaceTile": "staxel.tile.dirt.Dirt", "replaceWithTile": "staxel.tile.fairyVillage.FairyGrassLayer.1", "applyColouration": true }, { "toReplaceTile": "staxel.tile.dirt.Dirt.tilled", "replaceWithTile": "staxel.tile.fairyVillage.FairyGrassLayer.1", "applyColouration": true } ],
"toReplaceTile"
Valid options (String): The code to an Tile file
Default Value: No default value is specified. Always need to provide your own.
A string containing which tile you want to replace.
"replaceWithTile"
Valid options (String): The code to an Tile file
Default Value: No default value is specified. Always need to provide your own.
A string containing which tile you want to replace with.
"applyColouration"
Valid options (Bool): True or False
Default Value: False. No colouration is applied on place.
This should be true if the replacing tile has the property Tile#"palette" non-blank and/or Tile#"smoothRecolorationOnPlace" to true. This allows it to recolour when placed. In all other cases it should be false.