PSIN binary-XML editor #6

Open
opened 2026-11-26 20:55:39 +00:00 by github-bot · 0 comments
Owner

@⁠nineforge0 on GitHub · 2026-11-24 07:34 UTC · original

Read-modify-write values in PSIN/PSO game data, the binary form of the engine's metadata.

Goal

  • forge9 psin already parses the block table and struct schemas (src/rpf9/psin.rs). Extend it to:
    1. walk a block into a typed tree using the schemas (scalars, strings, arrays, nested structs, enums),
    2. export that tree to an editable text form (XML or TOML),
    3. write edited values back into the PSIN bytes, initially only for fixed-size scalar members (ints, floats, bools, hashes, enums) so no layout changes are needed.
  • Combined with forge9 mod apply, this lets mods change game values without hex editing.

Notes

  • Pointer, array and map encodings still need documenting in src/rpf9/psin.rs as part of this work; arrays/strings that change length need a block re-layout and can be a later step.
  • Needs a round-trip test: parse → export → import with no edits → identical bytes.

See CONTRIBUTING.md for build, test and style notes. Please don't attach game files to the PR; build test data in memory.

**@⁠nineforge0** on GitHub · 2026-11-24 07:34 UTC · [original](https://github.com/nineforge0/forge9/issues/6) Read-modify-write values in PSIN/PSO game data, the binary form of the engine's metadata. **Goal** - `forge9 psin` already parses the block table and struct schemas (`src/rpf9/psin.rs`). Extend it to: 1. walk a block into a typed tree using the schemas (scalars, strings, arrays, nested structs, enums), 2. export that tree to an editable text form (XML or TOML), 3. write edited values back into the PSIN bytes, initially only for fixed-size scalar members (ints, floats, bools, hashes, enums) so no layout changes are needed. - Combined with `forge9 mod apply`, this lets mods change game values without hex editing. **Notes** - Pointer, array and map encodings still need documenting in `src/rpf9/psin.rs` as part of this work; arrays/strings that change length need a block re-layout and can be a later step. - Needs a round-trip test: parse → export → import with no edits → identical bytes. See [CONTRIBUTING.md](https://github.com/nineforge0/forge9/blob/main/CONTRIBUTING.md) for build, test and style notes. Please don't attach game files to the PR; build test data in memory.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:55:39 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.