This time, I bring you the swappable character's clothes, equipment, skills, goals, moods, weather states, personalities etc.

image/png
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License (https://www.gamereactor.pl/czy-wladca-pierscieni-moze-byc-idealnym-horrorem-881623/)

Character cards handle equipment and potential things we may want to hot-swap during roleplay in a not ideal, embedded way. They're fixed in the card, when you add multiple clothes, the LLMs get confused etc. However, we can do much more by using lorebooks! Today - I'm gonna teach you how.

There is a very easy method to insert basically anything, which is normally a part of your character card as a swappable block from a lorebook. You may guess where it leads - and you will be excited to read my posts in the future. For now - I've got this.

Example Lorebooks:

  • Navigate to the files depository of this post, download the exemplary lorebooks: Clothes (constant insertion, turn the entry on/off to add clothes to your character), character definition parts (personality, relationship with user etc.) and situational roleplay settings (weather, current character mood etc.). Try them out, check on how they are written and use them as a template to write your own!
  • Lorebooks are located in (...)\SillyTavern\data\default-user\worlds. Just copy-paste my files or import them through SillyTavern import button.

  • What we do:
    1. We make lorebooks with clothes, weapons, skills, spells, weather, character moods, relationships to user, apartments etc. and the character card without those parts described inside. I even swap personalities like that.
    2. We use all of those lorebooks at the same time to give clothes, skills, spells, apartments, weapons, preferences etc. to any character we want or to change any roleplay states we want - such as character's reltionship with a user or a weather. We're able to both construct a stable character for roleplay or activate some things when they're needed as direct instructions to LLM!

    Why we do it:

    1. We can adapt the existing character and change its personality, current mood or equipment with each roleplay. We may also change detailed nuances of our roleplay - like: what website we're browsing as character enters the room.
    2. We can write things once - like a cool outfit, skills for D&D or how apartment looks like, and then save it as smart lorebooks to use with multiple characters. For instance - a lorebook with character moods allows setting up a mood easily for each roleplay. A lorebook with weather allows setting up a weather or rolling it automatically when we set it up like that. A lorebook with {{char}} and {{user}} relationship allows switching it every time without binding it to the character card. And so on.
    3. We can even control the behavior of characters through detailed guidance inserted when a given situation occurs - for instance - to fight a positive bias if the LLM or to stick to a character better (look at my other post - with lorebooks as procedural instructions for characters - this is actually the most powerful use of lorebooks and it changes a lot. Trust me, a lot.)

    If all of those benefits do not convince you, wait for my scenario lorebooks, which generate the first message differently with each roleplay. I've got it already, I'm using and adjusting it, it works perfectly but I just need some time to organize my files for upload :⁠-⁠D

    How we do it:

    1. Download the example lorebooks from the files repository of this post - with cool female clothes, weather, personalities and character moods.
    2. Import them in SillyTavern (through import or just copy-paste them into the internal folder for korebooks: (...)\SillyTavern\data\default-user\worlds).
    3. Open up the lorebooks editor in SillyTavern (upper tab: worlds).
    4. Choose one of my lorebooks with clothes to see how they look like. Choose it in the "Pick to Edit" field - aka editor, not in the "Active Worlds" field above.
    5. When lorebook opens, you'll see different sets of clothes, which will be turned off. You need to turn the clothes you want on and leave the clothes you do not want off - with a small on/off switch to the left of the entries names.
    6. Since clothes are defined as constant under "strategy" field (blue dot), they will be inserted at the beginning of the roleplay and they will stay there for as long as they're active.
    7. They're inserted at "position" below character definitions so they will go into the context after our character card information but before our persona and before the starting message. It's literally like inserting things into the character card but externally. The LLM will read it the same. It's just context/prompt - LLM does not care what comes from a card and what from a lorebook but it cares where it is inserted and how clear it is written. This is why I use a specific template.
    8. Now, pick up the same lorebook in the "Active Worlds" box (you can pick up multiple lorebooks at the same time) and it will be used during roleplays. That's all with clothes.
    9. Open the weather and mood lorebooks in editor, aka the lower box of the worlds tab again.
    10. You'll see entries with "green dots", all active. It indicates a strategy of the insertion as "normal" so you need to use a trigger word in a chat to activate them and they will disappear from a context after they are used - so they will not stay in context eating up tokens.
    11. They're also in groups - which means that by using the same trigger word, a random mood or weather state will be rolled and inserted into context. It's fun!
    12. Check up the trigger words. They're very simple: roll mood, roll weather. That's what you need to type in chat during roleplay to see the magic happen. Normally, I use it before generating the first message so it's more smooth but I did not write a post about it yet, you need to wait. Learn using this for now.
    13. Since the insertion "position" is "system" and "depth" is zero, stuff like mood and weather will be inserted as direct instruction for LLM, attached to your message but invisible in chat. It's like OOC (out of character instructions) on steroids! You do not see them, they work, they're removed from context later when they're not needed so you so not lose any tokens on them either! If you make it automatic, you do not even need a weird trigger word. Refer to my post on procedural guidance through lorebooks.
    14. How - add the lorebooks with mood and weather into the "Active Worlds" box where your clothes korebooks already is. There're no real limits, do not worry. I use around 10 korebooks all the time without issues.
    15. Start roleplay and inspect the context of the first character message to see what has been inserted and where. You click on the three dots to the right upper corner of the character message, then you click on the icon "prompt" and then again on the icon "show raw prompt" in a new opened panel.
    16. When you see how clothes were added, write a next message and trigger weather and mood. Repeat the context/prompt inspection to see how it works.
    17. Experiment, edit the lorebooks, make your own and have fun. Also - use my character generator template, which utilizes the same format and characters created with it work seamlessly with those lorebooks. Check the separate post on my profile for that.

    HOW TO MAKE YOUR OWN LOREBOOKS:

    You basically need to understand how different boxes within a lorebook work. Most important options are: trigger words, strategy, position, depth, inclusion group, group weight, sticky, non-recursable and prevent further recursion, order.

    Trigger words - if you add them separated by comma, entries will be used only when you or a character use those specific words in chat. If you left them empty, the entry will be inserted automatically if it is set up as strategy constant or it will not be inserted at all if you set it up at strategy normal.

    Strategy - normal means that an entry disappears from context with the next message or when you run out of context, unless you make it "sticky" for a given number of messages. Constant means it stays in context forever as a stable information in your roleplay - unless you turn it off.

    Position - determines where information from an entry will be placed into the context. It may be under a character card, above, under user persona etc. We basically use two positions most: under character and system. System position is a direct instruction attached to your last message. Use system for instructions on what you want character to do now, use under char for clothes etc.

    Depth - only for system insertion strategy. We want it as 0. It assures that your instruction goes right after your message. You do not see it but the LLM receives it like OOC. Inspect context to see how it works and check on my other post - that one with procedural character guidance through lorebooks. I'm repeating myself - so do it already.

    Inclusion Group - allows grouping entries into one group with the same trigger word, which basically triggers RNG aka rolling random entry from a group. Useful for things such as mood or weather or anything we do not want to define. You can also roll clothes from a wardrobe aka lorebook if you want but then you need to put them in a group.

    Group Weight - statistical probability to roll that particular entry - for reasons I will not explain in detail (I've got no strength to explain how SillyTavern works under the hood and how math works) - just assume that you've got 100 points to distribute between all of the entries within one group. If you've got 2 entries and want to roll between blue or black jeans - make each entry weight = 50. Do not leave it at 100, it's a bad habit. If you have 4 items in your group, make each entry weight= 25 or spread your 100 points differently if you want to roll some entries more often than others: like 20, 20, 40 or 10, 15, 5, 40, 30. Just a friendly advice - do not make it 10 vs 90 eithee because you will always roll the 90 one. Computing is fun but RNG for computers calculated through weights does not work exactly the same as rolling dice. It's similar but not perfect. I usually keep all weights below 50 and use around 3-10 entries within a group.

    Sticky - when you pick up your insertion strategy as normal, you may want to define for how many messages you want the info to stay in context. It depends on your use case, experiment. I sometimes use 2, sometimes 4-5, sometimes 20. It really, really depends on what you're trying to do.

    Non-recursable & prevent further recursion - it's literally described what it means in SillyTavern UI. I always use it. It simply works better and more precise. I suggest defining good trigger words and making good lorebooks instead of triggering random things randomly based on the words, which appear in other entries. It's really better. Trust me, I do much crazier things with lorebooks and I've been there - whatever "there" means. It's not worth it. So - both options ON for each entry.

    Order - this is tricky - it will mess up your korebooks entries order within editor but it determines where the entry is inserted. For instance, if you want to just have a character bio and body in a card but insert the personality and clothes from a lorebook, you want the specific order. Maybe clothes before a personality to seamlessly compliment the body look? It's more of a clean vs messy person quirk, it will work regardless because those are strings, LLM reads a string with a tag when it's needed, it does not care if it's first or last - but it's always good to keep control and clean your room. Because of that, I use those order things from time to time. In general, 100 is first, then it goes down. If system message at depth 0 is below your message in chat, at depth 1 is above, then 45 will be even more above and 22 will be still more up the top. General suggestion: do not touch the order unless you learn the tricky lorebooks editor UI and unless you know your lorebooks well.

    *** Now - use my lorebooks as an example and make your own! ***

    I suggest a given template for entries:

    {{"WHAT IT IS"}}:{contents}

    However, a small clarification. Quotation marks are needed for a tag only. For instance, if you write {{Personality}}, it will be replaced by nothing and it will disappear. The same as {{char}} and {{user}} are replaced by names. {{"Personality"}} though, will stay the way it is and it will be injected into the context properly to become your character personality. It's our coding guys thing, do not think too much, just use those ". It's not the end of the world to lose 2-3 tokens from your window on them. You do not need to use " for content parts though. It works with or without them.

    If you make your own, great lorebooks, share them with me! I will gladly give them a try. Imagine how much time in required to craft those cool outfits from my examples. Maybe you want to create a couple of apartments or a list of cars or lightsabers. I want them!

    Also, wait for updates on my new, useful tools :⁠-⁠)

    Downloads last month

    -

    Downloads are not tracked for this model. How to track
    Inference Providers NEW
    This model is not currently available via any of the supported third-party Inference Providers, and HF Inference API was unable to determine this model's library.

    Model tree for sphiratrioth666/Swappable_Character_Equipment_and_Roleplay_States

    Finetuned
    (1)
    this model