Walk, die and attack animations for all creatures (sheets, prompts and scripts)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-08 01:00:31 +01:00
1 parent 8c5afe872f
commit 48c20fabbc
405 files changed
+1339 -39

No files matched your search

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
"""anim_manifest.py NOTES: write anim/manifest.json (accepted animations per creature) and the
per-sheet status/notes into anim/progress.json. NOTES lines: <id>-<anim>|accepted|skipped|note"""
import json, os, sys
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, HERE)
from make_anim import BY_ID, ANIM, update_progress # noqa: E402
ORDER = ["imp"] + [c for c in BY_ID if c != "imp"]
notes = {}
for line in open(sys.argv[1]):
if line.strip():
sheet, status, note = line.rstrip("\n").split("|", 2)
notes[sheet] = (status, note)
# the pilot sheets
for s in ("knight-walk", "knight-attack", "kobold-walk", "kobold-attack"):
notes.setdefault(s, ("accepted", "pilot (see the pilot section)"))
man = []
for cid in ORDER:
anims = [a for a in ("walk", "die", "attack")
if notes.get(f"{cid}-{a}", ("",))[0] == "accepted" and os.path.exists(os.path.join(ANIM, f"{cid}-{a}-32.png"))]
man.append({"id": cid, "kind": BY_ID[cid]["kind"], "anims": anims})
json.dump(man, open(os.path.join(ANIM, "manifest.json"), "w"), indent=1)
def f(d):
for sheet, (status, note) in notes.items():
e = d["sheets"].setdefault(sheet, {"images": 0})
e["status"], e["note"] = status, note
for sheet, e in d["sheets"].items():
if e.get("status") == "generating":
e["status"] = "unreviewed"
update_progress(f)
print(sum(len(m["anims"]) for m in man), "sheets in the manifest")