stscript
Definition
Definition
STScript (SillyTavern Script) is a proprietary scripting language and macro system built into the SillyTavern AI frontend. It allows bot creators to implement dynamic behavior, conditional logic, and interactive elements within chatbot definitions that go beyond static text responses.
STScript provides functionality including:
- Macros - Custom commands that expand into text or trigger actions
- Conditional statements -
{{#if}},{{#else}}blocks for dynamic responses based on variables - Loops -
{{#each}}for iterating through lists or arrays - Variable manipulation - Storing and modifying values during a conversation
- Randomization -
{{#roll}}and similar functions for varied outputs - User input prompts - Inline buttons and dropdowns that appear in the chat interface
- Command triggers - Slash commands that execute specific script blocks
Usage
Apply this tag when a bot's definition contains STScript code, macros, or utilizes SillyTavern-specific scripting features. This typically appears within the character's definition, first message, or author's note fields.
Do not use this tag for:
- Bots that only use standard SillyTavern formatting like
{{char}}and{{user}}without scripting logic - Bots using other scripting systems from different frontends
- Bots written in "pseudo-code" formats like W++ or JSON that are not STScript-specific
Bots using STScript may also feature "contains_lorebook" if they incorporate SillyTavern's lorebook system alongside scripted elements. STScript functionality is exclusive to SillyTavern and will not function in other AI frontends.
Cards
Latest cards that use this tag.
No cards to show with your rating settings.
Show in gallery