Skip to content

JSON Properties

KINGTUT10101 edited this page Jul 8, 2023 · 12 revisions

This page contains a list of all JSON attributes for each content type. However, keep in mind that some attributes may be ignored depending on certain factors (eg: the type of a tile).

Tiles

Tiles include everything that can be built onto the map, like buildings, terrain, trees, roads, etc. These defaults are only 100% accurate for the generic “tile" type. Other types may use different default values (eg: “liquid” types will change the default values inside the “placedOn” object).

Property Description Required DataType Default
id A unique identifier for the tile. Yes String  
contentType The type of content this object is defining. Tiles should always set this to "tile". Yes String  
type The tile's type. This will determine its in-game behavior. Yes String  
name The name of the tile. No String filename
desc A description of the tile. No String filename
author The person or group that made this tile. No String “Unknown”
w The width of the tile. Yes Int  
h The height of the tile. Yes Int  
rotation The number of rotation frames. Possible values include 0, 2, and 4. No Int 0
cost The price of building the tile. No Int 0
images An array of image objects (see below). No Array Blank array
slopeImages An array of image objects that are used when the tile is built onto slopes. Only works for terrain and liquid tiles. No Array Blank array
foundation If true, the building will create foundations underneath itself if it is built on a slope. No Bool True
validTerrain An object containing a list of terrain tile IDs and/or tile types, which dictates what terrain this tile can be built on (see below). No Object Object containing “type_land": true
tags An array containing a list of tags that describe the tile. These tags will be used within the in-game searchbar. No Array Blank array
style The region that the building was inspired by (see below for possible values). No String “all”
density The population density of a building. Possible values are 1, 2, and 3, with 1 being the least dense. Only applies to RCI buildings that can appear in zones. No Int 1
effects An object containing effect IDs and their corresponding values. The value is the power of the influence (ie: its radius). No Object Blank object
roles An object containing role IDs and their corresponding values. The value is the tile's maximum capacity for that role. No Object Blank object
menu An object that will define how the tile appears in menus (see below). No Object (See below)
load If false, the game will not load this tile. No Bool True

Image Objects

Image objects are used to define the graphics for tiles. If no image objects are defined, the tile will be invisible. The game allows you to chain together multiple images for a single tile, which makes it easy to reuse images without duplicating them. If needed, the image objects also allow minor adjustments and offsets, which are shown below. However, you usually only need to provide a filename since the game often makes most of the other calculations automatically.

When the game loads the images, it will slice them into individual “frames”, which can be used for adding building rotations or multiple variations. The size of each frame is automatically calculated based on the size of the building, the number of rotation frames, and the images' dimensions.

image

Example: A single image containing two frames.

Property Description Required DataType Default
file A path to the image file. It should be a PNG file, or else it may not work properly. Yes String  
offsetX The number of horizontal pixels to offset the image by in rendering. No Int 0
offsetY The number of vertical pixels to offset the image by in rendering. No Int 0
w The width of the image. No Int image width
h The height of the image. No Int image height
beginW Offsets the starting x-position of the frame slicing. For example, a value of 10 means that the first 10 pixels on the x-axis will be ignored when the game slices the image into individual frames. No Int 0
beginH Offsets the starting y-position of the frame slicing. For example, a value of 10 means that the first 10 pixels on the y-axis will be ignored when the game slices the image into individual frames. No Int 0

Menu Object

The menu object will define how the tile appears in the build menu. If it is undefined, the game will place the tile into a hidden category that can only be accessed in debug mode.

Property Description Required DataType Default
category The ID of the category the tile should be placed within. Yes String  
displayImage An image object that will be used as an icon for the tile instead of its regular frames. No Object Blank object
position The position that the tile will be inserted into within the menu. If this is not defined, the tile will be inserted at the end of the category. No Int Infinity

Clone this wiki locally