Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/the-beach-mystery/llms.txt

Use this file to discover all available pages before exploring further.

The Beach Mystery gives you two items to find and carry: a sparkling jewel 💎 and a hand-drawn treasure map 🗺️. Neither item is guaranteed — they only appear if you choose to open the pirate’s chest early in the story. Once in your pocket, each item shapes what you see, what doors open, and how other characters respond to you in ways that are unique to your playthrough.

What the Inventory Tracks

Two boolean flags drive the entire item system:

💎 Jewel

Tracked by hasJewel. A brilliant gemstone — its color and name are chosen during personalization (e.g. a blue sapphire). It glows in the dark, reacts to cave symbols, and calms the creature in the guardian’s den.

🗺️ Treasure Map

Tracked by hasMap. An old dotted-route map found wrapped in faded blue cloth inside the chest. It unlocks the island branch of the story and is the only way to reach the followMap node.
A third flag, hasOpenedChest, records whether the chest was opened at all. All three flags are set together by the setState field on the relevant story nodes:
// chestOpened node in data/story.js
setState: { hasOpenedChest: true, hasJewel: true, hasMap: true }

// chestSkipped node
setState: { hasOpenedChest: false, hasJewel: false, hasMap: false }

How to Obtain the Items

Both items come from a single decision point: the very first choice in the story.
1

Find the chest

While walking along the shore, you uncover an old pirate’s chest buried beneath the sand. The chestDiscovery narration node sets the scene.
2

Choose to open it

The chestChoice node asks: “Do you have time to open the chest?” Answering Yes routes you to chestOpened.
3

Receive both items

The chestOpened narration describes pulling out a treasure map wrapped in faded blue cloth alongside a brilliant jewel that catches the sunlight. Both hasJewel and hasMap are set to true.
If you choose No at chestChoice, the chestSkipped node sets all three flags to false. You leave the chest undisturbed and walk directly toward the cave, skipping the island path entirely.

Inventory Display in the Sidebar

During gameplay, the sidebar shows both item slots at all times. The visual state of each slot reflects whether you currently hold that item:
StateAppearance
Not yet obtainedDimmed icon at 40% opacity with a ? badge
AcquiredFull-brightness icon, no badge
This means the sidebar acts as a passive reminder of what you carry — even before the items have influenced the story, their slots are visible so you always know what is possible.

How the Jewel Changes the Story

The jewel’s most significant effect is inside the cave. Whether you carry it or not, the cave splits at a fork — but what you see and what happens at each passage is entirely different.

Cave Entry

With the jewel (caveEnteredWithJewel)

When the darkness becomes too thick to see, the jewel begins to glow softly through your pocket. Its light reveals old arrows scratched into the wall and guides you safely to the fork where the tunnel splits.

Without the jewel (caveEnteredWithoutJewel)

You enter keeping one hand against the cool stone wall. A line of pale shells embedded in the rock catches what little light remains and guides you deeper by feel rather than by light.

Left Path: The Hidden Chamber

With the jewel (caveLeftWithJewel)

The jewel glows brighter with every step. At the end of the corridor it illuminates a stone door carved with the same symbol as the treasure map. Holding the jewel near the carving causes the door to rumble open, revealing the hidden chamber.

Without the jewel (caveLeftWithoutJewel)

You reach the chamber through shafts of sunlight from cracks above. The chamber is intact but you notice a stone pedestal with an empty jewel-shaped space — and realize the chest on the beach and this chamber must be connected.

Right Path: The Guardian’s Den

With the jewel (caveRightWithJewel)

The same symbol marked on your jewel glows faintly above the animal’s bed. You place the jewel on the ground as a sign that you mean no harm; the guardian gently pushes it back toward you, then leads you to a hidden ocean overlook.

Without the jewel (caveRightWithoutJewel)

No jewel symbol connects you to the guardian. The animal’s tag is shaped like a treasure map instead — hinting that the chest on the beach is part of a larger secret you have not yet uncovered.

At the Ending Screen

When you reach any ending with hasJewel: true, the ending screen displays a personal badge:
“You kept your [favoriteJewel]!”
The jewel name is pulled from your personalization answers, so the badge reads differently for every player.

How the Map Changes the Story

The treasure map’s role is structural rather than atmospheric. With hasMap: true, the mapChoice node appears after you open the chest and lets you choose to sail to the island. This is the only route to the followMapriddleIntroislandTreasure path.
Without the treasure map, the island branch is completely unreachable. Players who skip the chest or who open the chest but choose not to follow the map will never see the island guards, the riddle, or the islandTreasure ending through the normal story flow.

Inventory State at a Glance

hasOpenedChesthasJewelhasMapHow you got here
falsefalsefalseChose No at chestChoice (chestSkipped path)
truetruetrueChose Yes at chestChoice (chestOpened path)
There are no partial states — both items are always granted or withheld together, because they both live inside the same chest.
Your personalization answers directly affect what the jewel looks and feels like. The favoriteColor and favoriteJewel variables are interpolated into every description — so a player who chose “red ruby” sees a very different cave glow than one who chose “green emerald.”

Build docs developers (and LLMs) love