Tiles
Internal
Name | Type | Info |
---|
Informative
Name | Type | Info |
---|
Stats
Name | Type | Info |
---|
Appearance
Name | Type | Info |
---|
Interface
Name | Type | Info |
---|
Gameplay
Name | Type | Info |
---|
Temporary
Name | Type | Info |
---|---|---|
name | string | The unique tile name in the mod. Default: The tile's JSON file name without extension |
displayName | string | The tile's displayed name. (Map, etc.) |
texture | string | The texture path for the tile. Default: The tile's JSON path, without extension |
code | string | Full type name for the per-tile-type ModTileType -extending class to be used for this tile.Default: {internalName}.Tiles.{filename} |
instanceCode | string | Full type name for the per-tile-instance ModTile -extending class to be used for this tile.The difference between this and
code is this is a new class for every tile placed, while
code is one class for the entire tile type.Default: No default, you must specify this in your JSON. |
width | int | The amount of tiles on the X axis this tile takes up. For example, a chest has a width of 2.
|
height | int | The amount of tiles on the Y axis this tile takes up. For example, a chest has a height of 2.
|
size | int[2] | The amount of tiles on the X and Y axis this tile takes up. For example, a chest has a size of
[2, 2] . |
frameWidth | int | The tile's per-tile frame width. Default: 16 |
frameHeight | int | The tile's per-tile frame height. Default: 16 |
drawOffsetY | int | The draw offset of the tile on the Y axis. (Negative moves up, Positive moves down) Can be used to make tiles embedded in the tile below or above it.
Default: 0 |
sheetYAligned | bool | Wether the tile's spritesheet has frames along the X or Y axis. This is mainly used for placeStyle as well as animation.
Default: false |
checkWalls | bool | Wether or not this tile should check tile placement if walls behind it are broken. Default: false, true if the tile has the "wall" placement condition. |
solid | bool | Wether or not a tile has collision. Default: true |
solidTop | bool | Wether or not the player can walk on this tile if it's nonsolid. (such as tables, bookcases, etc.) Note: Having this false, but
solid true, does not result in a mostly solid tile with a nonsolid top.
solid accounts for the entire tile. To make a table-like tile, have solid be false and solidTop be true.Default: false |
frameImportant | bool | Wether or not to save the tile's frames. This should be true on any tile that is not 1x1 or a tile that has anything frame-dependent.
Default: false |
directional | bool | Wether or not this tile should place the first or second frame based on player direction.
This is mainly used for stuff like furniture, beds, etc..
Default: false |
placementFrameX | int | The specific X frame of the tile to use when it is placed.
Note: This is only used if you have
frameImportant set to true.
This is the frame count, not actual pixels.
Default: 0 |
placementFrameY | int | The specific Y frame of the tile to use when it is placed.
Note: This is only used if you have
frameImportant set to true.
This is the frame count, not actual pixels.
Default: 0 |
placementConditions | string or string[] | A string or string[] of preset conditions used to determine of a tile can be placed or stay in place.
Note: A string with 'Solid' at the end only allows placement if every tile it checks has
solid as true.The strings accepted as placement conditions are:
Default: placeTouchingSolid is the tile is 1x1, flatGroundSolid if not. |
placementOrigin | int[2] | The tile within the tile that is considered the placement tile. (The tile the mouse is over when placing) Default: [0, 0] |
breaksFast | bool | Wether or not a tile breaks immediately when hit. Default: false |
breaksByPick | bool | Wether or not a tile breaks from a pickaxe. Default: false |
breaksByAxe | bool | Wether or not a tile breaks from an axe. Default: false |
breaksByHammer | bool | Wether or not a tile breaks from a hammer. Default: false |
breaksByCut | bool | Wether or not a tile breaks when hit by a melee weapon or projectile. Default: false |
breaksByWater | bool | Wether or not a tile breaks when submerged in water or honey. Default: false |
breaksByLava | bool | Wether or not a tile breaks when submerged in lava. Default: false |
minPick | int | The minimum pick value required to mine this tile. Default: 0 |
minAxe | int | The minimum axe value required to mine this tile. Default: 0 |
minHammer | int | The minimum hammer value required to mine this tile. Default: 0 |
ratePick | float | A multiplier for how fast the tile is mined by a pickaxe. Default: 1f |
rateAxe | float | A multiplier for how fast the tile is mined by an axe. Default: 1f |
rateHammer | float | A multiplier for how fast the tile is mined by a hammer. Default: 1f |
table | bool | Wether or not this tile should be considered a table. (Used in NPC Housing) Default: false |
chair | bool | Wether or not this tile should be considered a chair. (Used in NPC Housing) Default: false |
torch | bool | Wether or not this tile should be considered a torch. (Used in NPC Housing) Default: false |
door | bool | Wether or not this tile should be considered a door. (Used in NPC Housing) Default: false |
rope | bool | Causes this tile to have similar behavior to a rope. Default: false |
noAttach | bool | Causes this tile to not be 'attachable' by other tiles.
In other words, a tile that needs a placement condition checking this tile will always return false for this tile. Default: false |
tileDungeon | bool | Wether or not this tile should be considered part of the dungeon. Default: false |
spawn | bool | Wether or not this tile should be considered a viable spawn point.
Note that this is does not make the tile function like a bed; you need to make the spawn point click code yourself. This merely
prevents the game from removing the spawn point for your tile when it runs spawn point validity checks.
Default: false |
spawnAt | int[2] | The tile position within this tile the player should respawn at.
This only is used if
spawn is true. Also, this does not prevent the player from teleporting to the nearest
tile below them, so try to avoid Y values that are not at the bottom layer of the tile.
Default: The bottom middle of the tile |
adjTile | int and/or string array | Array of tile IDs, names of tiles, or both that this tile can be considered when crafting.
For example, "adjTile": ["Furnace", "Work Bench"], would produce a tile that is considered a furnace and a workbench when
choosing what recipes the player can make.
Default: false |
blocksLight | bool | Wether or not this tile blocks light from passing through it. Default: false |
blocksSun | bool | Wether or not this tile blocks sunlight from passing through it. Default: false |
glows | bool | Wether or not this tile glows in the dark. Make this true if this tile uses the hook ModifyLight .Default: false |
shines | bool | Wether or not this tile spawns sparkle dust if it is properly lit. Default: false |
shineChance | int | The chance of the sparkle. (Higher numbers == less chance) Default: 0 |
frame | int | The start frame for the tile's animation. Default: 0 |
frameMax | int | The maximum frame of the tile. If this and
frameCounterMax are greater then 0, the tile will animate.Default: 0 |
frameCounter | int | The start count for the frame counter of the tile's animation. Default: 0 |
frameCounterMax | int | The maximum for the frame counter of the tile's animation. If this and
frameMax are greater then 0, the tile will animate.Default: 0 |
brick | bool | Wether or not this tile should be considered bricks. Default: false |
moss | bool | Wether or not this tile should be considered moss. Default: false |
stone | bool | Wether or not this tile should be considered stone. Default: false |
mergeDirt | bool | Wether or not this tile should merge with dirt. DO NOT HAVE THIS TRUE IF
tileMerge CONTAINS DIRT IN IT! Having both causes graphical glitches.Default: false |
tileSand | bool | Wether or not this tile should be considered sand. (does not grant gravity to the tile) Default: false |
tileFlame | bool | Wether or not this tile has a vanilla 'flame texture'. Almost all custom tiles will have this as false. Default: false |
alchemyFlower | bool | Wether or not this tile is considered a potion herb. Does nothing except change the default sound the tile makes. Default: false |
sound | int | The sound ID that this tile uses when it is killed. This is unused unless
soundGroup is above 0.Default: 0 |
soundGroup | int | The soundGroup ID that this tile uses when it is killed. Default: 0 |
dust | int | The dust ID that this tile uses when it is mined or killed. Default: 0 |
mapColor | int[4] | The color the tile uses on the map. Default: None, it is ignored if not specified. |
mapHoverText | string | The text used when the tile is hovered over. Default: None, it is ignored if not specified. |
drop | int or string | The item this tile will drop when killed. Default: 0 (nothing) |
tileMerge | int and/or string array | Array of tile IDs, names of tiles, or both that this tile merges with. There are some special behaviors:
#NormalTiles - Causes the tile to merge with every tile in the game that is not frameImportant and is 1x1 in size.
#Ores - Causes the tile to merge will all vanilla ores. This is usually used with the behavior below to exclude the vanilla ores from the above.
Having a ! before an entry (such as !#Ores ) means the opposite - do NOT merge with this tile.
This is used to exclude tiles from the above two if used.Default: None (merges with nothing except itself) |
treasure | bool | Wether or not this tile should glow if the player has Spelunker. Default: false |
danger | bool | Wether or not this tile should glow if the player has Dangersense. Default: false |
grass | bool | Wether or not the tile should be considered grass frame-wise. Default: false |