Name fragment group and root flag bits in model.json (SIX-206) #258

Manually merged
github merged 2 commits from gh-pr/258/head into gh-pr/258/base 2026-11-26 20:22:12 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 11:51 UTC · original
holdmysocks:six-frag-flags → master · +106 −3 · 1 files · 2 commits · merged 2026-11-25 12:17 UTC

Names the fragment flag bits in model.json's physics block (SIX-206, a follow-up to #251).

What changes

  • Groups: each group gets flag_names (the decoded bits of both flag words) and flag_bits_unnamed ([word, bit] pairs still unknown). flags and flags2 stay as raw hex.
  • Root: root_flag_names and root_flag_bits_unnamed sit next to the raw root_flags.
  • Tuning: slot 3 is now named disappears_when_dead_chance.
  • Note: the physics note now describes the type/include flags. They are not named.

Method

Each level group's 36 tuning values were compared with the 80 fragment tuning presets in common. 6,931 groups match exactly one preset on at least 8 values. For each preset true/false setting, I compared the share of groups with each bit set when the preset says true and when it says false.

Group flags (word 0 = group +0x00, word 1 = +0x04)

Confirmed: set on 97% or more of the groups whose preset says true, and on none whose preset says false.

bit name
0.0 break_when_damaged
0.2 damage_when_broken
0.3 doesnt_affect_vehicles
0.8 break_when_parent_damaged
0.11 enable_motor
0.14 disappear_when_broken
0.16 disable_map_collision_until_break

Likely:

bit name evidence
0.1 made_of_glass No preset. Set on the Glass_* groups of windows and doors, and 98% of the groups with it are box bounds
0.12 damage_around_break 93% of 73 groups, none of 18 false
0.20 break_when_walked_over only 7 groups
0.28 obliterate_at_high_speed 93% of 76 groups, 1% of 1,471 false
0.29 obliterate_at_very_high_speed 90% of 1,547 groups; no preset says false
0.30 break_when_tilted all 315 groups, and on none of the other matched groups; no preset says false
1.0 fade_with_time 84% of 607 groups, and on none of the other matched groups
0.23, 1.3 collide_convex_against_ground / _larger_bounds Always set together, as are the two preset settings, so which bit is which is unknown. Both get one shared name

Unknown: InitialArticulationDisabled has no bit of its own. Bits still unnamed: word 0 bits 4–7, 9, 10, 13, 17–19, 21, 22, 25–27 and 31; word 1 bits 1, 2, 4 and 5. Each is set on at most 4,349 of the 153,028 level groups.

Root flags (+0xB8)

Confirmed: these bits equal "some group has the bit" on all 40,705 level fragments.

bit meaning
2 some group has word 0 bit 13
3 some group has disable_map_collision_until_break
21 some group has obliterate_at_high_speed
22 some group has obliterate_at_very_high_speed
23 some group has break_when_tilted
28 some group has word 1 bit 1
29 some group has word 1 bit 2

Likely:

bit name evidence
8 vegetation set on every veg_ fragment; 99% of the fragments with it are veg_
10 vehicle only on vehicle fragments
20 has_joints 99% of the fragments with it have a group with joint stiffness above 0

Not named:

  • Bits 0, 5 and 30 are always set; bits 1, 4, 7, 9 and 31 are never set.
  • Bits 16 and 24 are set together on all but one fragment, and only on fragments with more than one group.

Child type and include flags

These are collision layer masks. On every fragment, the archetype's type flags equal the OR of its children's, plus bit 0. Type bit 19 appears only on vegetation, so it is likely the foliage layer. The layers are not named.

Tuning slot 3

Slot 3 is disappears_when_dead_chance. In 2,308 of the 2,320 matched groups whose preset value is above 0, slot 3 holds that value.

Tests: a new names_flag_bits test covers both flag words, the shared collide name and root flags taken from a real fragment. decodes_fragment_physics now checks flag_names and flag_bits_unnamed in the JSON.

**@⁠holdmysocks** on GitHub · 2026-11-25 11:51 UTC · [original](https://github.com/holdmysocks/SixNG/pull/258) `holdmysocks:six-frag-flags` → `master` · +106 −3 · 1 files · 2 commits · merged 2026-11-25 12:17 UTC Names the fragment flag bits in `model.json`'s `physics` block (SIX-206, a follow-up to #251). ## What changes - **Groups:** each group gets `flag_names` (the decoded bits of both flag words) and `flag_bits_unnamed` (`[word, bit]` pairs still unknown). `flags` and `flags2` stay as raw hex. - **Root:** `root_flag_names` and `root_flag_bits_unnamed` sit next to the raw `root_flags`. - **Tuning:** slot 3 is now named `disappears_when_dead_chance`. - **Note:** the physics note now describes the type/include flags. They are not named. ## Method Each level group's 36 tuning values were compared with the 80 fragment tuning presets in common. 6,931 groups match exactly one preset on at least 8 values. For each preset true/false setting, I compared the share of groups with each bit set when the preset says true and when it says false. ## Group flags (word 0 = group +0x00, word 1 = +0x04) **Confirmed:** set on 97% or more of the groups whose preset says true, and on none whose preset says false. | bit | name | |---|---| | 0.0 | break_when_damaged | | 0.2 | damage_when_broken | | 0.3 | doesnt_affect_vehicles | | 0.8 | break_when_parent_damaged | | 0.11 | enable_motor | | 0.14 | disappear_when_broken | | 0.16 | disable_map_collision_until_break | **Likely:** | bit | name | evidence | |---|---|---| | 0.1 | made_of_glass | No preset. Set on the `Glass_*` groups of windows and doors, and 98% of the groups with it are box bounds | | 0.12 | damage_around_break | 93% of 73 groups, none of 18 false | | 0.20 | break_when_walked_over | only 7 groups | | 0.28 | obliterate_at_high_speed | 93% of 76 groups, 1% of 1,471 false | | 0.29 | obliterate_at_very_high_speed | 90% of 1,547 groups; no preset says false | | 0.30 | break_when_tilted | all 315 groups, and on none of the other matched groups; no preset says false | | 1.0 | fade_with_time | 84% of 607 groups, and on none of the other matched groups | | 0.23, 1.3 | collide_convex_against_ground / _larger_bounds | Always set together, as are the two preset settings, so which bit is which is unknown. Both get one shared name | **Unknown:** InitialArticulationDisabled has no bit of its own. Bits still unnamed: word 0 bits 4–7, 9, 10, 13, 17–19, 21, 22, 25–27 and 31; word 1 bits 1, 2, 4 and 5. Each is set on at most 4,349 of the 153,028 level groups. ## Root flags (+0xB8) **Confirmed:** these bits equal "some group has the bit" on all 40,705 level fragments. | bit | meaning | |---|---| | 2 | some group has word 0 bit 13 | | 3 | some group has disable_map_collision_until_break | | 21 | some group has obliterate_at_high_speed | | 22 | some group has obliterate_at_very_high_speed | | 23 | some group has break_when_tilted | | 28 | some group has word 1 bit 1 | | 29 | some group has word 1 bit 2 | **Likely:** | bit | name | evidence | |---|---|---| | 8 | vegetation | set on every `veg_` fragment; 99% of the fragments with it are `veg_` | | 10 | vehicle | only on vehicle fragments | | 20 | has_joints | 99% of the fragments with it have a group with joint stiffness above 0 | **Not named:** - Bits 0, 5 and 30 are always set; bits 1, 4, 7, 9 and 31 are never set. - Bits 16 and 24 are set together on all but one fragment, and only on fragments with more than one group. ## Child type and include flags These are collision layer masks. On every fragment, the archetype's type flags equal the OR of its children's, plus bit 0. Type bit 19 appears only on vegetation, so it is likely the foliage layer. The layers are not named. ## Tuning slot 3 Slot 3 is `disappears_when_dead_chance`. In 2,308 of the 2,320 matched groups whose preset value is above 0, slot 3 holds that value. Tests: a new `names_flag_bits` test covers both flag words, the shared collide name and root flags taken from a real fragment. `decodes_fragment_physics` now checks `flag_names` and `flag_bits_unnamed` in the JSON.
Groups get flag_names and flag_bits_unnamed, from matching group tuning
to the fragment presets' booleans. The root gets root_flag_names; most
of its bits are "some group has bit X". Tuning slot 3 is the
disappears-when-dead chance.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:22:10 +00:00
github manually merged commit 85bfa77be7 into gh-pr/258/base 2026-11-26 20:22:12 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.