Travel & Deck Operations (TDO) v0.1
A scenario script that keeps the AI geographically honest while your player travels. Also lets you edit Story Cards live from the chat. It works with any deck; your cards just need a short position line (any marker such as Position: works, configurable below). What it does + Travel grounding. Every turn, the script scans the latest text for place names drawn from your Story Cards and quietly injects a positioning line into memory, for example: En route from Coppertown toward Stonehaven. Position of Stonehaven: north end of Long Lake, 19.7 rail mi from the Harbour. +The AI sees this; the player doesn't. It keeps working on the +Optimized-Context models, because it injects through state.memory rather than by editing the context. Live card ops. Typed commands edit Story Cards during play. Commands are silent: the AI is not called, so they don't burn a turn. Command / What it does /addcard keys | entry text | type / Creates a card (type is optional, defaults to Location) /updcard title | old text | new text / Exact find/replace in a card; refuses if the text isn't found /delcard title / Removes the card /position title | compass line - Sets or replaces the card's position line /where - Reports the last place the script recognised /addcard tip: put good triggers in the first field; they decide when the AI sees the card. Making it fit your world Everything world-specific lives in the CONFIG block at the top of the Library tab; that's the only part you should need to edit: cardTypes: ["location"], // card types that ground; [] = every type tag: "Position:", // the marker that starts a card's position line enRoute: "En route from {from} toward {to}. ", atPlace: "Position of {place}: {pos}." The tag (Position: by default) may be the first line of a card or the start of any line inside it. Cards without one are ignored by grounding, but still work with the commands. Choose trigger words (keys) carefully: broad ones like "town" will match far too often and mislead grounding. Prefer full names. Card convention in one line Keep each location card's position as one line, compass-anchored to a landmark or route, e.g. Position: north end of Long Lake, 19.7 rail mi from the Harbour; the quarry lies west of the village.
