-
Notifications
You must be signed in to change notification settings - Fork 177
YAML Basics: Part 2 Creating Your Own YAML
First, create a new text document named Character-setup.yaml where your character's capitalized name replaces the word Character. Ensure that the document's file type is .yaml and not .txt or the like. Some Windows users hide file extensions, which will not allow changing a document from .txt to .yaml. Changing this is basic computer usage, and not within the scope of this document.
For example, if your character is named Dennett, then your file will be named Dennett-setup.yaml
.
Your character's last name is ignored.
For crossing-training and combat-trainer to work, a minimum amount of information is required.
- Gear (armor, weapons)
- Hunting area
- Spells (buffs, offensive)
- Cambrinth
- Skills to train
As previously mentioned, these settings apply to more than one script. In particular: crossing-training
, combat-trainer
.
We will begin by setting up a YAML for a new character to hunt in rats, to use a cambrinth ring, and to train a few skills around town when not in combat.
Before Lich can determine which weapons to use while hunting, what armor to wear when stealing or during combat, or which pieces of your inventory require repair, we need to define two things: gear
and gear_sets
. The former details your gear, while the latter wraps this information into meaningful sets. Full documentation of each option available for listing gear can be found at the Lich script repository (expand combat-trainer).
Each item you wish to list (armor, weapons, brawling gear, shields) should include its own grouping of the following options under your gear
setting.
- :adjective: cloth
:name: hood
:is_leather: true
:hinders_lockpicking: true
:is_worn: true
- :adjective: short
:name: sword
:is_leather: false
Any option not included will default to off, or false. Examples can be found in any number of character YAMLs.
For gear_sets
, you will need to list either the ADJECTIVE NOUN from the gear listing or the full inventory string from INV COMBAT. For our given cloth hood example:
gear_sets:
standard:
- cloth hood
Additional gear_sets
can be defined. Of notable use will be a "stealing" gear set if one wishes to train Thievery - list only the items you can wear that will not hinder your stealing (or nothing if you wish to remove all worn items).
gear_sets:
standard:
- cloth hood
stealing: []
[] denotes an empty list, so this will remove all items from INV COMBAT and stow them in your STORE DEFAULT container.
Our new character would like to hunt in rats, so we need to configure the hunting_info
section
hunting_info:
- :zone: rats
This allows you to hunt in rats. How will the script know when to stop hunting and return to town? By using the stop_on
section:
hunting_info:
- :zone: rats
stop_on:
- Parry Ability
- Shield Usage
- Small Edged
Now you will hunt until Parry Ability, Shield Usage, and Small Edged all reach acceptable learning rates. But suppose we want to hunt for an arbitrary amount of time and do not care if skills are locked?
hunting_info:
- :zone: rats
:duration: 60
We will remain in rats for 60 minutes before returning to town.
We can combine these:
hunting_info:
- :zone: rats
:duration: 60
stop_on:
- Parry Ability
- Shield Usage
- Small Edged
We will hunt for 60 minutes OR until Parry Ability, Shield Usage, and Small Edged reach acceptable learning rates, whichever occurs first.
Conceptually, you are listing the minimally acceptable conditions for combat to stop.
We have listed our individual inventory pieces under gear
and placed them in gear_sets
. We have also listed in our hunting_info
that we wish to train Parry Ability, Shield Usage, and Small Edged. But how do the scripts know what weapon we want to use with Small Edged? For that, we have another setting called weapon_training
which lists the weapons we wish to use in a simple skill:weapon format, like so:
weapon_training:
Small Edged: short sword
Note that the skill name (Small Edged) is exactly how it is listed in-game. Also, "short sword" is the combination of the :adjective:
and :name:
from the gear
listing above.
Using buffs and offensive spells with Lich requires separate, yet similar, entries in your YAML. Again, see the Lich script repository (expand combat-trainer) for full documentation. Note that each spell requires its full name as it appears in-game.
buff_spells:
Sweet Buff Spell:
abbrev: sbs
recast: 3
mana: 5
cambrinth:
- 4
- 4
recast: #
means "recast this spell when # minutes remain on the buff". So, Sweet Buff Spell will be recast when 3 minutes remain on the buff timer. recast: -1
waits until the spell expires before recasting.
mana
is the mana with which we prep our Sweet Buff Spell.
cambrinth
includes two members in the list, indicating that we wish to charge our cambrinth two times, each time charging with 4 mana.
Similarly for offensive spells:
offensive_spells:
- skill: Debilitation
name: Barry Manilow's Greatest Hits
abbrev: bmgh
mana: 5
- skill: Targeted Magic
name: Psychic Headbutt
abbrev: ph
mana: 5
Note the need for listing the skill it utilizes first. This will become clear during our more advanced examination of YAMLs.
This one's easy enough. Only three top-level attributes need to be defined to include your own cambrinth:
cambrinth: ring
cambrinth_cap: 4
stored_cambrinth: false
We have denoted that we wish to hunt for 60 minutes or until a set of skills are mind locked, but what about after we finish hunting? Listing skills under the crossing_training
section allows Lich to train your character between hunts. Again, note that skills are listed by the name that appears in-game.
crossing_training:
- Perception
- Augmentation
- Athletics
- Outdoorsmanship
- Attunement
- Utility
- Warding
Documentation on supported skills and formatting appear under the crossing-training section at the Lich script repository.
Now we have a YAML that will, at minimum, hunt for 60 minutes (or until certain skills are locked) and then return to town, training a variety of skills including spell-casting using the cambrinth we defined earlier. Our YAML appears like this:
hunting_info:
- :zone: rats
:duration: 60
stop_on:
- Parry Ability
- Shield Usage
- Small Edged
weapon_training:
Small Edged: short sword
buff_spells:
Sweet Buff Spell:
abbrev: sbs
recast: 3
mana: 5
cambrinth:
- 4
- 4
offensive_spells:
- skill: Debilitation
name: Barry Manilow's Greatest Hits
abbrev: bmgh
mana: 5
- skill: Targeted Magic
name: Psychic Headbutt
abbrev: ph
mana: 5
cambrinth: ring
cambrinth_cap: 4
stored_cambrinth: false
crossing_training:
- Perception
- Augmentation
- Athletics
- Outdoorsmanship
- Attunement
- Utility
- Warding
gear:
- :adjective: cloth
:name: hood
:is_leather: true
:hinders_lockpicking: true
:is_worn: true
...rest of gear...
- :adjective: short
:name: sword
:is_leather: false
gear_sets:
standard:
- cloth hood
...rest of gear...
stealing: []
Our completed example YAML does not appear in the same order as the documentation suggests. Order of each group does not matter, only that each individual piece of a section remains together!