Skip to content

Recorder schema 2: item/fighter scale and per-character state - #14

Merged
hopskipnfall merged 3 commits into
masterfrom
schema-2-scale-and-character-state
Sep 16, 2026
Merged

hopskipnfall merged 3 commits into
masterfrom
schema-2-scale-and-character-state

Conversation

@hopskipnfall

@hopskipnfall hopskipnfall commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • ItemUpdate: optional scaleX/scaleY, the object's render scale. Samus's Charge Shot grows with charge (gfx_size / 30 per level).
  • StateFrame gains these optional fields (71 bytes in schema 2, 50 in schema 1):
    • scaleX/scaleY: the fighter's root-joint scale. Covers Giant/Tiny, and Kirby's aerial up-B leaving him about 5% larger until he respawns.
    • characterSpecific: Samus's stored Charge Shot level (0–7), DK's Giant Punch charge (0–10), or Kirby's copied ability (character ID, 8 = none).
    • shieldHealth.
    • specialHitStatus: respawn invincibility, wall-bounce, being inside Yoshi's egg.
    • knockbackResist: temporary armor. Among the original 12, only Yoshi's double jump sets it.
  • hurtboxState docs corrected: 2 = invincible (can be hit, takes no damage), 3 = intangible (can't be hit).
  • docs/RMGR_SPEC.md is synced from RMG-K (§5.2, §5.3).

Backwards compatibility

  • The new fields are read only when a file's EventPayloads declares the longer size. Schema-1 files parse exactly as before, with the fields absent.
  • The serializer writes the original 25/50-byte layouts when a replay has none of the fields, so re-saving an old file never invents values.
  • Checked against the 428 readable replays in the viewer corpus. All are schema 1: they parse with no new fields, and re-save and re-parse identically.

Test plan

ItemUpdate gains trailing scaleX/scaleY (DObj render scale - Samus's
Charge Shot size). StateFrame gains trailing scaleX/scaleY (fighter root
joint scale - Giant/Tiny, Kirby's up-B growth) and characterSpecific
(Samus/DK stored charge, Kirby's copied ability).

Backwards compatible: fields are parsed only when the file's
EventPayloads declares them, so schema-1 files parse exactly as before,
and replays without the fields are written in the original 25/50-byte
layouts. Spec synced from RMG-K docs/RMGR_SPEC.md.
…ema-2 StateFrame

StateFrame schema-2 layout is now 72 bytes (schema 1 stays 50). Also
corrects hurtboxState's docs: 2 = invincible, 3 = intangible. Spec synced
from RMG-K.
Super Star item invincibility isn't needed. Spec synced from RMG-K.
@hopskipnfall
hopskipnfall merged commit 6618602 into master Sep 16, 2026
2 checks passed
@hopskipnfall
hopskipnfall deleted the schema-2-scale-and-character-state branch September 16, 2026 13:36
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