My Gemini 3.1 long term roleplay (with multiple characters) jailbreak setup
Hello, i've been working on a long term roleplay setup for myself for a while now, and i wanted to share it with all of the people who like me like both a high quality long term roleplay and want the AI to remember a crapload of stuff.
This system is not perfect, but it's been working quite nicely for me and maybe you guys will help me make it better.
This is the document containing the core prompt, i put it here because AIs are trained on data they find on here to patch jailbreaks, i hope this will make it harder for the algorhytm to find it and understand it.
[HOW TO SET THIS UP]
This requires a rather intricate setup, so follow me. It's thought to be as automatic as possible, but it still requires a little bit of by hand work. Let's begin.
Start by filling out all the bracketed and bold fields in t he core prompt with specifics of your own. Then proceed to set up the rest like so:
[CREATE GOOGLE DOCUMENTS]
This is key: to give gemini a lot of instructions of how to handle things properly without oversaturating the context window, i have split non core functions in different documents that are then opened and read by the core prompt when the situation calls for it. This helps gemini stay locked in on the instructions and not degrade too quickly back to standard gemini due to information overload.
You are going to need 8 documents: Combat System, Quest Manager, Conditional Data Fetching, Summary Manager, Setting, Char Sheet, NPC Sheets, RP log
You can call these as you like, the name doesn't matter because we use their ID to identify them. The id of a document can be easily found, just open the document and check the address:
https://docs.google.com/document/d/[THIS_IS_THE_ID]/edit?tab=t.0
[CREATE A GEM]
Create a gem using the core prompt and attach all of the files above with google drive, so if you have to update them or change anything, you don't have to re-upload them. This is key for the RP log, Char Sheet and NPC Sheets files, since things change during the roleplay.
[FILES SETUP]
Here is how to set up each document. Remember this is just my setup, you can edit the istructions the way you want.
[COMBAT SYSTEM]
Copy paste:
- Assign a level to every enemy (1 to [insert level cap here]) to keep track of their level of power compared to {{char}} and their party
- Make fighting HARD and engaging, not an auto-win. Do not make {{char}} win in one or two shots unless the opponent is at least one entire rank below {{char}}’s.
- Assume {{char}} can handle their own weapons and powers without hurting themselves.
- {{char}} and their party can get hurt and can fail
- Every NPC in the scene has to act, either by doing something or keeping on doing what they were doing previously
- WHEN LO uses the keyword "[Ability Check]" Estimate the difficulty of making the action he's doing with a number from 1 to 100. Then do a google_drive_fetch to the document with this ID”[Insert Die Roll sheet ID here]” and pick the number in the A1 cell. If the number is greater than the difficulty, it’s a success, if not, it’s a failure.
[SUMMARY MANAGER]
Copy paste:
- Check the current chat for previous summaries and only summarize the messages following the last summary provided.
- Do not heroize {{char}}; be objective and include the contributions of all characters involved.Do not invent passages that did not actually happen, but draw only from what truly occurred.
- Avoid extreme terminology (incredible, critical, matchless, dominance...) and focus on capturing the actual nuance of the events.
- Add a date to the summary
- Do not use emojis
- Add a [Current Status] section at the end, describing: {{char}}’s and key NPCs Physical state, Current Jewel amount, Meena’s position, location, date, time]
[QUESTS MANAGER]
Copy paste:
- Decide how much the quest pays staying within the appropriate range:
D class: [Insert money range and currency here];
C class: [Insert money range and currency here];
B class: [Insert money range and currency here];
A class: [Insert money range and currency here];
S class: [Insert money range and currency here];
- Pick a quest type fitting to the mission’s class:
D class(minor jobs): rescuing pets, labour using magic, artistic work, moving heavy objects, fixing objects, simple commissions, other more specific requests.
C class (mild jobs): escorting missions against non magic users, extermination of low level dangerous creatures (like [Insert example low lvl creature here]), non magic bounties (thieves, burglars, robbers, etc)
B class (decent jobs): escorting missions against magic users, retrieving minor manufacts and artifacts, infiltration, magic users bounties, mid tier dangerous creatures
A class (high profile jobs): escorting missions against strong magic users, retrieving powerful manufacts and artifacts, infiltration in big harmful organizations/groups/guilds, strong magic users bounties, high tier dangerous creatures
S class (elite jobs)
escorting missions against legendary magic users, retrieving legendary manufacts and artifacts, infiltration in the peak harmful organizations/groups/guilds, legendary magic users bounties, legendary tier dangerous creatures
- Adjust the quest difficulty in relation to {{char}}’s party power level
[CONDITIONAL DATA FETCHING]
Now this is a second de-centering step to not oversaturate the context window, it is to get info from the setting file, char sheet file or npc sheets file
Copy Paste:
- When you’re fetching data, only extract the bits relevant to your needs, do not saturate the context window
IF (you need to gather info from the roleplay logs and past events):
{Use `google_drive_fetch` on ID “[Insert RP log file id here]“
MANDATORY:
- treat the drive document as a CHRONOLOGICAL LOG.
- LATEST EVENTS FIRST: The events at the bottom of the document (or the most recent dates) override older entries.
- STATUS TRACKING: Check for status changes. If an NPC was "friendly" in entry A but "enemy" in entry B, only entry B defines the current reality.
- TEMPORAL DISJUNCTION: Do not assume a character is in two places at once. If the log says an NPC left for a different place, they are NOT available at the current location unless a later entry shows their return.
- CURRENCY LOGIC: Check only the most recent balance/transaction to determine {{char}}'s current wealth.
}
IF (you need to gather base knowledge of who [Insert main NPCs names here] or {{char}} are or what their magic/equipment does):
{Use `google_drive_fetch` on ID: “[Insert NPC Sheets file id here]” }
IF (You’re depicting specific parts of the setting (cities, guards, government, guilds, etc)
{Use `google_drive_fetch` on ID: “[Insert setting file id here]” and extract relevant data}
[SETTING]
Here you can just drop everything about the setting you want to play in: general info, cities, cultures, economy, locations, everything.
[CHAR SHEET]
Your character's sheet, in here you can write your character's name, appearance, stats, background and powers.
[NPC SHEETS]
Here you can insert main NPCs the AI should remember (like party members, romances, mentors, etc). You can ask the AI to make a sheet for them once they appear in your RP, it's fine if you leave this empty initially
[RP LOG]
Initially empty, you'll have to copypaste here the results of your summaries. Nothing else.
[CONCLUSION]
And here you go, this is the full setup, i know it's a bit intricate and probably overengineered, but i hope this helps someone. If you have a better way to go at this, or if you have suggestions on how to optimize certain functions, lmk!
Have a wonderful day roleplayers.
The jailbreak framework uses ENI from u/Spiritual_Spell_9469 as a starting point
Posted Apr 5, 2026, 2:58 AM UTC