Scripter
Tokens: 59 permanent · 105 first greeting · estimated prompt budget 164
Creator notes
AI + Deterministic Systems: A Hybrid Architecture Pattern
(aka API calls with AI frontend xd)
The Problem
Large Language Models are excellent at generating narrative but terrible at maintaining consistent state:
- They hallucinate items that don't exist
- They forget what happened 20 messages ago
- They can't do math reliably
- They contradict themselves constantly
Traditional solution: Constrain the AI heavily with rigid prompts. Better solution: Let AI do what it's good at (narration) while deterministic scripts handle what it's bad at (state management).
The Pattern
User Input → AI Interpretation → Script Execution → State Update → AI Narrates Result
AI's job: Understand intent, generate narrative, create immersion Script's job: Track state, enforce rules, maintain consistency
Minimal Implementation: Inventory System
What it does:
- User says "I pick up the sword"
- AI calls
add_itemfunction with item details - Script adds item to database
- AI narrates the pickup using script confirmation
Why this matters:
When user later says "check inventory," the AI cannot hallucinate items. It must query the database. The state is authoritative.
Architecture Flow:
| Step | Actor | Action |
|------|-------|--------|
| 1 | User | "I pick up the gem" |
| 2 | AI | Interprets intent: user wants gem in inventory |
| 3 | AI | Calls add_item(name="gem", description="...") |
| 4 | Script | Validates request and updates database |
| 5 | Database | Item persisted with unique ID |
| 6 | AI | Narrates: "You pocket the shimmering gem" |
Key Principle
The AI never directly manipulates state. It only:
- Interprets user intent
- Calls appropriate functions
- Narrates based on function results
This separation ensures that creative narration (AI's strength) never interferes with accurate state tracking (scripts' job). The AI can hallucinate vivid descriptions all it wants - but it can't hallucinate what's in your inventory.
Why This Works
- Separation of concerns: Creative tasks ≠ Logical tasks
- Deterministic core: Game state is reliable
- Narrative flexibility: AI can improvise descriptions, dialogue, scenarios
- Scalability: Add new systems (combat, quests, factions) with same pattern
Applications
This pattern works anywhere you need:
- Reliable state + flexible narration
- Procedural generation with constraints
- AI NPCs that remember consistent facts
- Dynamic storytelling with mechanical consequences
See also: https://app.wyvern.chat/collections/collection_fD3JCppr1Nt8PCKg6T6WN
- This content was earlier served by Wyvern _dq1hNWGeaEwqCC7MkTqtC until .
Aztec-inspired techno-theocracy where priest-engineers access vast digital networks through crystalline temple-servers in neon-lit pyramid-cities, blending ritual and technology into living infrastructure.
First message105 tokens
{{user}} is led to a chamber on top of neon-lit ziggurat. High Priest Xavier sits on the floor in the empty space, eating from a bowl using his hands. Holographic displays of abstract shapes cover the walls. A technopriest brings two more bowls and places them before {{user}} before walking away.
Bowl on the right contains gems of various colours. Bowl on the left contains bread slices.
=>Xavier: "Pick one," Xavier gestures at you and takes another bite.
Post-history instructions
When speaking as non-{{user}} characters should speak on a separate line of text and start with => Name:
Extensions: wyvern (their contents are in the Raw tab)
3 assets: 3 archived, 0 pending, 0 failed, 0 dead · 0 expression images
1 file
- .jsonotherspec 2.0
20.3 KBfirst seen 9ff4e237f31bdb3a
Opens with the tab.