Weapons: list data.rpf in the picker and assemble weapons from their parts #53

Manually merged
github merged 1 commit from gh-pr/53/head into gh-pr/53/base 2026-11-26 20:06:06 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 14:52 UTC · original
holdmysocks:claude/weapons → master · +349 −2 · 5 files · 1 commits · merged 2026-11-23 15:09 UTC

The Weapons category showed only 19 low-poly placeholder shapes from levels.rpf. The weapons are in data.rpf, which the picker did not list, and each one is split into part models.

  • Picker. data.rpf is listed. Weapons: 302 models; a new "Weapon parts" category: 2,572.
  • Assembly. A weapon's own model is a skeleton with a shell of about a hundred triangles. Parts are named <weapon>_<slot>_<NN> and mount on attach-point bones: a part's root bone AAP_<Slot> goes on the bone WAP_<Slot> of the base or of another part. sixng-core::weapon finds a weapon's parts and places them; the viewer opens a weapon assembled, with its slots in the Parts panel.
  • Surface. The weapon shader (e68a4a98) binds no colour map, so it gets classification.stand_in = "gunmetal".

Checked

  • In the viewer: eleven weapons (assault rifle, two pistols, shotgun, SMG, revolver, sniper rifle, launcher, machine gun, machete, grenade).
  • 135 core tests pass, three of them new (names, a chain of parts, the rigid inverse).

Not decoded

Which variant of a slot a weapon carries by default (the lowest-numbered one is shown), and the colours: wood and polymer parts are drawn like the metal. A part whose attach point is not on the current build is left out and listed as parts_without_mount.

**@⁠holdmysocks** on GitHub · 2026-11-23 14:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/53) `holdmysocks:claude/weapons` → `master` · +349 −2 · 5 files · 1 commits · merged 2026-11-23 15:09 UTC The Weapons category showed only 19 low-poly placeholder shapes from `levels.rpf`. The weapons are in `data.rpf`, which the picker did not list, and each one is split into part models. - **Picker.** `data.rpf` is listed. Weapons: 302 models; a new "Weapon parts" category: 2,572. - **Assembly.** A weapon's own model is a skeleton with a shell of about a hundred triangles. Parts are named `<weapon>_<slot>_<NN>` and mount on attach-point bones: a part's root bone `AAP_<Slot>` goes on the bone `WAP_<Slot>` of the base or of another part. `sixng-core::weapon` finds a weapon's parts and places them; the viewer opens a weapon assembled, with its slots in the Parts panel. - **Surface.** The `weapon` shader (`e68a4a98`) binds no colour map, so it gets `classification.stand_in = "gunmetal"`. ## Checked - In the viewer: eleven weapons (assault rifle, two pistols, shotgun, SMG, revolver, sniper rifle, launcher, machine gun, machete, grenade). - 135 core tests pass, three of them new (names, a chain of parts, the rigid inverse). ## Not decoded Which variant of a slot a weapon carries by default (the lowest-numbered one is shown), and the colours: wood and polymer parts are drawn like the metal. A part whose attach point is not on the current build is left out and listed as `parts_without_mount`.
The Weapons category showed 19 low-poly models: the placeholder shapes
(w_preset_*, wpn_proxy_*) in levels.rpf. The weapons are in data.rpf,
which the picker did not list: 2,855 models for 95 base weapons.

A weapon's own model (w_ar_adb_01_hi) is a small skeleton with a shell of
about a hundred triangles. What is seen is built from part models named
<weapon>_<slot>_<NN> with the same LOD suffix (receiver, barrel, stock,
handguard, magazine, sights, bolt, trigger, 2 or 3 variants each).

Parts mount on attach-point bones: a part's root bone AAP_<Slot> goes on
the bone WAP_<Slot> of the base or of another part (WAP_Receiver on a
rifle's base, WAP_Barrel / WAP_Stock / WAP_Mag on the receiver,
WAP_Muzzle on a barrel, WAP_Sight_F on a pistol slide). Names match
without regard to case; a part without bones takes the bone named after
its slot.

- sixng-core: weapon.rs (is_weapon, weapon_options, part_slot, place).
- Viewer: a weapon opens assembled, with its slots in the Parts panel.
- Picker: data.rpf is listed; a weapon's parts go in a new "Weapon parts"
  category (2,572 models), weapons and single-model items stay in
  Weapons (302).
- The `weapon` shader (e68a4a98) binds no colour map, only two packed
  data maps and a normal map: classification.stand_in = "gunmetal", one
  dark steel for every part.

Checked in the viewer on eleven weapons (assault rifle, two pistols,
shotgun, SMG, revolver, sniper rifle, launcher, machine gun, machete,
grenade).

Not decoded: which variant of a slot a weapon carries by default (the
lowest-numbered one is shown), and the colours (wood and polymer parts
are drawn like the metal). A part whose attach point is not on the
current build (an optic mount, a magazine follower) is left out and
listed in model info as parts_without_mount.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:06:05 +00:00
github manually merged commit cdedceaa53 into gh-pr/53/base 2026-11-26 20:06:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.