Clothing State Tracker

# Clothing State Tracker (CST) **Version 0.1.5 — Experimental Public Release** Clothing State Tracker (CST) is an AI Dungeon script designed to help characters maintain consistent clothing states throughout an adventure. AI models often forget small clothing details as stories progress. A shirt that's been pushed up suddenly returns to its normal position, a removed jacket reappears, or an entire outfit changes without explanation. CST addresses this by automatically maintaining persistent records of individual garments and their current positions, helping the AI remember clothing changes across multiple turns. ### Features - **Automatic Tracking:** Detects and records clothing changes during normal storytelling without requiring manual commands for every interaction. - **Individual Garment States:** Tracks whether garments are worn, displaced, or removed, including nuanced positions such as a blouse raised above the chest or a dress gathered around the waist. - **Natural-Language Clothing States:** Supports ordinary outfits and unusual fictional garments using flexible position descriptions rather than predefined clothing categories or rigid body slots. - **Independent Clothing Layers:** Changing one garment doesn't automatically change another, allowing overlapping clothing and undergarments to retain their recorded positions. - **Multiple Characters:** Supports selected NPCs and player characters, each with their own persistent wardrobe. - **Automatic Story Cards:** Creates readable outfit summaries for tracked characters, showing their garments and current positions. A separate setup guide provides commands and troubleshooting information. - **Flexible Outfit Setup:** Register garments through simple lists, natural-language descriptions, or structured records. A guided two-step setup makes initial configuration easier. - **Manual Corrections and Backups:** Inspect wardrobes, correct individual garments, replace outfits, and export or restore saved clothing data. - **Optimized Context Support:** Uses compact background operations and preserves existing context for compatibility with AI Dungeon's optimized-context system. - **CEL Compatibility:** Designed as a standalone companion to Character Experience Ledger (CEL), with local integration tests covering both scripts running together. ### Getting Started CST starts with automatic tracking disabled. To begin, register a character's outfit, optionally designate your protagonist, and enable tracking. **Recommended setup:** 1. Enter `/cst outfit Lily`. 2. When prompted, enter `white blouse; black bra; black skirt; boots`. 3. Enter `/cst player Lily` if Lily is your protagonist. 4. Enter `/cst enable` to begin automatic tracking. You can also register an outfit in a single command: `/cst outfit Lily -- white blouse; black bra; black skirt; boots;` For more complicated clothing arrangements, CST also supports detailed descriptions and exact garment states. Commands can be entered through Story, Do, or Say actions, although Story input is recommended when exact wording matters. Use `/cst help` for the command reference, `/cst status` to inspect tracked wardrobes, and `/cst set` to manually correct a garment. CST automatically creates a **Setup & Commands** Story Card and individual **Outfit** Story Cards for reference. These cards are informational displays; use CST commands to change the actual saved clothing states. **Important:** New garments are not automatically registered during gameplay. Characters need an established wardrobe before CST can track changes to those garments. ### Experimental Release **CST is an experimental project undergoing active development and testing.** Although the script has passed extensive local automated tests, its latest changes still require verification in live AI Dungeon adventures. Clothing changes may occasionally be missed, misinterpreted, or attributed to the wrong character. Model behavior, available context, and other scripts can also affect tracking reliability. Story retries and rewinds do not currently restore previous clothing states automatically. Manual corrections or backup restoration may occasionally be necessary. The goal is to make CST as unobtrusive as possible, requiring little to no interaction once an outfit has been established. **Feedback, bug reports, and testing results are welcome!** ### Additional Information CST is a standalone project developed alongside Character Experience Ledger. Neither script is required to use the other. Although the intent is that both can be used in the same adventure, full live compatibility testing is still ongoing. CST is intended for a wide range of storytelling genres, including fantasy, science fiction, romance, and adult-oriented adventures. *The goal is simple: let the AI handle the storytelling while CST remembers what everyone is wearing—and where.*

Cover art for Clothing State Tracker, a clothing script on AI Dungeon