Skip to content

feat(merge): remap database record ids across the twelve kinds - #7

Merged
Zorkats merged 1 commit into
mainfrom
merge-engine
Nov 12, 2026
Merged

Zorkats merged 1 commit into
mainfrom
merge-engine

Conversation

@Zorkats

@Zorkats Zorkats commented Nov 12, 2026

Copy link
Copy Markdown
Owner

B4, step 2 of id remapping: the twelve database kinds (items, weapons, armors, skills, states, enemies, troops, common events, actors, classes, animations, tilesets).

Review first

  1. RPGModder.Core/Merge/ReferenceTable.cs: every place an id can appear, as rows of data.
  2. RPGModder.Core/Merge/ReferenceMap.cs: one walker reads those rows to scan and to rewrite.

What changes

  • Filler: a record with the editor's blank shape that its own mod never names never clashes and claims no target.
  • Null holes in database files are filled with the engine's blank record (MZ 1.10.0 editor shapes, pinned by tests).
  • Database ids are capped at 9999 on MZ and 999 on MV or an unknown engine.
  • A move refuses when an id cannot be pinned down: free text, a plugin text code, a vanilla sibling, the second equip slot in a dual-wield game, a float or string id, a by-variable troop or actor with a matching constant or random range, Get Location Info by character off MZ.
  • New warning rules.remap_stale_reference: a recorded move still applies when its mod now names the old id in free text.
  • MergedFileWriter.Write gains an optional engine parameter; no caller breaks.

Out of scope

Switches and variables (step 3, B5) and the profile wiring (lane A, A9).

Verification

  • Full suite on Windows: 907 passed, 1 skipped.
  • dotnet format --verify-no-changes clean on the merge paths.
  • CI on Windows and Ubuntu.

The reference table is now rows of data that one walker reads for scan and rewrite: event commands, record fields, map fields, System.json and the \N[n] text code. Filler (a record with the editor's blank shape that its own mod never names) never clashes and claims no target. Null holes in database files take the engine's blank record, pinned from the MZ 1.10.0 editor. Database ids are capped at 9999 on MZ and 999 on MV or an unknown engine. Ids the scan cannot pin down (a vanilla sibling, the second equip slot in a dual-wield game, a float or string id, a by-variable troop or actor with a matching constant or random range, Get Location Info by character off MZ) refuse the move, as does a plugin text code holding the old id outside a comment. A recorded move whose mod now names the old id in free text still applies, with the new warning rules.remap_stale_reference.
@Zorkats
Zorkats merged commit 84964e3 into main Nov 12, 2026
4 checks passed
@Zorkats
Zorkats deleted the merge-engine branch November 12, 2026 19:56
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