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

assorted canonicalizations #720

Merged
merged 14 commits into from
Mar 3, 2024
4 changes: 2 additions & 2 deletions df.buildings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@

<vmethod name='updateItems'/>
<vmethod name='updateTempFromTile'><uint16_t name='temp'/><bool/><bool/></vmethod>
<vmethod ret-type='bool' name='isNormalFurniture'/>
<vmethod ret-type='bool' name='isNormalFurniture' comment='bay12: item_determines_building_pic'/>
<vmethod ret-type='bool' name='isFarmPlot'/>
<vmethod name='getWorkshopProfile'>
<ret-type><pointer type-name='workshop_profile'/></ret-type>
Expand Down Expand Up @@ -454,7 +454,7 @@
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod ret-type='bool' name='isImpassableAtCreation'
comment='the true set looks like things where the unit should stand aside'/>
comment='bay12: perimdestroyer; the true set looks like things where the unit should stand aside'/>

<vmethod name='categorize' comment='Add to world.buildings.other.*'> <bool name='in_play'/> </vmethod>
<vmethod name='uncategorize' comment='Remove from world.buildings.other.*'/>
Expand Down
56 changes: 30 additions & 26 deletions df.entities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,13 @@
<enum-item name='Domesticated'/>
</enum-type>

<enum-type type-name='entity_position_flags'>
<enum-item name='IS_LAW_MAKER'/>
<enum-type type-name='entity_position_flags' comment='bay12: EntityPositionFlag'>
<enum-item name='IS_LAW_MAKER' comment='bay12: ATTACK_IS_TREASON'/>
<enum-item name='ELECTED'/>
<enum-item name='DUTY_BOUND'/>
<enum-item name='MILITARY_SCREEN_ONLY'/>
<enum-item name='GENDER_MALE'/>
<enum-item name='GENDER_FEMALE'/>
<enum-item name='GENDER_MALE' comment='bay12: FORCED_GENDER_MALE'/>
<enum-item name='GENDER_FEMALE' comment='bay12: FORCED_GENDER_FEMALE'/>
<enum-item name='SUCCESSION_BY_HEIR'/>
<enum-item name='HAS_RESPONSIBILITIES'/>

Expand All @@ -903,27 +903,27 @@
<enum-item name='CHAT_WORTHY'/>
<enum-item name='DO_NOT_CULL'/>
<enum-item name='KILL_QUEST'/>
<enum-item name='IS_LEADER'/>
<enum-item name='IS_DIPLOMAT'/>
<enum-item name='IS_LEADER' comment='bay12: ADD_CONV_SKILLS_AT_WORLD_GEN'/>
<enum-item name='IS_DIPLOMAT' comment='bay12: DIPLOMATIC_DRAFT_AVOIDANCE'/>
<enum-item name='EXPORTED_IN_LEGENDS'/>

<enum-item name='DETERMINES_COIN_DESIGN'/>
<enum-item name='ACCOUNT_EXEMPT'/>
<enum-item name='unk_12'/>
<enum-item name='unk_13'/>
<enum-item name='COLOR'/>
<enum-item name='HAS_MET_POP_REQ'/>
<enum-item name='HAS_BEEN_REPLACED'/>
<enum-item name='COLOR' comment='bay12: USE_COLOR'/>
<enum-item name='RULES_FROM_LOCATION'/>
<enum-item name='MENIAL_WORK_EXEMPTION'/>
<enum-item name='MENIAL_WORK_EXEMPTION_SPOUSE'/>

<enum-item name='SLEEP_PRETENSION'/>
<enum-item name='PUNISHMENT_EXEMPTION'/>
<enum-item name='unk_1a'/>
<enum-item name='unk_1b'/>
<enum-item name='HAS_RECEIVED_POSITIONS'/>
<enum-item name='ACTIVE'/>
<enum-item name='QUEST_GIVER'/>
<enum-item name='SPECIAL_BURIAL'/>
<enum-item name='REQUIRES_MARKET'/>
<enum-item name='unk_1f'/>
<enum-item name='HAS_MET_MARKET_REQ'/>
</enum-type>

<struct-type type-name='entity_position' key-field='id'>
Expand Down Expand Up @@ -985,30 +985,34 @@
<int32_t name='unk_2' init-value='30001' since='v0.47.01'/>
</struct-type>

<struct-type type-name='entity_position_assignment' key-field='id'>
<int32_t name='id'/>
<struct-type type-name='entity_position_profile_claimst' key-field='hfid'>
<int32_t name='hfid' comment='bay12: local_id is an alias'/>
</struct-type>

<struct-type type-name='entity_position_assignment' key-field='id' original-name='entity_position_profilest'>
<int32_t name='id' comment='bay12: global_id'/>

<code-helper name='describe'>
(describe-obj $.position_id.refers-to)
(awhen $.histfig.ref-target
(describe-obj it))
</code-helper>

<int32_t name='histfig' ref-target='historical_figure'/>
<int32_t name='histfig2' ref-target='historical_figure' since='v0.40.01'/>
<int32_t name='histfig' ref-target='historical_figure' comment='bay12: holder_hfid'/>
<int32_t name='histfig2' ref-target='historical_figure' since='v0.40.01' comment='bay12: last_holder_hfid'/>
<int32_t name='position_id'
refers-to='(find-by-id $$._global._parent._global.positions.own $id $)'
comment='position within relevant entity'/>
<int32_t name='position_vector_idx' init-value='-1'/>

<df-flagarray name='flags'/>
<int32_t name='squad_id' ref-target='squad'/>
<int32_t name='unk_1' init-value='-1'/>
<int32_t name='unk_2' init-value='-1'/>
<int32_t name='unk_3' init-value='-1' since='v0.40.01'/>
<int32_t name='unk_4' init-value='-1' since='v0.40.01'/>
<stl-vector name='unk_5' since='v0.40.01' comment='not saved'/>
<int32_t name='unk_6' since='v0.47.01' comment='unknown size, not initialized or saved'/>
<int32_t name='position_vector_idx' init-value='-1' comment='bay12: position_cache_index'/>

<df-flagarray name='flags' comment='bay12: flag'/>
<int32_t name='squad_id' ref-target='squad' comment='bay12: leads_squad_id'/>
<int32_t name='st_id' init-value='-1'/>
<int32_t name='ab_id' init-value='-1'/>
<int32_t name='vassal_of_entity_id' init-value='-1' since='v0.40.01'/>
<int32_t name='vassal_of_position_profile_id' init-value='-1' since='v0.40.01'/>
<stl-vector name='claim' pointer-type='entity_position_profile_claimst' since='v0.40.01' comment='not saved'/>
<int32_t name='assigned_army_controller_id' since='v0.47.01' comment='unknown size, not initialized or saved'/>
</struct-type>

<enum-type type-name='entity_material_category' base-type='int16_t'>
Expand Down
162 changes: 86 additions & 76 deletions df.history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,91 @@
<int32_t name='year_tick' since='v0.42.01' init-value='-1'/>
</struct-type>

<struct-type type-name='knowledge_profilest'>
<stl-vector name='known_secrets' pointer-type='interaction' comment="bay12: interation_ptr; Interactions inflicted upon the figure through an I_SOURCE:SECRET means are recorded here; this appears to prevent the interaction from affecting the figure again on subsequent exposure (when rereading a necromancy slab, for example). For interactions with both I_SOURCE:SECRET and another source (I_SOURCE:INGESTION, for example), exposure to the interaction through the non-secret route does not result in the interaction being listed here."/>
<int32_t name='next_intervention_resistance_year' init-value='-1' comment="All are gods with the DEATH sphere having created slabs, but the value isn't the id of the slab"/>
<stl-vector name='known_written_contents' type-name='int32_t' ref-target='written_content' comment="bay12: read_written_content_id; ID of written_contents known to the historical figure. Aside from the contents of read books, these so-called written contents also include known derivations of poetic forms, dance forms and musical forms" since='v0.42.01'/>
<stl-vector name="known_identities" type-name='int32_t' ref-target='identity' comment="bay12: identity_known_id; identity ID of identities known to the historical figure, such as demon true names"/>
<stl-vector name='known_witness_reports' pointer-type='witness_incidentst' comment='bay12: witness_incident'/>
<!-- compound rumor_infost -->
<stl-vector name='known_events' pointer-type='entity_event'/>
<!-- end compound rumor_infost -->
<stl-vector name='heard_of_guide_hfid' type-name='int32_t'/>
<stl-vector name='heard_of_stid' type-name='int32_t'/>
<compound name='opinion_info' comment='bay12: type is opinion_infost'>
<stl-vector name='entity_id' type-name='int32_t' comment="same length as next vector. Some are definitely entities (e.g. player fortress or attacker site government), but others make no such sense"/>
<stl-vector name='entity_opinion' type-name='int32_t' comment="5, 7, 8 seen. 7/8 only seen on humanoid experiments"/>
</compound>
<stl-vector name='creature_knowledge'>
<pointer>
<!-- creature_knowledgest -->
<int32_t name='unk_1'/>
<int32_t name='unk_2'/>

<stl-vector name='unk_3' type-name='int32_t'/>
<stl-vector name='unk_4' type-name='int32_t'/>
<stl-vector name='unk_5' type-name='int32_t'/>

<int32_t name='unk_6' since='v0.42.01'/>
</pointer>
</stl-vector>
<stl-vector name="known_poetic_forms" type-name='int32_t' ref-target='poetic_form' since='v0.42.01' comment='bay12: poetic_form_known_id'/>
<stl-vector name="known_musical_forms" type-name='int32_t' ref-target='musical_form' since='v0.42.01' comment='bay12: musical_form_known_id'/>
<stl-vector name="known_dance_forms" type-name='int32_t' ref-target='dance_form' since='v0.42.01' comment='bay12: dance_form_known_id'/>
<pointer name="knowledge" since='v0.42.01'>
<!-- scholar_knowledgest -->
<bitfield type-name='knowledge_scholar_flags_0' name='philosophy'/>
<bitfield type-name='knowledge_scholar_flags_1' name='philosophy2'/>
<bitfield type-name='knowledge_scholar_flags_2' name='math'/>
<bitfield type-name='knowledge_scholar_flags_3' name='math2'/>
<bitfield type-name='knowledge_scholar_flags_4' name='history'/>
<bitfield type-name='knowledge_scholar_flags_5' name='astronomy'/>
<bitfield type-name='knowledge_scholar_flags_6' name='naturalist'/>
<bitfield type-name='knowledge_scholar_flags_7' name='chemistry'/>
<bitfield type-name='knowledge_scholar_flags_8' name='geography'/>
<bitfield type-name='knowledge_scholar_flags_9' name='medicine'/>
<bitfield type-name='knowledge_scholar_flags_10' name='medicine2'/>
<bitfield type-name='knowledge_scholar_flags_11' name='medicine3'/>
<bitfield type-name='knowledge_scholar_flags_12' name='engineering'/>
<bitfield type-name='knowledge_scholar_flags_13' name='engineering2'/>
<uint32_t name='knowledge_goal_category'/>
<uint32_t name='unk_1'/>
<uint32_t name='unk_2'/>
<uint32_t name='unk_3'/>
<bitfield name='knowledge_goal'>
<flag-bit name='unk0'/>
</bitfield>
<uint32_t name='research_points' comment='research is finished at 100k? amount gained depends on skills, attributes'/>
<uint32_t name='times_pondered' comment='one per ponder no matter what. turns into research_points somewhere around 40-60.'/>
</pointer>
<pointer name='belief_systems' comment="found in prophets; contains the ID of the belief system developed by that particular prophet">
<!-- hf_religious_datast -->
<stl-vector type-name='int32_t' ref-target='belief_system'/>
</pointer>
<pointer name='known_locations'>
<!-- ab_review_infost -->
<stl-vector>
<pointer>
<int32_t name='site_id' ref-target='world_site'/>
<int32_t name='location_id' ref-target='abstract_building' aux-value='$$.site_id'/>
<int32_t name='unk_2' init-value='-1'/>
<int32_t name='unk_3' init-value='-1'/>
<int32_t name='unk_4' init-value='-1'/>
<int32_t name='unk_5' init-value='-1'/>
<int32_t name='unk_6' comment='increases by 10 when eating in a location'/>
<int32_t name='room_quality' comment='15 times the best dfhack_room_quality_level seen when using this room for an activity'/>
<int32_t name='unk_8'/>
<int32_t name='unk_9'/>
<int32_t name='unk_10'/>
<int32_t name='used_as_temple'/>
<int32_t name='used_as_library'/>
<int32_t name='used_as_tavern'/>
</pointer>
</stl-vector>
</pointer>
<stl-vector name='known_agreement_id' type-name='int32_t' since='v0.47.01'/>
</struct-type>

<struct-type type-name='historical_figure_info' original-name='hf_profilest'>
<pointer name="spheres">
<stl-vector name="spheres">
Expand Down Expand Up @@ -246,82 +331,7 @@
</bitfield>
</pointer>

<pointer name='known_info' since='v0.34.01'>
<stl-vector name='known_secrets' pointer-type='interaction' comment="Interactions inflicted upon the figure through an I_SOURCE:SECRET means are recorded here; this appears to prevent the interaction from affecting the figure again on subsequent exposure (when rereading a necromancy slab, for example). For interactions with both I_SOURCE:SECRET and another source (I_SOURCE:INGESTION, for example), exposure to the interaction through the non-secret route does not result in the interaction being listed here."/>
<int32_t name='unk_10' init-value='-1' comment="All are gods with the DEATH sphere having created slabs, but the value isn't the id of the slab"/>
<stl-vector name='known_written_contents' type-name='int32_t' ref-target='written_content' comment="ID of written_contents known to the historical figure. Aside from the contents of read books, these so-called written contents also include known derivations of poetic forms, dance forms and musical forms" since='v0.42.01'/>
<stl-vector name="known_identities" type-name='int32_t' ref-target='identity' comment="identity ID of identities known to the historical figure, such as demon true names"/>
<stl-vector name='known_witness_reports' pointer-type='witness_incidentst'/>
<stl-vector name='known_events' pointer-type='entity_event'/>
<stl-vector name='unk_4' type-name='int32_t'/>
<stl-vector name='unk_5' type-name='int32_t'/>
<stl-vector name='unk_6' type-name='int32_t' comment="same length as next vector. Some are definitely entities (e.g. player fortress or attacker site government), but others make no such sense"/>
<stl-vector name='unk_7' type-name='int32_t' comment="5, 7, 8 seen. 7/8 only seen on humanoid experiments"/>
<stl-vector name='unk_8'>
<pointer>
<int32_t name='unk_1'/>
<int32_t name='unk_2'/>

<stl-vector name='unk_3' type-name='int32_t'/>
<stl-vector name='unk_4' type-name='int32_t'/>
<stl-vector name='unk_5' type-name='int32_t'/>

<int32_t name='unk_6' since='v0.42.01'/>
</pointer>
</stl-vector>
<stl-vector name="known_poetic_forms" type-name='int32_t' ref-target='poetic_form' since='v0.42.01'/>
<stl-vector name="known_musical_forms" type-name='int32_t' ref-target='musical_form' since='v0.42.01'/>
<stl-vector name="known_dance_forms" type-name='int32_t' ref-target='dance_form' since='v0.42.01'/>
<pointer name="knowledge" since='v0.42.01'>
<bitfield type-name='knowledge_scholar_flags_0' name='philosophy'/>
<bitfield type-name='knowledge_scholar_flags_1' name='philosophy2'/>
<bitfield type-name='knowledge_scholar_flags_2' name='math'/>
<bitfield type-name='knowledge_scholar_flags_3' name='math2'/>
<bitfield type-name='knowledge_scholar_flags_4' name='history'/>
<bitfield type-name='knowledge_scholar_flags_5' name='astronomy'/>
<bitfield type-name='knowledge_scholar_flags_6' name='naturalist'/>
<bitfield type-name='knowledge_scholar_flags_7' name='chemistry'/>
<bitfield type-name='knowledge_scholar_flags_8' name='geography'/>
<bitfield type-name='knowledge_scholar_flags_9' name='medicine'/>
<bitfield type-name='knowledge_scholar_flags_10' name='medicine2'/>
<bitfield type-name='knowledge_scholar_flags_11' name='medicine3'/>
<bitfield type-name='knowledge_scholar_flags_12' name='engineering'/>
<bitfield type-name='knowledge_scholar_flags_13' name='engineering2'/>
<uint32_t name='knowledge_goal_category'/>
<uint32_t name='unk_1'/>
<uint32_t name='unk_2'/>
<uint32_t name='unk_3'/>
<bitfield name='knowledge_goal'>
<flag-bit name='unk0'/>
</bitfield>
<uint32_t name='research_points' comment='research is finished at 100k? amount gained depends on skills, attributes'/>
<uint32_t name='times_pondered' comment='one per ponder no matter what. turns into research_points somewhere around 40-60.'/>
</pointer>
<pointer name='belief_systems' comment="found in prophets; contains the ID of the belief system developed by that particular prophet">
<stl-vector type-name='int32_t' ref-target='belief_system'/>
</pointer>
<pointer name='known_locations'>
<stl-vector>
<pointer>
<int32_t name='site_id' ref-target='world_site'/>
<int32_t name='location_id' ref-target='abstract_building' aux-value='$$.site_id'/>
<int32_t name='unk_2' init-value='-1'/>
<int32_t name='unk_3' init-value='-1'/>
<int32_t name='unk_4' init-value='-1'/>
<int32_t name='unk_5' init-value='-1'/>
<int32_t name='unk_6' comment='increases by 10 when eating in a location'/>
<int32_t name='room_quality' comment='15 times the best dfhack_room_quality_level seen when using this room for an activity'/>
<int32_t name='unk_8'/>
<int32_t name='unk_9'/>
<int32_t name='unk_10'/>
<int32_t name='used_as_temple'/>
<int32_t name='used_as_library'/>
<int32_t name='used_as_tavern'/>
</pointer>
</stl-vector>
</pointer>
<stl-vector name='unk_3' type-name='int32_t' since='v0.47.01'/>
</pointer>
<pointer name='known_info' type-name='knowledge_profilest' since='v0.34.01' comment='knowledge_profile'/>

<pointer name='curse' since='v0.34.01'>
<stl-vector name="active_interactions" pointer-type='interaction'/>
Expand Down
Loading
Loading