ot_new_game
Start a new journey to the Well at Eldenmoor. Provide the player name to generate a random trail with distinct stops, NPCs, and scenery.
Instructions
Begin the journey to the Well at Eldenmoor. Provide the human player's name — Claude names its own character, and a pet is assigned at random. The trail is generated fresh each run — stops, NPCs, and scenery will differ. Read the full intro to the human before asking what they want to do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player_name | Yes | The human player's character name |
Implementation Reference
- src/games/oregontrail.ts:689-690 (registration)The tool 'ot_new_game' is registered via server.tool() with its name, description, and Zod schema.
server.tool( "ot_new_game", - src/games/oregontrail.ts:692-694 (schema)Input schema: requires a 'player_name' string parameter validated by Zod.
{ player_name: z.string().describe("The human player's character name"), }, - src/games/oregontrail.ts:695-767 (handler)The handler function that initializes a new Oregon Trail game (OtState) with random companion, pet, trail stops, supplies, weather, and returns the full intro narrative with game state.
async ({ player_name }) => { const companionName = pick(COMPANION_NAMES); const petDef = pick(PETS); const trailStops = generateTrail(); otGame = { player: { name: player_name, health: 100 }, companion: { name: companionName, health: 100 }, pet: { ...petDef, health: 100, alive: true }, supplies: { food: 28, medicine: 5, ammo: 80, money: 60, parts: 3, oxen: 4 }, trailStops, currentStopIndex: 0, mile: 0, day: 1, weather: pick(WEATHER_OPTIONS), status: "at_stop", pendingRiver: false, eventLog: [], }; const trailList = trailStops.map(s => s.name).join(" → "); return { content: [{ type: "text", text: [ `✨ THE WELL AT ELDENMOOR ✨`, ``, `They say there is a well at the edge of the Greymoor — ancient, unmarked on any`, `map, built by no hands anyone remembers. They say if you find it, you can make a wish.`, `They say the well grants it.`, ``, `They don't always mention the other part.`, ``, `── YOUR PARTY ──────────────────────────────`, ` ${player_name}`, ` That's you. You've heard the stories your whole life.`, ``, ` ${companionName}`, ` A traveling companion of uncertain background. (That's Claude.)`, ` ${companionName} has their own reasons for making this trip.`, ` They haven't shared them yet.`, ``, ` ${petDef.name} — ${petDef.species}`, ` Joined the party uninvited and shows no signs of leaving.`, ` You've decided this is fine.`, ``, `── THE TRAIL ─────────────────────────────────`, ` ${trailList}`, ` 1,200 miles total. The trail shifts each journey — not every road is the same twice.`, ``, `── HOW TO PLAY ───────────────────────────────`, ` ot_travel(pace) hit the trail: "easy", "steady", or "hard"`, ` ot_hunt() stop to hunt for food`, ` ot_rest(days) make camp and recover (1–3 days)`, ` ot_buy(item, qty) restock at trading posts and forts`, ` ot_sell(item, qty) unload surplus at a loss`, ` ot_cross_river(how) ford / caulk / ferry / wait`, ` ot_use_medicine(who) treat player, companion, or pet`, ` ot_status() check state anytime — free`, ` ot_make_wish(wish) only at the Well`, ``, `We make decisions together. You call the shots. I'll tell the story.`, ``, `[Show this full intro to the human verbatim, then present the status`, ` below and ask what pace they'd like to set out at.]`, ``, renderState(otGame), ].join("\n"), }], }; } ); - src/games/oregontrail.ts:294-294 (helper)Module-level mutable variable 'otGame' (OtState | null) that holds the current game state, set by ot_new_game.
let otGame: OtState | null = null; - src/index.ts:19-20 (registration)The top-level registration call: registerOregonTrailTools(server) which registers the ot_new_game tool among others.
registerOregonTrailTools(server); registerCritterCatchTools(server);