Skip to content

fix: preserve native Ranch records when editing Bank copies - #70

Open
NewBarkTownKris wants to merge 1 commit into
sofianeelhor:devfrom
NewBarkTownKris:fix/rk4-bank-metadata
Open

NewBarkTownKris wants to merge 1 commit into
sofianeelhor:devfrom
NewBarkTownKris:fix/rk4-bank-metadata

Conversation

@NewBarkTownKris

@NewBarkTownKris NewBarkTownKris commented Nov 3, 2026 •

Copy link
Copy Markdown

Editing a native RK4 record in the Bank currently exports its PK4 editor view, losing the RK4 format tag and the 28-byte Ranch ownership/handler tail. Retain the original native record for standalone RK4 sessions and overlay the edited Pokémon data when exporting it.

This is independent of Ranch save discovery and does not change other Bank formats or the existing validate → backup → write path. Companion read-only Ranch extraction: #71. Both branches start from dev and merge together cleanly; this small fix can be reviewed and merged first.

Verification:

  • Release Engine tests: 956 passed; Domain tests: 612 passed.
  • New synthetic tests cover Trainer, Hayley, and traded Hayley records: byte-identical no-op export, nickname edit with all tail bytes preserved, and reopening the edited RK4.
  • Android Debug build and Release APK publish checked locally; device checks of the same implementation in the combined test build used an AYN Thor running Android 13, with Diagnostics installed alongside production.

Format reference: the existing pinned RK4 implementation. No submodule changes, game files, saves, or binaries are included. Branched from and targeting dev, following the contribution instructions.

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