hatchimera / src /buddy_fusion /compendium_data.py
arkai2025's picture
chore: make tracked content English-only (keep CJK command-match table)
b27ae7c
Raw
History Blame Contribute Delete
16.9 kB
"""The Compendium: Claude-authored freeform voxel creatures used as the
starting roster for the all-freeform app.
Each entry is a box-layout in the voxelizer's convention:
x, z = box CENTER; y = box BOTTOM (grows up); y=0 = ground; +z = front (face).
sizes 1-8 per box; left-right symmetric; one dominant body colour + accents.
Content is broad, original creatures (no real-world IP / branded characters):
generic animals, mythical beasts, plants, aquatic life, bugs, aliens, robots.
Common animal body-plans are built parametrically (the `_quad`/`_biped`/… helpers)
so the roster stays coherent and easy to grow; distinctive/weird forms are
hand-authored below. Adding entries needs nothing else — the module, report tool,
and compendium screen all read COMPENDIUM. Keep ids unique.
"""
from __future__ import annotations
_DARK = "#16161f"
_WHITE = "#fbfbff"
def _box(x, y, z, w, h, d, color):
return {"x": int(x), "y": int(y), "z": int(z),
"w": int(w), "h": int(h), "d": int(d), "color": color}
def _shade(hex_color, f=0.7):
"""A darker shade of a #rrggbb colour for legs/feet/accents."""
h = hex_color.lstrip("#")
r, g, b = (int(h[i:i + 2], 16) for i in (0, 2, 4))
return "#" + "".join(f"{int(c * f):02x}" for c in (r, g, b))
# --- parametric body plans ---------------------------------------------------
def _quad(body, *, accent=None, eye=_DARK, body_dim=(4, 3, 6), leglen=2,
ears=False, horn=False, tail=True, snout=False):
"""A grounded quadruped: 4 corner legs, body, front head with eyes, options."""
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = []
lx, lz = max(1, bw // 2), max(1, bd // 2 - 1)
for sx in (-lx, lx):
for sz in (-lz, lz):
b.append(_box(sx, 0, sz, 1, leglen, 1, acc))
by = leglen
b.append(_box(0, by, 0, bw, bh, bd, body))
hz = bd // 2 + 1
hyB = by + max(0, bh - 2)
b.append(_box(0, hyB, hz, 3, 3, 3, body))
top = hyB + 3
frontZ = hz + 2
for sx in (-1, 1):
b.append(_box(sx, hyB + 1, frontZ, 1, 1, 1, eye))
if snout:
b.append(_box(0, hyB, frontZ, 1, 1, 1, acc))
if ears:
for sx in (-1, 1):
b.append(_box(sx, top, hz, 1, 1, 1, body))
if horn:
b.append(_box(0, top, hz + 1, 1, 2, 1, "#fff3c0"))
if tail:
b.append(_box(0, by + 1, -(bd // 2 + 1), 1, 1, 2, body))
return b
def _biped(body, *, accent=None, eye=_DARK, body_dim=(4, 4, 3), leglen=2,
ears=False, arms=True, tail=False):
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = []
for sx in (-1, 1):
b.append(_box(sx, 0, 0, 1, leglen, bd - 1, acc))
by = leglen
b.append(_box(0, by, 0, bw, bh, bd, body))
hyB = by + bh
b.append(_box(0, hyB, 0, bw, 3, bd, body))
top = hyB + 3
fz = bd // 2 + 1
for sx in (-1, 1):
b.append(_box(sx, hyB + 1, fz, 1, 1, 1, eye))
if arms:
for sx in (-(bw // 2 + 1), bw // 2 + 1):
b.append(_box(sx, by + 1, 0, 1, 2, 1, body))
if ears:
for sx in (-1, 1):
b.append(_box(sx, top, 0, 1, 2, 1, body))
if tail:
b.append(_box(0, by, -(bd // 2 + 1), 1, 2, 1, acc))
return b
def _bird(body, *, accent=None, beak="#ff8a3d", eye=_DARK, body_dim=(4, 4, 4),
crest=False, longtail=False):
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = []
for sx in (-1, 1):
b.append(_box(sx, 0, 0, 1, 1, 1, beak))
by = 1
b.append(_box(0, by, 0, bw, bh, bd, body))
for sx in (-(bw // 2 + 1), bw // 2 + 1):
b.append(_box(sx, by + 1, 0, 1, 2, 2, acc))
fz = bd // 2 + 1
for sx in (-1, 1):
b.append(_box(sx, by + bh - 1, fz, 1, 1, 1, eye))
b.append(_box(0, by + bh - 2, fz, 1, 1, 2, beak))
if crest:
b.append(_box(0, by + bh, 0, 1, 2, 1, accent or beak))
if longtail:
b.append(_box(0, by + 1, -(bd // 2 + 1), 1, 1, 3, acc))
return b
def _blob(body, *, accent=None, eye=_WHITE, pupil=_DARK, body_dim=(6, 5, 6), feet=True):
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = [_box(0, 0, 0, bw, bh, bd, body)]
fz = bd // 2
for sx in (-1, 1):
b.append(_box(sx, bh - 2, fz, 1, 2, 1, eye))
b.append(_box(sx, bh - 2, fz, 1, 1, 1, pupil))
if feet:
for sx in (-(bw // 2 - 1), bw // 2 - 1):
b.append(_box(sx, 0, fz - 1, 1, 1, 1, acc))
return b
def _bug(body, *, accent=None, eye=_DARK, body_dim=(5, 2, 6), legs=3, horn=False, spots=None):
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = [_box(0, 1, 0, bw, bh, bd, body)]
b.append(_box(0, 1 + bh, -1, bw - 2, 1, bd - 2, acc))
hz = bd // 2 + 1
b.append(_box(0, 1, hz, 3, 2, 2, acc))
for sx in (-1, 1):
b.append(_box(sx, 2, hz + 1, 1, 1, 1, eye))
zs = [(-(bd // 2 - 1)) + i * ((bd) // max(1, legs - 1)) for i in range(legs)]
for sz in zs:
for sx in (-(bw // 2 + 1), bw // 2 + 1):
b.append(_box(sx, 0, sz, 1, 1, 1, acc))
if horn:
b.append(_box(0, 3, hz + 1, 1, 2, 1, "#fff3c0"))
if spots:
for (sx, sz) in ((-1, -1), (1, 1)):
b.append(_box(sx, 1 + bh, sz, 1, 1, 1, spots))
return b
def _fish(body, *, accent=None, eye=_WHITE, pupil=_DARK, body_dim=(5, 4, 3)):
acc = accent or _shade(body)
bw, bh, bd = body_dim
b = [_box(0, 1, 0, bw, bh, bd, body)]
b.append(_box(-(bw // 2 + 1), 1, 0, 1, 3, 2, acc)) # tail fin (back = -x)
b.append(_box(0, 1 + bh, 0, 1, 1, 2, acc)) # top fin
ex = bw // 2
b.append(_box(ex, 2, 1, 1, 1, 1, eye))
b.append(_box(ex, 2, 1, 1, 1, 1, pupil))
return b
def _serpent(body, *, accent=None, eye=_DARK, segs=4, horn=False):
acc = accent or _shade(body)
b = []
for i in range(segs):
z = -segs + 1 + i * 2
y = i // 2
b.append(_box(0, y, z, 2, 2, 2, body if i % 2 else acc))
hz = -segs + 1 + (segs - 1) * 2 + 2
hy = (segs - 1) // 2 + 1
b.append(_box(0, hy, hz, 3, 3, 3, body))
for sx in (-1, 1):
b.append(_box(sx, hy + 2, hz + 1, 1, 1, 1, eye))
if horn:
for sx in (-1, 1):
b.append(_box(sx, hy + 3, hz, 1, 1, 1, "#fff3c0"))
return b
def _c(cid, name, theme, boxes):
return {"id": cid, "name": name, "theme": theme, "boxes": boxes}
# --- hand-authored distinctive forms (alien / mythical / plant / aquatic) ----
_SPECIALS = [
_c("zorblax", "Zorblax", "alien", [
_box(-1, 0, 0, 1, 2, 1, "#3fcf7a"), _box(1, 0, 0, 1, 2, 1, "#3fcf7a"),
_box(0, 2, 0, 3, 4, 2, "#4be08a"), _box(0, 6, 0, 3, 3, 3, "#4be08a"),
_box(0, 7, 2, 1, 1, 1, _WHITE), _box(0, 7, 2, 1, 1, 1, _DARK),
_box(-1, 9, 0, 1, 2, 1, "#3fcf7a"), _box(1, 9, 0, 1, 2, 1, "#3fcf7a"),
_box(-1, 11, 0, 1, 1, 1, "#ffd24a"), _box(1, 11, 0, 1, 1, 1, "#ffd24a"),
_box(-2, 3, 0, 1, 1, 1, "#3fcf7a"), _box(2, 3, 0, 1, 1, 1, "#3fcf7a"),
]),
_c("nebulon", "Nebulon", "alien", [
_box(0, 0, 0, 5, 4, 5, "#7c5cff"), _box(0, 4, 0, 3, 2, 3, "#8f74ff"),
_box(0, 5, 2, 1, 1, 1, _WHITE), _box(-2, 3, 2, 1, 1, 1, _WHITE), _box(2, 3, 2, 1, 1, 1, _WHITE),
_box(0, 5, 2, 1, 1, 1, _DARK), _box(-2, 3, 3, 1, 1, 1, _DARK), _box(2, 3, 3, 1, 1, 1, _DARK),
_box(-2, 0, 2, 1, 1, 1, "#5b3fd6"), _box(2, 0, 2, 1, 1, 1, "#5b3fd6"),
]),
_c("emberwing", "Emberwing", "mythical", [
_box(-1, 0, -2, 1, 2, 1, "#b8351f"), _box(1, 0, -2, 1, 2, 1, "#b8351f"),
_box(-1, 0, 2, 1, 2, 1, "#b8351f"), _box(1, 0, 2, 1, 2, 1, "#b8351f"),
_box(0, 2, 0, 3, 3, 6, "#d34328"), _box(0, 4, 4, 3, 3, 2, "#d34328"),
_box(-1, 6, 5, 1, 1, 1, "#ffd24a"), _box(1, 6, 5, 1, 1, 1, "#ffd24a"),
_box(-4, 4, 0, 2, 1, 3, "#8f2415"), _box(4, 4, 0, 2, 1, 3, "#8f2415"),
_box(0, 3, -4, 1, 1, 3, "#ffd24a"),
]),
_c("griffadon", "Griffadon", "mythical", [
_box(-1, 0, -2, 1, 2, 1, "#caa05a"), _box(1, 0, -2, 1, 2, 1, "#caa05a"),
_box(-1, 0, 2, 1, 2, 1, "#e8d098"), _box(1, 0, 2, 1, 2, 1, "#e8d098"),
_box(0, 2, 0, 4, 3, 6, "#caa05a"), _box(0, 4, 4, 3, 3, 3, "#f0e8d0"),
_box(-1, 6, 6, 1, 1, 1, _DARK), _box(1, 6, 6, 1, 1, 1, _DARK),
_box(0, 5, 6, 1, 1, 1, "#ff8a3d"),
_box(-4, 3, 0, 1, 3, 4, "#e8d098"), _box(4, 3, 0, 1, 3, 4, "#e8d098"),
]),
_c("sproutling", "Sproutling", "plant", [
_box(0, 0, 0, 1, 4, 1, "#5a8f3a"), _box(-2, 2, 0, 2, 1, 2, "#6fae48"), _box(2, 2, 0, 2, 1, 2, "#6fae48"),
_box(0, 4, 0, 3, 3, 3, "#ffd24a"), _box(0, 5, 2, 1, 1, 1, _DARK),
_box(-1, 7, 0, 1, 1, 1, "#ff7eb0"), _box(1, 7, 0, 1, 1, 1, "#ff7eb0"),
_box(0, 7, -1, 1, 1, 1, "#ff7eb0"), _box(0, 7, 1, 1, 1, 1, "#ff7eb0"),
]),
_c("mushlet", "Mushlet", "plant", [
_box(0, 0, 0, 2, 3, 2, "#f0e6d2"), _box(0, 3, 0, 6, 2, 6, "#d83a3a"),
_box(0, 5, 0, 4, 1, 4, "#e85a5a"),
_box(-2, 3, 2, 1, 1, 1, _WHITE), _box(2, 3, 2, 1, 1, 1, _WHITE), _box(0, 4, 3, 1, 1, 1, _WHITE),
_box(-1, 1, 1, 1, 1, 1, _DARK), _box(1, 1, 1, 1, 1, 1, _DARK),
]),
_c("squidlet", "Squidlet", "aquatic", [
_box(0, 3, 0, 4, 4, 4, "#c75cc7"),
_box(-1, 5, 2, 1, 1, 1, _WHITE), _box(1, 5, 2, 1, 1, 1, _WHITE),
_box(-1, 5, 2, 1, 1, 1, _DARK), _box(1, 5, 2, 1, 1, 1, _DARK),
_box(-2, 0, -1, 1, 3, 1, "#b04bb0"), _box(2, 0, -1, 1, 3, 1, "#b04bb0"),
_box(-2, 0, 1, 1, 3, 1, "#b04bb0"), _box(2, 0, 1, 1, 3, 1, "#b04bb0"),
_box(0, 0, 2, 1, 3, 1, "#b04bb0"),
]),
_c("jellybub", "Jellybub", "aquatic", [
_box(0, 4, 0, 5, 3, 5, "#8fd6e8"), _box(0, 3, 0, 5, 1, 5, "#a8e2f0"),
_box(-1, 5, 2, 1, 1, 1, _DARK), _box(1, 5, 2, 1, 1, 1, _DARK),
_box(-2, 0, -1, 1, 3, 1, "#6fc0d6"), _box(2, 0, 1, 1, 3, 1, "#6fc0d6"),
_box(0, 0, -2, 1, 3, 1, "#6fc0d6"), _box(0, 1, 2, 1, 2, 1, "#6fc0d6"),
_box(-1, 0, 1, 1, 3, 1, "#6fc0d6"), _box(1, 0, -1, 1, 3, 1, "#6fc0d6"),
]),
_c("gloop", "Gloop", "mythical", [
_box(0, 0, 0, 5, 4, 5, "#5fd17a"), _box(0, 4, 0, 3, 1, 3, "#74e08f"),
_box(-1, 2, 2, 1, 2, 1, _WHITE), _box(1, 2, 2, 1, 2, 1, _WHITE),
_box(-1, 2, 2, 1, 1, 1, _DARK), _box(1, 2, 2, 1, 1, 1, _DARK),
_box(2, 0, -1, 1, 1, 1, "#74e08f"), _box(-2, 0, 1, 1, 1, 1, "#74e08f"),
]),
_c("boolet", "Boolet", "mythical", [
_box(0, 1, 0, 4, 5, 4, _WHITE), _box(0, 0, -1, 1, 1, 1, "#e8e8f0"),
_box(0, 0, 1, 1, 1, 1, "#e8e8f0"), _box(-1, 0, 0, 1, 1, 1, "#e8e8f0"), _box(1, 0, 0, 1, 1, 1, "#e8e8f0"),
_box(-1, 4, 2, 1, 1, 1, _DARK), _box(1, 4, 2, 1, 1, 1, _DARK),
_box(0, 3, 2, 1, 1, 1, "#b0b0c8"),
]),
_c("monoeye", "Monoeye", "alien", [
_box(0, 0, 0, 4, 4, 4, "#ff6f59"),
_box(0, 1, 2, 2, 2, 1, _WHITE), _box(0, 1, 2, 1, 1, 1, _DARK),
_box(0, 4, 0, 1, 2, 1, "#c44a37"), _box(0, 6, 0, 1, 1, 1, "#ffd24a"),
_box(-2, 0, 0, 1, 1, 2, "#c44a37"), _box(2, 0, 0, 1, 1, 2, "#c44a37"),
]),
]
# --- broad animals via body-plan builders ------------------------------------
_ANIMALS = [
# quadruped mammals
_c("catkin", "Catkin", "mammal", _quad("#c8923f", ears=True, tail=True)),
_c("pupper", "Pupper", "mammal", _quad("#a4663a", body_dim=(4, 3, 6), ears=True, snout=True)),
_c("foxkit", "Foxkit", "mammal", _quad("#e8722e", accent=_WHITE, ears=True, tail=True)),
_c("bearcub", "Bearcub", "mammal", _quad("#6e4a2f", body_dim=(5, 4, 6), leglen=1, ears=True, tail=False)),
_c("fawnix", "Fawnix", "mammal", _quad("#caa06a", body_dim=(3, 3, 6), leglen=3, horn=True, tail=True)),
_c("liontail", "Liontail", "mammal", _quad("#d6a23f", accent="#8a5a22", ears=True, tail=True, snout=True)),
_c("pigwig", "Pigwig", "mammal", _quad("#f0a0b8", body_dim=(5, 3, 5), leglen=1, ears=True, snout=True)),
_c("moocow", "Moocow", "mammal", _quad("#f4f0ea", accent="#3a2f2a", body_dim=(5, 4, 7), horn=True, tail=True)),
_c("woolly", "Woolly", "mammal", _quad("#f3efe6", accent="#caa06a", body_dim=(5, 4, 5), leglen=2, ears=True)),
_c("mousekin", "Mousekin", "mammal", _quad("#b0a8b8", body_dim=(3, 2, 4), leglen=1, ears=True, tail=True)),
_c("pando", "Pando", "mammal", _quad(_WHITE, accent=_DARK, body_dim=(5, 4, 6), leglen=1, ears=True)),
_c("trunky", "Trunky", "mammal", _quad("#9aa6b0", body_dim=(6, 5, 7), leglen=2, ears=True, snout=True, tail=True)),
_c("hoglet", "Hoglet", "mammal", _quad("#8a6a4a", accent="#3a2a1a", body_dim=(4, 3, 5), leglen=1, snout=True)),
_c("bunbun", "Bunbun", "mammal", _biped("#f0ece4", accent="#d8c8b8", body_dim=(3, 3, 3), ears=True, tail=True)),
# bipeds
_c("roborto", "Roborto", "robot", _biped("#8fa8c0", accent="#5a6e84", body_dim=(4, 4, 3), arms=True, ears=True)),
_c("frostfur", "Frostfur", "mythical", _biped("#dff0ff", accent="#9ec7e8", body_dim=(5, 5, 4), arms=True, ears=False)),
_c("toadling", "Toadling", "amphibian", _biped("#6fae48", accent="#4f8a32", body_dim=(5, 3, 4), leglen=1, arms=True)),
_c("geckle", "Geckle", "reptile", _quad("#5fc06a", body_dim=(3, 2, 6), leglen=1, tail=True)),
# birds
_c("hootley", "Hootley", "bird", _bird("#8a6a4a", body_dim=(4, 4, 3), crest=True)),
_c("quackers", "Quackers", "bird", _bird("#f4e04a", beak="#ff8a3d", body_dim=(4, 3, 4))),
_c("tweetle", "Tweetle", "bird", _bird("#5fb0e8", body_dim=(3, 3, 3), crest=True)),
_c("waddle", "Waddle", "bird", _bird("#2b2b3a", accent=_WHITE, beak="#ff8a3d", body_dim=(4, 5, 3))),
_c("squawk", "Squawk", "bird", _bird("#e8443f", accent="#2fa7d6", body_dim=(3, 4, 3), crest=True, longtail=True)),
# blobs / round
_c("roundmochi", "Roundmochi", "mascot", _blob("#ff9bc7")),
_c("puffball", "Puffball", "mascot", _blob("#b48fe8", body_dim=(5, 5, 5))),
_c("orbit", "Orbit", "alien", _blob("#5fd6c0", body_dim=(5, 4, 5), feet=False)),
_c("yolkie", "Yolkie", "mascot", _blob("#ffd24a", accent="#e8a82e", body_dim=(5, 4, 5))),
# bugs
_c("beetlebot", "Beetlebot", "bug", _bug("#3a7d44", horn=True)),
_c("buzzby", "Buzzby", "bug", _bug("#f4c430", accent=_DARK, body_dim=(4, 3, 5), spots=_DARK)),
_c("spotbug", "Spotbug", "bug", _bug("#d83a3a", accent=_DARK, body_dim=(5, 3, 5), spots=_DARK)),
_c("snailby", "Snailby", "bug", _bug("#caa06a", accent="#8a6a3a", body_dim=(3, 2, 5), legs=2)),
# aquatic
_c("bubblefin", "Bubblefin", "aquatic", _fish("#2fa7d6")),
_c("chompfin", "Chompfin", "aquatic", _fish("#7a8a98", body_dim=(6, 4, 3))),
_c("goldie", "Goldie", "aquatic", _fish("#ff8a3d", body_dim=(4, 4, 3))),
_c("crabbo", "Crabbo", "aquatic", [
_box(0, 1, 0, 7, 2, 5, "#e8612e"),
_box(-3, 0, 2, 1, 1, 1, "#b8431c"), _box(3, 0, 2, 1, 1, 1, "#b8431c"),
_box(-3, 0, -2, 1, 1, 1, "#b8431c"), _box(3, 0, -2, 1, 1, 1, "#b8431c"),
_box(-4, 2, 3, 2, 2, 2, "#ff7a45"), _box(4, 2, 3, 2, 2, 2, "#ff7a45"),
_box(-1, 3, 3, 1, 2, 1, "#b8431c"), _box(1, 3, 3, 1, 2, 1, "#b8431c"),
_box(-1, 4, 3, 1, 1, 1, _DARK), _box(1, 4, 3, 1, 1, 1, _DARK),
]),
# reptiles / serpents
_c("slinky", "Slinky", "reptile", _serpent("#69c074", segs=4)),
_c("wyrmlet", "Wyrmlet", "mythical", _serpent("#7c5cff", segs=5, horn=True)),
_c("shellby", "Shellby", "reptile", [
_box(-2, 0, 2, 1, 1, 1, "#3f6e2a"), _box(2, 0, 2, 1, 1, 1, "#3f6e2a"),
_box(-2, 0, -2, 1, 1, 1, "#3f6e2a"), _box(2, 0, -2, 1, 1, 1, "#3f6e2a"),
_box(0, 1, 0, 5, 2, 6, "#86c46a"), _box(0, 3, 0, 4, 2, 5, "#5a8f3a"),
_box(0, 1, 4, 2, 2, 2, "#86c46a"),
_box(-1, 2, 5, 1, 1, 1, _DARK), _box(1, 2, 5, 1, 1, 1, _DARK),
_box(0, 1, -4, 1, 1, 2, "#86c46a"),
]),
# plants
_c("prickle", "Prickle", "plant", [
_box(0, 0, 0, 3, 6, 3, "#4f9c5a"),
_box(-2, 2, 0, 1, 2, 1, "#4f9c5a"), _box(2, 3, 0, 1, 2, 1, "#4f9c5a"),
_box(-1, 5, 2, 1, 1, 1, _DARK), _box(1, 5, 2, 1, 1, 1, _DARK),
_box(0, 6, 0, 1, 1, 1, "#ff7eb0"),
]),
_c("sunny", "Sunny", "plant", [
_box(0, 0, 0, 1, 4, 1, "#4f8a32"),
_box(-1, 2, 0, 2, 1, 1, "#6fae48"), _box(1, 2, 0, 2, 1, 1, "#6fae48"),
_box(0, 4, 0, 4, 4, 1, "#5a8f3a"), _box(0, 4, 1, 4, 4, 1, "#ffd24a"),
_box(0, 5, 2, 2, 2, 1, "#8a5a22"),
_box(-1, 6, 3, 1, 1, 1, _DARK), _box(1, 6, 3, 1, 1, 1, _DARK),
]),
_c("barkle", "Barkle", "plant", [
_box(-1, 0, 0, 1, 3, 1, "#6e4a2f"), _box(1, 0, 0, 1, 3, 1, "#6e4a2f"),
_box(0, 3, 0, 4, 4, 3, "#7a5a3a"),
_box(0, 7, 0, 5, 2, 4, "#4f9c5a"), _box(0, 9, 0, 3, 1, 3, "#5fb56a"),
_box(-1, 5, 2, 1, 1, 1, _WHITE), _box(1, 5, 2, 1, 1, 1, _WHITE),
_box(-1, 5, 2, 1, 1, 1, _DARK), _box(1, 5, 2, 1, 1, 1, _DARK),
_box(-3, 4, 0, 1, 1, 1, "#7a5a3a"), _box(3, 4, 0, 1, 1, 1, "#7a5a3a"),
]),
]
COMPENDIUM: list[dict] = _SPECIALS + _ANIMALS