
Guest List Roster
Advanced ScriptIntended for expanded character rosters, unit/linked groups of characters, and persona data converted to characters for a rotating injection of up to 9 different characters at a time from the script itself into the active chat session. Keyed to prevent assumption of user persona active with "duplicates".
About this script
────────────────────────────────────────────────
ROTATING GUEST CAST SYSTEM — v1.0
For “The Lion and the Rose” Pub — Mythic AU CoD
────────────────────────────────────────────────📘 Overview — What This Script Does
The Rotating Guest Cast System is an add‑on module that injects user‑submitted patron personas into the pub environment of The Lion and the Rose.
It is designed to run after the main CoD Roster Core engine, adding dynamic, flavorful NPCs without interfering with the core operatives.
This script provides a lightweight, plug‑and‑play expansion layer that:
Introduces a rotating cast of pub patrons
Reacts to time of day, weather, keywords, and message count
Prevents duplicates when the user is playing a persona with a matching name
Uses priority weighting and probability gating for natural variety
Keeps scenes lively while maintaining narrative focus
From the script:
“This template adds a rotating cast of patrons and units to the existing CoD Roster Core lorebook system and bots it's hooked into.”
⚙️ Key Features
🍻 Rotating Guest Injection
Up to 9 patrons can appear per turn, chosen by priority and activation conditions.Dupe Prevention
Guests with a nameBlock matching the user’s active persona are automatically excluded.Contextual Triggers
Guests can appear only during certain times, weather conditions, or when keywords are present.Probability‑Weighted Selection
Even if all conditions are met, guests may appear only based on a configurable chance.Priority‑Driven Sorting
Higher‑priority guests are selected first, with randomization inside priority tiers.Zero Interference with Core Roster
Runs independently and injects into the same personality/scenario buffers without overwriting core logic.
🧱 How the System Works (Under the Hood)
1. Input Normalization
The script mirrors the CoD Roster Core’s normalization pipeline, creating a clean, lowercase, punctuation‑stripped haystack for keyword matching.
2. Word‑Gate Checks
Guests can define:
keywordsandAnyrequireAll/requireAnynotAny/notAllprev.keywords
These gates determine whether a guest is even eligible to appear.
3. Time‑of‑Day Detection
A simple JS function maps the system clock to:
morning
afternoon
evening
night
From the script:
“If (hour >= 17 && hour < 22) return 'evening'.”
4. Weather Detection
A lightweight keyword scan checks the chat window for terms like rain, snow, storm, sunny.
5. Probability Gating
Each guest can define a probability (0–1).
If Math.random() exceeds it, the guest is skipped.
6. Priority Sorting
Guests are sorted by priority (1–5).
Higher priority = more likely to be selected.
7. Injection into Buffers
Selected guests append their personality and scenario text to:
context.character.personalitycontext.character.scenario
This mirrors the CoD Roster Core’s injection model.
🍻 How to Add Your Own Guest Personas
Each guest entry follows this structure:
{
name: “Character Name”, personality: Detailed personality, appearance, quirks, speech patterns., scenario: How they behave in the pub, typical interactions.,
nameBlock: [“UserPersonaName”],
keywords: [“pub”, “drink”], andAny: [“evening”, “night”], timeOfDay: [“evening”], weather: [“rain”], probability: 0.4, priority: 3,
minMessages: 5, maxMessages: 50 }
Required Fields
namepersonalityscenario
Optional but Recommended
nameBlock— prevents awkward duplicateskeywords— ensures they appear only in relevant scenesprobability— controls frequencypriority— determines selection order
Advanced Options
minMessages/maxMessagesandAnyTags/andAllTagsweathertimeOfDay
🧪 Activation Conditions Explained
Keyword Triggers
Guests activate when the chat contains any of their keywords.
Example from the script:
“keywords: [“pub”, “bar”, “whisky”, “drink”]”
Time‑of‑Day
Guests can appear only during specified windows.
Weather
Guests can be tied to rainy nights, snowy afternoons, etc.
Probability
A guest with probability: 0.3 appears only 30% of the time even if all other conditions are met.
Message Count
Useful for pacing:
Early‑session guests
Late‑session regulars
Long‑form narrative pacing
🔧 Global Settings You Can Edit
Located at the top of the script:
DEBUG— enable console logsAPPLY_LIMIT— core lore entry capMAX_GUESTS— maximum guests injected per turn
From the script:
“const MAX_GUESTS = 9; // 🍻 Maximum guests to inject per turn”
🧩 Integration with the CoD Roster Core
This script is designed to run after the main CoD Roster Core engine.
It does not modify or override core operatives.
Instead, it appends guest content into the same buffers the core engine uses.
This ensures:
Zero bleed
Zero conflict
Full compatibility with AURA+ logic
Smooth cinematic blending of operatives + patrons
📦 Best Practices for Bot Creators
Keep guest personas short and flavorful
Use
nameBlockto avoid awkward duplicatesUse
probabilityto prevent overcrowdingUse
priorityto spotlight important patronsAvoid stuffing too many keywords into one guest
Test activation conditions by simulating different times/weather