Difference between revisions of "Tile"

From wiki
Jump to: navigation, search
(Initial Work on Setting up Configuration Options list.)
Line 1: Line 1:
 
[[Category:Modding]]
 
[[Category:Modding]]
  
 
List of Attributes in a tile:
 
 
== Engine ==
 
== Engine ==
Code
+
=== "code" ===
Kind
+
'''Valid options (String): <code>Any valid string. Common to make the string the path to the model but with periods [.] replacing slashes [/] </code>'''
AttachToBelow
+
 
AttachToAbove
+
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.
AttachToSide
+
 
Bouncyness
+
For example: Having the code <code> "mods.fountain.fountain"</code> creates an object that has the handle "mods.fountain.fountain"
Collision
+
 
Unbreakable
+
 
Open
+
=== "kind" ===
Solid
+
'''Valid options (String): <code>"object", "material", "nothing"</code>'''
Priority
+
 
DamageSoundGroup
+
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.
PlaceSoundGroup
+
 
RepresentativeTile
+
 
 +
 
 +
== Tile Placement ==
 +
=== "alts" ===
 +
'''Valid options (String Array): <code>Any path pointing to a *.qb file. Starting at, but not including, the "content" folder</code>'''
 +
 
 +
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 <code>[ "staxel/tile/grass/Grass-alt2.qb", "staxel/tile/grass/Grass-alt3.qb", "staxel/tile/grass/Grass-alt4.qb" ]</code>, 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): <code>The number of alts + voxel combined</code>'''
 +
 
 +
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 <code>4</code> here.
 +
 
 +
 
 +
=== "autoTileInfo" ===
 +
To Be Made.
 +
 
 +
 
 +
=== "attachToAbove" / "attachToBelow" / "attachToSide" ===
 +
'''Valid options (bool): <code>Either true or false</code>'''
 +
 
 +
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): <code>A combination of one of (x,y,z) AND (p,n), OR just "all"</code>'''
 +
 
 +
"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" <code>["yn", "yp"]</code> will allow the object to be placed on the top or bottom of any object but not the sides while giving "attachmentDirections" <code>["yn", "yp"]</code> will allow any other object to be placed on the top or bottom of this object.
 +
 
 +
 
 +
=== "representativeTile" ===
 +
'''Valid options (String): <code>Any valid tile code.</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): <code>-1 and below to avoid bouncing, -1 to 0 for lower to normal bouncing, higher then 0 for more extreme bouncing</code>'''
 +
 
 +
This option describes how much a tile will bounce you back when colliding with it. The maths behind it is <code>Bounce Vector * (Tile.Bouncyness + 1)</code>.
 +
 
 +
 
 +
=== "collision" ===
 +
'''Valid options (Bool): <code>Either true or false</code>'''
 +
 
 +
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): <code>A hexadecimal string that is is in ARGB format. (2 chars for Alpha, Red, Green, Blue) </code>'''
 +
 
 +
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 <code>"FFFF0000"</code> will emit a strong red light.
 +
 
 +
 
 +
=== "light" ===
 +
'''Valid options (Float): <code>Any positive decimal number.</code>'''
 +
 
 +
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 <code>10.0</code> will let the object emit the same amount of light as an indoor lamp.
 +
 
 +
 
 +
=== "unbreakable" ===
 +
'''Valid options (Bool): <code>Either true or false</code>'''
 +
 
 +
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): <code>Either true or false</code>'''
 +
 
 +
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): <code>Either true or false</code>'''
 +
 
 +
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.
 +
 
 +
=== "priority" ===
 +
'''Valid options (int): <code>Any valid integer.</code>'''
 +
 
 +
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.
 +
 
 +
 
 +
== 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): <code>Any valid "code" string that points to a Sound Group.</code>'''
 +
 
 +
This option specifies what group of sounds to play when the object is destroyed.
 +
 
 +
For example: Setting this to <code>"staxel.sounds.damage.Grass"</code> will make the block play grass sounds when destroyed.
 +
 
 +
 
 +
=== "placeSoundGroup" ===
 +
'''Valid options (String): <code>Any valid "code" string that points to a Sound Group.</code>'''
 +
 
 +
This option specifies what group of sounds to play when the object is placed.
 +
 
 +
For example: Setting this to <code>"staxel.sounds.damage.Grass"</code> will make the block play destroying grass sounds when the tile is placed.
 +
 
 +
 
 +
=== "stepSoundGroup" ===
 +
'''Valid options (String): <code>Any valid "code" string that points to a Sound Group.</code>'''
 +
 
 +
This option specifies what group of sounds to play when the object is stepped on.
 +
 
 +
For example: Setting this to <code>"staxel.sounds.damage.Grass"</code> will make the block play destroying grass sounds when a person is walking over the object.
 +
 
 +
 
 +
 
 
DockInfo
 
DockInfo
AutoTileInfo
 
 
InteractEffect
 
InteractEffect
 
Mapping
 
Mapping
Light
 
EmissiveColor
 
 
Palette
 
Palette
AltsCount
 
 
OrientationVariants
 
OrientationVariants
 
RandomizePosition
 
RandomizePosition
Line 43: Line 162:
 
Searchable
 
Searchable
 
InteractActionTrigger
 
InteractActionTrigger
PlacementDirections
+
 
AttachmentDirections
+
  
  

Revision as of 01:09, 18 February 2017


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.


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.


"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.

"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.


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.


DockInfo InteractEffect Mapping Palette OrientationVariants RandomizePosition RadomizeVerticalPosition CanGrowFlowers CustomRendererVoxels Animation SpawnAction MerchantKind TileStateKind DescriptionImage PrefetchTileState SmoothRecolorationOnPlace PathFindingNoColission StackSizeLimit Categories Searchable InteractActionTrigger



CompoundSize CompoundSpecification CompoundFiller CompoundStandinCodes