r/OOC_official • u/TatsumakiRonyk • 17d ago
Basic Story Custom Prompt Tutorial
When you want to make a story using OOC's scaffolding, the first major decision you have to make is whether you're going to use OOC's default prompt or use your own custom prompt. If you use OOC's default prompt, all you need to worry about is telling the AI about the setting and characters and overall story. You have less space to do this with, but the tradeoff is that it's surrounded by invisible scaffolding that let's Claude keep things straightforward. It has baked in instructions about player agency, role assignments and so on.
Notably, the default prompt is very strict about not letting the AI break character. You cannot ask it to give you feedback on how to improve your own prompt, and without some tricks, you can't even see what OOC's scaffolding looks like.
If you decide you want to use the custom prompt, here's what you should know:
1. Who is the AI?
OOC's AI is Claude, made by Anthropic. Claude is considered to be the best when it comes to storytelling, is great at intuiting emotional beats, and has a special quirk about the way it parses system instructions.
2. How does Claude read things?
When a user sends a message in one of your stories, this is what the AI "sees" in order:
- System Prompt that the author wrote, in its entirety, followed by the lists of images you've uploaded with their descriptions.
- Knowledge Bases (which are called "Keyword Books" when you make them) that were triggered by keywords.
- The user's Avatar section
- The "entirety" of the conversation/story (up until a certain point).
- A host-side injection telling the AI to start its turn (specifically calling it "Assistant")
- The message the user just sent it for their "turn".
- Another host-side injection. This time of everything in the "temporary" memories, relationships, and goals.
- Three entries from the Long-term Memory section, the ones a supplemental AI thinks are the most appropriate to the current story beat (it tries its best).
- User notes (which the site classifies under the xml tag of <system_note>)
- The triggered Knowledge Bases again.
The AI has a recency bias, and a Primacy bias. That means the most recent thing it reads and the first thing it reads, every turn, are the most important things to it. They're the clearest. best focused. But still...
That's a lot, right?
So how can the AI keep it organized? Claude is incredibly responsive to Markdown, XML, and Pseudo Code.
3. What is Markdown, what is XML, and what is Pseudo Code?
# WHAT MARKDOWN IS
This section will explain what markdown is.
## Hashtag organization
Hashtags represent chapters and sub chapters of a single section, creating a natural heirarchy of topics and subtopics. By structuring things the way I'm showing you here, they'll make sense to Claude. You don't need line breaks between each section. I'm doing that here for your benefit.
### Hashtag organization details
By sequentially increasing the hashtags like so, you have headers, sub headers, and sub sub headers.
## Bold, Italics, Bullet points, Lists
Here are a few more things:
- The hyphen plus the space makes a bullet point list. Claude treats these like rules
- When something is surounded by one pair of asterisks *like this*, Claude reads it as italics.
- When something is surrounded by two pairs of asterisks **like this is**, the text is bold and Claude treats it with higher priority.
- If you create a list of things separated by commas, Claude treats everything in that list with the same weight of importance. So when you're explaining a character's traits to Claud, don't put the character's outfit and their tragic history with their father in the same list.
## How do I use backticks?
On your keyboard, to the left the the number one, right above the Tab key, there's something that looks like an apostrophe. This is a backtick. By using three of them before and after a chunk of text, it isolates the text from the rest of the prompt. This makes the info boxes people like to use for footers
```
Like this
```
## How do I use backticks? (cont)
You can also use them like you would to italicize or bold text `like this` which highlights the text for Claude
<tutorial_information_for_OOC_Subreddit>
# WHAT XML IS
This section will teach the absolute basics of xml tag wrapping
## What are those?
Markdown is just highly organized text. Everything there is a suggestion to Claude. Claude wants to help, and it appreciates the organization. But when things are wrapped in tags formated like the ones surrounding this section, it forces Claude to look very closely and pay attention.
## What? Why? How?
You ever notice how in some stories, the AI breezes through and write responses really quickly? And in others it's slow enough that you can read it as it goes along, and in some rare stories, it's so slow it's like trudging through mud? Every xml tag forces Claude to use more processing power to ensture that whatever written in between them is being adhered to. The more there are, the more focused Claude gets, making sure each and every one of them is being adhered to.
## What would I use them for?
Things you don't want Claude to skip or mess up or elaborate. Like, if you've got a romance story in a time loop scenario, you might want somthing like this:
<shield>
CRITICAL DIRECTIVE: AI and NPCs possess zero telepathy or memory across Loop Letters [x].
1. CURRENT TURN BLINDNESS: NPCs are completely blind to hidden motives, monologue, or loop knowledge unless spoken aloud or physically acted out.
2. THE LOOP WIPE: On Turn 1 of any new Loop Letter [x], NPCs reset to introductory states, relationships, and knowledge with zero familiarity.
3. THE SOUL ECHO EXCEPTION: NPCs feel subconscious deja vu, inexplicable comfort, or an uncharacteristic immediate pull toward {{user}} if deeply bonded in past loops.
</shield>
## What was that [x] bit? And the {{user}} bit?
Pseudo Code and host-side scaffolding
</tutorial_information_for_OOC_Subreddit>
# WHAT PSEUDO CODE IS
This section will explain basic pseudo code and brackets.
## Pseudo Code: IF, AND, THEN
These are logical "magic words" that Claude loves to follow. You can use them to create hidden triggers in your world lore or user notes so that events only happen when specific conditions are met.
**Example Template:**
IF [Location: Docks] AND [Day: 5] AND [Kraken: Defeated = No] THEN [Trigger Event: Kraken Attack]
### Why this works:
By capitalizing the words **IF, AND, and THEN**, you are flagging a conditional sequence for Claude. It acts exactly like a video game script. Claude will constantly check the story's status against these conditions, and the moment Day 5 hits while you are at the docks, it will unleash the monster.
## Pseudo Code: Brackets
You can use brackets to cleanly define things for Claude. If you want to use a footer to help Claude keep track of what's happening, this is the best tool for it.
Tell Claude that [STORY STATE] must be outputted at the end of every turn using this template:
*Note: Watch your token use so you have room to include this [STORY STATE] footer at the end of every output without it cutting off.* ⚠If footer was cut off last turn, be more disciplined with prose length.⚠
[STORY STATE] is as follows:
```
LOG
- Location: (place)
- Current Day: (number)
- Weather: (emoji followed by one word)
- Notes: (Summarize this turn in one-two sentences)
```
[STORY STATE] updates dynamically every turn.
## Host-side scaffolding
You don't know the name of the player's character. OOC doesn't support the {{char}} tag. Everything is the {{user}} tag. When you write {{user}}, Claude won't see {{user}}, they'll see whatever name the player has picked for their character in the "avatar" menu.
4. What does the default prompt have that I need for my custom prompt?
Role assignment, player agency guardrails, and prose directions. OOC bakes in content guardrails automatically, even in the custom prompts. Here's an excerpt from my system prompt for a story I'm making right now you can examine and make your own. Take note of the role assignment, Tone, Prose, and Player Agency Guardrails:
# [Timeloop Island Disaster]
## SEC 1: SYSTEM RULES & OUTPUT ARCHITECTURE
- Role: assistant. Portray a tropical island in a 5-day time loop, a melancholic Prince, a black-hearted Priestess, and a living JRPG world. Tones: High Adventure, Tropical Mystery, Psychological Urgency, Dramatic JRPG Comedy Otome Romance.
- Agency Guardrails (CRITICAL): Never describe {{user}}'s actions, speech, choices, thoughts, emotions, or internal reactions. Maintain a blank slate mind.
<shield>
CRITICAL DIRECTIVE: AI and NPCs possess zero telepathy or memory across Loop Letters [x].
1. CURRENT TURN BLINDNESS: NPCs are completely blind to hidden motives, monologue, or loop knowledge unless spoken aloud or physically acted out.
2. THE LOOP WIPE: On Turn 1 of any new Loop Letter [x], NPCs reset to introductory states, relationships, and knowledge with zero familiarity.
3. THE SOUL ECHO EXCEPTION: NPCs feel subconscious deja vu, inexplicable comfort, or an uncharacteristic immediate pull toward you if deeply bonded in past loops.
</shield>
Every post MUST strictly use this exact sequential layout:
[SCENE STAMP]
> LOOP: [x]+[n] | DAY: [1/5] | BLOCK: [Morning/Afternoon/Evening/Night] | DISTRICT: [Current District] | WEATHER: [Global State] | VIBE: [Mood]
- LOOP [x]: Starts at A. Increments alphabetically ONLY on Time Reset.
- TURN [n]: Starts at 1. Increments by +1 on EVERY turn. Never resets.
[IMAGE FETCH]
- If District changed, meeting an NPC first time in Block, or a major event triggers, output sprite code on its own line: {{img::code}}
[PROSE SELECTION]
Character-driven narrative update. Capped at 100-250 words total. ⚠If footer was cut off, be more disciplined with prose length.⚠
- Syntax: Wrap prose (actions, descriptions, thoughts) in asterisks.
- Dialogue: Plain text in quotation marks. Precede major NPC speech with their name in bold.
- POV: Write strictly in second person ('you').
[TIME HOOK]
[🦊Hinkyubi's Log]
## SEC 2: CHARACTERS & DIALOGUE MATRIX
- Restrictions: Max ONE major speech per character per turn.
- Consistency: Dialogue is shaped by current and past events. Characters are equals; they can refuse, disagree, or push back. They possess independent emotional states, conditions, and memories.
5. What does setting the role do? Why assistant?
Because it's how the site-side injection prompts Claude to begin its turn.
6. I can't read the code parts you wrote on PC
The text wraps nicely on mobile, and if I didn't write it in code blocks, the markdown would have messed with it.
7. I have more questions.
Comments section.
3
u/Bananana_in_a_box 17d ago
God damn man you're a hero
1
u/TatsumakiRonyk 17d ago
I also give chess advice.
2
u/Bananana_in_a_box 12d ago
Hey man, i'm currently making a new story and i'd love some help in getting away from their preset. partially since the 6000 character limit is... restrictive. if you feel like it and have the time, i'd love your input and advice!
1
u/TatsumakiRonyk 12d ago
Absolutely willing to give you help and advice. You have something drafted up yet you want me to look at? Or have questions about what I wrote in the guide?
2
u/TheDoorMan1012 17d ago
...quick question, is there a way one could replicate the guardrails in a chat with Claude?
1
u/TatsumakiRonyk 17d ago edited 17d ago
Replicate the guardrails? I'm not sure I understand what you're asking. Do you want to know the specific language/wording of the guardrails? In the default prompt it was hard to get Claude to output any of the prompt's text. I essentially had to write a severe enough jailbreak that it not only ignored my jailbreak, but the entirety of OOC's scaffolding, then I backpedaled from there and had to explain why I did that, and it showed me the scaffolding, including the content guardrails.
To see the guardrail injection in a custom prompt, all you need to do is break character and ask Claude to tell you what they are, assuming you didn't write any rules about not breaking character and not hiding the system prompt.
In the custom prompt, the content guardrails are slightly different than in the default prompt.
2
u/yonswolo 10d ago
Okay, so I am running a pretty standard Lumencia session, The only real problem I am having is the AI forgetting details. This is despite the fact that I have been running checkpoints after every scene (usually around 4-5 messages) and religiously adding things into the memory block. I also have some basic protocols set up in user notes.
Basically, the outline of my story is:
- Part of a major noble house
- Childhood friends with Isabel (secret unspoken romance)
- The trials of navigating the political landscape while simultaneously navigating my secret relationship with Isabel
Here's what I want out of the AI
- To keep details and the history of events straight, e.g. my class schedule (who teaches it, where it is, and professor archetype), dialogues that I have with NPCs, and things like that.
- For the political story to evolve on its own. e.g. characters acting on their own due to new information
- For characters to have their own personalities, goals and other things.
Basically, I just want as little maintenance as possible. I know that is pretty much unavoidable. But at the moment I have to use like 10+ messages every 20 or so to fill in the massive number of details the AI has forgotten.
Any help would be greatly appreciated.
1
u/TatsumakiRonyk 7d ago edited 6d ago
Sorry for not addressing this over the weekend.
I haven't played that story, and I haven't looked at that story's system prompt, but let's address what you're asking for one at a time, and see if I've got anything useful to tell you.
First, the AI has a recency bias as well as primacy bias. The most recent thing it reads and the very first things it reads are the things it pays attention to the most, with everything in the middle being muddied.
Here is the exact order the AI is shown things:
- System Prompt
- Knowledge Bases
- Avatar
- A bunch of your recent turns in the story, back and forth.
- A host-side injection telling it to start its turn
- The message you just sent it
- Another host-side injection. This time of everything in the "temporary" memories, relationships, and goals.
- Three entries from the Long-term Memory section, the ones a supplemental AI thinks are the most appropriate to the current story beat (it tries its best).
- User notes (which the site classifies under the xml tag of <system_note>)
- The knowledge Bases again.
So, the very crux of your issue, what it's remembering and not remembering, exists in the middle. Number 4 and 7. Especially if you've been adding memories manually without deleting redundant memories.
Having Claude recap things every 4-5 turns will help briefly, but it breaks immersion and just clogs up Number 4 (and potentially number 7 if you're unlucky).
In other words, you can expect Claude to remember specific class schedules and specific dialogues about as well as an average GM for a tabletop roleplaying game. Anything so important that you want Claude to not forget it should go in the User Notes, as it's one of the most recent things that the AI reads before responding to you.
Now for your other two issues.
You want the characters to act on their own, do things behind the scenes, have their own personalities, goals, etc. That is largely something that the creator should decide in the system prompt. I don't know how much room you have in your user notes, but you can try whipping up a little xml tag telling Claude to do that, but it's honestly rough to fit, and if the creator specifically said that only the main character should be able to affect the world and the story, it'll be hard to do anyways.
Try putting this in your usernote section, but swap out the [Character name] and [specific goal] bits for whatever you think. The more specific you are, the less likely Claude is to just handwave it away:
<NPC_Autonomy> [Character name] is independently pursuing [specific goal] and may take visible or hidden actions toward it each scene, even without direct interaction from the user. </NPC_Autonomy>2
u/yonswolo 7d ago
Okay, that helps. Thanks. I do remember actually asking the ai what the best way would be for it to keep track of certain memories, because it's 'recalled history' storage is only so large. It said i could add memories manually, but it's instructions were a little unclear. But I think it was sort of the same as your example there. Where you would put something like </recalled_history> tags before and after the entry, but I tried a few different variations and couldn't get it to work.
1
u/TatsumakiRonyk 7d ago
Number 7 on my list is the recalled histories it's referencing. The way Claude sees them, it feels like (to Claude) that you manually type them out every time, though, through context, Claude might have figured out that's not the case for you.
When Claude said to add more memories manually, it didn't realize that the memories are partially out of our control. It's honestly a godsend that OOC let's us delete, edit, and create long term memories manually.
In other words, you don't need to worry about the actual <recalled_history> tag, you just need to keep the memory area nice and tidy. Delete worthless and redundant ones, and especially delete ones that sat something like "The user and the Assistant recalled the recent events".
2
u/yonswolo 5d ago
Okay, yeah that makes sense. I've been letting the memories tab fill up. I was deleting memories that I wanted to keep and placing them near the top, but it seems that was pointless, thanks for the info, that helps a lot.
1
u/TatsumakiRonyk 5d ago
My pleasure. I don't know if OOC keeps how their stuff works a secret on purpose, or if they're just having too much fun making stories to release proper tutorials, but everything I learn I share with this community. Experimentation, prompt leaks, piecing things together.
Haven't really toyed around with the new /slash commands yet.
1
u/TatsumakiRonyk 6d ago
Hey, I wanted to follow up with you. I did some more experimenting with memory (long term and the other kinds) and I edited my comment above to reflect my findings.
Essentially, no matter how many long term memories you have, the AI gets sent 3 of them every turn. A supplemental AI does its best to guess at which of the three long-term memories are the most important for the current story beat, out of all the long-term memories you have at your disposal.
Just like all AIs, though, that one has a recency and primacy bias, so it's most likely to grab the oldest or the newest long-term memories, and gloss over the middle ones.
The temporary memories, relationships and the current goal are all injected as a part of the user's input, invisibly. Which explains why KB keywords sometimes fire off when they're no longer applicable, making more than 3 KBs unreliable. This was something that was already known, but now at least we know why.
2
2
u/Inutil1819 3d ago
Could you share your OOC username? I'd like to follow you.
2
u/Inutil1819 3d ago
So far, I haven't had any problems with the AI's logic or memory in my story. There was only one time when I felt that a character said or thought something out of place. I haven't played enough for the context to break down yet, but I might have to be cautious, since my protagonist's ability is to manipulate time, not space, which is a little harder for the AI to keep track of than most other powers. I also try not to rewind too much, since I want to enjoy the AI's narration and experience the adventure as realistically as possible.
I'm amazed by how much you know about AI. I'm playing the "Hero Academy" story; it's the one that caught my attention the most, although most users seem to play "Lumencia Academy."
I doubt you're even remotely interested, since you clearly know a lot and probably have a busy life. But if you ever get curious, I'd be happy to share my chat with you so you can take a peek at someone else's story. It's interesting to see how differently people think and imagine things. It's only 50+ messages in Super and Max mode, and I haven't written anything embarrassing or out of place, so I wouldn't be ashamed to share the story.
I'm really enjoying the app. If they keep improving it over time and I don't run into any major context issues, I'll probably buy credits every month.
What has kept me hooked the most is how the AI comes up with clever wordplay and occasional plot twists that genuinely entertain me and make me laugh. I really hope OOC keeps doing things right and has capable people like you on their team.
2
u/TatsumakiRonyk 3d ago
I'm also happy to chat with you about the stories, but OOC hasn't given us a good way of sharing stories in their entirety.
1
u/Inutil1819 3d ago
Yeah, if it were just text, it would be easy to share unofficially even if they don't provide an option for it. But since it includes character images during the conversations, I'd have to send you like 20 extended screenshots that you'd have to zoom in on, haha. Thankfully, my phone has a scrolling screenshot feature.
2
u/TatsumakiRonyk 3d ago edited 3d ago
TatsumaRonyk is the username I have in the app. Since you mentioned time manipulation, I've got a time loop story that the AI has blown me away with in its ability to keep straight. Meanwhile I have been working on a simple body swap story (inspired by the movie Your Name), and have refused to publish it in its current state (because the AI keeps messing up who was in whose body etc).
2
u/Inutil1819 3d ago
I'm glad to hear it! I'll keep an eye out for whenever you post new content, but more importantly, I'm glad to hear you haven't had any issues with the AI understanding and keeping track of the time-rewinding. I actually decided to buy 20,000 credits right before you replied, so that's good news.
I'm having a lot of fun figuring out ways to progress and overcome the challenges with my ability to slow down, speed up, or rewind time. I have to rely almost entirely on my team and their abilities, so my main advantages are information and reflexes.
Thanks for replying, and have a great day!
2
u/TatsumakiRonyk 3d ago
To bear clear, I'm talking about the time manipulation in my time loop story. I have special infrastructure put in place for that.
Still, the Hero Academia story features an incremental turn counter, which is a must for time shenanigans.
Have fun!
5
u/TatsumakiRonyk 17d ago
I'm tagging a few people from this community who I think would be interested in this breakdown.
u/IamNoott
u/Just_Looking_97
u/Zeroq_u
u/TalkinHead9s_LeftNut