SX-5: Character Environment ~ by Sphiratrioth
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.
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?
What is included?
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)
Extra Lorebooks (fully optional)
Extra Functionality - TRANSSEXUAL CHARACTERS GUIDANCE
Example Characters
Female
Male
How to set it up?
Download all the filest in the SX-5 HuggingFace repository!
- Navigate to the files section of this post and download all the files from the main directiory and from all the sub-folders.
- Copy lorebooks to (...)\SillyTavern\data\default-user\worlds.
- Copy character cards to (...)\SillyTavern\data\default-user\characters.
- Copy the SX-5 sysprompts to (...)\SillyTavern\data\default-user\sysprompt.
- 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.
- Open up SillyTavern.
- 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.
- 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.
- 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.
How to use it?
- 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).
- 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.
Roleplay:
- 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!
- 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.
- 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!
Integrate it into your existing characters
- Follow all the steps above.
- Download the example characters.
- 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)
- 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.
Example TTRPG Mode Experience
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:
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:
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:
- 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),
- Character's Feelings/Opinion about User,
- 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),
- 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),
- 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.),
- 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);
- Specific NSFW states & preferences.
- Character Lore - separated into categories: family, friends, rivals, home, vehicles, detailed likes/dislikes, universal world entries.
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.
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:
CG-4 (Character Generator)
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.
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
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:
Return to the "Character" section within the lorebook. Turn the current Personality OFF:
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.
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




















































