SX-5: Character Environment ~ by Sphiratrioth

Welcome to the new age of roleplaying!

Live-generate starting messages (no more fixed, repetitive roleplays), make your characters assertive and realistic, improve the overal LLM writing quality through auto-injected instructions mid-roleplay (OOC on steroids) - even for smaller and "stupid" models. No custom extensions in SillyTavern required. Everything works through simple, well-organized and internally labeled lorebooks - one embedded in a character card, two framework ones on your lorebooks list and that's it. It is as easy as it gets.

Replace the existing

Permissions: you are allowed to use it and generate your own SX-5 format character, scenarios & whole lorebooks. However, if you upload your creations online - you need to give me credits and attach a link to this exact repository. All the creations must be clearly credited as using SX-5 Environment by Sphiratroth. I may take offensive actions against any illegal or disgusting creations though - use your brain, you know what I am talking about and I do not endorse it. Just do not be a psychopath and all will be fine.

W3Schools.com

Here, you can buy me a Coffee. Just click on the banner above. I share everything for free, I've got a normal job - but I drink a lot of coffee and a token of support is always welcome if you're enjoying my work - and if you want to fuel my caffeine addiction :-D

In addition, you can find a lot of my other projects there. Some Reshade presets for different games, my custom TTRPG system (soon), different kind of goodies.

What is it?

It is not a SillyTavern extension. SX-5 Characters Environment/Roleplay Environment is just a roleplaying system - activated through lorebooks. It is fully compatible with your existing character and it works out of the box. You may use it to diversify the experience or you can convert your character cards to the SX-5 format to unlock its full potential - which is very fun, powerful and worth your time but optional! Everything is triggered from a normal chat window - so not additional menus that usually come with extensions. Here - everything works in a vanilla SillyTavern and the functionalities actually make any similar extension obsolete.

image/png

What is included?

  • Framework Lorebook - to activate the environment in SillyTavern (just import and activate it - it includes all the scenarios, locations, weather & time variables, anything used to generate the starting messages based on pre-written instructions);
  • QoL Lorebook - to improve the LLM writing quality and to activate other, useful tricks (it improves narrative styles of the LLM, provides situational instructions you may want to use mid-roleplay (OOC on steroids) and allows general character control);
  • Character Lorebook (Male/Female) - to embed in a character card in SillyTavern (this is for creating SX-5 characters)
  • That's all - just activate two lorebooks and use it or convert/generate characters in SX-5 format when you want to use a full power of the SX-5 roleplaying environment.

    Main Functionality (Preview)

    image

    image

    image

    Extra Lorebooks (fully optional)

  • Sex Booster - better, more active and assertive characters in NSFW scenes (FEMALE & TS FEMALE CHARACTERS ONLY, AT LEAST FOR NOW);
  • TTRPG mode - you are the Game Master/Game Mistress and the LLM becomes the player in a world you control - role reversal of sorts;
  • Year Zero Engine & Powered by the Apocalypse TTRPG system lorebooks - to roll dice and use those systems in your roleplays;
  • Simple Events Injector/DC Dice Rolling Mechanism (DC: check/RNG: check - to determine if current action worked/failed or to introduce random opportunities/complications)
  • Sphiratrioth's Boutique - a fun system to make your characters wear different outfits each roleplay (it is all auto-rolled and adjusted to make sense/match - FEMALE CHARACTER ONLY, AT LEAST FOR NOW)
  • Extra Functionality - TRANSSEXUAL CHARACTERS GUIDANCE

    LLMs have a natural problem with roleplaying transsexual characters. If character's pronouns are she/her and she's got breasts, for example, LLM always confuses private parts for transsexual characters. It's obvious and logical - since LLMs operate on trained conversations and tokens probability - so they default to male-female sexual interactions. It is super frustrating for those who like roleplaying with transsexual characters. Because you all asked for it - I decided to do something about it - and here it is. Reportedly, I succeeded - there are instructions inserted at low depth, which remind the LLM that a character is transsexual aka it has specific body parts and specific actions are possible with that character sexually. You need to activate a proper entry within the embedded character lorebook to make it work. Read further to understand what it actually means and how it works. It's super simple, I promise.

    Felix Argyle (TS)

    Example Characters

    Female

  • Aloy (Horizon Zero Dawn)
  • Ciri (The Witcher 4)
  • Eivor (Assassin's Creed)
  • Femshep (Jane Shepard) (Mass Effect)
  • Male

  • N.Q. (Sorry, gals, it's just me - a cameo - I suck in creating male characters and you love making your own - so use it as educational example)
  • Ciri_1

    How to set it up?

    Download all the filest in the SX-5 HuggingFace repository!

    1. Navigate to the files section of this post and download all the files from the main directiory and from all the sub-folders.
    2. Copy lorebooks to (...)\SillyTavern\data\default-user\worlds.
    3. Copy character cards to (...)\SillyTavern\data\default-user\characters.
    4. Copy the SX-5 sysprompts to (...)\SillyTavern\data\default-user\sysprompt.
    5. Use my custom context & instruct templates/samplers/regex from https://huggingface.co/sphiratrioth666/SillyTavern-Presets-Sphiratrioth - for better adherence to instructions and general quality improvements. There is a whole guide on how to import those and how to use them under the attached URL but the rule of thumb says: system prompt files go to (...)\SillyTavern\data\default-user\sysprompt, instruct template files go to (...)\SillyTavern\data\default-user\instruct, context string/template files go to (...)\SillyTavern\data\default-user\context, sampler files go to (...)\SillyTavern\data\default-user\TextGen Settings, then you load it up in SillyTavern.
    6. Open up SillyTavern.
    7. Check if all the lorebooks are already in your lorebook list. If so - activate two: (SX-5.0) - 01. Framework [SX5] [FEMALE/MALE] - v.5.0 (SX-5.0) - 02A. QoL [SOFT/HARD] - v.5.0 Male & Female versions should match a gender of the character you want to roleplay with, while SOFT & HARD versions of the QoL lorebook define the strength of the LLM quality boost/guidance. Start with SOFT, then experiment, which works better for you. Personally, I always use the SOFT version.

    image

    1. Select the SX-5 Sysprompt & instruct/context templates that match your LLM model (it's Mistral Tekken V7 for me). Sysprompts come in a couple of versions - which allow switching between the 1st and the 3rd person narration/character speech and different response lengths, which still come mostly from samplers but if you choose a proper sysprompt, it will reinforce the sampler max tokens per response setting. If you're using my REGEX (optional) - make sure to turn "Trim Incomplete Sentences" off. My REGEX does it better than standard SillyTavern solutions.

    image

    1. Select the SX-5 example character you want to roleplay with. Make sure to import the embedded Character Lorebook & Regex when you're asked to. An automatic prompt should appear when you click on the SX-5 character in your character list. If previously imported characters are not visible, navigate to (...)\SillyTavern\data\default-user\characters, delete the copy-pasted SX-5 characters and use the internal SillyTavern functionality to import the characters from a .png file.

    image

    image

    How to use it?

    1. Navigate to the chat window. You should be greeted with a "generic" SX-5 style roleplay message. This is where you roleplay and generate different starting messages (by using the normal chat window).

    image

    1. For now, navigate left to the alternate starting messages to check the list of all the available scenarios, locations and variables to select from - together with their trigger words.

    image

    image

    image

    image

    image

    image

    image

    image

    image

    image

    Roleplay:

    1. Return to the DEFAULT STARTING MESSAGE. BEWARE: THIS IS THE ONLY MESSAGE WHERE YOU ROLEPLAY. ALL THE ALTERNATIVE STARTING MESSAGES ARE JUST THE TRIGGER WORDS LISTS - FOR CONVENIENCE. DO NOT ROLEPLAY THERE!

    image

    1. Type in the trigger words you want. You need a scenario at minimum, you can add the location if you want or roll it randomly. You can also choose a character mood if you want.

    image

    1. Hit ENTER - the actual starting scene/message for a roleplay will be generated. If LLM makes a mistake, just try again. From now on, just roleplay and have fun!

    image

    Integrate it into your existing characters

    1. Follow all the steps above.
    2. Download the example characters.
    3. Copy-paste the starting messages with scenarios & locations from the example characters (they're all the same) into your existing character (as additional starting messages, I prefer having all of them to the left, message 0 as the roleplaying message and fixed scenarios to the right - in terms of swipes)
    4. Create a generic "Roleplaying" starting message - just like in the example characters - something like this:

    "You're ready to explore the unknown, {{user}}?" I ask with a gentle smile as I'm fixing my hair. "There's much left to discover." I pick up a small stone and toss it in front of me. "Shall we practice by roleplaying, first?" Let's see how far {{user}} is willing to delve into the mysteries of the world.

    Of course, feel free to come up with a generic message of your own - it's better when it reflects a desired character's style of speech but it does not actually start with anything specific so you can trigger the pre-written scenarios properly.

    TTRPG Mode

    By using a proper TTRPG sys-prompt, you can take the role of a Game Master/Game Mistres for your character. This time, you are not a character in the world - you control the whole world, you decide what happens - while LLM becomes your player in a TTRPG-like session. If you like D&D and other TTRPG systems, this is for you.

    image/png

    Example TTRPG Mode Experience

    image

    Embedded Character Lorebook

    In SX-5 environment, a majority of the character definions, user definitions (optionally) and other important roleplay informations are located in the embedded character lorebook - rather than in a character card itself. To embed the lorebook, use a grey/green globe button in the character details applet:

    image

    When you already embed the provided Character Lorebook (MALE/FEMALE & TS) into the character, you can edit it all to create the SX-5 format character. You unlink the already embedded lorebooks or link the alternative ones here:

    image

    Editing the SX-5 Characters

    You are advised to edit the lorebook entries when you want to change anything or when you want to swap one of the swappable variables in the already existing SX-5 characters - such as:

    1. User Persona (empty by default - use it if you want - it had been in my SX environment before persona-binding to characters and auto-switch was introduced in SillyTavern but I still use it up to this day),

    image

    1. Character's Feelings/Opinion about User,

    image

    1. Character's Relationship with User (swappable mid-roleplay if you want! - that is more useful for a majorify of users, you do not need to edit the character, just switch the relationship),

    image

    1. Character's Outfit (swappable mid-roleplay too! - and that is the only way of doing it for now, you can prepare different outfits, change them for a given roleplay or mid-roleplay and it actually works),

    image

    1. Setting (the most important variable that auto-filtrates locations, scenarios and other things - so you do not end up flying a space-ship in a high-fantasy middle-ages world etc.),

    image

    1. Character Definitions - they are here - instead of the character card (but that is also optional! - Speech, Skills & Weapons, Profession, Background, Sexuality, Quirks, Manliness/Feminity Style, Likes/Dislikes, Personality, Appearance/Face/Body);

    image

    1. Specific NSFW states & preferences.

    image

    1. Character Lore - separated into categories: family, friends, rivals, home, vehicles, detailed likes/dislikes, universal world entries.

    image

    image

    You do it by switching the trigger values from 0 (deactivate) to 100 (activate) & vice versa for one entry within a tagged group - such as: RELATIONSHIP WITH USER. Of course, you can also edit the entries. There are even some entries tagged as OPEN or CUSTOM - for your convenience - and this is where you place your own definitions.

    image/png

    The general idea is to edit a character within the lorebook instead of a character card. There are two separate ways of turning a given entry ON/OFF:

  • "Trigger" Value: 0 = turned off, 100 = turned on

    image

  • ON/OFF Switch - it disables the entry exactly the same way but it also grey-outs, disappears and moves to the back of the lorebook. Do not use those unless you want to actually get rid of something for good and move it to the back of the lorebook. It is not a permanent deletion - just has a different purpose called CG-5 (Character Generator 5 - read further to understand what it actually is).

    image

  • To edit the entry, just click on it and create a structured SX-5 string. It will work regardless - but those strings have been defined in sysprompts so to make everything work, it is the best idea following them. They're just often referenced in instructions in all the lorebooks. Structure is super easy: {{"STRING NAME"}}:{CONTENT}.
  • image

    CG-4 (Character Generator)

    image

    CG-4 aka Character Generator 4 is a set of carefully crafted personality, quirks, sexualities, body types and speech archetypes, which allow you creating ANY EXISTING CHARACTER IN THE WORLD BY JUST TURNING THE LOREBOOK ENTRIES ON/OFF. It is included within the embedded character lorebook of SX-5 format. I know, it sounds sketchy - but that's what I'm doing for a living. I am a game dev for two AAA gaming studios. All the characters in movies, games, books and any other media that you're consuming follow just the same, repetitive archetypes that were all included here. They are all turned off by default and located further down the embedded character lorebook. If you want to use any of those functionalities, you need to modify a character slightly - to follow the CG-4 format. It basically splits the "Appearance" block into two separate blocks: "Face" - where all the hair, eyes and facial features are defined; and "Body" - where all the body features come from but without the hair color and other features defined within the "face" block. It may look discouraging at first but it is very easy when you read the contents of the "BODY ARCHETYPES" at the end of the embedded character lorebooks. They lack things such as hair and eye color. If you look at the example SX-5 characters, the character card definitions include just the character's personal information - while appearence as a single block or divided into separate entries for "face" and "body" have been actually defined within the lorebook.

    image

    image

    Move to the end of the lorebook. You will find a lot of pre-defined personality archetypes, quirks, speech patterns, sexualities, bodies etc. to choose from. Just activate one of them here - wich ON/OFF switch - this time

    image

    image

    image

    image

    Don't worry, what you're seeing here is just 10% of what is actually available within the lorebook :-P

    Now - turn what you want ON - for example - a given personality:

    image

    image

    Return to the "Character" section within the lorebook. Turn the current Personality OFF:

    image

    image

    Close the lorebook, open up a different one, then return to the character embedded lorebook and watch the magic happen - the personality you wanted replaced the previously active one - your character is someone else now! As simple as that! All the entries will move up to the "Character" section automatically, while those you turned off - also automatically - move to the back of the character lorebook, into their proper categories. All clean and easy to use.

    image

    Suggested Models

    • TheDrummer/Cydonia-24B-v4.3

    • TheDrummer/Rocinante-X-12B-v1

    • TheDrummer/Cydonia-Redux-22B-v1.1

    • TheDrummer/Rocinante-12B-v1.1

    • ReadyArt/Dark-Desires-24B-v1.0-GGUF

    • ReadyArt/Dark-Desires-24B-v1.0-EXL3

    • ReadyArt/Dark-Desires-12B-v1.0-GGUF

    • ReadyArt/Dark-Desires-12B-v1.0-EXL3

    • Sao10K/MN-12B-Lyra-v4

    • kyx0r/Neona-12B

    • ArliAI/Qwen3-30B-A3B-ArliAI-RpR-v4-Fast

    • MarinaraSpaghetti/NemoMix-Unleashed-12B

    • inflatebot/MN-12B-Mag-Mell-R1

    • TheDrummer/Big-Tiger-Gemma-27B-v3

    • ArliAI/QwQ-32B-ArliAI-RpR-v4

    UPDATES

  • v.5.0
  • RELEASE
  • v.5.01
  • a) Character Lorebooks (Template) - added missing quirks, feminity styles, speech styles (I forgot to implement them before the release), separated creampie from breeding and switched blowjob to deepthroat in sexual preferences,
    b) Sex Booster - introduced the new, more balanced rolling mechanism and cleaned up some entries.
  • v.5.02
  • a) Character Lorebooks (Template) - all the character lore entries are non-recursive now, there was no reason to eat up so much context for triggering many at the same time, with a negligible quality gains, some new entries for friends, vehicles and family were added,
    b) Sex Booster - deleted low popularity and unnecessary kinks, deleted cum provocations, merged char's kinks and actions into a better adjusted category, toned down some rolling weights even more.
    Downloads last month

    -

    Downloads are not tracked for this model. How to track
    Inference Providers NEW
    This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

    Model tree for sphiratrioth666/SX-5_Character_Roleplaying_System

    Base model

    Qwen/Qwen2.5-32B
    Finetuned
    Qwen/QwQ-32B
    Finetuned
    (6)
    this model