Skip to content

Commit

Permalink
Identify remaining "unk" fields
Browse files Browse the repository at this point in the history
  • Loading branch information
quietust committed Jun 21, 2024
1 parent 8ff343a commit 975d205
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 82 deletions.
100 changes: 56 additions & 44 deletions df.creature-raws.xml
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@
</enum-type>

<enum-type type-name='habit_type' base-type='int16_t'> bay12: HabitType
<enum-item name='NONE' value='-1'/>
<enum-item name='GRIND_BONE_MEAL'/>
<enum-item name='COOK_BLOOD'/>
<enum-item name='GRIND_VERMIN'/>
Expand All @@ -847,6 +848,27 @@
<enum-item name='GIANT_NEST'/>
</enum-type>

<enum-type type-name='creature_sound_type' base-type='int16_t'> bay12: CreatureSoundType
<enum-item name='NONE' value='-1'/>
<enum-item name='ALERT'/>
<enum-item name='PEACEFUL_INTERMITTENT'/>
</enum-type>

<enum-type type-name='creature_sound_method_type' base-type='int16_t'> bay12: CreatureSoundMethodType
<enum-item name='NONE' value='-1'/>
<enum-item name='VOCALIZATION'/>
</enum-type>

<struct-type type-name='creature_soundst'>
<enum name='type' type-name='creature_sound_type'/>
<int32_t name='range' init-value='100'/>
<int32_t name='period' init-value='1000'/>
<enum name='method' type-name='creature_sound_method_type'/>
<stl-string name='verb_2nd'/>
<stl-string name='verb_3rd'/>
<stl-string name='noun'/>
</struct-type>

<struct-type type-name='caste_raw' original-name='creature_castest'>
<stl-string name='caste_id'/> bay12: string[CreatureCasteStrings]

Expand Down Expand Up @@ -948,7 +970,7 @@
<static-array type-name='int32_t' count='149' index-enum='job_skill'/>
</static-array>

<compound name='attributes'>
<compound name='attributes'> not a compound
<static-array name='phys_att_range' count='6' index-enum='physical_attribute_type'>
<static-array type-name='int32_t' count='7'/>
</static-array>
Expand Down Expand Up @@ -1124,44 +1146,42 @@

<stl-vector name='creature_class' pointer-type='stl-string'/>

<compound name='unknown2'> not actually a compound
<stl-vector name='syndrome_dilution_identifier' pointer-type='stl-string' since='v0.42.01' comment='SYNDROME_DILUTION_FACTOR'/>
<stl-vector name='syndrome_dilution_factor' type-name='int32_t' since='v0.42.01' comment='SYNDROME_DILUTION_FACTOR'/>
<stl-vector name='syndrome_dilution_identifier' pointer-type='stl-string' since='v0.42.01' comment='SYNDROME_DILUTION_FACTOR'/>
<stl-vector name='syndrome_dilution_factor' type-name='int32_t' since='v0.42.01' comment='SYNDROME_DILUTION_FACTOR'/>

<stl-vector name='gobble_vermin_class' pointer-type='stl-string'/>
<stl-vector name='gobble_vermin_creature' pointer-type='stl-string'/>
<stl-vector name='gobble_vermin_caste' pointer-type='stl-string'/>
<stl-vector name='gobble_vermin_class' pointer-type='stl-string'/>
<stl-vector name='gobble_vermin_creature' pointer-type='stl-string'/>
<stl-vector name='gobble_vermin_caste' pointer-type='stl-string'/>

<stl-vector name='infect_all' type-name='int32_t' ref-target='syndrome'
since='v0.34.01' comment='for Injected syndromes'/>
<stl-vector name='infect_local' type-name='int32_t' ref-target='syndrome'
since='v0.34.01' comment='for Contact syndromes'/>
<stl-vector name='infect_inhaled' type-name='int32_t' ref-target='syndrome' since='v0.34.01'/>
<stl-vector name='infect_ingested' type-name='int32_t' ref-target='syndrome' since='v0.34.01'/>
<stl-vector name='infect_all' type-name='int32_t' ref-target='syndrome'
since='v0.34.01' comment='for Injected syndromes'/>
<stl-vector name='infect_local' type-name='int32_t' ref-target='syndrome'
since='v0.34.01' comment='for Contact syndromes'/>
<stl-vector name='infect_inhaled' type-name='int32_t' ref-target='syndrome' since='v0.34.01'/>
<stl-vector name='infect_ingested' type-name='int32_t' ref-target='syndrome' since='v0.34.01'/>

<df-flagarray name='mannerism_flag'/>
<df-flagarray name='mannerism_situation_flag'/>
<df-flagarray name='mannerism_flag'/>
<df-flagarray name='mannerism_situation_flag'/>

<static-array name='armor_sizes' count='4' comment='index by UBSTEP'>
<static-array type-name='int32_t' count='4' comment='index by LBSTEP'/>
</static-array>
<static-array type-name='int32_t' name='pants_sizes' count='4' comment='index by LBSTEP'/>
<int32_t name='helm_size'/>
<static-array type-name='int32_t' name='shield_sizes' count='4' comment='index by UPSTEP'/>
<static-array type-name='int32_t' name='shoes_sizes' count='4' comment='index by UPSTEP'/>
<static-array type-name='int32_t' name='gloves_sizes' count='4' comment='index by UPSTEP'/>

for world generation
<compound name='materials' type-name='material_vec_ref'/>
<stl-vector name='material_states' type-name='matter_state'/>
<stl-vector name='material_small' type-name='int8_t'/>
<stl-vector name='material_butcher_amount' type-name='int32_t'/>
<stl-vector name='material_defining_flag' type-name='int32_t' since='v0.34.01'/>

muscle:
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</compound>
<static-array name='armor_sizes' count='4' comment='index by UBSTEP'>
<static-array type-name='int32_t' count='4' comment='index by LBSTEP'/>
</static-array>
<static-array type-name='int32_t' name='pants_sizes' count='4' comment='index by LBSTEP'/>
<int32_t name='helm_size'/>
<static-array type-name='int32_t' name='shield_sizes' count='4' comment='index by UPSTEP'/>
<static-array type-name='int32_t' name='shoes_sizes' count='4' comment='index by UPSTEP'/>
<static-array type-name='int32_t' name='gloves_sizes' count='4' comment='index by UPSTEP'/>

for world generation
<compound name='worldgen_materials' type-name='material_vec_ref'/>
<stl-vector name='worldgen_material_states' type-name='matter_state'/>
<stl-vector name='worldgen_material_small' type-name='int8_t'/>
<stl-vector name='worldgen_material_butcher_amount' type-name='int32_t'/>
<stl-vector name='worldgen_material_defining_flag' type-name='int32_t' since='v0.34.01'/>

muscle:
<int16_t name='meat_mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='meat_mat_index'/>

<static-array type-name='int32_t' name='habit_num' count='2'/>
<stl-vector name='habit_type' type-name='habit_type'/>
Expand All @@ -1181,15 +1201,7 @@
<stl-vector name='plant_str' pointer-type='stl-string'/>
</compound>

<stl-vector name='sound'>
<pointer> bay12: creature_soundst
<int32_t name='unk_1'/>
<int32_t name='unk_2' init-value='100'/>
<int32_t name='unk_3' init-value='1000'/>
<int32_t name='unk_4'/>
<static-array name='caption' type-name='stl-string' count='3'/>
</pointer>
</stl-vector>
<stl-vector name='sound' pointer-type='creature_soundst'/>
<stl-vector type-name='int32_t' name='sound_alert'/> bay12: vector[CreatureSoundType]
<stl-vector type-name='int32_t' name='sound_peaceful_intermittent'
refers-to='$$._global.sound[$]'/>
Expand Down
2 changes: 1 addition & 1 deletion df.graphics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
<static-array count='3' name='texpos_button_picture_box_sel_highlighted'><static-array type-name='int32_t' count='3'/></static-array>
<static-array count='3' name='texpos_button_picture_box_light'><static-array type-name='int32_t' count='3'/></static-array>
<static-array count='3' name='texpos_button_picture_box_dark'><static-array type-name='int32_t' count='3'/></static-array>
<static-array type-name='int32_t' count='3' name='texpos_unk_v50_06'/>
<static-array type-name='int32_t' count='3' name='texpos_button_picture_box_divider'/>
<static-array count='3' name='texpos_button_add'><static-array type-name='int32_t' count='3'/></static-array>
<static-array count='3' name='texpos_button_add_hover'><static-array type-name='int32_t' count='3'/></static-array>
<static-array count='3' name='texpos_button_add_pressed'><static-array type-name='int32_t' count='3'/></static-array>
Expand Down
24 changes: 12 additions & 12 deletions df.items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -829,34 +829,34 @@

-- BODY COMPONENT

<bitfield-type type-name='body_part_status'>
<bitfield-type type-name='body_part_status'> bay12: UNIT_BP_FLAG_*
<flag-bit name='on_fire'/>
<flag-bit name='missing'/>
<flag-bit name='organ_loss' comment='cyan'/>
<flag-bit name='organ_damage' comment='yellow'/>
<flag-bit name='organ_loss' comment='FUNCTION_LOSS; cyan'/>
<flag-bit name='organ_damage' comment='ANY_FUNCTION_DAMAGE; yellow'/>

<flag-bit name='muscle_loss' comment='red'/>
<flag-bit name='muscle_damage' comment='yellow'/>
<flag-bit name='bone_loss' comment='red'/>
<flag-bit name='bone_damage' comment='yellow'/>
<flag-bit name='bone_loss' comment='STRUCTURE_LOSS; red'/>
<flag-bit name='bone_damage' comment='ANY_STRUCTURE_DAMAGE; yellow'/>

<flag-bit name='skin_damage' comment='brown'/>
<flag-bit name='skin_damage' comment='ANY_DAMAGE; brown'/>
<flag-bit name='motor_nerve_severed'/>
<flag-bit name='sensory_nerve_severed'/>
<flag-bit name='spilled_guts'/>
<flag-bit name='spilled_guts' comment='HAS_POPPED_OUT'/>

<flag-bit name='has_splint'/>
<flag-bit name='has_bandage'/>
<flag-bit name='has_plaster_cast'/>
<flag-bit name='grime' count='3'/>

<flag-bit name='severed_or_jammed'
comment='seen e.g. on ribs smashed by blunt attack, but quickly disappeared'/>
<flag-bit name='under_shell'/>
comment='TEMP_NOT_ATTACHED; seen e.g. on ribs smashed by blunt attack, but quickly disappeared'/>
<flag-bit name='under_shell' comment='RETRACTED'/>

<flag-bit name='is_shell'/>
<flag-bit name='mangled' comment='a wounded body part is described as being mangled beyond recognition when this flag is set'/>
<flag-bit name='unk20' comment='on zombified head'/>
<flag-bit name='is_shell' comment='RETRACT_COVER'/>
<flag-bit name='mangled' comment='PULPED'/>
<flag-bit name='has_pulped_tissue'/>
<flag-bit name='gelded' comment='set on GELDABLE body parts after a unit has been gelded'/>
</bitfield-type>

Expand Down
23 changes: 16 additions & 7 deletions df.meeting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -868,13 +868,22 @@
<int32_t name='sub_type' comment='depends on type. if music: voice index in musical form'/>
<int32_t name='unit_id' ref-target='unit'/>
<int32_t name='histfig_id' ref-target='historical_figure'/>
<int32_t name='unk_act_1'/>
<int32_t name='unk_act_2'/>
<compound name='unk_act_3' type-name='coord'/>
<int32_t name='unk_act_6'/>
<int32_t name='unk_act_7'/>
<int32_t name='unk_act_8'/>
<int32_t name='unk_act_9'/>
<int32_t name='used_item' ref-target='item'/>
<int32_t name='used_building' ref-target='building'/>
<compound name='pos' type-name='coord'/>
<bitfield name='flags' base-type='uint32_t'> bay12: PERFORMANCE_ROLE_FLAG_*
<flag-bit name='adv_can_move'/>
<flag-bit name='was_removed'/>
<flag-bit name='simulating'/>
<flag-bit name='grabbed_item'/>
<flag-bit name='no_item_required'/>
<flag-bit name=''/>
<flag-bit name=''/>
<flag-bit name=''/>
</bitfield>
<int32_t name='roll_sum'/>
<int32_t name='roll_num'/>
<int32_t name='last_roll'/>
</pointer>
</stl-vector>
<compound name='reader_pos_min' type-name='coord2d'/>
Expand Down
8 changes: 6 additions & 2 deletions df.refs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,12 @@
the above are related to army.squads in some way
<stl-vector name='ab_profile' comment="When a single element the first value makes sense as an abstract building related to the entity, but longer lists do not, including numbers larger than the number of abstract buildings">
<pointer> bay12: entity_site_ab_profilest
<int32_t name='unk_1' init-value='-1'/>
<int32_t name='unk_2' comment="1, 2, 5 seen"/>
<int32_t name='id' init-value='-1'/>
<bitfield name='purpose_flag' base-type='uint32_t'> bay12: ENTITY_SITE_AB_PROFILE_FLAG_*
<flag-bit name='residence'/>
<flag-bit name='place_of_worship'/>
<flag-bit name='headquarters'/>
</bitfield>
</pointer>
</stl-vector>
<int32_t name='target_site_x' comment='target site world coordinate x'/>
Expand Down
2 changes: 1 addition & 1 deletion df.ui-menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<stl-vector name='candidates' pointer-type='item'/>
<stl-vector name='candidate_selected' type-name='bool'/>
<stl-vector name='unk_a0' type-name='int16_t'/>
<stl-vector name='level_map' type-name='int16_t' comment='map_block.walkable'/>
<stl-vector name='candidate_enabled' type-name='bool'/>

<int16_t name="count_required"/>
Expand Down
7 changes: 3 additions & 4 deletions df.units.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,9 @@
<int32_t name="swelling"/>
<int32_t name="impaired"/>

exact location unknown:
<int32_t name='unk_v42_1' since='v0.42.01'/>
<int32_t name='unk_v42_2' since='v0.42.01'/>
<int32_t name='unk_v42_3' since='v0.42.01'/>
<int32_t name='last_paralysis' since='v0.42.01'/>
<int32_t name='last_numbness' since='v0.42.01'/>
<int32_t name='last_impaired' since='v0.42.01'/>

This 0-100 percentage is related to cumulative damage. In cases where
multiple axe hacks are necessary for severing a limb, it must reach 100
Expand Down
34 changes: 23 additions & 11 deletions df.world-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,22 @@
<pointer name='wg_site_culture' pointer-type='wg_site_culturest'/>
</struct-type>

<bitfield-type type-name='cultural_identity_entity_flags' base-type='uint32_t'> bay12: CULTURAL_IDENTITY_ENTITY_FLAG_*
<flag-bit name='hostile_occupation'/>
<flag-bit name='part_of_occupation'/>
</bitfield-type>

<enum-type type-name='opinion_collection_type' base-type='int32_t'> bay12: OpinionCollectionType
<enum-item name='NONE' value='-1'/>
<enum-item name='PRO_OCCUPATION'/>
<enum-item name='NEUTRAL_TO_OCCUPATION'/>
<enum-item name='AGAINST_OCCUPATION'/>
<enum-item name='PART_OF_OCCUPATION'/>
<enum-item name='PRO_RULER'/>
<enum-item name='NEUTRAL_TO_RULER'/>
<enum-item name='AGASINT_RULER'/>
</enum-type>

<struct-type type-name='cultural_identity' original-name='cultural_identityst' key-field='id'
instance-vector='$global.world.cultural_identities.all'>
<int32_t name="id"/>
Expand All @@ -697,17 +713,13 @@
<int32_t name='start_tick' init-value='-1'/>
<int32_t name='end_year' init-value='-1' comment='when the group left the culture, or -1 if it has not left'/>
<int32_t name='end_tick' init-value='-1'/>
<int32_t name='unk_14' init-value='-1' comment='copy of start_year'/>
<int32_t name='unk_18' init-value='-1' comment='copy of start_tick'/>
<enum name='join_type'>
<enum-item name='Peaceful'/>
<enum-item name='CompleteTakeOver' comment='The previous group left the culture.'/>
<enum-item name='TakeOver' comment="The previous group's end_year is still -1."/>
</enum>
<int32_t name="unk_20"/>
<stl-vector name="unk_24" type-name="int32_t"/>
<stl-vector name='unk_34' type-name='int32_t' comment='same length as unk_24; elements always sum to 10000'/>
<int32_t name="unk_44" init-value='100'/>
<int32_t name='contact_year' init-value='-1'/>
<int32_t name='contact_tick' init-value='-1'/>
<bitfield name='flag' type-name='cultural_identity_entity_flags'/>
<bitfield name='former_flag' type-name='cultural_identity_entity_flags'/>
<stl-vector name="opinion_collection" type-name="opinion_collection_type"/>
<stl-vector name='opinion_collection_weight' type-name='int32_t' comment='same length as unk_24; elements always sum to 10000'/>
<int32_t name="perceived_strength" init-value='100'/>
</pointer>
</stl-vector>
<static-array name='ethic' count='22' type-name='ethic_response' index-enum='ethic_type'/>
Expand Down

0 comments on commit 975d205

Please sign in to comment.