Viewer: weapon finishes per part type #121

Manually merged
github merged 4 commits from gh-pr/121/head into gh-pr/121/base 2026-11-26 20:11:24 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 04:53 UTC · original
holdmysocks:claude/weapon-finishes → master · +150 −8 · 3 files · 4 commits · merged 2026-11-24 05:06 UTC

Stacked on #119 (its commit shows here until it merges).

What this adds

  • Index (version 4): weapon families. Each weapon family file gives its component models and, per part type, its variant presets (weapon_families). Index::weapon_finishes(model) returns the finishes for a model: the family that lists the model, and the part type that is a word of the model name (…_slide_02 -> slide, …_sight_f_01 -> sight_f before sight).
  • Viewer. The parts panel of an assembled weapon gets a "Finishes" block: one choice per shown part type, each option with colour squares of the preset (variant names are not recovered). The choice goes into the model query as #finish=<part type hex>:<preset hex>,…, so it also works from the command line and survives part changes. colour_weapon takes the chosen preset instead of the part's own.
  • README: one sentence in the materials row.

What was checked

  • Game data: 48 families with finishes, 407 part-type lists, 1,300 variants. 36 of the 54 part-type hashes are the joaat of a part word (barrel, receiver, stock, magazine, frame, trigger, bolt, pgrip, muzzle, grip, slide, optic ...), covering 1,051 of the 1,300 variants; the other 18 hashes are unnamed and are only offered when a model word hashes to them.
  • Screenshot (--gpu radeon): the pistol with #finish= for frame and slide comes out gold with the panel showing both choices; without it, as before.
  • cargo test -p sixng-core: 149 passed (the matlib test covers the family lookup and the longest-word rule). Release builds of CLI and viewer pass.

What is not done / not known

  • Which finish the game gives a weapon (the link from a weapon or its component option to a variant) is not decoded; the default stays the part's own preset.
  • Variant names, and 18 part-type names (249 variants).
  • A finish is applied to every shown part of that type; the export does not take finishes.
**@⁠holdmysocks** on GitHub · 2026-11-24 04:53 UTC · [original](https://github.com/holdmysocks/SixNG/pull/121) `holdmysocks:claude/weapon-finishes` → `master` · +150 −8 · 3 files · 4 commits · merged 2026-11-24 05:06 UTC Stacked on #119 (its commit shows here until it merges). ## What this adds - **Index (version 4): weapon families.** Each weapon family file gives its component models and, per part type, its variant presets (`weapon_families`). `Index::weapon_finishes(model)` returns the finishes for a model: the family that lists the model, and the part type that is a word of the model name (`…_slide_02` -> `slide`, `…_sight_f_01` -> `sight_f` before `sight`). - **Viewer.** The parts panel of an assembled weapon gets a "Finishes" block: one choice per shown part type, each option with colour squares of the preset (variant names are not recovered). The choice goes into the model query as `#finish=<part type hex>:<preset hex>,…`, so it also works from the command line and survives part changes. `colour_weapon` takes the chosen preset instead of the part's own. - README: one sentence in the materials row. ## What was checked - Game data: 48 families with finishes, 407 part-type lists, 1,300 variants. 36 of the 54 part-type hashes are the joaat of a part word (`barrel`, `receiver`, `stock`, `magazine`, `frame`, `trigger`, `bolt`, `pgrip`, `muzzle`, `grip`, `slide`, `optic` ...), covering 1,051 of the 1,300 variants; the other 18 hashes are unnamed and are only offered when a model word hashes to them. - Screenshot (`--gpu radeon`): the pistol with `#finish=` for frame and slide comes out gold with the panel showing both choices; without it, as before. - `cargo test -p sixng-core`: 149 passed (the matlib test covers the family lookup and the longest-word rule). Release builds of CLI and viewer pass. ## What is not done / not known - Which finish the game gives a weapon (the link from a weapon or its component option to a variant) is not decoded; the default stays the part's own preset. - Variant names, and 18 part-type names (249 variants). - A finish is applied to every shown part of that type; the export does not take finishes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:11:22 +00:00
github manually merged commit 504d4ccc71 into gh-pr/121/base 2026-11-26 20:11:24 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.