Which chapter element would you like to add?
Reveals
Reveals
Reveals place part of a chapter behind a labelled button. Readers can open and close the passage without moving to another chapter, making reveals useful for optional descriptions, clues, notes, explanations, and expandable interface elements.
Preview
Select Inspect the desk to open the hidden passage. Select it again to close the passage.
{reveal "Inspect the desk"}
A folded note is taped beneath the drawer.
{endreveal}
A simple reveal works without an active game. Opening it changes only what the reader can currently see on the page.
Copyable syntax
Give the opening tag a non-empty quoted label, put the hidden content after it, and close the passage with {endreveal}:
{reveal "Read the message"}
Meet me beneath the clock tower at midnight.
{endreveal}
The reader first sees a Read the message button. Opening it reveals the passage; closing it hides the same passage again.
Format and combine the hidden passage
The hidden passage can contain ordinary Markdown and supported chapter elements. For example, a reveal can open a complete Random Draw:
{reveal "Open the envelope"}
The card inside bears a single symbol.
{draw "Turn over the card"}
The Key
The Moon
The Crown
{enddraw}
{endreveal}
Close inner elements before {endreveal}. A reveal cannot be placed inside another reveal, and a second reveal cannot be opened inside its hidden passage.
Change Game State when the passage opens
A reveal can set one existing game variable as it opens. Create the variable first as described in Reader and Game Variables, then add one set game:... assignment after the label:
{reveal "Take the key" set game:has_key = true}
You slip the brass key into your pocket.
{endreveal}
The reader sees the same reveal button and hidden passage. With an active game, opening it also sets has_key to Yes. Game State, inventory, conditional content, and continuation choices refresh immediately. Before a game starts, the reveal can still open visually, but it cannot save the change; unlike a state-changing lock or action, it does not become a disabled Start game control.
In a compact example, the same pattern may be written as {reveal "Inspect" set game:found_key = true}...{endreveal}. Replace ... with the passage readers should uncover.
A state-changing reveal needs an active game and the exact name of an existing game variable. It uses = to replace one value; it cannot use += or -=, and it cannot change several variables at once.
Use a value that matches the variable type:
- Yes/No accepts
true,false,yes,no,1, or0. - Number accepts a whole number from -100,000 through 100,000.
- Percent accepts a whole number from 0 through 100.
- Age accepts a whole number from 18 through 150.
- Text and Dropdown accept text; quote a value that contains spaces. For a Dropdown, use one of the choices configured for that variable.
The change is saved as a game step. Going Back past that step restores the earlier Game State, so returning to the chapter can apply the reveal's change again. A simple reveal has no saved game step.
Labels, limits, and combinations
Use straight matching quotation marks around a non-empty button label. Braces and other chapter tags do not belong inside the label. Always include one matching {endreveal}.
Reveal content may include formatted prose and supported self-contained elements, but all blocks must close in the reverse order in which they opened. In particular, place an entire Random Draw inside a reveal rather than trying to put reveal tags inside one of the draw's one-line outcomes.
Keep essential information outside a reveal when every reader must see it. A reveal is an interface convenience, not a way to protect private or sensitive information.
Before publishing
- Check that the label is quoted, clear, and describes what will open.
- Confirm that every opening tag has one
{endreveal}and that nested blocks close first. - Test the passage with keyboard controls as well as a pointer.
- Make sure essential instructions remain visible without opening optional content.
- For a state-changing reveal, verify the exact variable name and a value that matches its type.
- Start a test game and confirm that opening the reveal refreshes any affected Game State display or continuation.
You've reached the end of this Guide topic.
- No further chapters
0 comments
No comments yet
The story has no discussion yet. Leave a note here when a branch gives you something to say.
No chapter comments yet
No one has commented on this branch yet. Add the first note above.