lore(0b): restructure openings for Dustcloud Ball, Quarry Tag, Sneaker's Grease

Replace mechanics-first paragraph 1 with origin hooks:
- Dustcloud Ball: flour mill explosion → retired sapper origin
- Quarry Tag: bounty hunter who decided the problem was philosophical
- Sneaker's Grease: cobbler who moonlighted as second-story specialist

Paragraphs 2-3 and closers preserved. Adds rewrite-lore.py helper script.

Made-with: Cursor
This commit is contained in:
2026-04-16 19:08:49 +02:00
parent 65de49dc41
commit 8be320c0b2
6 changed files with 106 additions and 25 deletions
+3
View File
@@ -0,0 +1,3 @@
owner: cursor-agent
task: lore-restructure (opening paragraphs → origin hooks)
created: 2026-04-16
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+11 -9
View File
@@ -96,13 +96,13 @@ Throw (40'). Creates 10-ft radius of light obscurity for 1 minute. Single use.
**Lore:**
A clay ball full of alchemical chalk dust that creates a ten-foot cloud of light obscurity for one minute. Not invisibility, not darkness—just enough visual confusion to make archers swear and dogs hesitate.
Invented after a flour mill explosion taught a retired sapper that visibility is a privilege, not a right. The original prototype was a bread roll.
Throw it at your feet when you need to leave. Throw it at their feet when they need to stop. Throw it at a door when you need a head start on an excuse.
The current version is slightly more aerodynamic and significantly less edible. Throw it at your feet when you need to leave.
The dust tastes like flour and poor decisions, which you'll discover if you throw it upwind. There are training manuals about wind direction.
Throw it at their feet when they need to stop. Throw it at a door when you need a head start on an excuse. The dust tastes like flour and poor decisions, which you'll discover if you throw it upwind.
Nobody reads them until the second time.
There are training manuals about wind direction. Nobody reads them until the second time.
### Ear-Seal Wax
@@ -427,9 +427,9 @@ Flick gel onto a creature within 10 ft; you gain advantage on your next three Su
**Lore:**
Flick a bead of luminescent gel onto something you'd like to find again. For twenty-four hours, your next three tracking checks gain advantage, because the tag does the hard part and lets you take the credit.
Developed by a bounty hunter who kept losing targets in crowds and eventually decided the problem was philosophical rather than optical.
Range: ten feet, which means you need to be close enough for a conversation but not close enough for a friendship. The gel is invisible to the target unless they have reason to check, which they will, eventually, because paranoia is a survival trait.
If you can't follow someone, mark them. If you can't mark them, get closer. Ten feet ought to do it. The gel is luminescent to the tracker and invisible to the target, which is the sort of asymmetric advantage that makes ethical philosophers uncomfortable and bounty hunters cheerful.
Bounty hunters buy them in bulk. Jealous lovers buy them and regret it. The guild sells both and keeps no records, which is itself a kind of service.
@@ -500,9 +500,11 @@ Apply to boots (10 minutes) for advantage on your next three Stealth checks with
**Lore:**
Ten minutes of boot preparation buys three Stealth checks with advantage and a floor of five—you literally cannot roll badly enough to trip over your own competence, which is more than most guild equipment promises.
Formulated by a cobbler who moonlighted as a second-story specialist and considered noise a personal insult. The original recipe involved rendered silence beetle fat, which remains the official ingredient.
The grease is clear, odorless, and produces the satisfying fiction that your boots have always been this quiet. Apply generously to soles and heels; avoid applying to stairs, door handles, or anything you'll need to grip while fleeing.
The actual ingredient is classified and smells faintly of apology. Apply generously to soles and heels; avoid applying to stairs, door handles, or anything you'll need to grip while fleeing.
Thieves consider it a sacrament. Scouts consider it a tool. The quartermaster considers it the only item in the Intermediate catalog that's never been returned, which is either a compliment or a confession.
The grease produces the satisfying fiction that your boots have always been this quiet. Thieves consider it a sacrament. Scouts consider it a tool.
The quartermaster considers it the only item in the Intermediate catalog that's never been returned, which is either a compliment or a confession.
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 362 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

+74
View File
@@ -0,0 +1,74 @@
#!/usr/bin/env python3
"""Rewrite lore text in an existing SVG card without regenerating the full card.
Usage:
python3 scripts/rewrite-lore.py "path/to/Card.svg" "New lore text here..."
Uses the same format_lore_text() and set_text_content() pipeline as generate-card.py
to avoid the tspan space-loss bug (SKILL.md lesson #13).
"""
import sys
import os
import re
import xml.etree.ElementTree as ET
sys.path.insert(0, os.path.dirname(__file__))
from importlib.machinery import SourceFileLoader
gc = SourceFileLoader("generate_card", os.path.join(os.path.dirname(__file__), "generate-card.py")).load_module()
SVG_NS = "http://www.w3.org/2000/svg"
ET.register_namespace("", SVG_NS)
for prefix, uri in [
("xlink", "http://www.w3.org/1999/xlink"),
("inkscape", "http://www.inkscape.org/namespaces/inkscape"),
("sodipodi", "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"),
("svg", SVG_NS),
]:
ET.register_namespace(prefix, uri)
def find_lore_element(root):
"""Locate the lore text element using the same heuristic as generate-card.py."""
texts = []
for child in root:
tag = child.tag.split("}")[-1] if "}" in child.tag else child.tag
if tag == "text":
texts.append(child)
elif tag == "g":
for sub in child:
sub_tag = sub.tag.split("}")[-1] if "}" in sub.tag else sub.tag
if sub_tag == "text":
texts.append(sub)
for t in texts:
style = t.get("style", "")
transform = t.get("transform", "")
if "shape-inside" in style and "matrix" in transform:
m = re.search(r"matrix\([^,]+,[^,]+,[^,]+,[^,]+,([^,]+)", transform)
if m:
x_offset = float(m.group(1))
if x_offset > 50:
return t
return None
def rewrite(svg_path, new_lore):
tree = ET.parse(svg_path)
root = tree.getroot()
lore_el = find_lore_element(root)
if lore_el is None:
print(f"ERROR: No lore text element found in {svg_path}", file=sys.stderr)
sys.exit(1)
formatted = gc.format_lore_text(new_lore)
gc.set_text_content(lore_el, formatted, wrap_width=42)
tree.write(svg_path, xml_declaration=True, encoding="unicode")
print(f"OK: {svg_path}")
if __name__ == "__main__":
if len(sys.argv) < 3:
print("Usage: rewrite-lore.py <svg-path> <new-lore-text>", file=sys.stderr)
sys.exit(1)
rewrite(sys.argv[1], sys.argv[2])