-
Notifications
You must be signed in to change notification settings - Fork 105
TileData.json
SimplyLiz edited this page Feb 5, 2021
·
38 revisions
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 | |
"subCategory": | yes | String | subcategories 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 or if it needs to be demolished first. | no |
"placeOnWater": | no | boolean | Whether or not this building be placed on water. | false |
"placeOnGround": | no | boolean | Whether or not this building be placed on ground. | true |
"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 |
"inhabitants" | no | Int | How many residents / workers this building can hold. Also how much jobs it provides | 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 |
"happyness" | no | Int | The effect on happyness around this building. | 0 |
"groundDecoration" | no | String Array | tileID of the item that should be drawn on ground below sprite instead of terrain (grass, concrete, ...). When more than one tileID is supplied, a random ground decoration is chosen from the list on placement. Must be a tileID with tileType GroundDecoration. | |
"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 |
"crimeLevel" | no | Int | Crime rate this building produces or prevents (police station) | 0 |
"pollutionLevel" | no | Int | Pollution rate this building produces or prevents (police station) | 0 |
"fireHazardLevel" | no | Int | Fire hazard rate this building produces or prevents (police station) | 0 |
"educationLevel" | no | Int | How much education this building provides (educational building) / requires (job) | 0 |
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 if pickRandomTile is set to true. | 1 |
"offset": | no | Int | If clip_rect / (width and height) is used, the offset in the spritesheet where the clipping should start | 0 |
"fileName" | yes | String | The filename of the image / spritesheet. | |
"pickRandomTile": | no | Int | Whether or not a random tile of the tileset should be used, if set to true. Should be set to false for tiles with a predetermined order, like road. | true |
Property | Required | DataType | Description | Default |
---|---|---|---|---|
width | no | Int | The width of building (how many tiles it'll occupy) | 1 |
height | no | Int | The height of building (how many tiles it'll occupy) | 1 |
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)
GROUNDDECORATION, // Draw this Tile on GROUNDDECORATION layer. Buildings can be placed over it
UNDERGROUND // same as AUTOTILE, but for the BLUEPRINT layer
)
BETTER_ENUM(Wealth, int,
NONE, // not applicable
LOW, // Low income
MEDIUM, // Medium income
HIGH // High income
)
BETTER_ENUM(Style, int,
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
)
BETTER_ENUM(Zones, int,
NONE, // not applicable
RESIDENTIAL,
INDUSTRIAL,
COMMERCIAL,
AGRICULTURAL
)