ProtoRPG:Tileset file

Jump to: navigation, search

A tileset file is a text file that must be stored in the tilesets subdirectory. It gives a description of all tiles used in a [[ProtoRPG:Map file|map]. Each map must specify which tileset file to use, to allow for sharing tilesets or using customized ones.

Generic format

A tileset is a text file containing a JSON array of tiles :

[	{	"id": 0,
		"title": "some grass",
		"file": "tiles0.png"
	},
	{
		"id": 1,
		"title": 'a wooden door',
		"blocking": 2,
		"file": ['tiles0.png',2],
		"onUse": { "action": "replace", "newTile": 0 }
	}

Tile formats

Each tile must have at least :

Optional attributes

The following attributes are optional :