Category: Advanced Mechanics
When managing worldbuilding, you often run into scenarios where a fact needs to persist beyond a single mention, or conversely, a fact keeps triggering too often and crowds the context window. The Lor
MiocAI הוא חלופה ל-Character.AI, Candy AI ואפליקציות צ'אט אחרות עם דמויות בינה מלאכותית.
When managing worldbuilding, you often run into scenarios where a fact needs to persist beyond a single mention, or conversely, a fact keeps triggering too often and crowds the context window. The Lorebook system provides two distinct time-based controls to manage this exact behavior: Sticky Duration and Cooldown Duration.
These settings allow you to dictate the exact lifecycle of an entry after its keywords are found, removing the need to constantly repeat yourself or suffer through repetitive AI outputs.
Relying entirely on keywords creates functional gaps in an ongoing narrative. If a character casts a "Blizzard" spell, the environment needs to remain snowy and freezing for the next several turns.
If you rely solely on standard keyword matching, you are forced to type the word "Blizzard" in every single reply just to keep the weather rules active. If you stop saying the word, the entry deactivates, and the AI forgets it is snowing. Increasing the Scan Depth to a massive number is an inefficient workaround that often results in false positives later in the chat.
Similarly, some keywords are spoken too frequently. If you have an entry detailing a character's physical appearance tied to their name, the AI will pull that description into the context every single time the name is spoken. This wastes your Token Budget on information the AI only needed to read once to establish the scene.
The Sticky duration field solves the persistence problem. It forces an entry to remain active for a specific number of messages after the initial keyword trigger, regardless of whether the keyword is mentioned again.
If you set an entry's Sticky duration to 5 and type the triggering keyword, the entry instantly activates. For the next five messages (counting both your inputs and the AI's outputs), the system bypasses keyword scanning entirely. It automatically injects that entry into the AI's context.
Once the five messages pass, the sticky state expires. The entry will only activate again if the keyword is naturally spoken in the chat.
Ideal use cases for Sticky Duration: * Status Effects: Poison, magical buffs, or severe injuries that need to affect the character's behavior for a specific duration. * Environmental Changes: Sudden rainstorms, a power outage, or entering a zero-gravity zone. * Transformations: A werewolf shifting forms, requiring the AI to remember the new physical traits for the rest of the scene.
The Cooldown duration field is the mechanical opposite of a sticky state. It forces an entry to go dormant, preventing it from activating even if the keyword is spammed repeatedly.
If you set an entry's Cooldown duration to 10, the system will lock the entry down the moment it finishes its active phase. For the next ten messages, the system completely ignores the keywords for that specific entry. It will not trigger, and it will not consume any of your Token Budget.
This is a strict suppression mechanic designed to keep your context window clean.
Ideal use cases for Cooldown Duration: * Physical Descriptions: You want the AI to remember the villain's menacing armor when he first enters the room, but you do not want to waste tokens injecting that armor description every time his name is spoken during the ensuing fight. * Catchphrases or Tics: If a character has a specific vocal tic defined in an entry, a cooldown prevents the AI from overusing it in every single generated reply. * Minor Lore: Historical facts about a location that only need to be established once per scene.
You can use both of these fields on the exact same entry to create a fully automated lifecycle.
If an entry has a Sticky duration of 3 and a Cooldown of 10, the flow operates like this:
1. Trigger: The keyword is spoken in the chat.
2. Sticky State: The entry forcibly injects itself into the context for the next 3 messages.
3. Cooldown State: On the 4th message, the entry deactivates and enters a 10-message lockdown. It will ignore all keyword matches.
4. Reset: On the 14th message, the cooldown expires. The entry returns to its default state, waiting for the keyword to be spoken again.
By tuning these numbers, you gain absolute control over the pacing of your worldbuilding, ensuring the AI only receives information exactly when it makes narrative sense.