# Story Quest: A 90-Second 3D Adventure from a Brief

> Write five lines (setting, hero, villager, errand, boss) and get a short playable 3D adventure in one offline HTML file. Find three items along side paths, open the gate, beat the boss and reach the goal; a rigged hero, the villager, items, the boss, the sky, every spoken line, the sounds and both music loops are generated through SandBase. The level, the quest beats and the effects are code.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.1
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/story-quest

## What you get

Bring a setting, a hero, a villager, an errand and a boss; optionally a mood. The Skill returns a downloadable Skill (the quest engine, a budgeted 3D asset generator with rigging, verification) and one playable example with its generated media and billed cost.

## Install

Download the Skill package from https://www.sandbase.ai/skills/games/story-quest (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/story-quest build a short 3D adventure in <your setting>, where <your hero> helps <your villager> by <your errand>, against <your boss>, in a <your mood> mood
```

## How it works

1. **Fill the slots** Describe the setting, the hero, the villager, the errand and the boss, plus a mood, for example a hillside apple orchard at harvest, a young beekeeper girl, an elderly keeper, three lost festival treasures, a living scarecrow boss, a cozy autumn mood. The agent turns the brief into a theme.
2. **Plan and generate the media** npm run assets prints every SandBase call with its worst-case estimate and refuses a plan over the budget, without spending. With --confirm-real it makes the calls through your logged-in sandbase CLI or SANDBASE_API_KEY, saves each run id at once so --recover can download finished runs without paying again, and compresses the rigged hero and each model. The example made 50 calls and billed a few US dollars.
3. **Build and verify** THEME=<id> npm run build:single inlines Three.js, the quest, the rigged hero and the models, the sky, all 30 voices and both music loops into one file that makes no network requests. npm run shoot runs the scene-verify checks, from the title and a talk to a win, a loss and play-again. The example passed 39 of 39 checks.

## FAQ

### Does Story Quest call a model or need a key?

Only during theme generation, never during play. The asset step calls SandBase models for the rigged hero, the villager, the boss, the items, the sky, the voices, the sounds and both music loops, through your own SandBase login, and the scripts never read, print or store the key. Once built, the quest page itself makes no network requests and calls no model. Nothing is billed without --confirm-real.

### How is Story Quest usage billed?

Story Quest’s asset step calls SandBase models for the models, sky, voices, sounds and music, billed to your SandBase account. npm run assets shows the full plan with worst-case prices up front, blocks a plan over budget, and only spends once --confirm-real is present. Check live model prices with sandbase inspect.

### Why does the quest run inside a frame?

The adventure is served from an opaque origin with no network, so it cannot see this page or go online — it plays exactly the build that was verified.

### Has anyone heard the voices and music?

Not yet — the checks confirm all 30 audio files are present and the lines play one at a time, but nobody has listened to them.

### Can I use my own models in Story Quest?

Yes. Put your own GLB files in the theme’s media folder, skip generating those parts, and record their source and licence in CREDITS.json.

### Can I make a new quest on this page?

Not yet. A new theme calls SandBase models, which needs a key the sandbox doesn’t have. Run the Skill locally with your own agent for now.

## Examples

- Story Quest playable adventure (scene)
- Oasis Courier (video)
