Skip to content

Commit

Permalink
Update unit with more details
Browse files Browse the repository at this point in the history
  • Loading branch information
quietust committed Dec 20, 2017
1 parent 63da142 commit c531a09
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 36 deletions.
4 changes: 3 additions & 1 deletion df.military.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@

<struct-type type-name='army_controller_sub4'>
<int32_t/>
<int32_t/>
<bitfield name='unk_2'>
<flag-bit name='not_sleeping' comment='set to 1 to make army wake up'/>
</bitfield>
</struct-type>

<struct-type type-name='army_controller_sub5'>
Expand Down
129 changes: 94 additions & 35 deletions df.units.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<flag-bit name='exit_vehicle2' comment='trapavoid'/>
<flag-bit name='dangerous_terrain'/>
<flag-bit name='adv_yield'/>
<flag-bit name='unk23'/>
<flag-bit name='vision_cone_set'/>

<flag-bit name='unk24'/>
<flag-bit name='emotionally_overloaded' since='v0.40.01'/>
Expand Down Expand Up @@ -582,6 +582,7 @@
<int32_t name='patrol_cooldown'/>
<int32_t name='patrol_timer'/>

<!-- <compound name='uniform' comment='confirmed from disassembly'> -->
<int16_t name='cur_uniform'/>

<stl-vector name='unk_items' type-name='int32_t'
Expand All @@ -597,14 +598,15 @@

<stl-vector name='uniform_pickup' type-name='int32_t' ref-target='item'/>
<stl-vector name='uniform_drop' type-name='int32_t' ref-target='item'/>
<!-- </compound> -->

<stl-vector name='individual_drills' type-name='int32_t' ref-target='activity_entry'/>
</compound>

<stl-vector name='social_activities' type-name='int32_t' ref-target='activity_entry'/>
<stl-vector type-name='int32_t' since='v0.40.01'/>
<stl-vector name='unk_1d0' type-name='int32_t' since='v0.40.01'/>
<stl-vector name='activities' type-name='int32_t' ref-target='activity_entry'/>
<stl-vector type-name='int32_t' since='v0.40.01'/>
<stl-vector name='unk_1e8' type-name='int32_t' since='v0.40.01'/>

<compound name='animal'>
<compound name='population' type-name='world_population_ref'/>
Expand All @@ -618,7 +620,7 @@
This was used by a vampire scared of cave creatures and doing FleeFromOpponent panic
<int32_t name='unit_id' ref-target='unit' since='v0.40.01'/>
<compound name='unit_pos' type-name='coord' since='v0.40.01'/>
<int32_t since='v0.40.01'/>
<int32_t name='unk_c' since='v0.40.01'/>
</compound>

<enum base-type='int16_t' name='mood' type-name='mood_type' init-value='None'/>
Expand Down Expand Up @@ -811,8 +813,9 @@

<pointer name='attr_change' type-name='curse_attr_change' since='v0.34.01'/>
<uint32_t name='luck_mul_percent' since='v0.34.01' init-value='100'/>
<int32_t since='v0.42.01'/>
<int32_t name='unk_98' since='v0.42.01'/>

<!-- <compound name='interaction' comment='confirmed from disassembly'> -->
<stl-vector name='interaction_id' type-name='int32_t' since='v0.34.01'
ref-target='creature_interaction_effect'/>
<stl-vector name='interaction_time' type-name='int32_t' since='v0.34.01'/>
Expand All @@ -823,6 +826,7 @@
<stl-vector name='own_interaction' type-name='int32_t' since='v0.34.01'
refers-to='$$._global.body.body_plan.interactions[$]'/>
<stl-vector name='own_interaction_delay' type-name='int32_t' since='v0.34.01'/>
<!-- </compound> -->
</compound>

<compound name='counters2'>
Expand Down Expand Up @@ -922,8 +926,8 @@
</compound>

<compound name='unknown7'>
<stl-vector name='unk_7c4'/>
<stl-vector since='v0.34.01'/>
<stl-vector type-name='int32_t' name='unk_7c4'/>
<stl-vector type-name='int32_t' name='unk_c' since='v0.34.01'/>
</compound>

<compound name='syndromes'>
Expand Down Expand Up @@ -958,25 +962,45 @@
index-refers-to='$$._global.caste.ref-target.sound[$]'/>

<pointer name='undead' since='v0.34.01'>
<compound>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int16_t/>
<stl-string/>
<int32_t name='unk_v43_1' since='v0.43.01'/>
<int32_t name='unk_v43_2' since='v0.43.01'/>
</compound>
<int32_t name='unk_1'/>
<int32_t name='unk_2'/>
<int32_t name='unk_3' init-value='-1'/>
<int32_t name='unk_4' init-value='-1'/>
<int32_t name='unk_5'/>
<int16_t name='unk_6'/>
<stl-string name='unk_7'/>
<int32_t name='unk_v43_1' since='v0.43.01'/>
<int32_t name='unk_v43_2' since='v0.43.01'/>
</pointer>
<int32_t name='were_race' ref-target='creature_raw'/>
<int32_t name='were_caste' ref-target='caste_raw' aux-value='$$.were_race'/>
<int32_t name='normal_race' ref-target='creature_raw'/>
<int32_t name='normal_caste' ref-target='caste_raw' aux-value='$$.normal_race'/>
<int32_t name='interaction' refers-to='$$._global.body.body_plan.interactions[$]' since='v0.34.01'/>

<stl-vector name='unk_850'/>
<stl-vector name='unk_850'>
<pointer>
<int32_t name='unk_1'/>
<int32_t name='unk_2'/>
<int16_t name='unk_3'/>
<static-array type-name='unit_attribute' name='physical_attrs' count='6' index-enum='physical_attribute_type'/>
<int16_t name='unk_5'/>
<stl-vector name='unk_6' type-name='int32_t'/>
<stl-vector name='unk_7' type-name='int32_t'/>
<int32_t name='unk_8'/>
<stl-vector name='unk_9' type-name='int16_t'/>
<stl-vector name='unk_10' type-name='int32_t'/>
<stl-vector name='unk_11' type-name='int32_t'/>
<stl-vector name='unk_12' type-name='int32_t'/>
<stl-vector name='unk_13' type-name='int32_t'/>
<df-array name='unk_14' type-name='uint8_t'/>
<int32_t name='unk_15'/>
<int16_t name='unk_16'/>
<stl-vector name='unk_17' type-name='int32_t'/>
<int32_t name='unk_18'/>
<int32_t name='unk_19'/>
</pointer>
</stl-vector>
<stl-vector name='witness_reports'>
<pointer>
<int32_t name='death_id' ref-target='incident'/>
Expand All @@ -995,26 +1019,59 @@
<static-array name='unk_v40_1c' type-name='int32_t' count='10' since='v0.40.01'/>
<static-array name='unk_v40_1d' type-name='int32_t' count='10' since='v0.40.01'/>
<static-array name='unk_v40_1e' type-name='int32_t' count='10' since='v0.40.01'/>
<static-array name='unk_v40_2' type-name='int32_t' count='20' since='v0.40.01'/>
<static-array type-name='int32_t' count='180' since='v0.40.24'/>
<static-array name='unk_v40_2' type-name='int32_t' count='200' since='v0.40.01'/>
<int32_t name='unk_v40_2_count' since='v0.40.01'/>
<pointer since='v0.40.01'/>
<pointer since='v0.40.01'/>
<int32_t since='v0.40.01'/>
<int32_t since='v0.40.01'/>
<int32_t since='v0.40.01'/>
<pointer name='unk_448' since='v0.40.01'>
<int32_t/>
<int32_t/>
<int32_t/>
<compound name='unk'>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t comment='not saved'/>
</compound>
</pointer>
<pointer name='unk_44c' since='v0.40.01'>
<int32_t/>
<int32_t/>
<int16_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<static-array type-name='int32_t' count='20'/>
<static-array type-name='int32_t' count='20'/>
<int16_t/>
<int16_t/>
<int32_t/>
<int32_t/>
</pointer>
<int32_t name='unk_450' since='v0.40.01'/>
<int32_t name='unk_454' since='v0.40.01'/>
<int32_t name='army_controller_id' ref-target='army_controller' since='v0.40.01'/>
<compound name='unk_v40_sub3' since='v0.40.01'>
<int32_t since='v0.40.01'/>
<pointer since='v0.40.01'/>
<stl-vector since='v0.40.01'/>
<stl-vector since='v0.40.01'/>
<stl-vector type-name='int32_t' since='v0.40.01'/>
<pointer>
<pointer name='controller' type-name='army_controller' since='v0.40.01'/>
<pointer name='unk_2' since='v0.40.01'>
<stl-vector name='unk_1' type-name="int32_t"/>
<stl-vector name='unk_2' type-name="int32_t"/>
<stl-vector name='unk_3' type-name="int32_t"/>
<stl-vector name='unk_4' type-name="int32_t"/>
</pointer>
<stl-vector name='unk_3' type-name='int32_t' since='v0.40.01'/>
<stl-vector name='unk_4' type-name='int32_t' since='v0.40.01'/>
<stl-vector name='unk_5' type-name='int32_t' since='v0.40.01'/>
<pointer name='unk_6'>
<stl-vector name="unk_0" type-name="int32_t"/>
<stl-vector name="unk_10" type-name="int32_t"/>
</pointer>

<pointer since='v0.42.01'>
<pointer name='unk_7' since='v0.42.01'>
<stl-vector name='unk_sub1'>
<pointer>
<int32_t name='unk_sub1_1'/>
Expand All @@ -1038,7 +1095,7 @@
</pointer>
</compound>

<int32_t name='enemy_status_slot' init-value='-1'/>
<int32_t name='enemy_status_slot' init-value='-1' comment='also combat_side_id'/>
<int32_t name='unk_v4206_1'/>
<int32_t name='unk_874_cntr'/> // age ? incremented every tick

Expand All @@ -1065,7 +1122,9 @@

<stl-vector name='burrows' type-name='int32_t' ref-target='burrow'/>

<int32_t name='combat_side_id'/>
<pointer name='vision_cone'>
<static-array count='21'><static-array type-name='int8_t' count='21'/></static-array>
</pointer>
<stl-vector name='occupations' pointer-type='occupation' since='v0.42.01'/>
<stl-string name='adjective' comment='from physical descriptions for use in adv'/>
</struct-type>
Expand Down

0 comments on commit c531a09

Please sign in to comment.