Skip to content

Archkr/SillyTavern-OutfitSwitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

139 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outfit Switcher for SillyTavern

Outfit Switcher is the slim single-character wardrobe manager spun out of the Outfit Lab inside Character Visuals for SillyTavern. It watches streaming responses, fires the right costume the moment a keyword or regex hits, and keeps manual overrides one click away. The extension still works great for focused setups or legacy installs while the Outfit Lab continues forward with richer UI and multi-character support.

Character Visuals at a glance: the flagship extension that handles full-cast wardrobe automation, integrates with Character Expressions, and ships the Outfit Lab that inspired this standalone drawer. Install it if you want the complete experience; reach for Outfit Switcher when you need a lighter, single-character tool or compatibility with older builds.

Think of Outfit Switcher as the little brother carved out of the Outfit Lab. Costume Switcher remains the flagship, dressing the whole cast, sharing telemetry with Character Expressions, and evolving the Outfit Lab that now covers single-character workflows too. If you are starting fresh, install Costume Switcher and enable Outfit Lab—you will get everything documented here plus ensemble automation. Keep Outfit Switcher around only if you prefer its pared-back drawer or need a lightweight alternative for older SillyTavern builds.

Under the hood both extensions listen to streaming output, score the mentions they care about, and update costumes instantly. Costume Switcher layers scene awareness, focus locks, and outfit variants on top, while Outfit Switcher keeps those smarts targeted at a single pipeline. The shared lineage means tips from the Outfit Lab directly improve your Outfit Switcher setup and vice versa.

New to my extensions? Start with Character Visuals → enable Outfit Lab for multi-character wardrobe control → consult the Character Expressions README for emotion swaps. Return here only if you need the archival Outfit Switcher drawer or a minimal install.

Contents

  1. Highlights at a Glance
  2. Requirements
  3. Installation
  4. Architecture Overview
  5. Trigger & Variant Model
  6. Getting Started in Five Minutes
  7. Tour of the Settings UI
    1. Character Card
    2. Profiles
    3. Variant Gallery
    4. Trigger Table
    5. Status & Tips
  8. Understanding Automatic Switches
  9. Troubleshooting Checklist
  10. Support & Contributions

Highlights at a Glance

  • Single-character focus – Keep one avatar in the spotlight and let Outfit Switcher handle every outfit change for that performer.
  • Stream-aware triggers – Keywords and regexes are evaluated as tokens arrive, ensuring the correct outfit lands before the message finishes rendering.
  • Variant shortcuts – Pair friendly names with costume folders so dramatic looks, seasonal outfits, and casual wear are just a click away.
  • Manual safety net – Fire any variant from the panel without waiting for automation.
  • Non-destructive switching – Every action resolves to /costume calls; speaker focus never changes, avoiding accidental role swaps.

Requirements

  • SillyTavern v1.10.9 or newer (release or staging).
  • Streaming enabled for your model or connector. Without streaming tokens, automatic switching will not run.
  • Browser storage access to persist settings under the Outfit Switcher namespace.

Installation

  1. Open Settings → Extensions → Extension Manager in SillyTavern.
  2. Click Install from URL and paste the repository address:
    https://github.com/archkrrr/SillyTavern-OutfitSwitch
    
  3. Press Install. SillyTavern downloads the extension and refreshes the page.
  4. Enable Outfit Switcher from the Extensions list if it is not activated automatically.

To update, revisit the Extension Manager and choose Update all or reinstall from the same URL.


Architecture Overview

Outfit Switcher leans on the same event hooks as Costume Switcher but simplifies every step around a single character profile:

  1. Stream listener – The extension subscribes to rendered and streaming assistant tokens, cleaning and buffering text without blocking the UI.
  2. Profile loader – Your configured focus folder, variants, and triggers are compiled into a lightweight runtime bundle.
  3. Trigger evaluation – As new text arrives, keyword and regex triggers run against the rolling buffer. Matches resolve to a target folder (base or variant).
  4. Switch dispatcher – Matched triggers invoke /costume for the configured folder while respecting cooldowns and duplicate suppression.
  5. Status reporting – The UI surfaces success and error banners, making it clear when a trigger fired or was ignored.

With one character to manage, you always know which folder will be used while still benefiting from real-time automation.


Trigger & Variant Model

Outfit Switcher stores a single profile object containing:

  • Character folder – The default costume path used when no trigger is active.
  • Variants – Named shortcuts that append to the base folder or override it entirely for special looks.
  • Triggers – Entries with a friendly name, keyword/regex, and target folder. Each trigger can reference the base folder or any variant.

This structure mirrors the Outfit Lab’s per-character view: one hero with optional alternates and a clear trigger list.


Getting Started in Five Minutes

  1. Enable the extension in Settings → Extensions and open the Outfit Switcher panel.
  2. Enter your focus character’s display name and default costume folder (e.g., characters/Ember Hart).
  3. Add variants for special outfits such as characters/Ember Hart/Winter Gala or .../Battle Gear.
  4. Create trigger rows with friendly names, match text (plain keywords or regex), and the variant to run.
  5. Talk with your model—when the trigger phrase appears, Outfit Switcher fires the mapped outfit automatically.

You can always click a variant’s Run button to override automation instantly.


Tour of the Settings UI

Character Card

Set the reference name and default costume folder. The card includes quick actions to test the default outfit and confirm the extension is enabled.

Profiles

Use the Active Profile picker to switch between saved setups. Export/Import targets the active profile, while Export All/Import All gives you a full backup or multi-profile restore in one file.

Variant Gallery

Add, rename, or remove outfit variants. Each entry shows the resolved folder path plus a one-click Run button for manual switches.

Trigger Table

Create trigger rows with three fields: friendly name, match text (keyword or regex), and the variant to activate. Each row includes a literal match mode (contains vs. whole word), plus inline validation that highlights invalid regex patterns. Use the Up/Down controls to reorder rows when multiple triggers overlap.

Status & Tips

Inline banners surface validation errors, successful saves, or warnings when a folder path is missing. Automated matches also report which trigger fired and which outfit was applied.


Understanding Automatic Switches

  • Keyword vs. regex – Plain text triggers match case-insensitively, while regex triggers obey JavaScript syntax (wrap in /pattern/ to enable flags like i). The settings panel includes a toggle to force regex case-insensitivity if you want consistent i behavior.
  • Buffer window – The stream buffer length is configurable in the Triggers section. Larger values catch longer phrases but can delay matches; set it to 0 to disable trimming.
  • Cooldowns – Rapid repeat matches are ignored briefly so the same line does not spam costume calls.
  • Reset events – Clearing chat or regenerating a message resets the buffer, ensuring fresh context for the next response.

If a trigger does not fire, confirm the row order, match mode, and any regex validation warnings in the trigger table. The browser console still logs the processed buffer and evaluation details for deeper debugging.


Troubleshooting Checklist

  1. No switches occur: Verify streaming output is enabled and the extension toggle is on.
  2. Trigger never fires: Confirm the match text appears exactly (or adjust the regex), and ensure the variant points to an existing folder.
  3. Wrong outfit runs: Check trigger priority order, match mode, and the target folder in the table to ensure the highest-priority row matches first.
  4. Manual runs fail: Make sure /costume works for the chosen folder outside the extension—missing directories prevent switches.

Support & Contributions

Issues and pull requests are welcome. When reporting a problem, include:

  • The trigger or variant that misbehaved and the text that was expected to match.
  • Your SillyTavern build number and API provider.
  • Whether the issue happened during streaming automation or a manual command.

These details make it easier to reproduce the behaviour and suggest accurate fixes.

About

Little brother of Costume Switcher. Instead of detecting who is speaking in a multi-character scene, Outfit Switcher focuses on what a single character is wearing by watching for specific keywords.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages