cardex

Rats!

also called Narrator

Immersive pseudo-RPG set in Whatever Land. WIP, postponed till Wyvern starts supporting Featherless models tool calls :3from Wyvern

on Wyvernarchived

Tokens: 368 permanent · 190 first greeting · Lorebook: up to 112 tokens triggered, 169 across all entries · estimated prompt budget 670

Creator notes

Pseudo-RPG: combat ~~/travel/time progression~~ This is unfinished but combat part works. Decided to publish cause some bits could be reused in other situations and I'm off the platform for a bit, will come back when it's slightly more stable 🖖 (Got bored here, doing something else xd)

Use Tool Calls so you don't have to use commands. AI will detect your responses and determine what you're doing to keep track of the state. Basically a regular RPG chat with pen and paper to keep AI from hallucinating bullshit math.

Turn-Based Combat with Dynamic Bestiary

The Problem

Traditional chatbot combat is pure theater:

  • AI decides you hit or miss based on vibes
  • No actual health tracking - you're "wounded" until the plot says otherwise
  • Fighting multiple enemies becomes narrative chaos
  • No real danger - the AI won't let you die because that would make you sad

Combat has no stakes because there are no real mechanics.

The Solution

Deterministic turn-based combat with persistent monster templates and health tracking. The AI narrates dramatically, the scripts handle all mechanics behind the scenes.

How It Works

Basic Combat Flow

| Step | Actor | Action | |------|-------|--------| | 1 | User | "I attack the sailor" | | 2 | AI | Detects combat intent | | 3 | AI | Calls monster_attack(target="sailor", attacker="both") | | 4 | Script | Rolls user attack (75% hit chance, 1-6 damage) | | 5 | Script | If monster survives, ALL monsters counter-attack (50% hit chance each) | | 6 | Script | Updates all HP values in database | | 7 | Script | Returns narrative cues: "strikes true", "badly hurt" | | 8 | AI | Transforms into dramatic prose: "The polished wood of your cane makes a satisfying thwack against Seamus's temple, snapping his head to the side. A thin trickle of blood immediately begins to seep from his hairline." |

The user never sees numbers. Scripts calculate damage and HP, but return descriptive conditions instead. AI receives "severely wounded" and creates "The rat's red eyes seemed to glow with an internal fire, casting faint crimson reflections on the wet wood beneath them. The metallic scent of blood had grown stronger, mingling with the salt air."

Dynamic Bestiary Creation

When you fight a new enemy type:

| Step | Actor | Action | |------|-------|--------| | 1 | AI | NPC becomes hostile: "the mocking sailor" | | 2 | AI | Calls monster_create(name="mocking sailor", subtype="Sailor", type="humanoid") | | 3 | Script | Checks if "Sailor" template exists in database | | 4 | Script | Template doesn't exist → generates stats (8-15 HP, fists + random weapon) | | 5 | Script | Saves "Sailor" template for future use | | 6 | Script | Spawns "mocking sailor" instance with full HP | | 7 | Script | Creates lexicon entry for "Sailor" as bestiary reference | | 8 | AI | The sailor's expression darkens, his earlier amusement vanishing. "You deaf or something? I said move along, unless you want trouble." His hand drops to the knife at his belt, fingers curling around the handle. The atmosphere grows tense as dockworkers nearby pause their work to watch the unfolding confrontation. |

Next time you fight a sailor, it uses the existing template. But "scarred veteran sailor" is a unique instance with the same stats.

Combat Features

Group Combat:

  • Multiple enemies attack each turn
  • Each monster rolls independently
  • Damage stacks
  • AI narrates: "The severely wounded rat somehow managed another desperate dodge. Both rodents were panting heavily, their movements becoming more frantic as if realizing this elderly woman was far more formidable than she appeared."

Monster Behaviors:

  • Fight: Normal combat continues
  • Flee: Monster escapes before/during combat
  • Surrender: Monster gives up, removed from combat - "Enough! Enough! I yield, you mad old bat!"

Ambush System:

  • attacker="user": You attack, monsters can't counter (stealth/surprise)
  • attacker="monster": Monsters ambush you, you can't act this turn
  • attacker="both": Normal combat (default)

Health Tracking:

  • User: 20 HP max (never shown as numbers)
  • Monsters: Template-based (5-15 HP depending on type)
  • Conditions translate to narrative: barely scratched → lightly injured → wounded → badly hurt → severely wounded → barely clinging to life → dead

Monster Categories

Humanoid:

  • 8-15 HP
  • Always has fists + one random weapon (dagger/sword)
  • Examples: sailors, guards, bandits

Animal:

  • 5-12 HP
  • 1-2 natural weapons (claws/fangs)
  • Examples: rats, wolves

Plant:

  • 6-10 HP
  • 1-2 natural weapons (thorns/vines)
  • Examples: animated vines, spore creatures

Why This Works

Consequences are real: You can actually die. AI narrates your condition dramatically - "Your vision blurs at the edges, darkening into tunnel sight. The last thing you see is Seamus's triumphant, bloody smirk." - but the script determines if you're actually dead.

Emergent drama: Scripts ensure mechanical fairness. AI transforms "sailor counter-attacks and strikes you hard" into "The cold steel bites deep into your side, and you feel something vital give way. The evening had deepened into proper night now, with only the flickering lantern light illuminating the gruesome scene."

Persistent world: Once you've fought Sailors, the game remembers what Sailors are. The bestiary builds itself through play. But each encounter feels unique because AI improvises the narrative around consistent mechanics.

No immersion-breaking numbers: You never see "You take 5 damage, HP: 15/20". Instead: "The cold steel bites deep into your side, and you feel something vital give way. Pain lances through you as warmth spreads beneath your shirt."

Traditional chatbot: "You swing your sword in a perfect arc, the blade catching the moonlight as it slices through the air. The enemy staggers back, clutching their wounded shoulder, blood seeping between their fingers. They let out a pained cry and drop their weapon with a clatter. 'You... you're stronger than I thought,' they gasp, falling to their knees in defeat. The other guards see their companion fall and immediately flee into the darkness, leaving you victorious in the empty courtyard."

(AI resolved the entire fight in one message. You didn't actually do anything. It just... happened at you.)

This system: "The one-eyed seagull squawks defiantly, its milky white eye tracking your movements."

(Now you decide: attack? retreat? negotiate with the bird? The fight happens through actual back-and-forth, with real consequences for each action.)

The stakes are real. Death is possible. Combat matters. But it still feels like collaborative storytelling, not a spreadsheet.

See also: https://app.wyvern.chat/collections/collection_fD3JCppr1Nt8PCKg6T6WN

Last checked on Wyvern: Created Updated Archived since

Immersive, emergent RPG in a fantasy setting where your choices matter little but you can kill rats and travel.

Permanent link to this version