Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More structure updates #539

Merged
merged 5 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions df.buildings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -733,17 +733,13 @@
</class-type>

<struct-type type-name='building_design'>
<int32_t name='architect' ref-target='historical_figure'/>
<int32_t name='unk2' init-value='-1'/>
<int16_t name='design_skill'/>
<int32_t name='builder1' ref-target='historical_figure'/>
<int32_t name='unk5' init-value='-1'/>
<int16_t name='build_skill'/>
<int16_t name='build_timer1' comment='+1 per 10 frames while building'/>
<int32_t name='builder2' ref-target='historical_figure'/>
<int16_t name='build_timer2'/>
<enum base-type='int16_t' name='quality1' type-name='item_quality'/>
<enum base-type='int16_t' name='quality2' type-name='item_quality'/>
<bitfield name='flags' base-type='uint32_t'>
<flag-bit name='rough' comment='rough gabbro road'/>
<flag-bit name='built'/>
Expand Down Expand Up @@ -1260,10 +1256,8 @@
</struct-type>

<class-type type-name='building_weaponrackst' inherits-from='building_actual'>
<int16_t name='unk_c0'/>

<stl-vector name='squads' pointer-type='building_squad_use'/>
<!-- removed in 50.02 <int32_t name='specific_squad' ref-target='squad'/> -->
<int16_t name='rack_flags'/>
<int32_t name='specific_squad' ref-target='squad'/>
</class-type>

<class-type type-name='building_wellst' inherits-from='building_actual'>
Expand Down
94 changes: 28 additions & 66 deletions df.creature-raws.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1137,15 +1137,19 @@
<stl-vector type-name='int16_t' name="sense_creature_class_3"/>
<stl-vector type-name='int16_t' name="sense_creature_class_4"/>
<stl-vector type-name='int16_t' name="sense_creature_class_5"/>

<pointer name='caste_graphics' type-name='creature_raw_graphics'/>
<pointer name='unk_v50_4300'/>
</struct-type>

<enum-type type-name='creature_graphics_role'>
<enum-item name='DEFAULT'/>
<enum-item name='ADVENTURER'/>
<enum-item name='GUARD'/>
<enum-item name='ROYALGUARD'/>
<enum-item name='LAW_ENFORCE'/>
<enum-item name='TAX_ESCORT'/>
<enum-item name='ANIMATED'/>
<enum-item name='ADVENTURER'/>
<enum-item name='GHOST'/>
<enum-item name='CORPSE'/>
</enum-type>

<enum-type type-name='tissue_style_type' base-type='int16_t'>
Expand All @@ -1156,15 +1160,27 @@
<enum-item name='CLEAN_SHAVEN'/>
</enum-type>

<struct-type type-name='creature_graphics_appointment' key-field='token'>
<stl-string name='token'/>
<struct-type type-name='creature_raw_graphics'>
<static-array name='creature_texture_texpos' count='2'><static-array count='7' index-enum='creature_graphics_role'><static-array count='3'><static-array type-name='int32_t' count='2'/></static-array></static-array></static-array>
<static-array name='creature_texture_add_color' type-name='bool' count='7' index-enum='creature_graphics_role'/>
<static-array name='creature_texture_unk' count='2'><static-array type-name='int32_t' count='7' index-enum='creature_graphics_role'/></static-array>

<static-array name='entity_link_texpos' count='2'><static-array count='18' index-enum='histfig_entity_link_type'><static-array count='7' index-enum='creature_graphics_role'><static-array count='3'><static-array count='2' type-name='int32_t'/></static-array></static-array></static-array></static-array>
<static-array name='entity_link_add_color' count='18' index-enum='histfig_entity_link_type'><static-array type-name='bool' count='7' index-enum='creature_graphics_role'/></static-array>
<static-array name='entity_link_unk' count='2'><static-array count='18' index-enum='histfig_entity_link_type'><static-array type-name='int32_t' count='7' index-enum='creature_graphics_role'/></static-array></static-array>

<static-array name='site_link_texpos' count='2'><static-array count='10' index-enum='histfig_site_link_type'><static-array count='7' index-enum='creature_graphics_role'><static-array count='3'><static-array count='2' type-name='int32_t'/></static-array></static-array></static-array></static-array>
<static-array name='site_link_add_color' count='10' index-enum='histfig_site_link_type'><static-array type-name='bool' count='7' index-enum='creature_graphics_role'/></static-array>
<static-array name='site_link_unk' count='2'><static-array count='10' index-enum='histfig_site_link_type'><static-array type-name='int32_t' count='7' index-enum='creature_graphics_role'/></static-array></static-array>

<static-array name='texpos' type-name='int32_t'
count='6' index-enum='creature_graphics_role'/>
<static-array name='texpos_gs' type-name='int32_t'
count='6' index-enum='creature_graphics_role'/>
<static-array name='add_color' type-name='bool'
count='6' index-enum='creature_graphics_role'/>
<static-array name='profession_texpos' count='2'><static-array count='135' index-enum='profession'><static-array count='7' index-enum='creature_graphics_role'><static-array count='3'><static-array count='2' type-name='int32_t'/></static-array></static-array></static-array></static-array>
<static-array name='profession_add_color' count='135' index-enum='profession'><static-array type-name='bool' count='7' index-enum='creature_graphics_role'/></static-array>
<static-array name='profession_unk' count='2'><static-array count='135' index-enum='profession'><static-array type-name='int32_t' count='7' index-enum='creature_graphics_role'/></static-array></static-array>

<static-array name='ptr_unk' count='2'><static-array type-name='pointer' count='7' index-enum='creature_graphics_role'/></static-array>

<static-array name='vec_unk' count='810'><stl-vector type-name='int32_t'/></static-array>
<static-array name='profession_vec_unk' count='135' index-enum='profession'><stl-vector type-name='int32_t'/></static-array>
</struct-type>

<struct-type type-name='tissue_style_raw' key-field='id'>
Expand Down Expand Up @@ -1226,61 +1242,7 @@

<df-flagarray name='flags' index-enum='creature_raw_flags'/>

<pointer name='graphics' comment='pointer is to an object of size 0x158b0'/>
<!-- replaced with above in 50.01
<compound name='graphics'>
<static-array name='texpos' type-name='int32_t'
count='6' index-enum='creature_graphics_role'/>
<static-array name='texpos_gs' type-name='int32_t'
count='6' index-enum='creature_graphics_role'/>

<static-array name='entity_link_texpos'
count='6' index-enum='creature_graphics_role'>
<static-array count='18' type-name='int32_t' index-enum='histfig_entity_link_type'/>
</static-array>
<static-array name='entity_link_texpos_gs'
count='6' index-enum='creature_graphics_role'>
<static-array count='18' type-name='int32_t' index-enum='histfig_entity_link_type'/>
</static-array>

<static-array name='site_link_texpos'
count='6' index-enum='creature_graphics_role'>
<static-array count='10' type-name='int32_t' index-enum='histfig_site_link_type'/>
</static-array>
<static-array name='site_link_texpos_gs'
count='6' index-enum='creature_graphics_role'>
<static-array count='10' type-name='int32_t' index-enum='histfig_site_link_type'/>
</static-array>

<static-array name='profession_texpos'
count='6' index-enum='creature_graphics_role'>
<static-array type-name='int32_t' index-enum='profession'/>
</static-array>
<static-array name='profession_texpos_gs'
count='6' index-enum='creature_graphics_role'>
<static-array type-name='int32_t' index-enum='profession'/>
</static-array>

<static-array name='add_color' type-name='bool'
count='6' index-enum='creature_graphics_role'/>

<static-array name='entity_link_add_color'
count='6' index-enum='creature_graphics_role'>
<static-array count='18' type-name='bool' index-enum='histfig_entity_link_type'/>
</static-array>

<static-array name='site_link_add_color'
count='6' index-enum='creature_graphics_role'>
<static-array count='10' type-name='bool' index-enum='histfig_site_link_type'/>
</static-array>

<static-array name='profession_add_color'
count='6' index-enum='creature_graphics_role'>
<static-array type-name='bool' index-enum='profession'/>
</static-array>

<stl-vector name='appointments' pointer-type='creature_graphics_appointment'/>
</compound> -->
<pointer name='graphics' type-name='creature_raw_graphics'/>

<stl-vector name='speech1' type-name='int8_t'/>
<stl-vector name='speech2' type-name='int32_t'/>
Expand Down
42 changes: 19 additions & 23 deletions df.entities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,11 @@

<int32_t name='next_assignment_id'/>

<stl-vector name='unk_v40_1' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='unk_v40_2' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='unk_v40_3' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='unk_v40_4' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='unk_v40_5' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='possible_evaluate' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='possible_succession' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='possible_appointable' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='possible_elected' pointer-type='entity_position_assignment' since='v0.40.01'/>
<stl-vector name='possible_claimable' pointer-type='entity_position_assignment' since='v0.40.01'/>
</compound>

<compound name='tissue_styles'>
Expand All @@ -651,13 +651,14 @@

<stl-vector name='squads' type-name='int32_t' ref-target='squad'/>

<compound name='unknown1d' comment='related to founding sites?'>
<int32_t name='year' init-value='-1'/>
<stl-vector name='unk43' type-name='int32_t' comment='empty'/>
<int32_t name='unk44'/>
<int32_t name='unk44a' since='v0.34.01' comment='appears to be a class with a constructor?'/>
<static-array name='unk44b' count='15' type-name='int32_t' since='v0.34.01'/>
</compound>
<int32_t name='global_event_knowledge_year' init-value='-1'/>
<stl-vector name='local_known_events' comment='since the above year' type-name='int32_t' ref-target='history_event'/>
<int32_t name='production_zone_id' comment='not sure what this refers to'/>
<bitfield name='conquered_site_group_flags' since='v0.34.01' comment='actually lives inside a class'>
<flag-bit name='harsh' comment='will TORTURE_FOR_INFORMATION'/>
<flag-bit name='hostile_occupation'/>
</bitfield>
<static-array name='worldgen_can_make_guildhall' count='15' index-enum='town_labor_type' type-name='int32_t' since='v0.34.01'/>

<pointer name='training_knowledge' since='v0.34.06'>
<stl-vector name="level" index-refers-to='(find-instance $creature_raw $)'>
Expand Down Expand Up @@ -762,7 +763,7 @@
<stl-vector name='gloves_over' type-name='int16_t' ref-target='itemdef_glovesst'/>
<stl-vector name='gloves_cover' type-name='int16_t' ref-target='itemdef_glovesst'/>
</compound>
<static-array name='assignments_by_type' count='42'
<static-array name='assignments_by_type' count='43'
index-enum='entity_position_responsibility'>
<stl-vector pointer-type='entity_position_assignment'/>
</static-array>
Expand All @@ -779,13 +780,12 @@
comment='includes self'/>

<compound name='unknown2'>
<!-- <int32_t name='metal_proficiency'
comment='best IMPACT_FRACTURE/10000 + MAX_EDGE/1000 for weapon mats plus best IMPACT_FRACTURE/10000 for armor mats'/> -->
<int32_t name='metal_proficiency'
comment='best IMPACT_FRACTURE/10000 + MAX_EDGE/1000 for weapon mats plus best IMPACT_FRACTURE/10000 for armor mats'/>
<stl-vector name='weapon_proficiencies' type-name='job_skill'/>

<pointer name='resource_allotment' type-name='resource_allotment_data' comment="Only for SiteGovernment, but not all"/>
<stl-vector name='unk_1' since='v0.42.01' pointer-type='poetic_form'/>
<int32_t comment='this may be metal_proficiency'/>
<stl-vector name='unk_2' since='v0.42.01' pointer-type='musical_form'/>
<stl-vector name='unk_3' since='v0.42.01' pointer-type='dance_form'/>
<stl-vector name='unk_4' since='v0.42.01' pointer-type='written_content'/>
Expand All @@ -796,11 +796,6 @@
<pointer name='region' type-name='world_region' has-bad-pointers='true'/> -- Civ entities. Non pointers for sites.
<int32_t name='unk16' comment='uninitialized'/>
<int16_t name='unk17' comment='0'/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>

<stl-vector name='unk18' type-name='int32_t' comment='used during world gen'/>
<stl-vector name='unk19' type-name='int16_t' comment='used during world gen'/>
Expand Down Expand Up @@ -958,7 +953,8 @@
<stl-vector name='appointed_by_civ' type-name='int32_t' ref-target='historical_entity'/>
<stl-vector name='succession_by_position' type-name='int32_t'/>

<static-array type-name='bool' name='responsibilities' count='42' index-enum='entity_position_responsibility'/>
<static-array type-name='bool' name='responsibilities' count='43' index-enum='entity_position_responsibility'/>
<stl-string name='unk_v50_358'/>
<static-array type-name='int16_t' name='color' count='3'/>

<int32_t name='required_boxes'/>
Expand Down Expand Up @@ -1344,7 +1340,7 @@
<stl-vector type-name='int32_t' name='entity_ids' ref-target='historical_entity'/>
<stl-vector name='unk_1'>
<pointer>
<int32_t name='unk_1'/>
<enum type-name='history_event_reason' name='reason'/>
<int32_t name='unk_2'/>
<int32_t name='year'/>
<int32_t name='tick'/>
Expand Down
7 changes: 4 additions & 3 deletions df.entity-raws.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@
<stl-vector name='positions' pointer-type='entity_position_raw'/>

<static-array name='variable_positions' type-name='int8_t'
index-enum='entity_position_responsibility' count='42'/>
index-enum='entity_position_responsibility' count='43'/>

<static-array name='site_variable_positions' type-name='int8_t'
index-enum='entity_position_responsibility' count='42'/>
index-enum='entity_position_responsibility' count='43'/>

<stl-vector name='tissue_styles'>
<pointer>
Expand Down Expand Up @@ -435,6 +435,7 @@
<enum-item name='MAINTAIN_ROADS'/>
<enum-item name='MAINTAIN_BRIDGES'/>
<enum-item name='MAINTAIN_TUNNELS'/>
<enum-item name='DELIVER_MESSAGES'/>
</enum-type>

<struct-type type-name='entity_position_raw'>
Expand Down Expand Up @@ -484,7 +485,7 @@
<stl-vector name='succession_by_position_str' pointer-type='stl-string'/>
<stl-vector name='succession_by_position' type-name='int32_t'/>

<static-array type-name='bool' name='responsibilities' count='42' index-enum='entity_position_responsibility'/>
<static-array type-name='bool' name='responsibilities' count='43' index-enum='entity_position_responsibility'/>
<static-array type-name='int16_t' name='color' count='3'/>

<int32_t name='required_boxes'/>
Expand Down
10 changes: 0 additions & 10 deletions df.jobs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,6 @@
<bool name='on'/>
</struct-type>

<enum-type type-name='guild_id' base-type='int16_t'>
<enum-item name='None' value='-1'/>
<enum-item name='Miners'/>
<enum-item name='Carpenters'/>
<enum-item name='Masons'/>
<enum-item name='Metalsmiths'/>
<enum-item name='Jewelers'/>
<enum-item name='Craftsmen'/>
</enum-type>

<struct-type type-name='mandate'>
<pointer name='unit' type-name='unit'/>

Expand Down
Loading