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:
library.js→ Library tabinput.js→ Input tabcontext.js→ Context taboutput.js→ Output tab
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:
- Create a new story card in your scenario
- Set Name to exactly:
⚙️ CSMS CFG - Set Type to
Other - Leave Entry empty or add a note for yourself
- 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
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.
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
- Sheet created when player sets their name — via the fire icon menu, top left of the screen
- Sheet renames automatically if player changes their name mid-session — all data preserved
- Names in
BANNED_NAMESare silently skipped
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.