tfscript/docs/source/yaml.rst

987 B

YAML Syntax

TFScript uses YAML to express how you want your keybindings to work. YAML is a well known data format that helps you write structured data in a plain text file. That means you write out a hierarchy of things, with the attributes of those things, and program like tfscript can read that data file in very carefully and use it to do what you wanted. In this case, we define a YAML format for TF2 scripting. You can write terse little blocks of YAML that expand into multiple lines of TF2 script, including standard checks for server-side features and common mistakes.

Example

class1:
  key1:
    type:
      fields
  key2:
    type:
      fields
...

class2:
  key1:
...