# Lesson Notes — Showing Stats with Header and Footer Passages

- Link: https://doss.academy/course-2-game-design-development-principles/unit-5-game-design-storytelling-nonlinear-narratives/lesson-12-showing-stats-with-header-and-footer-passages-c2u5l12/lesson-notes-c2u5l12/
- Published: 2026-11-03T15:49:48-05:00
- Author: matthew.leffler@jefferson.kyschools.us

Course 2: Game Design & Development Principles / Unit 5: Game Design Storytelling&
Nonlinear Narratives / Lesson 12: Showing Stats with Header and Footer Passages

**Save your work every day:** Export your story and save it to Google Drive at the
end of every class. Twine only saves your story in the browser on the laptop you
are using, and you may not get the same laptop next time.

## Lesson overview

In Lesson 10 you stored the player’s choices in variables. Today you show those 
variables to the player on every screen, like a game’s HUD (heads-up display). You
do this with special **passage tags**.

## How to add a tag

Open a passage and use the **+ Tag** button at the top of the passage editor. Type
the tag name exactly.

  |  Tag |  What it does |  
   |  `startup` |  Runs once, when the game starts. Nothing in it appears on screen except text you write. |  
 |  `header` |  Its text appears at the top of every passage. |  
 |  `footer` |  Its text appears at the bottom of every passage. |

## Step 1: Make a startup passage

Create a new passage named **Setup**, tag it `startup`, and move your starting values
into it:

    ```
    (set: $studied to false)
    (set: $confidence to 0)
    (set: $item to "nothing")
    ```

Now your variables are set before the first passage appears, no matter which passage
is first.

## Step 2: Make a footer that shows stats

Create a passage named **Stats** and tag it `footer`. Typing a variable’s name shows
its value:

    ```
    ---
    Confidence: $confidence
    Carrying: $item
    (if: $studied is true)[Studied: yes]
    ```

The `---` draws a line between the story and the stats.

## Step 3: Change the stats during the story

    ```
    (set: $confidence to $confidence + 1)
    (set: $item to "a pencil")
    ```

Play your game and watch the footer change as you make choices.

## Tips

 * Only show stats the player needs to make decisions.
 * Use a `header` instead if you want stats at the top.
 * Your stats can open new paths with `(if:)`, for example a choice that only appears
   when confidence is 3 or more.

## Your turn

 1. Move your starting values into a passage tagged `startup`.
 2. Make a `header` or `footer` passage that shows at least two stats or items.
 3. Change those stats in at least 3 passages.
 4. Play your game and check that the stats change correctly.
 5. Export your story and save it to Google Drive at the end of every class.

## Check your understanding

 1. What is the difference between a `startup` passage and a `footer` passage?
 2. Why move your starting values into a `startup` passage?
 3. Which stat in your game matters most to the player’s choices? Why?

Use this lesson’s Key Terms page to build your glossary.
