Skip to content

feat(mhfu-port): the MHP3rd porter, built from a manifest on mhp-formats - #8

Merged
sp00ktober merged 1 commit into
mainfrom
feat/mhfu-port
Sep 29, 2026
Merged

sp00ktober merged 1 commit into
mainfrom
feat/mhfu-port

Conversation

@sp00ktober

@sp00ktober sp00ktober commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of sp00ktober/MHFU-ModKit#63. GPL-3.0-or-later.

  • mhfu-port build|inject ports/<name>.toml: the manifest is the only input. inject hands the bytes to mhfu.inject under the manifest's pac name.
  • build is port_monster as steps: donor, host, record map, rig (rig, retarget), skin and PMO (skin, mesh), motion, PAC. constraints checks the engine's rules before it writes.
  • fk: the one engine FK, matched to the old copies within 1e-12; the studio (sp00ktober/MHFU-ModKit#67) and Blender (sp00ktober/MHFU-ModKit#70) move onto it.
  • manifest: the whole schema, read with tomllib, written with tomli-w. ports/*.toml carry no comments. Derived keys (host_frame, fid, orig, em_id, animated) and dead ones (hops, reweight_undriven) are gone, and so is the Tigrex hitzone table the Zinogre's manifest copied from the game.
  • mhfu-port diff OLD NEW: two builds compared group by group and clip by clip.
  • mhfu: inject takes the file name a Lua mod expects and names the .orig; Extracted.find reads another game's variable.

Against today's builds, mhfu-port diff finds only fixes:

Fix Brute (88 groups) Zinogre (181)
Source strips drawn twice, the next dropped 8 groups 19
Mirrored triangles in lists 45 (+2 in strip groups) 57 (+8)
Loop starts carried 8 clips × 3 parts 5 × 3 (2 of 7 sit in slots the host leaves empty)
Vertex scale 32768/128; header scale was (clip, sx, sy) < 0.5 step; one group no longer clamped (0.026) < 0.5 step
The donor mesh's UV scale and offset applied – group 133, 20 vertices
Layout: strips instead of a PRIM per triangle, 16-aligned buffers, the host PAC's 432-byte tail kept PMO 76048 → 68480 B 120000 → 107648 B

Skeleton, textures, skin weights and the other entries are identical. Also fixed: skip_bones reaches the build; retarget mode maps records by the record table instead of by position; a second root at bone 1 hung the partition (275 of 2122 MHP3rd skeletons).

Test plan

  • uv run pytest with and without MHFU_DATA/MHP3RD_DATA; both manifests build to pinned hashes
  • Variants (auto, transfer, retarget, both donors) against the old builder: only the fixes above, and the Zinogre retarget's record map
  • In game after a cold boot, both ports render and animate. Open, as in today's builds: the Zinogre stands slightly below the ground, and the Brute's severed tail floats beside him.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sp00ktober
sp00ktober merged commit 2776123 into main Sep 29, 2026
4 checks passed
@sp00ktober
sp00ktober deleted the feat/mhfu-port branch September 29, 2026 10:04
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.

1 participant