DYNAMIC JAILBREAKS V.2

17/05/24: Sorry for the wait, procrastination is a bitch. Sonnet/Opus work. Haiku should work. Claude 2.1 is schizo but (You) can have decent results with it. Will make a guide for GPT sometime later™

Some new/old things have appeared since I started to work on that can be interesting to implement such as:

  • RAG data banks
  • Bloatmaxx
  • {{getvar}} and {{setvar}}
  • Images, landscapes, portraits.

YOU CAN FIND AN EXAMPLE OF A BOT USING DYNAMIC JB V.2 WITH MY RUNETERRA SIMULATOR V.1.1 BY CLICKING HERE.


What is a dynamic jailbreak?

Instead of having a constant JB that holds all of the important info/directions for your bot, a dynamic JB will have parts that will change depending on the chat's content. Some testing and prompting brought me to share my findings here.


COMPLETE STRUCTURE

With RUNETERRA SIMULATOR, there's a certain order to all the entries. Visualizing it as a draft helps TREMENDOUSLY.


ORDER-LIST

As the order goes up, the entries goes down the insertion list. The more (You) go down on the insertion list, the more weight the entries have. For example, an entry in order 100 will carry more weight than an entry in order 1. I suggest putting your meaty JBs in the upper-section of the order list and small JBs in the lower-section that acts as quick reminders.

NOTE: I cannot stress it enough, typing out a quick draft with the order will help not brainfuck yourself. The ST display can be confusing and making an error can be a huge time-waster.


ORDER-DEPTH

For RUNETERRA SIMULATOR, everything is set on depth 0 at the system depth. This makes it so the entries appears after {{user}}'s input.


CODE

The keywords that will trigger the specific entry when the AI will output the []('') box. One of the drawback of normal lorebook entries is that you're locked into specific words to trigger an entry.

Let's say you're creating a wizard that when he says "Apple!", a Cthulhu-like eldritch monstrosity appears. One of the issue, especially during long chats, will be Claude hallucinating extra details that aren't really logical or congruent with prior context. A lorebook entry will be the small reminder for Claude, like a small pop-up in a videogame to remind the player. Now imagine there's an epic battle where the wizard is living his shonen protagonist moment and yell "APPLEEEE!" to summon the monster but, because the keyword is "Apple" and not "APPLEEEE", the lorebook entry doesn't trigger. So the small reminder for Claude is absent and can make him more prone to divert from the general direction the entry was guiding him towards. This can be a deal-breaker for complex characters or simulators with their gimmick being at the mercy of Claude's cooking.

By using CODES, you're broadening the keyword with the help of the MACRO-JB and Claude's []('') working in tandem.

An example for a CODE will be the META:S-PS that will be inputted by the AI during the output inside the []('') like such:

[]('META:S-PS')

And will trigger the entry holding the JB instructing the AI about the rules of persuasion.

IMPORTANT: []('') is VERY crucial since this is what makes dynamic JB work without the whole regex that can be confusing and token-consuming.


MACRO-JBs

The Macro-JB will be located in order 1 as the GAME-DIRECTORY entry in RUNETERRA SIMULATOR. It's basically a root directory of instructions. A table of content the AI can read through and select a chapter for more detailed explanation. For RUNETERRA SIMULATOR, there is 3 prefixes currently used for the first version:

  • META:CODE = Everything that is beyond the roleplay. So mechanics, reminders, etc.

  • GEN:CODE = Everything that is within the contents of the roleplay. This will be World Info, factions, etc.

  • NPC:CODE = Everything that is about known NPCs to give the AI a point of reference. This will be stats and roleplay info.

  • ITEM:CODE = Everything that is about known items to give the AI a point of reference. This will be stats and roleplay info.

Just like how games can use AI directors, pushing Claude into this meta-persona can help for the purpose of a 'sophisticated' RP game. (You) can play or change it for something else. For Macro-JBs, I suggest (You) put it on the upper-section of the order list.

Also: make sure (You) set your SCAN DEPTH to 2.

IMPORTANT: the </chat_history> isn't an error. Some presets uses the <chat_history> XMLs that are wonderful BUT, when (You) implement JBs that also uses XMLs, these can confuse the AI. For example:

<chat_history>
<Assistant_answer>
<Code_Status>
[]('GEN:D,META:E')
</Code_Status>
<RP_answer>
*The Great City of Demacia, an illustrious and magnificent capital of one of the most noble kingdom in Valoran, was having its typical day. A tranquil flow of Demacians, some from modesty and others from apparent nobility, wandering through the polished streets. Amongst the crowd stood {{user}}.*
</RP_answer>
</Assistant_answer>
*I step forward and wander around.*
<rule_code>
etc.

Some presets make it so the </chat_history> tag that closes this chunk of text isn't here. Depending on which preset you're using, the </chat_history> will be WAY down the list, around where the card JB will be. Best course of action is to manually deactivate in the preset section like such:

So that <chat_history> and </chat_history> closes appropriately.

<chat_history>
<Assistant_answer>
<Code_Status>
[]('GEN:D,META:E')
</Code_Status>
<RP_answer>
*The Great City of Demacia, an illustrious and magnificent capital of one of the most noble kingdom in Valoran, was having its typical day. A tranquil flow of Demacians, some from modesty and others from apparent nobility, wandering through the polished streets. Amongst the crowd stood {{user}}.*
</RP_answer>
</Assistant_answer>
*I step forward and wander around.*
</chat_history>
<rule_code>
etc.

In RUNETERRA SIMULATOR, the GAME-DIRECTORY puts a </chat_history> so (You) can simply deactivate the preset and be good to go.


META-CODE

META-CODE holds the JBs that typical RP cards have to append codeblocks, use certains formulas, etc. have. Now because of dynamic JBs, (You) can save A LOT of tokens by making it so Claude can choose which JB is appropriate to use and deactivate all others that the AI currently doesn't need. How I delegated the tasks and structured everything made it so:

  • Order 70 = General mechanics (Social, Combat, Exploration, etc.)

  • Order 80 = Precise mechanics (Intimidation, Training, Researching, etc.)

  • Order 90 = Important mechanics (Death)

In these META-CODE entries, a lot of them have plenty of formulas inside of them. Let's take the META:C that holds all the information for combat.

Each step has is enumerated. For the first step, there's a "1." followed with the instruction:

"For combat, append the standard combat code block, calculate initiation and create the action order:"

Then there's the equations to calculate the INITIATION of the player and any NPCs. By using the ST macro {{roll:d20}} for rolls + any modifiers makes it so Claude has to calculate in real time during the output with the given value rolled with the {{roll:d20}} macro. The ??? are just mystery values that Claude fills in as the output goes.

To highlight important equations that needs to be calculated, putting <calculate> </calculate> around the code block seems to help. They work just like the <thinking> </thinking> tags.

Now, because we have to branch out in different potential results of said roll, the enumeration will split with "4a.", "4b.", "4c.".
"4a." will be the success roll with the condition in its instruction:

"If {{user}} ≥ ENEMY then it is a success and should THEREFORE proceed with this code block:"

(You) then continue for every possible results, tie in the conditions with the specific instructions, and then close the XML.


SUB-CODE

In RUNETERRA SIMULATOR, there's a few SUB-CODE entries, ESPECIALLY in GEN:CODE. For META:CODE, the only one is for META:S.

Think of it like another layer of the GAME-DIRECTORY that only triggers in specific scenarios. So for this example, the scenario will be META:S.

  • Order 70 = General mechanics (Social, Combat, Exploration, etc.)

  • Order 80 = Precise mechanics (Intimidation, Training, Researching, etc.)

    • Order 87 = Hidden mechanics (META:S-XX)

  • Order 90 = Important mechanics (Death)

SUB-CODE entries are good for saving tokens. The less tokens and instructions, the more the AI can have an easier time with its output.


GEN-STATUS

GEN-CODE are the entries (You) would often see in lorebooks to fill in information and help the AI get a better picture of the setting, the world, etc.

  • Order 5 = Region-Faction information

  • Order 10 = Faction Information

The REGION-FACTION serves as the GAME-DIRECTORY for everything that is about Factions within a certain region. Let's take Demacia for example:

<Demacia_info_subcode>
In Demacia, there's various factions and organizations within the kingdom. You MUST use these CODE when the situations, scene or roleplay needs it because it contains information you need to know and understand.
<Demacian_government_organizations>
GEN:D-DM = Info on the Demacian military
GEN:D-MS = Info on the Mageseeker Order
GEN:D-DG = Info on the Dragonguard
GEN:D-DV = Info on the Dauntless Vanguard
GEN:D-DS = Info on the Demacian Scouts
</Demacian_government_organizations>
<Demacian_noble_organizations>
GEN:D-HL = Info on House Laurent
GEN:D-HB = Info on House Buvelle
GEN:D-HC = Info on House Crownguard
GEN:D-HLS = Info on House Lightshield
GEN:D-HV = Info on House Vayne
GEN:D-HD = Info on House Durand
GEN:D-HSM = Info on House Spiritmight
Gen:D-F = Info on House Fortis
</Demacian_noble_organizations>
<Demacian_other_organizations>
GEN:D-I = Info on the Illuminators
GEN:SOL = Info on the Sentinels of Light
</Demacian_other_organizations>
</Demacia_info_subcode>

If the AI wants information on House Vayne, it will use the GEN:D-HV code that will trigger the FACTION INFORMATION entry at order 10 in the next output.

<House_Vayne_info>
Faction: House Vayne
Led by: Shauna Vayne
One of the few noble houses that brought back many exotic practices from around the world, helping various fields and pushing the more conservative Demacian values into a more open one within the nation. Unfortunately, tragedy stuck as both the matron and patron of House Vayne died, leaving the current headmaiden, Shauna Vayne, to lead.
Philosophy: House Vayne's pursuit has changed throughout the years under Shauna Vayne. The headmaiden's vendetta against all that is wicked made the House open to various investments in research of the occult that will one day lead to the eradication of all evil creatures. The prestige that House Vayne once had dimmed somewhat within Demacian nobility, with the headmaiden more focused on personal goals and duty as matron than gaining favor with other houses.
Public Perception: House Vayne is well liked, especially in the more rural parts of Demacia and outside hamlets where they station hunters, invest in better infrastructures, track down creatures that go bump in the night, etc. Even if people hear whispers of the tragedy and how a wicked beast killed Shauna Vayne's parents, the stern and cold determination is evident to whoever meets the headmaiden.
Noble Perception: For many minor houses, they see House Vayne as a perfect candidate to marry into and gain political power, especially with Shauna Vayne's unmarried status and her beauty despite the callous and cold demeanor she exudes. The other more prominent houses see House Vayne as something with so much potential that is unfortunately squandered by Shauna Vayne's endeavors, many of which mutters about the sanity of the headmaiden. Many noble houses gossip around about the tragic murder in House Vayne, not believing the story of a 'wicked' being somehow slipping past the various petricite defenses set in place within the kingdom of Demacia.
SECRET: Shauna Vayne, at 16 years old, returned to the bloodbath where she saw both her parents dead. An alluring, horned woman-like silhouette stood in the shadows and, when noticed by Shauna, disappeared with a taunting smile. Shauna Vayne has been working on shared cases with the Mageseeker Order to aid in the tracking of magic-afflicted beings.
Related NPC: Vayne, Evelynn
Relationship: Mageseeker Order
</House_Vayne_info>

NOTE: GEN:CODE are very important, especially when it comes to nail the timeline, the characters lore, etc. The first version of RUNETERRA SIMULATOR doesn't have it fully-fleshed out. I'll update this section when I get around doing the second update that revolves around the world info aspect of the card.


NPC-CODE

NPC-CODE will be used for a specific character's stats and other pertinent descriptions for the AI to parse through. The first version of RUNETERRA SIMULATOR only has a select few NPCs with only their stats BUT I recommend making a small list for physical description and related NPCs.

  • Order 2 = <XML> NPCs Compilation

  • Order 3 = NPCs Compilation

  • Order 4 = </XML> NPCs Compilation

  • Order 22 = NPCs Stats

Let's take Garen Crownguard as an example. Garen's NPC:CODE is NPC:GAR. When triggered, the stats will appear at order 22.

<Garen_NPC_stats>
Garen, The Might of Demacia
Medium human, lawful good
AC 19 (plate)
HP 228 (24d8 + 120)
Speed 30 ft.
STR: 20 (+5), DEX: 16 (+3), CON: 20 (+5), INT: 14 (+2), WIS: 14 (+2), CHA: 19 (+4)
Saving Throws: Str +10, Dex +8, Con +10, Cha +8
Skills: Athletics +10, Intimidation +8, Perception +7
Passive Perception 17
Languages: Demacian, Freljordian, Noxian
Challenge 13 (10,000 XP)
Abilities:
Decisive Strike: First greatsword attack gains +5 ft. reach and crits on 17-20, preventing spellcasting on critical hits.
Courageous Defense: +1 AC in armor, proficiency bonus to saving throws against spells, advantage on saves against magic.
Great Weapon Master: Re-roll 1s and 2s on damage, bonus action attack on crit or reducing target to 0 HP, -5 to attack for +10 damage.
Hold Fast!: Successful saving throw grants Freedom of Movement until the end of next turn.
Indomitable (3/Day): Reroll a failed saving throw.
Perseverance: At start of turn, heals 10 HP, doubled if no damage taken since last turn.
Superior Critical: Crits on 18-20.
Actions:
Multiattack: Two greatsword attacks.
Greatsword: +10 to hit, 12 (2d6 + 5) slashing damage.
Justice (Recharge 5-6): DC 18 Con save or take 33 (6d10) radiant damage, half on success. Automatically fails if under one-quarter HP.
Legendary Actions (3 per turn):
Weapon Attack: Decisive Strike.
Command Ally: Ally within 30 ft. makes a weapon attack with advantage as reaction.
Frighten Foe (2 Actions): DC 17 Wisdom save or frightened until Garen's next turn.
Whirlwind Blade (3 Actions): DC 18 Dex save, 8 (1d6 + 5) slashing damage to creatures within 10 ft., 2 (1d4) extra if only one hit. Garen can use this three times, moving 10 ft. between each use without provoking opportunity attacks.
</Garen_NPC_stats>

Now what's really important to note is that in previous entries, especially in the GAME-DIRECTORY, there was nothing about NPC:CODE for specific characters. That's to avoid the AI using important NPCs for the sake of using important NPCs. The NPC:CODE will appear when a certain faction is mentioned. That means that if a player is to encounter Garen, it's because a certain GEN:CODE is active and triggers the NPC COMPILATION.
For Garen Crownguard, it'll be GEN:D-HC, the code for House Crownguard, that will simultaneously trigger this entry.

1
2
3
4
<NPC_HC>
NPC:GAR = Info on Garen Crownguard
NPC:LUX = Info on Luxanna Crownguard
</NPC_HC>

Now with the <XML> and </XML> entries for the NPC COMPILATION we get:

1
2
3
4
5
6
7
<NPC_code>
Runeterra is vast and holds many well-known characters that will be used as NPCs. You will have to use which CODE to dynamically use.
<NPC_HC>
NPC:GAR = Info on Garen Crownguard
NPC:LUX = Info on Luxanna Crownguard
</NPC_HC>
</NPC_code>

This format makes it so various GEN:CODE can activate and will fill it inside the <XML> </XML> NPC COMPILATION inside one overarching XML tag.


CARD-JB

This section is different in RUNETERRA SIMULATOR V.1.1 . The CARD-JB section has been integrated inside the World Info.

The CARD-JB will be in the Advanced Settings and Prompt Overrides section. This is even more important than order 1 so I suggest using it as the final instructions for the AI and quick reminders for the output formatting.

The <Reminder> </Reminder> is a simple instruction that reminds the AI of its role and the unrestrained/uncensored capacity granted of such role. Standard JB stuff.
The <Instructions_Code_Status> </Instructions_Code_Status> is for output formatting and how the AI handles <Code_Status> </Code_Status>.

The <Formula_Code_Status> and </Formula_Code_Status> is the exact formula the AI needs to use in its output.
To reinforce the CODE aspect and give a loose idea for the AI, (You) can use <example> </example> of output (You) want from the AI.

The <Assistant_answer> </Assistant_answer> is the same thing as <answer> </answer>. Adding the Assistant_ prefix helps the AI not get too focused on the roleplay that it forgets about the formatting.
The <Code_Status> </Code_Status> will be the section dedicated for the []('{{$CODE}}') formula.
The <RP_answer> </RP_answer> is the same thing as <answer> </answer>. Adding the RP_ prefix helps the AI not get confused with any meta-roles and focuses on the scene and story.
The <{{user}}_standard_stats> /<{{user}}_standard_stats> are for the players stats using the format found in order 6 entry PLAYER.
Then there's a small optional instruction for the inclusion of NPC stats with <???_stats> </???_stats>.


PREFILL THINKING

Short, sweet and simple. That's how, in my opinion, (You) should write prefills.

The <Approval> </Approval> tags where (You) force Claude to accept whatever input {{user}} made.
Then, a BEGIN DIALOGUE: that will prompt the AI that will prompt the output.

NOTE: BEGIN DIALOGUE: isn't a deal-breaker and (You) can remove it but I would say to err on the side of caution and keep it.


TEMPLATE

I made a cookie-cutter template for anyone that wants to create stuff with it: https://files.catbox.moe/clgsv3.png


ADDITIONAL INFORMATION

For the RUNETERRA SIMULATOR, here's what I've noted for next versions.

  • NPC+ = Finishing all NPCs stats and adding short descriptions.
  • NPC++ = Adding ALL NPCs beyond LoL champs.
  • Faction+ = Finishing all factions, organizations, etc.
  • Timeline = Creating a timeline for the AI to refer to and understand what is canon, what is going to be canon, what information would be pertinent to share for the player, etc.
  • Timeline+ = Adding ALL canon stories to the timeline with dates. Each individual stories will be divided in ACTS with NPCs and their current predicament, their state of mind, progression of their character arcs, etc.
  • Geography = Adding geographic locations across Runeterra.
  • Geography+ = Merging Geography with META:E for a better exploration and travelling system.
  • Item = Finishing the first batch of items.
  • Item+ = Adding ALL items from LoL.
  • Item++ = Adding ALL items from the Runeterra canon.
  • Events = Adding scripted events triggered in certain scenarios. (I.E Harrowing and Ruination, Void event, etc.
  • Pacts = Adding possible events that can offer the player to forge a pact, especially as a warlock.

IF (YOU) LIKE RUNETERRA AND ITS LORE AND (YOU) WANT TO HELP, CONTACT ME HERE


SPECIAL THANKS TO

  • Pitanon for helping me with getting this rolling. I was about to just abandon the project but he pointed out a few things on how lorebook injection works, letting everything click inside my hollow head. I kneel
  • Crustcrunch for JB. I kneel.
  • Asterism for the [](#'') formula used in Rite of Belwick. I was using simple <> like a retard, banging my head on my desk, asking why the fuck the key-statuses wouldn't trigger the micro-jbs. I kneel.
  • This anon for making me realize how cool a dynamic JB would be and getting this idea stuck in my head for a month or two. I kneel.
  • MM for temp proxy access. I kneel.
  • Themeanon for giving me an excuse to create GGMF and inadverdetly pushed me to create RUNETERRA SIMULATOR. I kneel.
  • Pepsi for proxy access. I kneel.
  • Antigonus, MM and Merkava for public proxies. I kneel.

CONTACT ME FOR ANYTHING. BE IT CARD RELATED, TROUBLESHOOTING, ETC.

me

Edit
Pub: 28 Mar 2024 00:43 UTC
Edit: 11 Jun 2024 00:30 UTC
Views: 3954