Skip to content

TileData.json

JimmySnails edited this page Apr 3, 2020 · 38 revisions

Properties:

TileData.json properties

Property Required DataType Description Default
DataType Description Default
"author" yes String The author of this item
"category": yes String The category this item resides in. Categories are used for the building menu in-game and for sorting the items in the editors tree view
"description": yes String Description of the item that is shown in it's details
"tileType": yes String (to enum) The tiletype determines the tiles behaviour. See below for more details DEFAULT
"RequiredTiles": no Json Array How many tiles this building uses. - See documentation below 1x1
"isOverPlacable": no Boolean Determines if other tiles can be placed over this one tile. no
"placeOnWater": no boolean Can this building be placed on water only false
"id": yes String The ID of this item. Must be unique and can be referenced in the code.
"power": no Int Power production of this item. Negative values means power consumption. 0
"residents" no Int How many residents / workers this building can hold 0
"price": no Int How much it costs to place this building 0
"title": yes String The items title. It's shown ingame and in the editors tree-view
"upkeep cost" no Int Monthly cost to upkeep this building 0
"water" no Int Water production of this item. Negative values means power consumption. 0
"tag" yes String Array Multiple tags for searching this item ingame. Must be a string array
"tiles" yes JSON Array Tile Spritesheet information array - see below for detailed description
"slopeTiles" no JSON Array Slope Tile Spritesheet information array - see below for detailed description
"shoreLine" no JSON Array Shore Tile Spritesheet information array. This is only applicable for tiles with TileType "terrain" - see below for detailed description
"biomes" no String Array Restrict this building to spawn only in the given biomes. Must correspond to a biome defined in resources/data/TerrainGen.json ""
"style" no String Array (to enum) Restrict this building to certain Art Styles. See enum Style description below ALL
"wealth" yes String (to enum) Restrict this building to a certain wealth level. See enum Wealth description below NONE
"zones" yes String Array (to enum) Restrict this building to a zone type. See enum Zones description below NONE

Tiles / SlopeTile / ShoreLines json property:

Property Required DataType Description Default
"clip_height": yes Int Size of this element or of one tile, if the image contains multiple tiles in a tileset. auto
"clip_width": yes Int Size of this element or of one tile, if the image contains multiple tiles in a tileset. auto
"count": no Int How many frames / tiles this image contains. One of the items will be randomly chosen per default, except for certain tiletypes. See TileType Enum 1
"offset": no Int If clip_rect / clip_height is used, the offset where the clipping should start 0
"fileName" yes String The filename of the image / spritesheet.
"rotations": no Int A number greater than 1 will prevent picking a random tile from the spritesheet if the count is > 1 1

RequiredTiles property

Property Required DataType Description Default
width no Int The width of building (how many nodes it'll occupty) 1
height no Int The height of building (how many nodes it'll occupty) 1

TileType Enum

BETTER_ENUM(TileType, int,
            DEFAULT,    // Default is for buildings and practically everything that'll be placed on the TERRAIN layer
            TERRAIN,    // Terrain itself
            WATER,      // Water terrain
            BLUEPRINT,  // Same as terrain, but gets placed on the BLUEPRINT layer
            AUTOTILE,   // Autotiling to itself, like roads, power lines, etc
            ZONE,       // Zones (rectangular placement)
            UNDERGROUND // same as AUTOTILE, but for the BLUEPRINT layer
)

Wealth Enum

BETTER_ENUM(Wealth, int,
            NONE,   // not applicable
            LOW,    // Low income
            MEDIUM, // Medium income
            HIGH    // High income
)

Style Enum

BETTER_ENUM(Style, int,
            NONE, // not applicable
            ALL,      // Default, place the Building in all Styles
            ASIAN,    // This building will only appear in a game with the Style Asian
            EUROPEAN, // This building will only appear in a game with the Style European
            US        // This building will only appear in a game with the Style US
)

Zones Enum

BETTER_ENUM(Zones, int,
            NONE, // not applicable
            RESIDENTIAL,
            INDUSTRIAL, 
            COMMERCIAL,
            AGRICULTURAL
)
Clone this wiki locally