Skip to content

Track items, effects and skills

Not everything on a character sheet is a number. What a character carries, what they are suffering from and what they can do changes through the story too: a potion found, a poison cured, a skill learned. Leafbind tracks these the way it tracks numbers: you write each change down where it happens, and Leafbind keeps the list.

Each of these lists is a stat that holds things rather than a number: an inventory, effects, skills, titles. In the editor a change shows as a tag in the text:

She pulled the vial from the cellar dust. Waverly gains Healing Potion

Put the cursor where the change happens and add an event as usual: + Event above the text, Ctrl+Shift+E, or Add event… on the right-click menu.

  • Who: the character.
  • Stat: the list that changes, such as inventory, effects or skills.
  • Change: for a list of things, choose one of these:
    • + gains: the character now has it. Type its name, such as healing potion.
    • − loses: it is gone. The names offered are what the character holds at that point.
    • = holds exactly: the whole list, as the text states it, with names separated by commas. It starts filled in with what the character holds now, so you only change what is different.

Select Insert. The tag reads Waverly gains Healing Potion, Waverly loses Poisoned, or Waverly SKILLS = Fireball, Mana Shield. Point at a tag to see everything the character holds after it. Click it to change or delete it, as with any event.

The first change to a stat decides what it is. A stat whose first change was + gains holds things, and from then on Change offers only gains, loses and holds exactly for it. A stat nobody has used yet offers both kinds.

A name is one word in the text. If you type healing potion, Leafbind writes healing-potion, and shows it as Healing Potion.

If the name matches a wiki entry, such as an Items entry for a unique sword, the tag uses the entry’s name, and Stats at the cursor links to it. Anything else is fine as it is. Most potions don’t need a wiki page, and Leafbind doesn’t ask for one.

A list holds each thing once. To count things, use a number instead: three arrows is arrows +3.

A character can start the book already holding things. Open their wiki entry, find Stats, type the stat’s name, and as its starting value type the names separated by commas, such as fireball, mana shield. Select Add. Change the list later in the same place: the stat starts with what you type there.

As with numbers, you can type a change straight into the text and press Space:

  • .inventory+rope gives the scene’s POV character a rope.
  • .skills=[fireball,mana-shield] states their skills.
  • .effects-poisoned takes poisoned away, but only once effects already holds things somewhere in the book. Before that, a hyphen between two words stays a hyphen.

The stat is written in lowercase letters. Press Ctrl+Z straight after to get back what you typed.

As text, the events look like this:

{>>! waverly.inventory + healing-potion — found in the cellar<<}
{>>! waverly.effects - poisoned<<}
{>>! waverly.skills = [fireball, mana-shield]<<}

Stats at the cursor, in a scene’s properties panel, lists each character’s numbers and then each of their lists on a line of its own, as they stand where the cursor is:

Waverly HP 70 · LEVEL 7 INVENTORY Moonblade, Rope EFFECTS nothing SKILLS Fireball, Mana Shield

In a character’s wiki entry, Stats shows each list’s history: every gain, loss and full list in reading order, with what it held after. Select a scene to go to that event.

Leafbind tells you when a list doesn’t add up, and never blocks you. These show as an amber tag and in the warnings under Stats at the cursor:

  • Losing something never held. If poisoned was never gained, losing it changes nothing and is flagged. The event may be in the wrong place, or the gain may be missing.
  • A full list the story disagrees with. If the events so far say Fireball and the list says Fireball, Mana Shield, the tag says what the events had. The list counts from then on, so a missed gain costs one warning. The first full list for a stat nothing has touched yet is never flagged.
  • A change of the other kind. Adding a number to a list, or gaining a thing on a number such as HP, is flagged and left out.

Gaining something already held changes nothing and isn’t flagged, because being poisoned twice is a story event, not a mistake.

A sword in the pack and a sword in hand are two different facts, so keep them as two lists: inventory for what a character carries and equipped for what they are holding or wearing. Drawing the sword is one event with two changes: inventory − loses moonblade, then + Add a change, equipped + gains moonblade.

Leafbind doesn’t tie the two lists together. Equipping something that was never in the inventory isn’t flagged, so the lists mean exactly what you decide they mean.

A skill or a class can have a level of its own: Fireball at level 3, Hedge Healer at level 4. Keep the level as a number of its own, named after the skill or class with -level at the end:

  • skills holds Fireball: that she has it;
  • fireball-level is 3: how good she is at it.

So when Waverly levels up as a Hedge Healer, the event is hedge-healer-level + add 1. If she loses a level, it’s hedge-healer-level − subtract 1. Because the level is an ordinary number, everything numbers have works for it: a checkpoint, a starting value, a row on a status window (| Hedge Healer Level | ? |), even a maximum with a bar (hedge-healer-level-max).

A status window can show a list. A calculated row, such as Inventory on calculated here, shows what the character holds at that point in the book: Moonblade, Rope, or a dash when they hold nothing. A list can stand beside the title too: a title of {Classes}, Level {Level} reads Hedge Healer, Level 4.

When the scene is locked, the list is frozen as it was, like a number. If an event before it later changes what it should hold, the frozen list is flagged. In the dialog, a list’s row offers Calculated here and Frozen at, but no Specified here: a list is never typed in by hand. A plain line such as Gear: Moonblade, Rope stays exactly as you wrote it, and nothing checks it.

When you export an EPUB or copy for Royal Road, readers see the names, never the ?.

The sample project has lists in every chapter. Waverly starts with skills (Mending, Herb Lore), an inventory (Skinning Knife, Healing Potion, Bandages), and an empty equipped and effects: open her wiki entry and find Stats to see them. Chapter 1 gains and loses an effect (bleeding) and loses the bandages; Chapter 2 gains an effect, a skill (Beast Mending) and a sword, Stillwater.

Create a copy of The Hedge Healer from Tutorials… in the ? menu, open Chapter 3, Stillwater, and the properties panel (Ctrl+Shift+T), and watch Stats at the cursor as you move down through the chapter:

Cursor INVENTORY EQUIPPED COMPANIONS
at the top of the chapter Skinning Knife, Healing Potion, Stillwater nothing (none yet)
after she picks up the sword Skinning Knife, Healing Potion Stillwater (none yet)
after her aunt’s potion Skinning Knife Stillwater (none yet)
after she takes stock Skinning Knife Stillwater (none yet)
after the wolf sits beside her Skinning Knife Stillwater Grey Wolf
  • Picking up the sword is one event with two changes, inventory − loses and equipped + gains: carried and equipped.
  • Her aunt’s potion is one event with two changes too: inventory − loses healing potion, and hp + add 20.
  • Taking stock states the whole inventory, = holds exactly skinning knife. It agrees with the events before it, so it is not flagged. Click the potion’s event and remove its inventory change, and the tag turns amber: the events had Skinning Knife, Healing Potion. Ctrl+Z puts it back.
  • Companions has no starting value, so it is not listed until its first change. Grey Wolf links to the wolf’s wiki entry, because the event names it by its alias, wolf.

The status window at the end of the chapter shows all of these lists, worked out from the events.