Skip to main content

Event & Reaction System

events

SkyrimNet’s event system enables dynamic memory, LLM-based dialogue, and NPC reactivity by processing structured in-game events. These events act as the core data stream that drives memory formation, conversation context, and AI behavior.


🧠 Core Concepts​

1. Events​

  • Definition: Structured records representing player or NPC actions (e.g., combat, dialogue, spell casting).
  • Per Event Type Settings:
    • Enabled: If unchecked, event is ignored.
    • Persistent: If checked, event is logged to the memory database.
    • Allow NPC Reaction: Enables live NPC responses.
    • NPC Reaction Cooldown: Time in seconds before another reaction to the same type.

2. Dialogue Context History​

  • Setting: Event History Count – Dialogue
  • Default: 50 (range: 5–200)
  • Purpose: Controls how many past events are passed to the LLM during dialogue generation.

3. Preloaded Event Memory​

  • Setting: Event Preload Count (e.g., 1000)
  • Range: 500–8000
  • Purpose: Number of past events preloaded on game start to prime memory and context.

🧠 How Events Influence Memory & Dialogue​

FeatureUses EventsNeeds PersistenceAffected by Cooldowns
LLM Dialogue Contextβœ… Yesβœ… Yes❌ No
Memory Recall / Reflectionβœ… Yesβœ… Yes❌ No
NPC Live Reactionsβœ… Yes❌ Noβœ… Yes
Event Logging / Debuggingβœ… Yesβœ… Yes❌ No

βœ… Best practice: Events you want remembered or reacted to should be Enabled, Persistent, and have Allow NPC Reaction set appropriately.


πŸ’¬ NPC Reactions Overview​

  • What They Are: Real-time dialogue or behavior responses triggered by in-game events.
  • Cooldowns:
    • Global Cooldown: Minimum delay between any reactions (e.g., 60s).
    • Per-Event Cooldown: Delay between reacting to the same event type (e.g., 180s for combat).

Example Use Cases:​

  • NPC comments on spell casting (spell_cast)
  • NPC notices player looting a container (container_changed)
  • NPC reacts to combat or death (combat, death)

πŸ§ͺ Event Type Tiers – Recommendation Matrix​

Event TypeEnablePersistNPC ReactCooldown
combat, deathβœ…βœ…βœ…120–180s
activation, equipβœ…βœ…βœ…30–60s
book_read, container_changedβœ…βœ…βœ…60s
spell_castβœ…βœ…βœ…60–90s
dialogue_*, scene_*βœ…βœ…βŒ0
direct_narration, continue_narrationβœ…βŒβŒ0
custom, gamemaster_dialogue, player_thoughtsβœ…βŒβŒ0

πŸš€ Usage Strategy Summary​

βœ… For Immersive Memory and Dialogue​

  • Set Persistent = true for all important events.
  • Adjust Event History Count (50–100) for context depth.

βœ… For NPC Interactivity​

  • Enable Allow NPC Reaction for immersive actions (combat, lockpicking, spell casting).
  • Use custom cooldowns to avoid spammy chatter.

βœ… For Performance Balance​

  • Use a Preload Count of 1000–3000 for good memory retention without overloading startup.
  • Avoid enabling reactions on every event β€” pick impactful ones.