Commercial#
Commercial drafts have the type of commercial
and belong to the $cat_commercial00
category by default.
Attributes#
active#
Type: boolean
Whether the draft is active and should be loaded by the game.
add price#
A single ID or array of IDs of other drafts whose building price should be added when building this building.
alias#
Type: string
aliases#
Same as alias, but for multiple IDs.
alignable#
Type: boolean
If true the building will align with neighbouring buildings.
By default will inherit the value of the frame alignment attribute.
allocate road flags#
Allocates a custom car flag.
Note that there is a max limit of 32 custom flags.
animated#
Type: boolean
If set and the building has multiple frames, then these frames will be used for animation. Normally multiple frames will be used for different variants of a building and or rotation awareness.
User will no longer be able to select a specific frame manually.
By default, the value will be false.
Deprecated
This attribute is a relict from a time when separate animation objects were not a thing yet. Use the more powerful animation attribute instead.
animation#
Type: Animation
array
Similar to smoke, can be used to place animations on your building. Position is relative to pivot point of the building.
animation fg#
Type: Animation
array
aspect body disposal capacity#
Type: integer
The body capacity of a deceased processing facility.
aspect education high capacity#
Type: integer
The student capacity of a high school.
aspect education low capacity#
Type: integer
The student capacity of a school.
aspect health care capacity#
Type: integer
The patient capacity of a hospital.
aspect waste disposal capacity#
Type: integer
The garbage capacity of a garbage processing facility.
author#
Type: string
The name of the author behind the draft.
auto build#
Type: boolean
Only supported by RCI drafts.
Determines whether the building can be built automatically by the game on corresponding zones and given demand.
By default, the value will be true.
auto build factor#
Type: float
The auto build factor can be used to tweak the auto spawn rate of the building.
Higher values will cause the building to be built more likely.
biomes#
Type: Biome spawner
Used for spawning draft objects on the map during generation.
budget item#
Type: string
ID of the draft that has the "budget item"
meta tag defined.
Buildings that have monthly income or spendings usually appear in the budget view in the associated category, that is e.g. parks for buildings of type park.
You can define your own type of budget, called budget item. That is a data object that will be used to provide a name for the item.
build height#
Type: integer
The height of the building in 8px units. Used for auto build time calculation, collision checks, clipping during drawing, helicopters and much more.
build time#
Type: integer
The build time of the building in days.
build time factor#
Type: float
build zone#
Type: boolean
bulldoze price#
Type: integer
The price to bulldoze the building.
Negative values require privileges.
burnable#
Type: boolean
Whether the building can be set on fire.
By default will inherit the value of the destroyable attribute.
capacity#
Type: integer
Capacity for passenger related calculations.
By default, the value will be 0.
car spawner#
Type: CarSpawner
category#
Type: string
ID of the category the draft should be contained in.
category from#
Type: string
Draft ID to grab category from and use for the draft.
composition#
Type: Composition
array
Composition buildings must be rotation aware.
conductive#
Type: boolean
Whether the building will connect to normal power lines.
By default, the value will be true.
deco frames#
deco frames winter#
density#
Type: float
Used for attribute calculations as more dense buildings usually have higher expectations.
By default, if the value is -1, the game will calculate it on its own by diving the number of people in the building by the building's area.
depot capacity#
Type: integer
Amount of vehicles that can be stored in a depot building.
By default, the value will be 0.
Added in version 1.12.26
destroyable#
Type: boolean
Whether the building is destroyable by disasters.
By default, the value will be true.
destroyable by fun#
Type: boolean
Whether the building is destroyable by fun actions.
By default, the value will be true.
destruction#
Type: string
The ID of a building that will be used to replace the destructed building.
Must be either 1x1 in which case it will fill up the area of the destructed building, or match the size of the destructed building.
dev#
Type: boolean
diamond price#
Type: integer
The diamond price to build this building. Will be ignored in case the building was unlocked by a feature.
On premium platforms, the value will be 0.
disaster#
Type: boolean
Whether the existence of the building should be considered as a disaster.
When city is in a disaster state, game may play disaster music, the city growth will halt.
By default, the value will be false.
draw ground#
Type: boolean
If true the ground below the building will be drawn. Useful when the building has transparent parts in the ground.
By default, the value will be false.
draw water borders#
Type: boolean
draw water ground#
Whether water will be drawn under the building even if there's ground. Useful for semi transparent buildings that use this feature to incorporate water into their visuals.
If a string is provided, ground draft by the specified ID will be used for drawing.
By default, the value will be true.
draw zone#
Type: boolean
easy remove#
Type: boolean
explodes#
Type: boolean
Whether building will explode upon being burnt down (that is, after a while of burning).
By default, the value will be false.
explosion radius#
Type: integer
For exploding buildings only, the radius of the explosion.
By default, the value will be 16.
ext rotation aware#
Type: boolean
If true the building will use 16 frames per variant to model joining with nearby buildings.
By default, the value will be true, if the draft is rotation aware and has frame alignment or frame alignment area attributes set to true.
final#
Type: boolean
If set to true, the draft can no longer be overridden.
frame alignment#
Type: boolean
If true the building will be built using a line tool unless frame alignment area is true.
By default will inherit the value of the frame alignment area attribute.
frame alignment area#
Type: boolean
If true the building will be built using an area tool.
By default, the value will be false.
frame animation fg indices#
frame animation indices#
Animation indices are used to specify which animations should be visible for which frames.
frames#
Graphic frames definition of the draft.
At least one frame has to be given. If multiple frames are given, player may select one of them in the game.
Required unless you are using a composition.
frames winter#
Works the same as frames, but during winter time. If you define it you have to provide the same number of frames as in frames.
free build time skip#
Type: boolean
Whether the build time can be skipped for free in freemium versions.
fun#
Type: Fun
ground frames#
ground frames winter#
ground tiles#
Array of Viewport draft IDs.
habitants#
Type: integer
Only supported by residential type drafts.
Number of habitants in the building.
By default, the value will be inferred from building size.
height#
Type: integer
Tile height of the base of the building.
Must be of equal value to the width attribute unless it's a composition.
helicopter spawner#
Type: HelicopterSpawner
hidden#
Type: boolean
Whether the draft shows up in the toolbar. If set to true, the draft will not be available in the toolbar.
hidden on click#
Type: boolean
By default, the value will be false.
hide id#
Type: boolean
Whether to hide the draft ID even when the debug mode is enabled. This will automatically be set to true if final is set to true or if your draft is part of an encrypted plugin file.
high voltage only#
Type: boolean
Whether the building will connect to high voltage lines.
icon frames#
Frames that will be used for the top left corner of the building dialog.
Size of the frames should be 26x26 pixels.
icon frames winter#
Frames that will be used during winter for the top left corner of the building dialog.
Size of the frames should be 26x26 pixels.
id#
Type: string
Unique identifier of the draft.
idle build time#
Type: boolean
Whether the building can get build progress through idle time.
By default, the value will be true.
index#
Type: boolean
Whether to allow the draft to be indexed by Lua methods.
By default, the value will be true unless the draft is scenario draft.
infer requirements#
Type: boolean
Whether the draft should infer requirements from drafts in the composition.
May only be used with a composition attribute.
By default, the value will be true.
influence body disposal#
Type: integer
Has no effect unless the draft is privileged.
influence commercial#
Type: integer
Has no effect unless the draft is privileged.
influence culture#
Type: integer
Has no effect unless the draft is privileged.
influence density#
Type: integer
Has no effect unless the draft is privileged.
influence education high#
Type: integer
Has no effect unless the draft is privileged.
influence education low#
Type: integer
Has no effect unless the draft is privileged.
influence fire department#
Type: integer
Has no effect unless the draft is privileged.
influence health#
Type: integer
Has no effect unless the draft is privileged.
influence industrial#
Type: integer
Has no effect unless the draft is privileged.
influence level0#
Type: integer
Has no effect unless the draft is privileged.
influence level1#
Type: integer
Has no effect unless the draft is privileged.
influence level2#
Type: integer
Has no effect unless the draft is privileged.
influence management#
Type: integer
Has no effect unless the draft is privileged.
influence nature#
Type: integer
Has no effect unless the draft is privileged.
influence noise#
Type: integer
Has no effect unless the draft is privileged.
influence park#
Type: integer
Has no effect unless the draft is privileged.
influence passenger bus#
Type: integer
Has no effect unless the draft is privileged.
influence passenger train#
Type: integer
Has no effect unless the draft is privileged.
influence police#
Type: integer
Has no effect unless the draft is privileged.
influence pollution#
Type: integer
Has no effect unless the draft is privileged.
influence preview#
Type: boolean
Whether a preview of the building's influences should be rendered.
By default, the value will be true.
influence radioactive#
Type: integer
Has no effect unless the draft is privileged.
influence religion#
Type: integer
Has no effect unless the draft is privileged.
influence residential#
Type: integer
Has no effect unless the draft is privileged.
influence sport#
Type: integer
Has no effect unless the draft is privileged.
influence traffic#
Type: integer
Has no effect unless the draft is privileged.
influence waste disposal#
Type: integer
Has no effect unless the draft is privileged.
inherit#
Type: boolean
Whether to modify a draft of the same ID by inheriting values.
level#
Type: integer
Only supported by RCI buildings.
Represents wealth level of the building. Level ranges from 1 to 3.
By default, the value will be 1.
liquid#
Type: boolean
Whether the building will conduct water like a pipe.
map color#
Type: Color
Only supported by terrain drafts.
Specifies the color of the building on the map.
max count#
Type: integer
The maximum permitted occurrences of the building within the city.
By default, the value will be -1 which indicates no limit.
max version#
Type: integer
The maximum game version that will run the draft.
meta#
Type: Meta
A special attribute that allows you to store additional metadata about the draft.
Read more about it in the Meta documentation.
min version#
Type: integer
The minimum game version required to run the draft.
min water tiles#
Type: integer
If the value is >= 0 then the building can only be built if the building area below it consists of at least this amount of water tiles.
By default, the value will be -1.
monthly price#
Type: integer
The monthly costs of this building. Negative values mean income and require privileges.
moveable#
Type: boolean
Whether the building can be moved by move building tool.
mute#
Type: boolean
Whether to suppress any errors that have occurred while loading the draft.
mute lua#
Type: boolean
needs land#
Type: boolean
If true there must be at least one land tile under the building.
If false and needs water is true then there must be no land tiles under the building.
By default, the value will be true.
needs road#
Type: boolean
If true the building will complain if there is no road connection available.
To determine road connection the road flags of nearby roads will be examined.
By default, the value will be true.
needs water#
Type: boolean
If true there must be at least one water tile under the building.
If false and needs land is true then there must be no water tiles under the building.
By default, the value will be false.
night light probability#
Type: float
not implemented#
Type: boolean
Whether the draft has to be inherited to be considered implemented. Will cause an error otherwise.
nuclear#
Type: boolean
Whether the explosion of the building will be nuclear.
By default, the value will be false.
on built fun#
Type: Fun
on click fun#
Type: Fun
on destroy fun#
Type: Fun
on event fun#
Type: Fun
once#
Type: boolean
Whether the draft should be loaded once.
What this means is that if another draft is encountered with the same ID, the game will ignore loading it rather than failing with an error message.
ordinal#
Type: integer
Position of the draft in a category. Lower ordinal value will list the draft higher. Negative values are allowed.
ordinal from#
Type: string
ID of the draft to grab ordinal from. Must be used in combination with the ordinal attribute.
override#
Type: boolean
Whether to modify a draft of the same ID by replacing values.
Rather than replacing the values, you may want to add or only change specific values of the draft. For that, refer to the inherit attribute.
pedestrian#
Type: string
ID of a pedestrian draft.
pedestrian count#
Type: integer
By default, the value will be 0.
people#
Type: integer
Only supported by RCI type drafts. Unified type that specifies habitants or workers depending on the RCI type.
performance#
Type: boolean
Whether the performance of the building can be adjusted. Performance impacts influences, aspects, costs and income.
By default, the value will be false.
pickable#
Type: boolean
Whether the building can be picked via eye dropper tool.
By default, the value will be true.
power#
Type: integer
Produced amount of energy by this building in kWh. Positive values produce and negative values consume the resource.
Maximum possible value is determined by $ ext{width} imes ext{height} imes 10000$, unless you're using privileges.
By default, the value will be inferred from building size.
power radius#
Type: integer
The maximum value is 10 unless privileged.
By default, the value will be 5.
premium#
Type: boolean
Whether the draft is premium. A premium draft will not be active in non premium versions of the game.
premium requirement#
Type: Nested requirement
Requirements that need to be fulfilled for the draft on premium platforms.
If platform is premium, this attribute will be loaded over the regular requirement attribute. On non-premium platforms, this attribute will be ignored.
premium requirements#
Type: Requirement
array
Requirements that need to be fulfilled for the draft on premium platforms.
If platform is premium, this attribute will be loaded over the regular requirement attribute. On non-premium platforms, this attribute will be ignored.
preview frames#
Frames that will be used for preview in the toolbar instead of regular frames.
preview frames winter#
Frames that will be used for preview in the toolbar instead of regular frames during winter.
price#
Type: integer
The price to construct the building. If the building costs diamonds, the price won't be charged.
Negative values require privileges.
price factor#
Type: float
Factor by which subsequent building prices will be multiplied by.
privileged#
Type: string
Privileged key for your draft. Allows the use of special features, which are restricted to trusted plugin creators only.
Deprecated
Due to a change in how the privilege system works, you are now recommended to use require privileges or require super privileges.
provide aspect body disposal#
Type: integer
The body capacity of a deceased processing facility.
provide aspect education high#
Type: integer
The student capacity of a high school.
provide aspect education low#
Type: integer
The student capacity of a school.
provide aspect health care#
Type: integer
The patient capacity of a hospital.
provide aspect waste disposal#
Type: integer
The garbage capacity of a garbage processing facility.
random frame#
Type: boolean
If true, every time you place the building, a random frame from the frame array will be selected
By default, the value will be true.
random fun#
Type: Fun
randomize animation#
Type: boolean
By default, the value will be false.
randomize lights#
Type: boolean
By default, the value will be true.
rci cars#
Type: integer
rebuild#
Type: boolean
Whether the RCI building will rebuild instead of being replaced by another. Useful if your population drops suddenly, but you want the city to remain looking the same.
By default, the value will be true.
removable#
Type: boolean
Whether the draft can be removed from the city by player build tools.
By default, the value will be true.
renameable#
Type: boolean
Whether the building can be renamed by the player.
By default, the value will be true.
require privileges#
Type: boolean
Whether the draft requires features such as monthly income, frame placement, etc.
Added in version 1.11.73
require scenario#
Array of scenario IDs in which this draft can be used. It will be unloaded when entering a city that is not one of these scenarios.
Privileged context is required to use this attribute as it could be used to cheat inside a scenario.
Added in version 1.12.12
require super privileges#
Type: boolean
Whether the draft requires features that are restricted to official game content such as DSA.
Added in version 1.11.73
requirement#
Type: Nested requirement
Requirements that need to be fulfilled for the draft.
requirements#
Type: Requirement
array
Requirements that need to be fulfilled for the draft.
road flags airport#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags all#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags bus#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags emergency#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags high speed#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags lkw#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags maglev#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags military#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags monorail#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags native pedestrian#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags none#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags normal#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags pedestrian#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags pkw#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags snow plow#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags subway#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags tractor#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags train#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags tram#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user0#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user1#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user2#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user3#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user4#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user5#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user6#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user7#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
road flags user8#
Type: boolean
For buildings that need road these flags will be used to determine whether a given neighbouring road counts as a connection.
At least one of the given flags must match with the flags of the neighbouring road.
rotation aware#
Type: boolean
If true the building will dedicate frames for use in rotation. In this case you have to provide a multiple of 4 frames.
By default, the value will be true, if the draft is alignable and has at least 4 frames or it is a composition building.
script#
Type: string
Used to attach a script to the current draft.
Supported modes of operation#
-
Loading the script from file:
-
Declaring the script inline:
-
Using a helper script
#LuaWrapper
for Real time script editing:
scripts#
Like script, but for multiple scripts.
searchable#
Type: boolean
Whether the draft can be searched in the toolbar.
selectable frames#
Type: boolean
Whether the user can manually select a frame upon building.
By default, the value will be true, if frame alignment attribute is false.
separator#
Type: boolean
Whether to separate the draft from others in a category.
service car tags#
Array of tags.
service cars#
Type: integer
ship count#
Type: integer
By default, the value will be equal to building's width.
ship radius#
Type: integer
By default, the value will be 128.
ships#
Array of ship draft IDs.
show new marker#
Type: boolean
Whether the draft will show a new marker in the toolbar.
smoke#
Type: Smoke
array
List of smoke sources. Position is relative to pivot point of the building.
See here for the listing of defined smoke types.
sound click#
Type: obj
This sound will be played when clicked on the draft in default mode.
Example#
One may refer to a file locally:
Or a game resource:
spawn#
Type: Legacy spawner
Used for spawning draft objects on the map during generation.
Deprecated
Following the biome update this method of building spawning is considered obsolete. Use the new biomes attribute instead.
strict lua#
Type: boolean
super conductive#
Type: boolean
Whether the building will connect to normal power lines and high voltage ones.
By default, the value will be false.
supports shoreline#
Type: boolean
If set to false the building cannot be built if there is coast under it.
By default, the value will be true.
supports slope#
Type: boolean
Determines whether this building handles slopes on it's own (graphically). Enabling this will not draw the concrete blocks under the building. Usually only recommended for decorations and in combination with draw ground attribute set to true.
By default, the value will be false.
supports terrain#
Type: boolean
Indicates whether this building can be placed on terrain in general (if not the building will only be placeable on flat areas).
By default, the value will be true.
template#
Type: string
ID of the template draft to inherit the implementation from.
template prefix#
Type: string
Has effect only when using templates.
templates#
Like template, but accepts multiple IDs.
text#
Type: string
Description, usually of the building. Should be English if distributed.
By default, the value will be null.
text id#
Type: string
title#
Type: string
Title, usually of the building. Should be English if distributed.
By default, the value will be null.
title id#
Type: string
type#
Type: string
A special attribute that determines what kind of attributes and abilities a draft has.
upgrades#
Type: Upgrade
array
Defines the upgrades the building can have.
Some additional notes: - price, monthly price, water, power and influences will be added to corresponding values of the building when the upgrade is applied
- You can also provide animations as for regular buildings, but not smoke
- You can set "only one":true in an upgrade to state that no other upgrade may be active at the same time. We use this for example for the radio station were you can have selected only one program at the same time.
use fence#
Array of fence draft IDs. A random fence will be chosen to be placed around a building.
By default, the behaviour is disabled.
use fire frames#
Type: boolean
Whether the building will draw the usual fire when burning.
Can be disabled to draw a custom fire animation.
By default, the value will be true.
volatile#
Type: boolean
Not in use.
By default, the value will be false.
water#
Type: integer
Produced amount of water by this building in L/h. Positive values produce and negative values consume the resource.
Maximum possible value is determined by $ ext{width} imes ext{height} imes 10000$, unless you're using privileges.
By default, the value will be inferred from building size.
water border frames#
water border frames winter#
water waste#
Type: float
Positive values indicate that the building causes water pollution. Negative values reduce water pollution.
width#
Type: integer
Tile width of the base of the building.
Must be of equal value to the height attribute unless it's a composition.
workers#
Type: integer
Only supported by commercial and industrial type drafts.
Number of workers in the building.
By default, the value will be inferred from building size.
zone#
Type: string
ID of the zone draft to use.