Guest List Roster cover
0
0

Guest List Roster

Advanced Script

Intended 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:

  • keywords

  • andAny

  • requireAll / requireAny

  • notAny / notAll

  • prev.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.personality

  • context.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

  • name

  • personality

  • scenario

Optional but Recommended

  • nameBlock — prevents awkward duplicates

  • keywords — ensures they appear only in relevant scenes

  • probability — controls frequency

  • priority — determines selection order

Advanced Options

  • minMessages / maxMessages

  • andAnyTags / andAllTags

  • weather

  • timeOfDay


🧪 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 logs

  • APPLY_LIMIT — core lore entry cap

  • MAX_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 nameBlock to avoid awkward duplicates

  • Use probability to prevent overcrowding

  • Use priority to spotlight important patrons

  • Avoid stuffing too many keywords into one guest

  • Test activation conditions by simulating different times/weather


📝 Changelog — v1.0

  • Initial public release

  • Added priority‑based selection

  • Added probability gating

  • Added weather + time‑of‑day triggers

  • Added dupe prevention

  • Added message‑count gating

  • Fully compatible with CoD Roster Core



Script source

Public codeContext depth 3

Please log in to see comments