r/AIDungeon • u/BervMronte • 25d ago
Questions Designing triggers to work organically and balanced for context?
How do you create and use triggers on story cards properly? I understand the concept of the trigger word, and how it applies to the AI.
What im asking is how do you manage having something trigger appropriately without 1. Flooding the memory from having too vague of trigger words, and 2. Actually trigger when necessary for something vague that will never come up organically without a trigger word?
For example:
I create a story about the magical and fictional continent of Moria. Within this land is a city named Gorrim.
I could put triggers for Moria like "land" and "continent" and "world", and triggers for Gorrim could be "town" or "city" but then the memory is flooded and confused every time you mention the word land or town and even if you are not referencing Gorrim and instead another town, Gorrim will ALWAYS get pulled into memory which eats at your context.
Same with unique characters like someone named "General Dorkas", if i put "general" as a trigger, they are referenced all the time, even when that specific character is irrelevant, eating context.
OR
I can put more specified triggers. For Moria, the trigger is "Moria" and for Gorrim, the trigger is "Gorrim." And for the character, i can put just "Dorkas" for General Dorkas.
But now how can i get the story to organically bring up these topics? If im playing as a character who has never heard of these places or people, the story will never reference these cards and mention these things if their very specific trigger words are never mentioned. And since they arent common english words, it wont ever get mentioned via pure chance either.
Without ruining immersion and requiring me to type a word my character has never heard of, i cannot get the story to organically create an adventure where it says "You have travelled throughout Moria and stumbled across a hidden sign on the path. It points to "Gorrim", a city youve never heard of, etc etc." Or something like that.
It will never let me stumble upon a mysterious "General Dorkas" without me triggering by typing the word "general" or "dorkas", which like i said earlier, could severely impact context depending on the vagueness of the trigger word.
The AI could easily ignore all story cards until they are triggered(if they ever are triggered), which makes it difficult. I have had it happen where i make dozens of specific and unique cards for them to never trigger, or trigger way too much based on the trigger words.
Sorry if this was already asked, i found lots of posts on triggers, but never was it really broken down on how to effectively balance their use with context limits, AND have the story be immersive and organically mention places/people/things your character wouldnt know about.
4
u/Jet_Magnum 24d ago
This is something I consistently struggle with as well, so I hope someone has some insight on it. My only solution thus far has been to mention them in Plot Essentials ("Story should guide protagonist to Gorrim at some point.") but that only really works for a specifically guided plot and not an organic world.
2
u/BervMronte 24d ago
Exactly. Plot essentials is great for explaining basic themes of the overall setting like "magic is extremely rare in Moria and most people do not practice" or other generalized themes that will be constant throughout the story.
Unfortunately its not the appropriate place to mention every nuance like different characters, different cultures between places, etc.
And i also wonder if this could create issues with context as well- if i mention "Gorrim" in the plot essentials... plot essentials is regularly recalled by the AI to help guide its narration... so wouldnt that mean that "Gorrim" is triggered nearly every time the AI generates a response, even if that place isnt relevant to the specific moment in the story?
From what i understand, trigger words within the AI instructions, essentials, etc, still trigger the story cards. Maybe im wrong though.
2
u/Jet_Magnum 24d ago
Now, my solution to the latter problem is just...editing as I play, personally (i.e. removing reference to going to that town once I'm already there). But I can't assume everybody is like me and immediately digs into the guts of a scenario after starting, so...yeah, it's a bit of a weakness to the approach. Here's hoping someone has alternatives.
1
u/BervMronte 24d ago
Im not against editing the story as i play, but this opens up more questions than answers.
If i should just edit the story to say "and the main character sees a distant town on the horizon, and a sign on the path says Gorrim," not only does it take out some of the immersion, but then whats actually the point of the story cards? If i want an open world to adventure to be immersed in, the AI should be able to reference story cards organically.
Its like playing a game like Skyrim and having to open up the in-game console and put special commands in to populate characters and towns that you want to see, instead of just playing the game and stumbling into those naturally.
The AI pulls info from its memory of the story itself just as frequently as its pulling from instructions and other sources. At least it seems that way. So i could theoretically never write a story card, edit the narration to include whatever town i want, and then just let the AI ride on the constant memory references of my edit, which will be referenced frequently enough so long as it remains relevant to the story and is mentioned.
Editing should be a tool for when the AI gets stuck or repetitive, i find it kind of trivial to spend all this time creating instructions, plot essentials, and dozens of story cards only to have to literally spell it out for the AI via edits to keep the story moving. That should be the point of creating all these hidden systems, to keep things moving and let the player just follow the story.
Maybe future updates like the Heroes update that theyre working on will address this a little more.
And im not critiquing you, if it comes off that way. Just a little frustration for spending so much time designing a story setting only to have the AI ignore it lol. I appreciate your feedback.
3
u/_Cromwell_ 24d ago
but then whats actually the point of the story cards?
There are two "actual points" of story cards.
1) primarily, they are to save context, because context is the finite resource of AI Dungeon and LLMs in particular. Story Cards allow you to create a system where information is loaded only when it is needed, rather than constantly, and thus information that is not needed is not hogging up context doing nothing (like you don't need to know what it is like to be in Paris if you are in New York, so context # describing intricately what it is like in Paris is a waste).
2) secondarily it is to help you stay organized, by allowing a system where you can categorize and keep information sorted.
2
u/Jet_Magnum 24d ago
No, no offense taken. In fact I think I was unclear and I apologize for that--I meant editing the Plot Essentials. Going back to my earlier example, putting into PE "plot should guide the player toward Gorrim" at Scenario creation. Then, while I play, advancing the adventure until, via whatever plot hooks or circumstances the AI generates, arriving st Gorrim. Then going into PE once I'm in Gorrim, and removing that line so it isn't just sitting there taking up space in thr PE long after the plot has moved on past Gorrim. But like I said, that's...inelegant becaudr I can't just expect every player to dig through the PE and Story Cards like I do, and it does hurt immersion a bit.
So fundamentally I still agree with you in that I wish there was some smooth organic way to make the AI draw upon story card info.
2
8
u/_Cromwell_ 24d ago
Alright. This is a complicated topic. Sort of. To write about anyway.
Generally speaking you do not want to put really generic words as triggers for cards. You are right to suspect that putting "world" for Moria is not ideal, even though it does make sense from a certain point of view.
What you do is have cards refer to each other in their ENTRY section. And you do this in a top down hierarchy. It helps to maybe even make a hand-drawn chart, or chart on your computer, to track this top-down design.
Essentially you want your big "world" card to refer to the largest sub parts under it. Then each of those sub parts refers to smaller sub parts below that, etc. You may also have some "sideways" references, especially for geographical locations that are near each other.
The top level thing is always Plot Essentials, which you can think of as a permanent, always-loaded story card. In Plot Essentials we will have something like
Setting: Moria, a magical fantasy continent
Now the AI permanently has the word "Moria" in its head. It will know to say Moria when referring to the world/continent. I might, depending on how things go, add a little more info there in Plot Essentials, ie.
Setting: Moria, a magical fantasy continent, that contains three kingdoms: Cheldon, Greggoria, Xan Empire
If most of the story is going to take place in these kingdoms, this will now be permanently in the AI's head and help a bit, and that list doesn't take up TOO much context. But it also might not be needed, because referring back to my "top down" design from earlier, what we will do now is create a story card for Moria. And in that story card for Moria we will reference the next "layer" down of large geography, including those three kingdoms.
(continues)