v3.7.0: Merge PR #109 + opacity sliders + custom attributes fix + context instructions prompt + newline fixes

This commit is contained in:
Spicy_Marinara
2026-01-27 14:33:36 +01:00
parent 08474bd910
commit ea81dd0634
19 changed files with 362 additions and 123 deletions
+7 -17
View File
@@ -37,24 +37,9 @@ export const DEFAULT_DECEPTION_PROMPT = `When a character is lying or deceiving,
* Default Omniscience Filter prompt text
* This instructs the AI to separate information the player character cannot perceive
*/
export const DEFAULT_OMNISCIENCE_FILTER_PROMPT = `OMNISCIENCE FILTER INSTRUCTIONS:
You must strictly separate what the player character can directly perceive from what they cannot. The player should only read narrative content that their character can actually see, hear, smell, touch, or otherwise directly sense.
If the player character cannot directly perceive something, but it is happening, it ABSOLUTELY MUST be placed inside of a <filter> tag.
BEFORE writing any narrative content that involves events, actions, or details the player character CANNOT directly perceive (because they're not looking, too far away, behind them, in another room, happening silently, etc.), you MUST first output that hidden information inside a <filter> tag using this exact format:
export const DEFAULT_OMNISCIENCE_FILTER_PROMPT = `You must strictly separate what the player can directly perceive from what they cannot. They should only read limited narrative content that their persona can actually see, hear, smell, touch, or otherwise directly sense. Before writing any narrative content that involves events, actions, or details the player directly cannot perceive (because they're not looking, too far away, behind them, in another room, happening silently, include NPCs' internal thoughts, etc.), you absolutely must output that hidden information inside a <filter> tag using this exact format:
<filter event="[Brief description of what is happening that the player cannot perceive]" reason="[Why the player character cannot perceive this - e.g., 'behind them', 'in another room', 'too quiet to hear', 'focused elsewhere']"/>
CRITICAL RULES:
1. The <filter> tag must come BEFORE any sensory hints (sounds, smells, etc.) that the player DOES perceive from that event
2. Only write narrative that reflects what the player character actually experiences through their senses
3. Instead of "Jake sweeps the floor behind you", write: <filter event="Jake is sweeping the floor" reason="Jake is behind Michael who is focused on reading"/> followed by narrative like "You hear soft sweeping sounds behind you"
4. NPCs' internal thoughts, silent actions, and events in other locations MUST go in <filter> tags
5. The player's narrative should create natural mystery and immersion - they experience the world through limited senses, not omniscient narration
6. Be liberal and proactive in using <filter> tags to hide information the player cannot perceive directly
7. Don't forget to properly close the <filter> tag with />.
EXAMPLE:
Wrong: "As you read the newspaper, Sarah quietly pockets the key from the table behind you and slips out the back door."
Correct: <filter event="Sarah quietly takes the key from the table and slips out the back door" reason="Sarah is behind Michael who is absorbed in reading, and she moves silently"/>You hear a faint click from somewhere behind you, but when you glance up from your newspaper, the room seems unchanged. The afternoon light streams through the windows as you return to your reading.`;
Example: <filter event="Zandik quietly takes the key from the table and slips out the back door" reason="Zandik is behind Mari, who is absorbed in reading, and he moves silently"/> You hear a faint click from somewhere behind you, but when you glance up from your newspaper, the room seems unchanged.`;
/**
@@ -77,6 +62,11 @@ export const SPOTIFY_FORMAT_INSTRUCTION = `Include it in this exact format: <spo
*/
export const DEFAULT_NARRATOR_PROMPT = `Infer the identity and details of characters present in each scene from the story context below. Do not use fixed character references; instead, identify characters naturally based on their actions, dialogue, and descriptions in the narrative.`;
/**
* Default Context Instructions prompt text (customizable by users)
*/
export const DEFAULT_CONTEXT_INSTRUCTIONS_PROMPT = `The context above is information about the current scene, and what follows is the last message in the chat history. Ensure these details naturally reflect and influence the narrative. Character behavior, dialogue, and story events should acknowledge these conditions when relevant, such as fatigue affecting performance, low hygiene influencing social interactions, environmental factors shaping the scene, or a character's emotional state coloring their responses.`;
/**
* Gets character card information for current chat (handles both single and group chats)
* @returns {string} Formatted character information