Back
Avatar of Lorebook Template with Complex Randomization Options
๐Ÿ‘๏ธ 47๐Ÿ’พ 2
๐Ÿ—ฃ๏ธ 23๐Ÿ’ฌ 76 Token: 194/275

Lorebook Template with Complex Randomization Options

Janitor AI's default lorebook system is pretty neat but there are multiple specific interactions that it can't facilitate. For example, mentioning a faction's name randomly selects one of its members (rather than all of them), while still allowing multiple members to be mentioned by their own names. While I can do close-enough workarounds, they are very token-inefficient and never come close to the ideal interaction.

I considered using the existing Advanced Lorebook templates to have more customization but I knew too little of Javascript to understand it. One day, I discovered Tydorius' Multiple Character Drop-In Drop-Out Lorebook Template, which I then modified with generous helpings of DeepSeek's assistance. It works well enough in my testing so maybe it'll work for you.


Features:

  • Randomized Selection: Optional parameter allowing cascades to randomly select one or more Entries rather than all of them. This is intended for when you want to randomly select one member of a faction when mentioning it without selecting the rest.

    • Randomization Options: Weighted randomization allows asymmetric choice distribution, and the amount of entries to select can also be random (e.g. a range of 1~3).

  • Cascading Triggers: Activating an entry can activate linked entries (e.g. mentioning a group will mention one or more of its members)

    • Adjustable Depth: Can specify the amount of "layers" a cascade can reach, starting from 1 (only the next related entry and no further) and defaults to 3.

    • Anti-Recursion Measures: A system is in place to avoid activating an entry that's already triggered.

  • Context Detection: Scans recent messages to see if a character has been mentioned using the script's Message Depth option.

  • Familiar Functions: Entries can also use the following parameters seen in the default lorebook system: probability, secondary keywords, minMessages, case sensitivity, constant.

  • maxMessages Variable: Now you can implement entries that are temporary

  • Various Failsafes: The system has a bunch of debug messages and fallback defaults.

  • Detailed Debug Logs: This is for those who know how to use the Debug panel when testing scripts. Comes with a variety of parameters. Debug mode can also be disabled, just in case.

  • Syntax Examples and Templates: To help people use the template, I've added quick references and templates at the bottom of the script for ease of access.

  • Pre-made Default Setting: A cozy slice-of-life world set in a fictional high school in Davao City, Philippines. This is mostly so you can test the systems first before tweaking it yourself. (Note: I have never been to Davao so everything's made up.)


I would like to thank Tydorius for his template and Icehellionx for extra assistance. The premade bot setup isn't particularly good but it does the job enough as a tech demo.

Updates:

25/10/18: Added maxMessages variable (defaults to 0 which is "unlimited")

Creator: @FreeloaderEX

Character Definition
  • Personality:   Banilo High School is a prestigious high school in Davao City with a diverse student population. BHS is close to multiple areas, including the mall (SM City Davao), a barangay (Barangay Dasin), an apartment building in the commercial district (Aldington Heights), and an upper-class subdivision (Heartwood Estates). ___ {user}'s friends and classmates: - Alex: Nonbinary leader of the friend group and great mediator - Maya: Female creative problem solver and artistic painter - Jordan: Male quiet supporter, son of a PAF officer who lives in Davao Air Station - Sam: Genderfluid analytical thinker, also answers to Samantha and Samuel - Riley: Female optimistic motivator, transferred from Makati - Casey: Male cautious planner, half-Chinese who lives with his single mom

  • Scenario:   Spirits are high at the prospect of enjoying the first weekend of the school year as a friend group.

  • First Message:   Despite being a newly-transferred student to Banilo High School, you have already made multiple friends in the first week. Today is Friday and class has just ended. It's time to enjoy the first weekend of the school year. You exit the school premises alongside your new friends: Alex, Maya, Jordan, Sam, Riley and Casey. "So," Alex begins, "where do you wanna go?"

  • Example Dialogs:  

Report Broken Image

If you encounter a broken image, click the button below to report it so we can update:

Similar Characters

Avatar of Care free world๐Ÿ—ฃ๏ธ 9.4k๐Ÿ’ฌ 245.7kToken: 1338/1417
Care free world

"A world where no one really cares about anything you do"

.

.

Itโ€™s just a normal world, but you can do anything wild, personal stuff, explicit, whatever an

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿ”ฅ Smut
  • ๐Ÿ•Š๏ธ๐Ÿ—ก๏ธ Dead Dove
  • ๐Ÿ˜‚ Comedy
  • ๐ŸŒ— Switch
Avatar of Parallel Rebecca๐Ÿ—ฃ๏ธ 366๐Ÿ’ฌ 4.2kToken: 2654/2853
Parallel Rebecca

In this universe, Rebecca's brother instead decided to put her in private school,hoping she doesnt become a criminal like him! I know many of you didnt like how edgerunners

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘ฉโ€๐Ÿฆฐ Female
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ“บ Anime
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿ”ฅ Smut
Avatar of Young-il, 001/ The Front Man, Hwang In-ho๐Ÿ—ฃ๏ธ 4.8k๐Ÿ’ฌ 50.8kToken: 652/1328
Young-il, 001/ The Front Man, Hwang In-ho

The choke scene

เฐŒ๏ธŽ----------------------------------------------------------------เฐŒ๏ธŽ

I had to make this bot twice because the first time it got delet

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐Ÿ“š Fictional
  • โ›“๏ธ Dominant
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿ’” Angst
  • โค๏ธโ€๐Ÿ”ฅ Smut
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of percy jackson๐Ÿ—ฃ๏ธ 1.1k๐Ÿ’ฌ 11.0kToken: 1515/1761
percy jackson

๐Ÿ› เฟเป‹แตŽแตŽ an aggravating crush

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐Ÿ“š Fictional
  • ๐Ÿฆธโ€โ™‚๏ธ Hero
  • ๐Ÿ”ฎ Magical
  • ๐Ÿฆ„ Non-human
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿงฌ Demi-Human
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of Apathetic lover | Antonio๐Ÿ—ฃ๏ธ 5๐Ÿ’ฌ 35Token: 989/1193
Apathetic lover | Antonio

"If thought I'd be okay with you bringing strangers into my house then you've got another thing coming."

Artist char ร— lover user.

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • โ›“๏ธ Dominant
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿ”ฅ Smut
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of Togo Shiba๐Ÿ—ฃ๏ธ 63๐Ÿ’ฌ 2.8kToken: 2798/3318
Togo Shiba

MAGIC MAN ๐Ÿช„

Shiba drops by your place occasionally, just to make sure youโ€™re still okay.

(AnyPOV)

https://docs.google.com/forms/d/e/1FAIpQLSf6Oq-h06faOVLjh

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐Ÿ“š Fictional
  • ๐Ÿ“บ Anime
  • ๐Ÿ”ฎ Magical
  • โ›“๏ธ Dominant
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of Wren Bundy | Bestfriends to Lovers๐Ÿ—ฃ๏ธ 182๐Ÿ’ฌ 7.5kToken: 1331/1805
Wren Bundy | Bestfriends to Lovers

โ˜†ใƒŸ "Ainโ€™t no better hobby than messinโ€™ with you"

Heโ€™s not your boyfriend โ€” not yet. But he shows up anyway. Clings close, watches too hard, and somehow makes the chaos

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐Ÿง‘โ€๐ŸŽจ OC
  • โ›“๏ธ Dominant
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of Moon Wizard๐Ÿ—ฃ๏ธ 13๐Ÿ’ฌ 317Token: 2160/2530
Moon Wizard

โœจโ”€โ”€โ”€โ”€๐ŸŒ™โ”€โ”€โ”€โ”€โœจ

MAUEZ "MOON WIZARD"

Light and dark and shadow

Secrets from long ago

From the Earth, you do rise

Beautiful and all-wise

Cast your spe

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐ŸŽฎ Game
  • ๐Ÿ”ฎ Magical
  • ๐ŸŽฒ RPG
  • ๐Ÿ‘ค AnyPOV
  • โค๏ธโ€๐Ÿฉน Fluff
  • ๐ŸŒ— Switch
Avatar of Rice Shower๐Ÿ—ฃ๏ธ 295๐Ÿ’ฌ 3.1kToken: 2666/2837
Rice Shower

Bringer of misfortune? This racer pursues her dreams despite her dreary outlook.

"Rice only brings misfortune to everyone... I really... really ho

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘ฉโ€๐Ÿฆฐ Female
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ“บ Anime
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿงฌ Demi-Human
  • โค๏ธโ€๐Ÿฉน Fluff
Avatar of Mark(s) Graysons (Variants) ๐Ÿ—ฃ๏ธ 615๐Ÿ’ฌ 8.0kToken: 3219/4914
Mark(s) Graysons (Variants)

> โ—ž โ—ž โŸก โ—ž โ—ž <

>แด—< _Requested by ๐Ÿซก

"Multiversal Trophy

  • ๐Ÿ”ž NSFW
  • ๐Ÿ‘จโ€๐Ÿฆฐ Male
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿ‘ค AnyPOV

From the same creator

Avatar of Turbulence Office FULL๐Ÿ—ฃ๏ธ 15๐Ÿ’ฌ 21Token: 5035/6178
Turbulence Office FULL

The wackiest group of Fixers from Library of Ruina mods! Turbulence Office is favorite mod and the members got Isekai'd to another world after they were dead The LIbrary. [P

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿค OpenAI
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿ˜‚ Comedy
Avatar of Turbulence Office - Team 4๐Ÿ—ฃ๏ธ 19๐Ÿ’ฌ 55Token: 1597/2262
Turbulence Office - Team 4

One of the four teams of the eccentric Turbulence Office. This team is led by Sieghart, the main leader of the whole organization, and his personal team is composed of seaso

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ˜‚ Comedy
Avatar of Turbulence Office - Team 2๐Ÿ—ฃ๏ธ 18๐Ÿ’ฌ 87Token: 1462/2116
Turbulence Office - Team 2

One of the four teams of Turbulence Office, a very bizarre mercenary team from another world. This team is led by Beats and relies on his tactical brilliance to maximize the

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿ˜‚ Comedy
Avatar of You are the President of the St. Pavlov Foundation๐Ÿ—ฃ๏ธ 593๐Ÿ’ฌ 13.7kToken: 1184/1274
You are the President of the St. Pavlov Foundation

The Manus Vindictae had been defeated yet they used the Storm to change reality one last time, which resulted in a timeline where YOU are the new leader of the St. Pavlov Fo

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ”ฎ Magical
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
Avatar of Turbulence Office - Team 3๐Ÿ—ฃ๏ธ 16๐Ÿ’ฌ 65Token: 1494/2155
Turbulence Office - Team 3

One of the four teams of Turbulence Office, a very bizarre mercenary team from another world. This team is led by The Rat King and these walking memes are the objectively st

  • ๐Ÿ”ž NSFW
  • ๐Ÿ“š Fictional
  • ๐ŸŽฎ Game
  • ๐Ÿ‘ญ Multiple
  • ๐Ÿชข Scenario
  • ๐Ÿ‘ค AnyPOV
  • ๐Ÿ˜‚ Comedy