Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <metatile>
- Defines a metatile: a section of tiles that should be placed together. It can be seen as a tilemap that can be stamped onto another tilemap.
- *probability: Same as for <tile>
- Goes in the <tileset> element.
- Either contains a <layer> element or a <quickMetatile> element. May also contain a <9SectionScaling> element.
- <quickmetatile>
- Defines that the tilemap for the metatile is just a section of prelaidout tiles on the tileset.
- * x: The x postion (in tiles) on the tileset where the top left corner of the metatile begins
- * y: The y postion (in tiles) on the tileset where the top left corner of the metatile begins
- * width: The width of the metatile (in tiles)
- * height: The height of the metatile (in tiles)
- * scan: (Defaults to 2D) If the metatile is laid out in 2D or 1D scan on the tilemap
- 2D scan has the tiles laid out as in the source image, while 1D use only the tile id.
- 1D scan builds the tilemap by starting in the top left corner and using incrementing tile indexes left-to-right, top-to-bottom.
- <9SectionScaling>
- Allows scaling the metatile by repeating parts of it. The top and bottom edges are not repeated on the y axis,
- with the left and right edges not repeating on the x axis. The corners don't repeat at all.
- * top: The number of tiles that compose the non resizing part of the top edge of the metatile
- * bottom: The number of tiles that compose the non resizing part of the bottom edge of the metatile
- * left: The number of tiles that compose the non resizing part of the left edge of the metatile
- * right: The number of tiles that compose the non resizing part of the right edge of the metatile
- If an attribute or the entire element is missing then the default value is zero.
- <data>
- Bits 25 to and including bit 28 define a tile type integer.
- Type 0 is a plain ordinary tile.
- Type 4 is a non scaled metatile instance.
- Type 5 is a scaled metatile instance.
- Type 8 is an animated tile
- Type 9 is an animated tile with an overriden animation rate
- Type 10 is an animated tile with a staggering offset
- Type 11 is an animated tile with an overriden animation rate and a staggering offset
- Normal tiles, metatiles and animations have different namespaces. In other words, they do not share the same set of numbers. Tile # 1 is not the same as metatile # 1.
- If the tile is a scaled metatile instance then two integers follow the tile number. They are, in order, the width of the metatile instance and the height of the metatile instance.
- Metatile instances are not written out for each tile they are composed of. Instead they work like a table cell in HTML with a colspan and/or rowspan attribute. Scaling takes place before rotation/mirroring.
- If the metatile instance is rotated and/or mirrored then both the indididual tiles and the tilemap of the metatile is rotated.
- The position of the metatile instance in the main tilemap is always the top left corner of the boundary region that the metatile occupies in the main tilemap.
- Metatile instances may not overlap with other tiles.
- If there is an overriden animation rate then an additional integer follows the tile number. (Someone else think up the unit for that)
- If there is a staggering offset then an additional integer follows the tile number (or animation rate override). (Yup, someone else think up the unit here too)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement