Tiles are defined with a JSON object, which can have the following fields: "name" Friendly name for the tile. Not currently used for anything except autotiling, but could be displayed in a client. "pic": Graphic to use for the tile. Format is [sheet, x, y] where sheet may be an image URL directly, or it may be an ID that points to a tileset image indirectly (in which case you'll need to send the IMG protocol command to get the URL). "menu_pic": Graphic to use for the tile in build menus and inventories specifically. Same format as "pic". "density": Defaults to false. If true, users will be stopped when attempting to walk onto this tile. "walls": Bit field representing which sides of this tile are solid. When a user attempts to move from a tile onto another one, the client will check the "walls" values on both of those tiles, and prevent the movement if a bit corresponding to the movement direction is set on either of those tiles. For the original tile, the bit to check for is (1 << Movement Direction): 1 = East 2 = Southeast 4 = South 8 = Southwest 16 = West 32 = Northwest 64 = North 128 = Northeast For the destination tile, the bit to check for is (1 << ((Movement Direction + 4) & 7)): 1 = West 2 = Northwest 4 = North 8 = Northeast 16 = East 32 = Southeast 64 = South 128 = Southwest "obj": Defaults to false. If true, tile goes on the map's object layer instead of the turf layer. "type": Tile type. Only "sign" does anything currently, in which case the user will see the "message" field when the tile is bumped into. Other tile types that are used in the default tileset (but not supported by the client) are "escalator" (automatically move in a given direction), "ice" (keep moving until you hit a non-ice tile). "message": Message to display if user bumps into this tile and it's type is "sign". "dir": Tile direction. Not used for anything currently. Directions available: 0 = East 1 = Southeast 2 = South 3 = Southwest 4 = West 5 = Northwest 6 = North 7 = Northeast "over": Display over entities. Can currently only apply to map objects, not map tiles. --- Autotiling --- "autotile_layout" Determines how to change "pic" to make it look connected to surrounding tiles of the same type (where the same type means that "autotile_class" matches, or that "name" matches if "autotile_class" is not provided). Possble values for this: 0 = Leave "pic" as-is and don't change it. 1 = The client looks at the four cardinal directions for connections. "pic" points at the middle of a 3x3 square of tiles representing a square of connected tiles, with four corners, edges, and a middle tile. Similar to how 9-slice scaling works. Will use the middle tile if the needed tile can't be represented (like one that has a connection only on the left and right). .-. |P| '-' P = Pic 2 = An extension of 1 that also supports tiles connected only horizontally and vertically (with tiles above and to the right of the 3x3 square). HHHO .-.V |P|V '-'V P = Pic O = Tile to use if there is no connection in any direction H = Tiles to use when the only connections are horizontal V = Tiles to use when the only connections are vertical 3 = Exactly the same as how 2 works, except "pic" points at the tile used for when there are no connections. The reason 2 and 3 both exist is so that you can choose which fallback will look better for clients that don't support autotiling. HHHP .-.V |~|V '-'V 4 = The client looks at all eight surrounding tiles, and builds a 16x16 tile out of four 8x8 parts from the tileset. For example, a tile that's connected on the left and the right will be built out of 8x8 tiles from the top edge of the main square and 8x8 tiles from the bottom edge. 8x8 tiles from the # position override 8x8 tiles in the result when there is a connection north and east but not northeast, north and west but not northwest and so on. This layout is supposed to be similar to how RPG Maker 2000/2003 does autotiling, though one difference is that the tile in the O position is actually used, instead of only showing up on the map editor. O # .-. |P| '-' P = Pic O = Tile to use when there are no connections # = Tile to use when there are connections on all four cardinal directions, but not northeast, northwest, southeast, or southwest 5 = Exactly the same as how 4 works, except "pic" points at the tile used for when there are no connections. P # .-. |~| '-' 6 = Horizontal-only autotiling, where single just uses the middle tile LPR P = Pic; tile to use if there is a connection on both the left and right, OR if there is neither a connection on the left nor the right. L = Tile to use if there is a connection on the right, but not the left R = Tile to use if there is a connection on the left, but not the right 7 = Horizontal-only autotiling, separate single, defaulting to middle -P-O P = Pic; tile to use if there is a connection on both the left and right L = Tile to use if there is a connection on the right, but not the left R = Tile to use if there is a connection on the left, but not the right O = Tile to use if there is not a connection on the left or the right 8 = Horizontal-only autotiling, separate single, defaulting to single -#-P # = Tile to use if there is a connection on both the left and right L = Tile to use if there is a connection on the right, but not the left R = Tile to use if there is a connection on the left, but not the right P = Pic; tile to use if there is not a connection on the left or the right 9 = Vertical-only autotiling, where single just uses the middle tile U P D P = Pic; tile to use if there is a connection on both the left and right, OR if there is neither a connection on the left nor the right. U = Tile to use if there is a connection on the bottom, but not the top D = Tile to use if there is a connection on the top, but not the bottom 10 = Vertical-only autotiling, separate single, defaulting to middle O U P D P = Pic; tile to use if there is a connection on both the top and bottom U = Tile to use if there is a connection on the bottom, but not the bottom D = Tile to use if there is a connection on the top, but not the top O = Tile to use if there is not a connection on the top or the bottom 11 = Vertical-only autotiling, separate single, defaulting to single P U # D # = Tile to use if there is a connection on both the top and bottom U = Tile to use if there is a connection on the bottom, but not the bottom D = Tile to use if there is a connection on the top, but not the top P = Pic; tile to use if there is not a connection on the top or the bottom 12 = 8-way connections and 8x8 tiles, defaulting to middle Builds the tile out of four 8x8 units, like 4 and 5 P S C E M = Pic; tile to use if there are connections in all 8 directions S = Tile to use if there are no connections in cardinal directions C = Tile to use when there are connections on all four cardinal directions, but not northeast, northwest, southeast, or southwest E = Edges, broken up in the following way: RD | R=Connection on everything except right | D=Connection on everything except down UL | U=Connection on everything except up | L=Connection on everything except left 13 = 8-way connections and 8x8 tiles, defaulting to single Like 12 but the Pic value points to S instead of M 14 = 8-way connections and 8x8 tiles, defaulting to middle, with vertical and horizontal Builds the tile out of four 8x8 units, like 4 and 5, but there's a separate tile for a vertical connection and a horizontal connection P S C V H M = Pic; tile to use if there are connections in all 8 directions S = Tile to use if there are no connections in cardinal directions C = Tile to use when there are connections on all four cardinal directions, but not northeast, northwest, southeast, or southwest V = Tile to use when there are connections on the top and bottom, but not left and right H = Tile to use when there are connections on the left and right, but not top and bottom 15 = 8-way connections and 8x8 tiles, defaulting to single, with vertical and horizontal Like 14, but the Pic value points to S instead of M "autotile_class" When provided, the client will use this field for determining whether tiles should look connected to each other. "autotile_class_edge" When provided, tiles with the specified class will connect to this tile, but this tile will not use this when connecting back. --- Animation --- "anim_frames" Defaults to 1, which disables animation. Number of frames for the animation the tile is involved with. "anim_speed" Defaults to 1. Amount of time each frame takes up in units of 0.1 seconds. "anim_mode" Defaults to 0. Integer that specifies how to play the animation. You can choose from the following options: 0 = Play forwards 1 = Play in reverse 2 = Play in a ping-pong style (which means play forward, then backwards, then forward again, then backwards again, and on and on) 3 = Same as 2, but starts in reverse 4 = Random frames If a tile is animated (which means its anim_frames value is greater than 1), that means that whenever the tile is drawn, the x portion of the tile's pic will change over time to create an animation. For a forwards animation, this means that the tile will be drawn with the specified pic with an offset of +0, +1, +2, all the way through +animation_frames-1. A client may decide to disable animation if autotiling is used (or if an unknown autotile_layout is used), but a client could combine autotiling with animation by multiplying the offset added, so that each animation frame uses a separate autotiling tileset. Table of values to multiply by for each autotile_layout: 0: 1 (No autotiling) 1: 3 ("9 slice") 2: 4 ("4 directions - middle") 3: 4 ("4 directions - single") 4: 3 ("RPG - middle") 5: 3 ("RPG - single") 6: 3 ("Horizontal - middle 3") 7: 4 ("Horizontal - middle 4") 8: 4 ("Horizontal - single 4") 9: 1 ("Vertical - middle 3") 10: 1 ("Vertical - middle 4") 11: 1 ("Vertical - single 4") 12: 1 ("Quarter 8-way - Middle (8)") 13: 1 ("Quarter 8-way - Single (8)") 14: 1 ("Quarter 8-way - Middle (16)") 15: 1 ("Quarter 8-way - Single (16)") "anim_offset" Defaults to 0. Adds an offset to the timer used for animation (in 0.1 second units).