Category: Trigger Logic
The trigger system relies entirely on finding specific words in your chat. However, the system does not read your entire chat history every time a new message is generated. Scanning hundreds of messag
MiocAI הוא חלופה ל-Character.AI, Candy AI ואפליקציות צ'אט אחרות עם דמויות בינה מלאכותית.
The trigger system relies entirely on finding specific words in your chat. However, the system does not read your entire chat history every time a new message is generated. Scanning hundreds of messages for dozens of keywords would be highly inefficient and would cause the AI to constantly pull in outdated information from scenes that ended hours ago.
The mechanism that controls exactly how far back the system looks is called Scan Depth. Controlling this setting dictates whether your lore stays highly relevant to the immediate moment or persists as a slow-burn background element.
Scan Depth is a numerical value that determines the exact number of recent messages the system will read when looking for your keywords.
If your scan depth is set to 2, the system takes the text of the most recent message (usually yours) and the message immediately preceding it (usually the bot's last reply). It concatenates those two blocks of text together and searches them for matches.
If your keyword was spoken three messages ago, the system will not see it. The entry will not activate. The lore will not be injected.
Every Lorebook has a global default scan depth, which is typically set to 2. However, inside the editor for any individual entry, you will find a Scan depth override field. Leaving this blank forces the entry to inherit the Lorebook's default. Entering a specific number here allows you to micro-manage exactly how that specific piece of lore behaves.
A low scan depth (1 to 3) is the most efficient and reliable setting for 90% of your worldbuilding.
Shallow scans are built for immediate physical presence and active characters. If you create an entry for a specific tavern, you want a low scan depth. When you walk into the tavern and mention its name, the entry activates. A few turns later, you leave the tavern and start walking through the forest. Because you are no longer saying the tavern's name, it quickly falls out of the scan window.
This immediate deactivation is entirely intentional. It frees up your Token Budget. The system stops injecting the tavern's layout into the context, leaving more room for the AI to process the rules of the forest you just entered.
Keep scan depths shallow for: * Physical locations and buildings. * Minor NPCs who only appear for short conversations. * Specific items or weapons being actively used in a fight.
There are times when a shallow scan will break the logic of your narrative. If you are dealing with overarching plots, complex puzzles, or persistent status effects, a low scan depth will cause the AI to "forget" the rules of the situation simply because the keyword wasn't repeated in the last two messages.
This is when you use the override field to set a Deep Scan (5 to 10+).
If your character is afflicted by a specific magical curse, you might not mention the name of the curse in every single line of dialogue. But the AI still needs to know the symptoms of the curse to accurately format its responses over the course of the scene.
By setting the curse's entry to a scan depth of 10, you ensure that as long as the curse was mentioned recently, its mechanical rules will remain firmly injected into the AI's context.
Increase scan depth for: * Slow-burn mysteries or detective clues that span multiple dialogue exchanges. * Complex magical rules or environmental hazards (like toxic air or extreme gravity). * Persistent character states, like a severe injury or a curse.
It is tempting to set the global scan depth to 20 just to guarantee the AI never misses a detail. This will ruin your chat.
Deep scanning massively increases the rate of False Positives. If a character casually mentions the name of a distant king in passing, and your scan depth is set to 20, the system will continue injecting the entire political history of that king into the AI's brain for the next 20 messages.
The AI will assume the king is highly relevant to the current moment, even though the conversation moved on long ago. Furthermore, these active entries will rapidly exhaust your Token Budget, meaning other, more immediate entries might fail to trigger simply because the system ran out of space.
Match the depth to the necessity of the lore.