31 lines
987 B
ReStructuredText
31 lines
987 B
ReStructuredText
.. _yaml-page:
|
|
|
|
===================
|
|
YAML Syntax
|
|
===================
|
|
|
|
TFScript uses YAML to express how you want your keybindings to work. YAML is a `well known data format <https://yaml.org/>`_ 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
|
|
=============
|
|
|
|
.. code-block::
|
|
:caption: Basic tfscript input file
|
|
|
|
class1:
|
|
key1:
|
|
type:
|
|
fields
|
|
key2:
|
|
type:
|
|
fields
|
|
...
|
|
|
|
class2:
|
|
key1:
|
|
...
|
|
|
|
.. meta::
|
|
:description: TFScript scripting tool for Team Fortress 2
|
|
:keywords: Team Fortress, TF2, tf2 script
|