Skip to content

feat: Import a petscodex pet into a Character Package - #114

Closed
omesser wants to merge 1 commit into
mainfrom
cursor/import-petscodex-8cbd
Closed

omesser wants to merge 1 commit into
mainfrom
cursor/import-petscodex-8cbd

Conversation

@omesser

@omesser omesser commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What

A one-time scripts/import_pet.py --format petscodex that slices a petdex atlas into a Character Package the loader accepts.

Why

petscodex is a fixed grid with named rows, so mapping is data not judgement. Shimeji and the survey stay on #112. Pillow is allowed here because this is authoring, not a build step (Blip's generator stays stdlib).

How to test

  • Synthetic atlas maps to all nine required Animations
  • waiting is an idle variant; land/react play once
  • fps follows durationMs
  • Per-animation union bbox, not per-frame flattening
  • Unknown license refused without --accept-license
  • character::load accepts the imported fixture

Addresses #112. Does not close it.

Open in Web Open in Cursor 

Implement scripts/import_pet.py --format petscodex to translate petdex
packages into Character Packages. Maps 8×9 atlas rows to the Required
Animation Set (idle, walk, fall, land, sit, sleep, react, talk, hold) plus
waiting as an idle variant. Crops to per-animation union bbox with collective
baseline alignment. Detects render_mode and chooses scale for ~100-130px
on-screen size.

Pillow is allowed in this script only, documented as the authoring exception.
Tests verify mapping, variant rings, fps computation, union bbox cropping, and
license refusal. Rust test confirms character::load accepts the imported
fixture.

Co-authored-by: Oded Messer <odedmesser@gmail.com>
@omesser omesser changed the title Import a petscodex pet into a Character Package feat: Import a petscodex pet into a Character Package Aug 31, 2026
@omesser

omesser commented Aug 31, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #118, now merged — the disposition the plan on #112 laid out. The one piece worth porting from here, the KNOWN_LICENSES allowlist, is tracked as #130.

@omesser omesser closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants