Skip to content

Color#

Color drafts are used to define colors which can be referred to by attributes that use the Color attribute type.

Color drafts have the type of color.

Supports 2 input formats:

Either specifying the color using hex:

Or specifying the color using rgba:

Attributes#

a#

Type: integer

The alpha component of a color.

Defaults to 255.

active#

Type: boolean

Whether the draft is active and should be loaded by the game.

alias#

Type: string

aliases#

Type: string array

Same as alias, but for multiple IDs.

author#

Type: string

The name of the author behind the draft.

b#

Type: integer

The blue component of a color.

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 overriden.

g#

Type: integer

The green component of a color.

hex#

Type: string

hidden#

Type: boolean

Whether the draft shows up 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#

Type: Frame array

icon frames winter#

Type: Frame array

id *#

Type: string

Unique identifier of the draft.

index#

Type: boolean

Whether to allow the draft to be indexed by Lua methods.

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, 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 draft that is considered premium will not be active in non premium versions of the game.

premium requirement#

Type: Nested requirement

Only loaded on premium versions.

premium requirements#

Type: Requirement array

Only loaded on premium versions.

preview frames#

Type: Frame array

Frames that will be used for preview in the toolbar instead of regular frames.

preview frames winter#

Type: Frame array

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 to use 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.

r#

Type: integer

The red component of a color.

require privileges#

Type: boolean

Whether the draft requires features such as monthly income, frame placement, etc.

Added in version 1.11.73

require super privileges#

Type: boolean

Whether the draft requires features that are restricted to DSA.

Added in version 1.11.73

requirement#

Type: Nested requirement

requirements#

Type: Requirement array

script#

Type: string

Used to attach a script to the current draft.

Supported modes of operation#

  • Loading the script from file:

    {
        "script": "script.lua"
    }
    

  • Declaring the script inline:

    {
        "script": "function script:lateInit() Debug.toast('Late init called') end"
    }
    

  • Using a helper script #LuaWrapper for Real time script editing:

    {
        "script": "#LuaWrapper",
        "meta": {
          "luawrapper": {
            "script": "script.lua",
            "dev": true
          }
        }
    }
    

scripts#

Type: string array

Like script, but for multiple scripts.

searchable#

Type: boolean

Whether the draft can be searched in the toolbar.

separator#

Type: boolean

Whether to separate 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#

{
    "sound click": {
        "file": "path to file.mp3",
        // alternatively there's "res" string attr to refer to a game resource
    }
}

strict lua#

Type: boolean

template#

Type: string

ID of the template draft to inherit the implementation from.

You can also reference other templates.

template parameters#

template prefix#

Type: string

Has effect only when using templates.

Example#

Say you have some template drafts with IDs $ja_building_template00, $ja_residential_template00.

Instead of specifying them fully like so

{
  "templates": [
    "$ja_building_template00",
    "$ja_residential_template00"
  ]
}

You can instead use the attribute like so:

{
    "template prefix": "$ja_",
    "templates": [
        "building_template00",
        "residential_template00"
    ]
}

templates#

Type: string array

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.