Tileset File Format
This description is based on Crimson Fields 0.4.7.
A tile set consists of two files:
- the bitmap (*.bmp) containing the tile graphics and
- the tile set source (*.tsrc) containing the tile properties
The bitmap file must be a Windows bitmap format with up to 256 colors. The colormap must be indexed (8 bits). No other formats are supported yet. The bitmap contains all tile graphics. Each tile has an area of 32x28 pixels. The first eight tiles are special tiles like cursors and markers. The game and also the level editor expect them at these locations.
The tile set source file connects the tile image with properties. It is divided in sections. The name of a section is enclosed by '[]'.
The first section is named tileset and contains general options:
- name = name of the tile set
- icons = name of the bitmap file
- class =
Each section is a tile and starts with tile. Below this header follow the properties in the widely used format:
property = value
The tile section supports following properties:
- terrain = terrain type this tile belongs to
- icon = index of the image in the bitmap file representing this tile
- color = color of the tile used in the overview map display
- move = how expensive is it to cross this tile
- attack = attack modifier
- defend = defence modifier
Terrain Class
Any number of terrain types can be assigned to a tile. The identifier 'terrain' might appear multiple times to define more than one terrain type, or it may be ommitted completely to define a tile no units can move to. The class id at the beginning of the tileset file roughly corresponds to these terrain types: Class0 = 'plains', class1 = 'forest', etc.
Possible terrains are: 'plains', 'forest', 'mountains', 'trenches', 'rails', 'shallowwater', 'deepwater', 'shop', 'rough', 'road', 'swamp', 'water', 'restricted'
Icon
The number of the icon in the image that should represent this tile. The smallest number here is 9 because of the special tiles.
Move
The move cost associated with this tile. Values below -1 will be clipped. This value specifies how many movement points are needed to cross this tile.
Color
The color definition consists of three byte values representing red, green, and blue, separated by commas. This value defines which colour this tile should have in the map preview.
Attack
The attack modifier, -20%..+20%
Defend
The defence modifier, -20%..+20%