Installation

CSMS lives entirely in your scenario's script tabs. No external dependencies, nothing to install.

Step 1 — Copy the scripts

Open each file from the GitHub repo and paste into the matching tab in your scenario editor:

Using other scripts too? Paste CSMS calls before your other script calls in each tab. CSMS is designed to coexist with Inner Self, Auto-Cards, and others.

Configuration

CSMS auto-creates a ⚙️ CSMS CFG story card on first action. All configuration lives in its Notes field — edit it anytime, changes take effect on the next action. No script editing required.

Pre-creating the CFG card

You don't have to wait for first action. Create the card yourself before publishing so it's ready to go:

  1. Create a new story card in your scenario
  2. Set Name to exactly: ⚙️ CSMS CFG
  3. Set Type to Other
  4. Leave Entry empty or add a note for yourself
  5. Paste the template below into the Notes field
MODULE_CHARACTER_SHEETS: true
MODULE_COMBAT: true
MODULE_ORDINANCE: true
MODULE_INVENTORY: true
MODULE_LEVELING: true
DEBUG_MODE: false
STAT_MAX: 50
STAT_MIN: 1
AVERAGE_STAT: 10
DEFAULT_STAT: 10
DEFAULT_HP: 10
DEFAULT_AC: 10
DEFAULT_SPEED: 30
DAMAGE_DIE: 6
REST_HEAL_PERCENT: 10
CONSUME_HEAL_PERCENT: 10
LOOKBACK_ACTIONS: 5
INJECTED_SHEET_MAX: 20
PENDING EXPIRY: 3
ORD_PROXIMITY: 50
ORD_DEFAULT_ROLL: 1d20
ORD_ND_DAMAGE_DETECTION: false
LEVEL_CAP: 50
XP_THRESHOLD: 100
HP_PER_LEVEL: 10
DP_PER_LEVEL: 3
XP_PER_ACTION: 1
XP_PER_ORDINANCE: 5
XP_PER_HIT: 3
XP_PER_DAMAGE_RECEIVED: 2
XP_PER_KILL: 10
XP_PER_ROLL_SUCCESS: 3
XP_PER_ROLL_FAIL: 1
XP_PER_LEARN: 5
PROFICIENCY_THRESHOLDS: 4,8,12,16,20,28,36,44,50
DEBUG_MAX_LINES: 50
Missing keys auto-repair. If you add CSMS to an existing adventure, any missing config keys are automatically appended to your CFG card with script defaults. No manual migration needed.

The Tag System

Instead of manually assigning stats, let the AI read your character descriptions and generate sheets automatically. Add [CSMS] to the beginning of any story card title:

Name:     [CSMS] Mira
Type:     Character
Entry:    Mira is a battle-hardened mercenary with fifteen years
          of combat experience. She's exceptionally fast and
          agile, relying on speed over brute strength. Her body
          is lean and scarred. She's seen enough death to be
          completely unshakeable under pressure.
Triggers: Mira, mercenary

When Mira appears in the story, CSMS will read the entry, ask the AI to determine appropriate stats, create a 📋 Mira sheet, and remove the tag from your original card. Your lore card stays intact.

Write rich descriptions. The better your entry, the more accurate the AI's stat choices. "Fast and agile" → high DEX. "Unshakeable under pressure" → high WIS. Physical traits, history, personality — the AI reads it all.

Works with Auto-Cards

Using LewdLeah's Auto-Cards? Once AC creates a card for a character, add [CSMS] to its title and CSMS generates the sheet automatically.

Processing order

CSMS processes one tagged card per action — the AI needs to respond with stats before the next character can be processed. A party of 5 unknown characters takes 5 consecutive actions to fully generate. This only happens once per character.

Multiplayer Setup

CSMS handles multiplayer automatically. Sheet creation is tied to player names — a sheet is created for anyone whose name isn't "You" or a banned name. This works in both single player and multiplayer.

Recommended: Third Person plot component

Add the Third Person plot component to your scenario. This switches player input from > You to > PlayerName, which lets CSMS detect which player is currently acting — essential for accurate combat, rolls, and Ordinance attribution in multiplayer.

Without Third Person, CSMS can still track sheets — but in multiplayer it won't be able to tell which player's action to assign mechanics to.

What happens automatically

Remind players to set their name. All players default to "You" on join. They need to tap the fire icon and set their name before their sheet is created. "You" is banned by default.

Player Name Tips

Full names with spaces work — /csms create/John Smith creates a character named John Smith. Just remind players to be consistent — the name used in commands must match exactly (case insensitive) every time.

Stat Ranges

Default range is 1–50. This is intentionally wider than classic D&D to give world makers more flexibility. Adjust STAT_MIN and STAT_MAX in the config card to fit your scenario's power level.

AI Context Injection

Every action, CSMS injects a compact character summary into what the AI sees — invisible to players:

[CSMS|Nikolai|HP:18/20|AC:15|STR:15|DEX:12|CON:14|INT:10|WIS:11|CHA:13]
[CSMS|Mira|HP:10/10|AC:12|STR:12|DEX:18|CON:13|INT:10|WIS:16|CHA:9]

Only characters mentioned in the last LOOKBACK_ACTIONS actions are injected, plus the player always. Keeps token usage efficient even with large casts.

Compatibility Notes

Inner Self (LewdLeah) ✓ Compatible

CSMS mirrors IS architecture. Both use storyCards directly and namespace their state keys. Run CSMS first, then IS in each tab. They coexist cleanly.

Auto-Cards (LewdLeah) ✓ Compatible

CSMS uses the csms_cs_ key prefix to avoid keyword conflicts. The tag system is designed to work alongside AC-generated cards — AC creates the card, world maker adds [CSMS], CSMS generates the sheet.

LoLa — Localized Language (LewdLeah) ✗ Incompatible

LoLa overrides AI output language and format. CSMS depends heavily on parsing specific AI response patterns — roll notations, stat blocks, ordinance keywords. Any script that changes what the AI writes will break CSMS parsing.

General rule

Anything that changes what the AI writes is incompatible with CSMS. Scripts that only modify state, inject into frontMemory, or read cards without altering output are generally safe.