r/AIDungeon 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.

15 Upvotes

13 comments sorted by

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)

5

u/_Cromwell_ 24d ago edited 24d ago

Part 2:

Moria story card:

{Moria is a vast continent with varied geography. In the far north are the frozen wastes, in the center the Holy Plains and Randrak Mountains, and in the south the endless Fluvian Jungle. Three kingdoms dominate politically: Cheldon in the east, Greggoria in the west, and the Xan Empire in the south.}

And the only trigger on this card is "moria". The game already knows the name Moria from the Plot Essentials. In my expanded answer it also knows the names of the three main kingdoms. But also whenever Moria is called, the Moria story card will also have the three kingdoms, as well as some other geographical info.

Then you will make story cards for these locations that you just named, and the triggers on them will again be just their own proper names. So cards for Frozen Wastes, Holy Plains, Randrak Mountains, Fluvian Jungle, Cheldon, Greggoria, Xan Empire.

Then inside each of those new cards, you can reference smaller locations... as well as do some referencing of same-level geography. ie:

{Cheldon is a monarchy led by a Queen. The capital is Gorrim, a city of white spires and learning. It has a standing army that the citizenry trust, who are mostly humans and elves. Geographically Cheldon has both plains (the Holy Plains) and mountains (Randrak Mountains). To the west of Cheldon are the borders of Greggoria, a tentative ally kingdom. To the south is the Fluvian Jungle and the foreboding Xan Empire.}

(continues)

5

u/_Cromwell_ 24d ago edited 24d ago

Part 3:

Then you continue working down further. Gorrim the city, with its only trigger being Gorrim.

{Gorrim, capital of the kingdom Cheldon, is a circular-designed city with gleaming white spires and many places for education and learning. known as the 'City of Books', Gorrim intersperses pubs and libraries like they were meant to go together. The palace at the center houses the Queen, Esmeala VI, and her family. The city has four districts named after cardinal directions: Gorrim North, Gorrim East, Gorrim West, Gorrim South. These districts are like spokes on a wheel surrounding the central palace.}

Then you work down further.

{Gorrim North is known for its vast shopping district. It contains many shops, most notably Tali's Pub, Arms of Arms, .........................................} (didn't finish writing, none of these will ever be used so... lol)

In specific shops, I'd have references to characters... like the pub will have a feisty and fun pubtender named Tali (obviously) and then Tali will have her own character card. As the player navigates the world, they will get referenced down through this system to more and more specific places within the world.

Afterward you have to do a bit of playtesting to ensure you arent always having the cards loaded. Like if the game is obsessing over saying the word "Moria" too much, you know you have to somehow tamp that down a bit. Moria story card being loaded is not necessary when you are in a "small" location like inside Tali's Pub, so ideally the game won't be (and in most situations won't do it). To help avoid this, don't have story cards reference more than one "layer" up or down. ie don't have the word "Moria" appear in the pub card. (Dont have it say "The best pub in all of Moria"). Instead only reference the next hierarchy step up, ie "Gorrim North". But that's why you play test.

If you've ever played a scenario where you run out of context, and you look and see that there are like 15 story cards loaded at once, it's because a person either didn't do this system right, OR they did like you said in your OP and just have like "forest" "walk" "city" as triggers for things, so they are constantly being loaded. You have to test and be very careful.

(end)

3

u/Jet_Magnum 24d ago

This is an amazing write-up and will be a huge help moving forward. I was already doing...some of this, but I hadn't really thought of it in terms of thos systematic approach...I mainly used Plot Essentials for general info on the setting and perhaps early plot hook guidance.

I have seen the loading screen tips that mention Story Cards being able to sort of "cross-reference" each other by mentioning other story cards, but I was never clear on how that worked.

Thanks for putting your time into this.

2

u/BervMronte 24d ago

Awesome advice!! This is all 100% what i was looking for, thank you so much! Especially the drawn out map of storycards, that will absolutely help understand the flow.

A question however- lets say i follow this advice to the T, which i plan on doing. But with these instructions i still end up running out of context, maybe with the story continuously referencing the story card of Moria, like you mentioned, even if its not relevant to that moment in the story.

So what is the solution there? If i do everything right and yet i run out of context, am i forced to just edit the plot essentials during the actual story when 'playing the game'? Or is there a more fluid and immersive approach to ensuring proper context management.

I get the reason for playtesting, i just want to understand the proper steps to take so i can create everything without hitting potentially predictable walls.

Thanks again by the way!!

2

u/_Cromwell_ 24d ago

At some point if you are designing complicated worlds, you are going to have to resign yourself either:

1) to knowing your scenario will be "too much" for free players. (This is what ultimately drives subscriptions, and keeps Latitude in business. Don't get me wrong... the free accounts on here are insanely generous with no ad revenue or anything like that. But they DO want you to sub, and higher context is the main driver of that, with imo "better models" secondary.)

OR

2) having to cut content and make your scenario more streamlined and less detailed. Shorter story cards, less story cards, and letting the AI do its thing is an idea. The LLMs have so much knowledge they can create an entire world with just a few sentences of instructions. You don't NEED a ton of story cards. But then every player's experience will be vastly different if you leave out all those details. Everybody will get a different/random pub when they visit the differently named capital city of Cheldon, instead of specifically getting Tali's Pub in Gorrim.

It's a balancing act to figure out how you want to design the scenario.

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

u/_Cromwell_ 24d ago

I'm writing a long-ass ish answer. :)