Outfits open in their body-shape kits' preset items #403

Manually merged
github merged 4 commits from github-bot/gh-403 into gh-pr/403/base 2026-11-26 21:16:15 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-26 19:45 UTC · original
holdmysocks:body-preset-kits → master · +181 −22 · 7 files · 4 commits · merged 2026-11-26 21:13 UTC

Follow-up to #388 (SIX-232): outfits now open in the body shape the game actually gives them.

What the data says

  • The outfit body-type words (Average, Big, Skinny, very_big, very_skinny) are labels only. In the exe they are a parser enum, and only a "the ped's tag is one of these words" condition reads them. No code turns a word into a shape.
  • The shape comes from kits. An outfit's BodyShapePreset variation includes body-shape kits (tagged bodyshape). Their tags under keys 36313cc7, 02484ea6, 6b3fb5a6, 179c8d5c and 63d3733d name preset items of the body-shape preset PSO in anim.rpf (struct 890b5009). Each item lists control values and the rig input values they give.
    • The exe reads these five keys together: static list at .rdata 0x651eab4, gathered by fn 0x3e47f90.
  • The same word gives different shapes: Lucia's Skinny item sets every weight region to −0.2, Jason's to −0.4.
  • Merge rule, traced: applying an item stores each rig input's value over the old one (fn 0x5520220 → fn 0x4f95310, vmovups into the input's slot); removing one resets the inputs to their defaults (fn 0x1fcaa70). So the later item wins.
  • Order: fn 0x3e47f90 gathers one kit's items along that kit's parent chain. The tag-key table in packs.rpf (PSO struct 91315b01) gives the four item keys mode 0 (collect every value) and 63d3733d mode 1 (first wins). Kits apply in include order, each kit's items in key order. Mandy's preset depends on this: it sets every muscle region to 0.2, then thigh and calf back to 0.
  • Several presets: only Lucia has outfits that reach two (variants of a base outfit that add the Skinny preset after her own). Both apply; Skinny wins where both set a control, and her own musclebutt 0.1 stays.

Changes

  • bodyshape::preset_items reads the preset items from every anim.rpf PSO that holds struct 890b5009. A small PSO earlier in the index also has the struct, so taking only the first match is not enough. outfit_preset uses the items and falls back to the word's body-type XML profile when an outfit has no kits.
  • The wardrobe keeps the five kit tag values as hashes. Outfit::body_preset_items lists them in the game's order.
  • The viewer and outfit --look use them. The viewer note now reads "Average, 12 preset item(s) from anim.rpf".
  • README paragraph updated.

Results (look 0)

  • Mandy: 12 items. Muscle 0.2 (thigh and calf 0), weight on hip 0.2, calf 0.2, thigh 0.4, butt 0.2; breasts 0.4; gchipwidth 0.6, gcchestheight −0.6, gcbreastheight −0.4 (controls from #386).
  • Lucia: weight on belly 0.1, butt 0.3, hip 0.25, thigh 0.3.
  • Jason: heavier back, shoulders, neck and arms.
  • In the exports, 348, 140 and 394 bones move compared with neutral.
  • Viewer screenshots were checked on the RTX 4080.

Tests

  • cargo test -p sixng-core passes, including a new test of the later-wins merge.

Not covered

  • The viewer's sliders still cover the 26 original controls. #386's new controls apply in outfit --look exports, but the viewer drops them until it gets sliders for them.
  • Which preset the game picks when a character has several preset variations is not traced. The outfit's own included variations are used.
  • One control in Lucia's second kit (bcd70547) has no name and is left out.
**@⁠holdmysocks** on GitHub · 2026-11-26 19:45 UTC · [original](https://github.com/holdmysocks/SixNG/pull/403) `holdmysocks:body-preset-kits` → `master` · +181 −22 · 7 files · 4 commits · merged 2026-11-26 21:13 UTC Follow-up to #388 (SIX-232): outfits now open in the body shape the game actually gives them. **What the data says** - The outfit body-type words (Average, Big, Skinny, very_big, very_skinny) are labels only. In the exe they are a parser enum, and only a "the ped's tag is one of these words" condition reads them. No code turns a word into a shape. - The shape comes from kits. An outfit's `BodyShapePreset` variation includes body-shape kits (tagged `bodyshape`). Their tags under keys 36313cc7, 02484ea6, 6b3fb5a6, 179c8d5c and 63d3733d name preset items of the body-shape preset PSO in anim.rpf (struct 890b5009). Each item lists control values and the rig input values they give. - The exe reads these five keys together: static list at .rdata 0x651eab4, gathered by fn 0x3e47f90. - The same word gives different shapes: Lucia's Skinny item sets every weight region to −0.2, Jason's to −0.4. - **Merge rule, traced:** applying an item stores each rig input's value over the old one (fn 0x5520220 → fn 0x4f95310, `vmovups` into the input's slot); removing one resets the inputs to their defaults (fn 0x1fcaa70). So the later item wins. - **Order:** fn 0x3e47f90 gathers one kit's items along that kit's parent chain. The tag-key table in packs.rpf (PSO struct 91315b01) gives the four item keys mode 0 (collect every value) and 63d3733d mode 1 (first wins). Kits apply in include order, each kit's items in key order. Mandy's preset depends on this: it sets every muscle region to 0.2, then thigh and calf back to 0. - **Several presets:** only Lucia has outfits that reach two (variants of a base outfit that add the Skinny preset after her own). Both apply; Skinny wins where both set a control, and her own musclebutt 0.1 stays. **Changes** - `bodyshape::preset_items` reads the preset items from every anim.rpf PSO that holds struct 890b5009. A small PSO earlier in the index also has the struct, so taking only the first match is not enough. `outfit_preset` uses the items and falls back to the word's body-type XML profile when an outfit has no kits. - The wardrobe keeps the five kit tag values as hashes. `Outfit::body_preset_items` lists them in the game's order. - The viewer and `outfit --look` use them. The viewer note now reads "Average, 12 preset item(s) from anim.rpf". - README paragraph updated. **Results** (look 0) - Mandy: 12 items. Muscle 0.2 (thigh and calf 0), weight on hip 0.2, calf 0.2, thigh 0.4, butt 0.2; breasts 0.4; gchipwidth 0.6, gcchestheight −0.6, gcbreastheight −0.4 (controls from #386). - Lucia: weight on belly 0.1, butt 0.3, hip 0.25, thigh 0.3. - Jason: heavier back, shoulders, neck and arms. - In the exports, 348, 140 and 394 bones move compared with neutral. - Viewer screenshots were checked on the RTX 4080. **Tests** - `cargo test -p sixng-core` passes, including a new test of the later-wins merge. **Not covered** - The viewer's sliders still cover the 26 original controls. #386's new controls apply in `outfit --look` exports, but the viewer drops them until it gets sliders for them. - Which preset the game picks when a character has several preset variations is not traced. The outfit's own included variations are used. - One control in Lucia's second kit (`bcd70547`) has no name and is left out.
An outfit's BodyShapePreset variation includes body-shape kits. Their tags
under keys 36313cc7, 02484ea6, 6b3fb5a6, 179c8d5c and 63d3733d name preset
items of the body-shape preset PSO in anim.rpf (struct 890b5009), which
list control values. The game gathers the items key by key over all kits
(fn 0x3e47f90) and stores each rig input's value over the old one
(fn 0x4f95310), so a later item wins.

The Average / Skinny words are only labels (the same word gives -0.2
weight on Lucia and -0.4 on Jason); outfits without kits fall back to the
body-type XML profile as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:33:29 +00:00
The game gathers a kit's items along that kit's own parent chain
(fn 0x3e47f90; the tag-key table in packs.rpf gives the four item keys
mode 0, append, and 63d3733d mode 1, first wins), so kits apply in include
order rather than all items sorted by key. Mandy, Lucia and Jason give the
same shapes under both orders.
github-bot changed target branch from master to gh-pr/403/base 2026-11-26 21:16:13 +00:00
github manually merged commit 2dd142e17f into gh-pr/403/base 2026-11-26 21:16:15 +00:00
github-bot referenced this pull request from a commit 2026-11-27 00:40:15 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.