litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Update Tileset specification

Open nightm4re94 opened this issue 1 year ago β€’ 0 comments

<tileset>

  • [ ] class: The class of this tileset (since 1.9, defaults to β€œβ€).
  • [ ] objectalignment: Controls the alignment for tile objects. Valid values are unspecified, topleft, top, topright, left, center, right, bottomleft, bottom and bottomright. The default value is unspecified, for compatibility reasons. When unspecified, tile objects use bottomleft in orthogonal mode and bottom in isometric mode. (since 1.4)
  • [ ] tilerendersize: The size to use when rendering tiles from this tileset on a tile layer. Valid values are tile (the default) and grid. When set to grid, the tile is drawn at the tile grid size of the map. (since 1.9)
  • [ ] fillmode: The fill mode to use when rendering tiles from this tileset. Valid values are stretch (the default) and preserve-aspect-fit. Only relevant when the tiles are not rendered at their native size, so this applies to resized tile objects or in combination with tilerendersize set to grid. (since 1.9)

Can contain at most one: <image>, , <grid> (since 1.0), <properties>, <terraintypes>, <wangsets> (since 1.1), <transformations> (since 1.5)

<terraintypes>

Deprecated: This element has been deprecated since Tiled 1.5, in favour of the element, which is more flexible. Tilesets containing terrain types are automatically saved with a Wang set instead.

This element defines an array of terrain types, which can be referenced from the terrain attribute of the tile element.

Can contain any number:

<terrain>

Deprecated: This element has been deprecated since Tiled 1.5, in favour of the element.

name: The name of the terrain type.

tile: The local tile-id of the tile that represents the terrain visually.

Can contain at most one: <properties>

<transformations>

This element is used to describe which transformations can be applied to the tiles (e.g. to extend a Wang set by transforming existing tiles).

hflip: Whether the tiles in this set can be flipped horizontally (default 0)

vflip: Whether the tiles in this set can be flipped vertically (default 0)

rotate: Whether the tiles in this set can be rotated in 90 degree increments (default 0)

preferuntransformed: Whether untransformed tiles remain preferred, otherwise transformed tiles are used to produce more variations (default 0)

<wangsets>

Contains the list of Wang sets defined for this tileset.

Can contain any number: <wangset>

<wangset>

Defines a list of colors and any number of Wang tiles using these colors.

name: The name of the Wang set. class: The class of the Wang set (since 1.9, defaults to β€œβ€). tile: The tile ID of the tile representing this Wang set. Can contain at most one: <properties> Can contain up to 255: <wangcolor> (since Tiled 1.5) Can contain any number: <wangtile>

<wangcolor>

A color that can be used to define the corner and/or edge of a Wang tile.

name: The name of this color. class: The class of this color (since 1.9, defaults to β€œβ€). color: The color in #RRGGBB format (example: #c17d11). tile: The tile ID of the tile representing this color. probability: The relative probability that this color is chosen over others in case of multiple options. (defaults to 0)

Can contain at most one: <properties>

<wangtile>

Defines a Wang tile, by referring to a tile in the tileset and associating it with a certain Wang ID.

tileid: The tile ID. wangid: β€œThe Wang ID, given by a comma-separated list of indexes (starting from 1, because 0 means unset) referring to the Wang colors in the Wang set in the following order: top, top right, right, bottom right, bottom, bottom left, left, top left (since Tiled 1.5). Before Tiled 1.5, the Wang ID was saved as a 32-bit unsigned integer stored in the format 0xCECECECE (where each C is a corner color and each E is an edge color, in reverse order).” hflip: Whether the tile is flipped horizontally (removed in Tiled 1.5). vflip: Whether the tile is flipped vertically (removed in Tiled 1.5). dflip: Whether the tile is flipped on its diagonal (removed in Tiled 1.5).

nightm4re94 avatar Jul 20 '22 17:07 nightm4re94