Category#
Category drafts have the type of category
.
By default, category drafts have the category of $cat_root00
.
Either frames or preview frames are required.
Attributes#
active#
Type: boolean
Whether the draft is active and should be loaded by the game.
alias#
Type: string
aliases#
Same as alias, but for multiple IDs.
author#
Type: string
The name of the author behind the draft.
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.
dev#
Type: boolean
final#
Type: boolean
If set to true, the draft can no longer be overridden.
frames#
frames winter#
hidden#
Type: boolean
Whether the draft shows up in the toolbar. If set to true, the draft will not be available in the toolbar.
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.
icon frames#
icon frames winter#
id#
Type: string
Unique identifier of the draft.
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.
inherit#
Type: boolean
Whether to modify a draft of the same ID by inheriting values.
max version#
Type: integer
The maximum game version that will run the draft.
meta#
Type: Meta
min version#
Type: integer
The minimum game version required to run the draft.
mute#
Type: boolean
Whether to suppress any errors that have occurred while loading the draft.
mute lua#
Type: boolean
not implemented#
Type: boolean
Whether the draft has to be inherited to be considered implemented. Will cause an error otherwise.
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.
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.
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.
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.
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.
separator#
Type: boolean
Whether to separate the draft from others in a category.
show new marker#
Type: boolean
Whether the draft will show a new marker in the toolbar.
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:
strict lua#
Type: boolean
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.
text id#
Type: string
title#
Type: string
Title, usually of the building.
title id#
Type: string
type#
Type: string
A special attribute that determines what kind of attributes and abilities a draft has.