Cheat template files use the JSON format and are put in simulation/data/cheats (see mod layout).

The basic format is:

    "Name": "i want pizza",
    "Data": {
        "Action": "addresource",
        "Type": "food",
        "DefaultParameter": 1000,
        "isNumeric": true,
        "Templates": []

Name is the string which has to be entered in the chat to execute the Action (if cheats are enabled). The code which decides what to do (based on the Action is Cheat.js.

Type: Optional passed as an additional parameter (to differentiate between similar actions).

DefaultParameter: Optional. If this is defined the cheat takes an additional parameter. The default, which is used if no additional parameter is provided is the value of DefaultParameter.

isNumeric: Optional, only used iff the cheat takes a parameter. If true the parameter is passed as a number, else it is passed as a string. Only positive integers are currently passed on.

Templates: Optional. Array of templates that the cheat uses (eg createPlane.json).

Last modified 3 years ago Last modified on May 4, 2014 3:24:37 AM