ReviewOS

stacks/the-settlers-iii-remake

Align DAT torso sequences with their body sequence indices

#210
Closed chris opened this 7 days ago ·
7 days ago

While importing the original geologist, the current DAT reader pairs bodies with the wrong torso sequences when a DAT file has fewer torso sequences than body sequences.

The supplied pinned remake's AdvancedDatFileReader shifts the shorter torso table to the end of the settler table before resolving a body sequence. The game reader currently reads both raw tables at the same index.

Verified demo headers:

  • Roman carrier file 10: 60 body and 60 torso sequences, no shift.
  • Roman specialist file 11: 239 body and 226 torso sequences, shift 13.
  • Roman soldier file 12: 34 body and 25 torso sequences, shift 9.

For example, the geologist's body sequence 37 has 72 movement frames, while raw torso sequence 37 has only 10 frames from a different activity. The proper torso is raw sequence 24. The same indexing error affects existing priest and soldier composition. Body pixels, signed layer anchors and the prototype player tint are separate concerns.

Acceptance:

  • Resolve torso sequence availability and frames against the right-aligned body sequence contract at the decoder source. Missing early torsos must remain missing. Preserve equal-length tables and other section semantics.
  • Add a failing byte-level DAT regression and verify real demo specialist and soldier examples against independently decoded source pointers/pixels.
  • Rebuild all affected originals through the maintained converter, with source provenance. Do not add per-profession offsets, patch installed dependencies or alter gameplay rules.
  • Verify geologist images in #209, existing composition tests, assets, unit/browser checks, types, lint and build. Verify committed CI and retained diagnostics before closure.

Primary source: AdvancedDatFileReader. This is reference-remake and original-file evidence. Full original player palettes, shadow mapping, Gold runtime comparison and native presentation remain open.

7 days ago

The DAT reader now aligns shorter torso tables to their matching body sequences, following the supplied remake. This corrects specialist and soldier clothing while preserving equal-length carrier tables and missing early layers.

A byte-level regression and independently decoded carrier, geologist, priest and soldier samples pass. All affected images were rebuilt through the converter. The real-data tests also enforce the archive's exact filename casing. CI passed, including 361 unit tests and all 472 browser steps.

Player colors remain in #211; full animation and shadow coverage remain in #20.

Sign in to comment on this issue.