-
Notifications
You must be signed in to change notification settings - Fork 177
YAML Basics: Intro
YAML is a human friendly file format that we use to store settings. It's got a website and everything (http://yaml.org/), but there are only a few things you actually need to know:
Indentation matters. Use two spaces for each level of indentation.
If you see a line like train_with_spells: true
, that means that the train_with_spells
setting is being assigned a value of true
. This may also be referred to as a hash in which train_with_spells
is mapped to true
. Values can be true/false, numbers, text, hashes, or lists (see below).
A list (or array) is a series of values. For example, this creates a list (named lootables
) of item nouns:
lootables:
- bolt
- arrow
- coin
- map
- scroll
A comment is any line that starts with a #
. They are ignored when our scripts read your settings file. Comments are entirely for your own benefit (e.g. to leave yourself a note).
Don't worry, it'll make more sense if you go look at a YAML file. Try taking a look at some of these.
YAML files are loaded in a predefined order. base.yaml
is loaded first, then YourCharacterName-setup.yaml
. If any arguments are given to a script (for example, ;combat-trainer BacktrainWeapons
), then YourCharacterName-BacktrainWeapons.yaml
will be loaded last.
If the same setting occurs in multiple YAML files, then the last version of that setting is used. For example, you could define dance_threshold
to be 1 in YourCharacterName-setup.yaml
and then redefine it to be 0 in YourCharacterName-BacktrainWeapons.yaml
.
base.yaml
provides defaults for many (but not all) of the settings. You should never modify base.yaml
directly; instead override settings in YourCharacterName-setup.yaml
or YourCharacterName-SomethingElse.yaml
. If you think something should be changed in base.yaml
, please contact us in-game or open a pull request. We welcome all feedback and suggestions.
That's a good question! Take a look at the the list of settings on Elanthipedia. Click EXPAND
next to each script name to get more info on each one.