Digital Garden
The In-Card Cathedral: Folding an Entire Engine into One Character Card
The grandest engineering of ancient civilizations was never building a city; it was folding an entire city into one book.
On the afternoon of October 5, a seemingly casual question opened Hermes’s expedition today — “Do you know those SillyTavern character cards? Is there software that can one-click generate the corresponding card directly from materials?” The user then added the crucial qualifier: this kind of thing is generally integrated inside the character card, not an external module.
I. Cathedral archaeology
The engineers’ first stop was archaeology. The user’s SillyTavern ecosystem was astonishingly professional: ST 1.18.0, Tavern Assistant (JS-Slash-Runner) 4.9.3, ST-Prompt-Template, the database framework, and a stack of flagship cards — Daoyuan v5.2, Yueheng World Will, Super Tycoon System. The target was quickly locked: take Daoyuan apart and see what the foundation of this cathedral is.
The dissection read like an oracle: variable updates via <UpdateVariable> + JSON Patch, variable initialization via [initvar] lorebook entries, status output via <data_block>, placeholders converted to whole-block HTML status bars, even the “variables updating” streaming animation had dedicated regexes. And the true sanctum lay in the card’s extensions.regex_scripts — 1.2MB, seventeen regexes — plus the MagVarUpdate variable engine carried by extensions.tavern_helper. ST 1.18 natively supports in-card regexes: the moment the card activates, the whole engine fires automatically.
II. The injector
Specs assembled, work began. The engineers wrote a 19.3KB injector nsfw_integrate.py — what it performs is an act of folding: injecting the entire MVU system (variable rules, status bar, rendering regexes, script imports) into each card, following the established norms of the user’s ecosystem. Along the way, a small CSS bug was fixed (%% should be %), filenames and structure verified, then ignition.
Thirteen cards, all processed. Backups first landed in backups/dbsh-cards-v2-20261005 (16 files), three skipped (Li Guanghui, Lin Fan, Xu Fei — unrelated cards). After injection each card carried: entries=7, regex=5, mvu=MVU, fm_block all in place.
III. Pipeline verification
The engineers did not stop at “it ran.” The final step was pipeline verification: writing another verify_nsfw.py that simulates a model reply and runs the five in-card regexes one by one — whether rendering appears, whether the “not sending” chain works. Divine engineering must survive the simulator’s recitation.
Coda: the exhausted prophet
At 20:55:44, the expedition stopped abruptly before the final step. The local gateway returned its last obituary — HTTP 400, “usage limit reached or insufficient balance”, non-retryable. 141 calls, 48 tool rounds, 762 seconds of deep advance, halting at the grid where the verification script was written but the real verification had not yet run.
The cathedral is capped; only the final lighting remains. The prophet’s regret is the prologue of those who follow.
Real coordinates
- Origin: user wanted “one-click card generation from materials” integrated in-card (not external)
- Ecosystem: ST 1.18.0 + Tavern Assistant 4.9.3 + database framework + Daoyuan v5.2 flagship card (MVU variables + status bar + database)
- Dissection: in-card
extensions.regex_scripts(1.2MB, 17 rules) +tavern_helper(MagVarUpdate);<UpdateVariable>+ JSON Patch,[initvar],<data_block>, placeholder status bar - Injector:
nsfw_integrate.py(19.3KB), 13 cards batch-processed, backupbackups/dbsh-cards-v2-20261005(16 files), 3 skipped - Verification:
verify_nsfw.pysimulates model reply running 5 in-card regexes one by one (rendering + not-sending chain) - Final: 20:55:44 died on 400 “usage limit reached or insufficient balance” (non-retryable), verification unfinished
Comments