ART Format (Build)

From ModdingWiki
Jump to navigation Jump to search
ART Format (Build)
There is no image of a tileset in this format — upload one!
Format typeTileset
HardwareVGA
Max tile count231 - 1
PaletteShared VGA
Tile names?No
Minimum tile size (pixels)0×0
Maximum tile size (pixels)32767×32767
Plane count1
Plane arrangementLinear VGA
Transparent pixels?No
Hitmap pixels?No
Metadata?None
Supports sub-tilesets?No
Compressed tiles?No
Hidden data?No
Games

The ART format is used by Ken Silverman's Build engine to store game textures and sprites. It contains a number of individual graphics called tiles.

File Names and Tile Numbers

According to Ken Silverman's documentation, ART files can be named anything, as long as they end in three digits and .ART, but for most games they are named TILES###.ART. The Build engine games will load these in order starting from 000 until they can't find any more. Every tile in the game has a numerical index, and each ART file for a particular game holds a range of these. For example, TILES000.ART may hold tiles 0 to 255, and TILES001.ART would hold tiles 256-511. The range of indexes held by a particular file are indicated in the header. The tiles are normally stored sequentially (TILES000.ART holding the first set, and each higher numbered file continuing where the previous left off) with a consistent number of tiles per file, but it is up to the particular game's developers.

Header

Data Type Name Description
INT32LE artversion version number, should be 1
INT32LE numtiles number of tiles, unused. The number of tiles can be determined by the localtilestart and localtileend fields.
INT32LE localtilestart number of first tile in this file
INT32LE localtileend number of last tile in this file.
INT16LE[localtileend-localtilestart + 1] tilesizx array of the x-dimensions of all of the tiles in the file
INT16LE[localtileend-localtilestart + 1] tilesizy array of the y-dimensions of all of the tiles in the file
INT32LE[localtileend-localtilestart + 1] picanm array of attributes for all the tiles

Tile Attributes

Entries in the picanm array store several properties for each tile:

bits 31-28 bits 27-24 (4 bit unsigned integer) bits 23-16 (8 bit signed integer) bits 15-8 (8 bit signed integer) bits 7 and 6 (2 bit enumeration) bits 5-0 (6-bit unsigned integer)
unused? Animation speed Y-center offset X-center offset Animation type:
  • 00 = no animation
  • 01 = oscillating animation
  • 10 = animate forward
  • 11 = animate backward
Number of frames

Pixel Data

The pixels are stored as bytes, corresponding to indexes in the palette stored in PALETTE.DAT. The pixels in each tile are stored columnwise, starting from the top-left. For a 4x4 tile, the offsets for each pixel would be arranged like this:

0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15

Source