Difference between revisions of "Tile"
DeamonHunter (Talk | contribs) (Almost finished set of config options.) |
DeamonHunter (Talk | contribs) (Initial Finish of adding all config options. Some options aren't finished due to needing more research.) |
||
Line 34: | Line 34: | ||
This option is primarily for objects that don't fit into a 1x1 tile space, such as a lamp post or a table. The size and specification variables are explained below. | This option is primarily for objects that don't fit into a 1x1 tile space, such as a lamp post or a table. The size and specification variables are explained below. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 53: | Line 47: | ||
For example: Lets say we have a lamp post that is 4 tiles high, 1 tile in length and 2 tiles in width we would then have a parameter of <code>{"x" : 1, "y" : 4, "z" : 2}</code> | For example: Lets say we have a lamp post that is 4 tiles high, 1 tile in length and 2 tiles in width we would then have a parameter of <code>{"x" : 1, "y" : 4, "z" : 2}</code> | ||
+ | |||
==== "specification" ==== | ==== "specification" ==== | ||
Line 78: | Line 73: | ||
=== "dockInfo" === | === "dockInfo" === | ||
To be made. | To be made. | ||
+ | |||
+ | |||
+ | === "pathFindingPenalty" === | ||
+ | '''Valid options (Int): <code>Any positive or negative number.</code>''' | ||
+ | |||
+ | This option allows you to change how much NPC's prefer using this block as part of their path when compared to other blocks. Negative numbers are prefer to use (Lower penalty), while positive numbers are for avoiding (Higher penalty). | ||
+ | |||
+ | |||
+ | === "pathFindingNoCollision" === | ||
+ | '''Valid options (bool): <code>Either true or false</code>''' | ||
+ | |||
+ | This option allows the pathfinding system to ignore the tile for pathfinding purposes. | ||
Line 83: | Line 90: | ||
'''Valid options (String): <code>Any valid effect code.</code>''' | '''Valid options (String): <code>Any valid effect code.</code>''' | ||
− | This will set the tile that you will receive when breaking or pressing g on the tile. This is | + | This will set the tile that you will receive when breaking or pressing g on the tile. This is available because when you place an object with auto-tile info, it can turn into another item with no info on what original tile was placed. By default, it will give the tile that is being made. |
Line 246: | Line 253: | ||
This option specifies if the object whether the object will show up when it is searched for in the shop catalogue or the creative inventory. Useful for objects that have auto tiling info such as fences. (As such only one object appears in the shopping menu) | This option specifies if the object whether the object will show up when it is searched for in the shop catalogue or the creative inventory. Useful for objects that have auto tiling info such as fences. (As such only one object appears in the shopping menu) | ||
+ | |||
+ | |||
+ | === "stackSizeLimit" === | ||
+ | '''Valid options (int): <code>Any valid integer.</code>''' | ||
+ | |||
+ | This is the number of a tile you can hold in 1 slot in your inventory. Left at 999 for consistency with other items. | ||
Line 276: | Line 289: | ||
== Tile State Options == | == Tile State Options == | ||
+ | All these options require the block to be a Tile State Entity. Tile state entities however, allow the player to directly affect the tile and also supports animations based on the entity's model and it's layers. | ||
=== "animation" === | === "animation" === | ||
'''Valid options (String): <code>A valid path to a .bvh animation</code>''' | '''Valid options (String): <code>A valid path to a .bvh animation</code>''' | ||
Line 287: | Line 301: | ||
An option to specify the use of a set of voxels while the object is placed? | An option to specify the use of a set of voxels while the object is placed? | ||
+ | === "interactActionTrigger" === | ||
+ | '''Valid options (String): <code>A valid code for an entityAction</code>''' | ||
+ | |||
+ | An option to specify an action to trigger when the tile is interacted with. | ||
=== "prefetchTileState" === | === "prefetchTileState" === | ||
Line 305: | Line 323: | ||
This option specifies what type of tilestate that your tile supports. This is mostly used for crafting stations and other interactable objects. This is not to be included on "dumb" objects such as stone. | This option specifies what type of tilestate that your tile supports. This is mostly used for crafting stations and other interactable objects. This is not to be included on "dumb" objects such as stone. | ||
− | == | + | == Other Options == |
=== "merchantKind" === | === "merchantKind" === | ||
'''Valid options (String): <code>Any valid "code" string that points to a Merchant File.</code>''' | '''Valid options (String): <code>Any valid "code" string that points to a Merchant File.</code>''' | ||
Line 311: | Line 329: | ||
This option specifies when specifies converts the tile Object into a Merchant Vendor block. This essentially makes the tile invisible and spawns the appropriate merchant with their appropriate stall. Do not use this on files that you want to stay in the world. | This option specifies when specifies converts the tile Object into a Merchant Vendor block. This essentially makes the tile invisible and spawns the appropriate merchant with their appropriate stall. Do not use this on files that you want to stay in the world. | ||
+ | == Components == | ||
+ | === "apiary" === | ||
+ | This is the component for making your tile an apiary. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "apiary": { | ||
+ | "beeEffect": "", | ||
+ | "rallyStages": [ | ||
+ | 0, | ||
+ | ], | ||
+ | "maxBeeCount": 10, | ||
+ | "beesPerDay": 1, | ||
+ | "produceWaitDays": 7, | ||
+ | "collectionStage": 3 | ||
+ | }, | ||
+ | </pre> | ||
+ | |||
+ | Bee Effect, is the code of the particle effect that the apiary should produce. | ||
+ | Rally Stages, is a list of the number of bees the apiary should produce during the stages. | ||
+ | Max Bee Count, is the maximum number of bees required to produce honey in your apiary. | ||
+ | Bees per day, is the number of bees that will arrive on each new day. | ||
+ | Produce wait days, is the number of days between producing honey. | ||
+ | Collection stage, is the number of particles around the apiary to signify you can collect honey. | ||
+ | |||
+ | |||
+ | === "axeable" === | ||
+ | This is the component for making your tile breakable by axes. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "axeable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | ||
+ | |||
+ | |||
+ | === "grazable" === | ||
+ | This is the component for allowing animals to eat your tile. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "grazable" : { | ||
+ | "turnsInto" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | TurnsInto is the code of the block you want the tile to turn into. | ||
+ | |||
+ | |||
+ | === "hammerable" === | ||
+ | This is the component for making your tile breakable by hammers. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "hammerable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | ||
+ | |||
+ | |||
+ | === "hoeable" === | ||
+ | This is the component for allowing your tile to be changed into hoed dirt. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "hoeable" : { | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | There are no attributes in hoeable. | ||
+ | |||
+ | |||
+ | === "mineable" === | ||
+ | This is the component for making your tile breakable by pickaxes. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "mineable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | ||
+ | |||
+ | |||
+ | === "pricing" === | ||
+ | This is the component needed for selling your item in the catalogue. This is required if the object is searchable. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "pricing" : { | ||
+ | "value" : 10.0, | ||
+ | "buyable" : true | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Value is the price of the item to be bought for in the catalogue. | ||
+ | Buyable sets whether the item can be bought from the catalogue or only sold. | ||
+ | |||
+ | |||
+ | === "scytheable" === | ||
+ | This is the component for making your tile breakable by scythes. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "scytheable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | ||
+ | |||
+ | |||
+ | === "shovelable" === | ||
+ | This is the component for making your tile breakable by shovels. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "shovelable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | ||
+ | |||
+ | |||
+ | === "sweepable" === | ||
+ | This is the component for making your tile breakable by brooms. | ||
+ | |||
+ | This component can be added to your file by placing the text below into your file; | ||
+ | <pre> | ||
+ | "sweepable" : { | ||
+ | "treasure" : "" | ||
+ | } | ||
+ | </pre> | ||
− | + | Treasure is just the code of a treasure file you want the game to access in order to get drop lists. | |
− | + |
Revision as of 01:42, 19 February 2017
Contents
Engine
"code"
Valid options (String): Any valid string. Common to make the string the path to the model but with periods [.] replacing slashes [/]
This option is required to uniquely identify any object or resource. This path must be unique to all other codes, but does not have any other requirements.
For example: Having the code "mods.fountain.fountain"
creates an object that has the handle "mods.fountain.fountain"
"kind"
Valid options (String): "object", "material", "nothing"
This option specifies what type of item is being specified by your file. In this case, it tells the game whether to treat the model as if its a material, where it shall construct the look in game based on how it's placed, verses an object which it will not care about the model.
"canGrowFlowers"
Valid options (bool): Either true or false
This option specifies if flowers, can grow on top of the block during world generation. Helpful when a block is used in Structures.
"compound"
Compound is a container for multiple variables. It is written as:
"compound": { "size": { "x": 3, "y": 1, "z": 2 }, "specification": "\n\tCC XC CC\n\t" }
This option is primarily for objects that don't fit into a 1x1 tile space, such as a lamp post or a table. The size and specification variables are explained below.
"size"
Size is another multiple variable container. It is written as:
"size": { "x": 3, "y": 1, "z": 2 },
The variables of x, y and z are integer inputs stating how many tiles the object occupies in the x,y and z directions. If the object is not a multiple of 16, you will need to round upwards to the next multiple of 16.
For example: Lets say we have a lamp post that is 4 tiles high, 1 tile in length and 2 tiles in width we would then have a parameter of {"x" : 1, "y" : 4, "z" : 2}
"specification"
Valid options (String): A string comprised of "X", "C" or "E" that has exactly the same number of characters as the number of tiles the object occupies. (Not counting whitespace. E.g. spaces, tabs and newlines.)
You do not need to add a specification, unless you want to allow an empty tile to be built in.
This option specifies to the game how it should handle each tile in an object. Starting from the top layer, at the x = 0 and z = 0, it will read through each character in the string and apply it to the specific tile in the model. The order goes "Go down x, then increment z, go down x again. Once z is finish decrement y and start again". The different options are;
"X"
specifies the origin of the object. Every object must have 1"X"
. All"X"
follow the"C"
specification as well. Although multiple can be applied (thus spawning multiple versions of the object) it is not recommended to have more than one"X"
."C"
specifies that nothing should be placed in this tile. Set this for tiles in which the object actually occupies in the object."E"
specifies that an object can be placed in this tile. Set this for any tile that is completely (or almost completely) empty.
For example: Lets take the lamp example from #size Lets say that the lamp follows a pattern like;
[*] [*] [*] [*] [*]
An appropriate specification variable for this is "CE CE CE CX"
For more in depth information precede to either This Guide or this collection of thoughts.
"dockInfo"
To be made.
"pathFindingPenalty"
Valid options (Int): Any positive or negative number.
This option allows you to change how much NPC's prefer using this block as part of their path when compared to other blocks. Negative numbers are prefer to use (Lower penalty), while positive numbers are for avoiding (Higher penalty).
"pathFindingNoCollision"
Valid options (bool): Either true or false
This option allows the pathfinding system to ignore the tile for pathfinding purposes.
"interactEffect"
Valid options (String): Any valid effect code.
This will set the tile that you will receive when breaking or pressing g on the tile. This is available because when you place an object with auto-tile info, it can turn into another item with no info on what original tile was placed. By default, it will give the tile that is being made.
"mapping"
Valid options (Unsigned Int): Any positive number.
A fixed ID for the tiles in the world. For example "sky" or blocks of nothing have a set ID of 1. Do not change this value from 0 unless you know what you are doing.
Tile Placement
"alts"
Valid options (String Array): Any path pointing to a *.qb file. Starting at, but not including, the "content" folder
A list of alternative models to use instead of the base model described in "voxels". The game will randomly choose a model from this list and the "voxels" parameter upon placing the object.
For example: If you put [ "staxel/tile/grass/Grass-alt2.qb", "staxel/tile/grass/Grass-alt3.qb", "staxel/tile/grass/Grass-alt4.qb" ]
, then when you place the tile, it will choose between the one specified in "voxels" and alt 2, 3 or 4 upon placing.
"altsCount"
Valid options (Int): The number of alts + voxel combined
This represents how many different options there are. Should be the number of alternative models plus the base voxel.
For example: If using the example from #"alts", you should place the number 4
here.
"autoTileInfo"
To Be Made.
"attachToAbove" / "attachToBelow" / "attachToSide"
Valid options (bool): Either true or false
These options specifies if the object will try and align itself. Above and Below will attach themselves to the bottom/top of a block so that the object is flush with the other block. Side will attempt to attach to the block behind the object. These affects are recursively done for up to 3 objects?
For example: If you have a lantern, setting to "attachToAbove" true will properly attach to the cieling, while setting to false may leave it floating in mid-air.
"attachmentDirections" / "placementDirections"
Valid options (String Array): A combination of one of (x,y,z) AND (p,n), OR just "all"
"placementDirections" is the list of directions that the tile can be placed onto. For each options, they must have a direction (x, y or z. The three planar directions.) and whether to check in the positive or negative direction. (p or n respectively). Alternatively you can just use "all" to allow the object to be placed in any direction.
The complement of "placementDirections" is the "attachmentDirections" option, which specifies which directions objects can be placed on the specified object.
For example: Giving "placementDirections" ["yn", "yp"]
will allow the object to be placed on the top or bottom of any object but not the sides while giving "attachmentDirections" ["yn", "yp"]
will allow any other object to be placed on the top or bottom of this object.
"orientationVariants"
Valid options (Bool): Either true or false
This option specifies if the object should be rotated randomly upon placement. (Right?)
For example: If set to true on a book tile, it will place the book in any of the 4 orientations when placed down, while if false, allows the player to rotate the book themselves.
"randomizePosition" / "radomizeVerticalPosition"
Valid options (Bool): Either true or false
This option specifies if the object should be given a random horizontal/vertical displacement when it is placed.
For example: If set to true on a book tile, it will place the book and give it an offset of a few voxels in the x and z direction, while if false, it will always be in the standard position.
"variantsRandomizeVerticalPosition"
Valid options (List of Bools): Either true or false for each model specified in alts. Needs to be the same length as Alts.
This option specifies if the object should be given a random vertical displacement when it is placed. The first object in the list affects the first alternative model. The second affects the second. This
For example: If set to true on a book tile, it will place the book and give it an offset of a few voxels in the x and z direction, while if false, it will always be in the standard position.
"representativeTile"
Valid options (String): Any valid tile code.
This will set the tile that you will receive when breaking or pressing g on the tile. This is avaliable because when you place an object with auto-tile info, it can turn into another item with no info on what original tile was placed. By default, it will give the tile that is being made.
Physics and Lighting
"bouncyness"
Valid options (Float): -1 and below to avoid bouncing, -1 to 0 for lower to normal bouncing, higher then 0 for more extreme bouncing
This option describes how much a tile will bounce you back when colliding with it. The maths behind it is Bounce Vector * (Tile.Bouncyness + 1)
.
"collision"
Valid options (Bool): Either true or false
This option specifies whether or not a player, or other object, can collide with the tile in question. Commonly flowers don't have collision, while most other objects do.
"emmisiveColor"
Valid options (String): A hexadecimal string that is is in ARGB format. (2 chars for Alpha, Red, Green, Blue)
The color in which an object with the option #"light" higher than 0 will emit when it is placed down.
For example: A light that has an emmisiveColor property of "FFFF0000"
will emit a strong red light.
"light"
Valid options (Float): Any positive decimal number.
Specifies how much light is to be emitted from the object. If set to 0, no light will be emitted
For example: Setting this option to 10.0
will let the object emit the same amount of light as an indoor lamp.
"unbreakable"
Valid options (Bool): Either true or false
This option specifies whether a person can break the object after it is placed in the world. Should never be set to true, unless there is some code to remove this object. This option overrides the need to add any components for breaking the tile.
Rendering Options
"open"
Valid options (Bool): Either true or false
A rendering option. Should only be true if the object is completely empty, like an air block. For all other cases, this is false.
"solid"
Valid options (Bool): Either true or false
Should only be true if the object is completely full, such as a dirt block. Most materials will have this option true while most objects should not have this option.
"smoothRecolorationOnPlace"
Valid options (Bool): Either true or false
This option will make the tile recolour itself to match the tiles nearby it. Used when a palette is defined.
"palette"
Valid options (String): A valid path to a *.colorcorrection file
This is an option that specifies to the game that it can overlay colours on top of the model. It points at another file which acts as a collection for images which define colours which will be used to vary colours. Most files don't need this, however if a tile is repeated often, such as the ground, it can be a handy thing to include.
"priority"
Valid options (int): Any valid integer.
This rendering option specifies this objects order to being rendered. Currently this is only used on objects of the "material" kind. The object with the higher priority will display over the top of the object with lower priority.
Shop / Inventory Options
These options specify how the shop and inventory will handle this tile.
"categories"
Valid options (String Array): Any valid string, although the following strings are used in the menu sorting, "block", "door", "floor"/"flooring", "flower", "furniture", "light", "plant", "tool", "window", "misc", "red", "orange", "yellow", "green", "blue", "purple", "pink", "white", "black" and "brown"
This options allows for you to specifiy a number of strings that a person can search for, that will turn up the object in question. Several categories are applied when using the buttons in the catalogue or creative mode inventory.
For example: If you give an item the category "road", the player is then able to search for "road" which will return the item in question.
"descriptionImage"
Valid options (String): A valid path to an image
This option specifies an image that will be placed at the end of a description in the catalogue and creative inventory.
"searchable"
Valid options (Bool): Either true or false
This option specifies if the object whether the object will show up when it is searched for in the shop catalogue or the creative inventory. Useful for objects that have auto tiling info such as fences. (As such only one object appears in the shopping menu)
"stackSizeLimit"
Valid options (int): Any valid integer.
This is the number of a tile you can hold in 1 slot in your inventory. Left at 999 for consistency with other items.
Sound Options
These options include all ways of adding sound to a tile. Look at Sound for finding out what a Sound/Sound Group is and how it is defined.
"damageSoundGroup"
Valid options (String): Any valid "code" string that points to a Sound Group.
This option specifies what group of sounds to play when the object is destroyed.
For example: Setting this to "staxel.sounds.damage.Grass"
will make the block play grass sounds when destroyed.
"placeSoundGroup"
Valid options (String): Any valid "code" string that points to a Sound Group.
This option specifies what group of sounds to play when the object is placed.
For example: Setting this to "staxel.sounds.damage.Grass"
will make the block play destroying grass sounds when the tile is placed.
"stepSoundGroup"
Valid options (String): Any valid "code" string that points to a Sound Group.
This option specifies what group of sounds to play when the object is stepped on.
For example: Setting this to "staxel.sounds.damage.Grass"
will make the block play destroying grass sounds when a person is walking over the object.
Tile State Options
All these options require the block to be a Tile State Entity. Tile state entities however, allow the player to directly affect the tile and also supports animations based on the entity's model and it's layers.
"animation"
Valid options (String): A valid path to a .bvh animation
An option that specifies what animations should be used on the model. This requires that layernames are the same in the model and animations.
"customRendererVoxels"
Valid options (String): A valid path to a model
An option to specify the use of a set of voxels while the object is placed?
"interactActionTrigger"
Valid options (String): A valid code for an entityAction
An option to specify an action to trigger when the tile is interacted with.
"prefetchTileState"
Valid options (Bool): Either true or false
This options decides whether or not the TileState of a block is gotten on Server Start.
"spawnAction"
Valid options (String): Any valid "code" string that points to a Entity Action.
This option specifies what action is toggled on when the object is spawned into the world, either by loading it up in the world or by placing the object.
"tileStateKind"
Valid options (String): "object", "material", "nothing"
This option specifies what type of tilestate that your tile supports. This is mostly used for crafting stations and other interactable objects. This is not to be included on "dumb" objects such as stone.
Other Options
"merchantKind"
Valid options (String): Any valid "code" string that points to a Merchant File.
This option specifies when specifies converts the tile Object into a Merchant Vendor block. This essentially makes the tile invisible and spawns the appropriate merchant with their appropriate stall. Do not use this on files that you want to stay in the world.
Components
"apiary"
This is the component for making your tile an apiary.
This component can be added to your file by placing the text below into your file;
"apiary": { "beeEffect": "", "rallyStages": [ 0, ], "maxBeeCount": 10, "beesPerDay": 1, "produceWaitDays": 7, "collectionStage": 3 },
Bee Effect, is the code of the particle effect that the apiary should produce. Rally Stages, is a list of the number of bees the apiary should produce during the stages. Max Bee Count, is the maximum number of bees required to produce honey in your apiary. Bees per day, is the number of bees that will arrive on each new day. Produce wait days, is the number of days between producing honey. Collection stage, is the number of particles around the apiary to signify you can collect honey.
"axeable"
This is the component for making your tile breakable by axes.
This component can be added to your file by placing the text below into your file;
"axeable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.
"grazable"
This is the component for allowing animals to eat your tile.
This component can be added to your file by placing the text below into your file;
"grazable" : { "turnsInto" : "" }
TurnsInto is the code of the block you want the tile to turn into.
"hammerable"
This is the component for making your tile breakable by hammers.
This component can be added to your file by placing the text below into your file;
"hammerable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.
"hoeable"
This is the component for allowing your tile to be changed into hoed dirt.
This component can be added to your file by placing the text below into your file;
"hoeable" : { }
There are no attributes in hoeable.
"mineable"
This is the component for making your tile breakable by pickaxes.
This component can be added to your file by placing the text below into your file;
"mineable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.
"pricing"
This is the component needed for selling your item in the catalogue. This is required if the object is searchable.
This component can be added to your file by placing the text below into your file;
"pricing" : { "value" : 10.0, "buyable" : true }
Value is the price of the item to be bought for in the catalogue. Buyable sets whether the item can be bought from the catalogue or only sold.
"scytheable"
This is the component for making your tile breakable by scythes.
This component can be added to your file by placing the text below into your file;
"scytheable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.
"shovelable"
This is the component for making your tile breakable by shovels.
This component can be added to your file by placing the text below into your file;
"shovelable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.
"sweepable"
This is the component for making your tile breakable by brooms.
This component can be added to your file by placing the text below into your file;
"sweepable" : { "treasure" : "" }
Treasure is just the code of a treasure file you want the game to access in order to get drop lists.