entities

entities.entity_occasion_info

<struct-type type-name="entity_occasion_info">
  <stl-vector name="occasions" pointer-type="entity_occasion">
    v0.42.01
  </stl-vector>
  <int32_t name="next_occasion_id"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
</struct-type>

entities.entity_occasion

<struct-type type-name="entity_occasion">
  <int32_t name="id"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <compound name="name" type-name="language_name"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t name="event"/>
  <int32_t/>
  <stl-vector name="schedule"
      pointer-type="entity_occasion_schedule"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
</struct-type>

entities.occasion_schedule_type

<enum-type type-name="occasion_schedule_type" base-type="int32_t">
  <enum-item name="DANCE_PERFORMANCE"/>
  <enum-item name="MUSICAL_PERFORMANCE"/>
  <enum-item name="POETRY_RECITAL"/>
  <enum-item name="STORYTELLING"/>
  <enum-item name="DANCE_COMPETITION"/>
  <enum-item name="MUSICAL_COMPETITION"/>
  <enum-item name="POETRY_COMPETITION"/>
  <enum-item name="FOOT_RACE"/>
  <enum-item/>
  <enum-item/>
  <enum-item name="WRESTLING_COMPETITION"/>
  <enum-item name="THROWING_COMPETITION"/>
  <enum-item name="GLADIATORY_COMPETITION"/>
  <enum-item name="PROCESSION"/>
  <enum-item name="CEREMONY"/>
</enum-type>

entities.entity_occasion_schedule

<struct-type type-name="entity_occasion_schedule">
  <enum name="type" base-type="int32_t"
      type-name="occasion_schedule_type"/>
  <int32_t name="reference">
    art form / event / item_type
  </int32_t>
  <int32_t name="reference2">
    item_subtype
  </int32_t>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <stl-vector name="features"
      pointer-type="entity_occasion_schedule_feature"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
</struct-type>

entities.occasion_schedule_feature

<enum-type type-name="occasion_schedule_feature" base-type="int32_t">
  <enum-item/>
  <enum-item/>
  <enum-item name="STORYTELLING"/>
  <enum-item name="POETRY_RECITAL"/>
  <enum-item name="MUSICAL_PERFORMANCE"/>
  <enum-item name="DANCE_PERFORMANCE"/>
  <enum-item/>
  <enum-item name="CRIERS_IN_FRONT"/>
  <enum-item name="ORDER_OF_PRECEDENCE"/>
  <enum-item name="BANNERS"/>
  <enum-item name="IMAGES"/>
  <enum-item/>
  <enum-item/>
  <enum-item name="ACROBATS"/>
  <enum-item name="INCENSE_BURNING"/>
  <enum-item name="COSTUMES"/>
  <enum-item name="CANDLES"/>
  <enum-item name="THE_GIVING_OF_ITEMS"/>
  <enum-item name="THE_SACRIFICE_OF_ITEMS"/>
</enum-type>

entities.entity_occasion_schedule_feature

<struct-type type-name="entity_occasion_schedule_feature">
  <enum name="feature" base-type="int32_t"
      type-name="occasion_schedule_feature"/>
  <int32_t name="reference"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
</struct-type>

entities.entity_activity_statistics

<struct-type type-name="entity_activity_statistics">
  <compound name="food">
    <int32_t name="total"/>
    <int32_t name="meat"/>
    <int32_t name="fish"/>
    <int32_t name="other"/>
    <int32_t name="seeds"/>
    <int32_t name="plant"/>
    <int32_t name="drink"/>
  </compound>
  <static-array name="unit_counts" type-name="int16_t" count="152"
      index-enum="profession"/>
  <int16_t name="population"/>
  <int16_t/>
  <int16_t/>
  <int16_t/>
  <int16_t name="trained_animals"/>
  <int16_t name="other_animals"/>
  <int16_t/>
  <int32_t/>
  <static-array name="item_counts" type-name="int32_t" count="112"
      index-enum="item_type"/>
  <stl-vector name="created_weapons" type-name="int32_t"
      index-refers-to="$global.world.raws.itemdefs.weapons[$]"/>
  <compound name="wealth">
    <int32_t name="total"/>
    <int32_t name="weapons"/>
    <int32_t name="armor"/>
    <int32_t name="furniture"/>
    <int32_t name="other"/>
    <int32_t name="architecture"/>
    <int32_t name="displayed"/>
    <int32_t name="held"/>
    <int32_t name="imported"/>
    <int32_t/>
    <int32_t name="exported"/>
  </compound>
  <static-array name="recent_jobs" count="7">
    <static-array count="260" type-name="int32_t"
        index-enum="job_type"/>
  </static-array>
  <int32_t name="excavated_tiles">
    unhidden, subterranean, and excluding map features
  </int32_t>
  <static-array count="5" type-name="int32_t" name="death_history"/>
  <static-array count="5" type-name="int32_t"
      name="insanity_history"/>
  <static-array count="5" type-name="int32_t"
      name="execution_history"/>
  <static-array count="5" type-name="int32_t"
      name="noble_death_history"/>
  <int32_t name="total_deaths"/>
  <int32_t name="total_insanities"/>
  <int32_t name="total_executions"/>
  <int32_t name="num_artifacts"/>
  <int32_t/>
  <stl-vector name="discovered_creature_foods" type-name="bool"
      index-refers-to="(find-creature $)"/>
  <stl-vector name="discovered_creatures" type-name="bool"
      index-refers-to="(find-creature $)"/>
  <stl-vector name="discovered_plant_foods" type-name="bool"
      index-refers-to="(find-plant-raw $)"/>
  <stl-vector name="discovered_plants" type-name="bool"
      index-refers-to="(find-plant-raw $)">
    allows planting of seeds
  </stl-vector>
  <int16_t name="discovered_water_features"/>
  <int16_t name="discovered_subterranean_features"/>
  <int16_t name="discovered_chasm_features">
    unused since 40d
  </int16_t>
  <int16_t name="discovered_magma_features"/>
  <int16_t name="discovered_feature_layers">
    back in 40d, this counted HFS
  </int16_t>
  <int32_t name="migrant_wave_idx">
    when >= 2, no migrants
  </int32_t>
  <stl-vector name="found_minerals" type-name="int32_t"
      ref-target="inorganic_raw">
    Added after 'you have struck' announcement
  </stl-vector>
  <bitfield name="found_misc">
    <flag-bit name="deep_special"/>
  </bitfield>
</struct-type>

entities.caravan_state

<struct-type type-name="caravan_state">
  <int32_t name="total_capacity"/>
  <int32_t/>
  <enum name="trade_state" base-type="int8_t">
    <enum-item name="None"/>
    <enum-item name="Approaching"/>
    <enum-item name="AtDepot"/>
    <enum-item name="Leaving"/>
  </enum>
  <int8_t name="depot_notified">
    has it warned you that you need a depot
  </int8_t>
  <int16_t name="time_remaining"/>
  <int32_t name="entity" ref-target="historical_entity"/>
  <compound name="activity_stats"
      type-name="entity_activity_statistics"/>
  <bitfield name="flags" base-type="uint32_t">
    <flag-bit name="check_cleanup">
      set each time a merchant leaves the map or dies
    </flag-bit>
    <flag-bit name="casualty"/>
    <flag-bit name="hardship"/>
    <flag-bit name="communicate">
      send data to mountainhomes
    </flag-bit>
    <flag-bit name="seized"/>
    <flag-bit name="offended"/>
    <flag-bit name="announce">
      display merchantintro and merchantexit
    </flag-bit>
  </bitfield>
  <int32_t name="import_value"/>
  <int32_t name="export_value_total"/>
  <int32_t name="export_value_personal">
    excluding foreign-produced items
  </int32_t>
  <int32_t name="offer_value"/>
  <stl-vector name="animals" type-name="int32_t" ref-target="unit"/>
  <pointer type-name="entity_sell_prices" name="sell_prices"/>
  <pointer type-name="entity_buy_prices" name="buy_prices"/>
  <stl-vector name="goods" type-name="int32_t" ref-target="item"/>
  <int32_t/>
  <pointer/>
</struct-type>

entities.entity_buy_prices

<struct-type type-name="entity_buy_prices">
  <pointer type-name="entity_buy_requests" name="items"/>
  <stl-vector type-name="int32_t" name="price"/>
</struct-type>

entities.entity_buy_requests

<struct-type type-name="entity_buy_requests">
  <stl-vector name="item_type">
    <enum base-type="int16_t" type-name="item_type"/>
    guess
  </stl-vector>
  <stl-vector name="item_subtype">
    <int16_t refers-to="(item-subtype-target
        $$._global.item_type[$$._key] $)"/>
    guess
  </stl-vector>
  <stl-vector name="mat_types">
    <int16_t ref-target="material"
        aux-value="$$._parent.mat_indices[$._key]"/>
  </stl-vector>
  <stl-vector name="mat_indices" type-name="int16_t"/>
  <stl-vector name="mat_cats" type-name="job_material_category"/>
  <stl-vector type-name="int8_t" name="priority"/>
</struct-type>

entities.entity_sell_category

<enum-type type-name="entity_sell_category" base-type="int16_t">
  <enum-item name="Leather"/>
  <enum-item name="ClothPlant"/>
  <enum-item name="ClothSilk"/>
  <enum-item name="Crafts"/>
  <enum-item name="Wood"/>
  <enum-item name="MetalBars"/>
  <enum-item name="SmallCutGems"/>
  <enum-item name="LargeCutGems"/>
  <enum-item name="StoneBlocks"/>
  <enum-item name="Seeds"/>
  <enum-item name="Anvils"/>
  <enum-item name="Weapons"/>
  <enum-item name="TrainingWeapons"/>
  <enum-item name="Ammo"/>
  <enum-item name="TrapComponents"/>
  <enum-item name="DiggingImplements"/>
  <enum-item name="Bodywear"/>
  <enum-item name="Headwear"/>
  <enum-item name="Handwear"/>
  <enum-item name="Footwear"/>
  <enum-item name="Legwear"/>
  <enum-item name="Shields"/>
  <enum-item name="Toys"/>
  <enum-item name="Instruments"/>
  <enum-item name="Pets"/>
  <enum-item name="Drinks"/>
  <enum-item name="Cheese"/>
  <enum-item name="Powders"/>
  <enum-item name="Extracts"/>
  <enum-item name="Meat"/>
  <enum-item name="Fish"/>
  <enum-item name="Plants"/>
  <enum-item name="FruitsNuts"/>
  <enum-item name="GardenVegetables"/>
  <enum-item name="MeatFishRecipes"/>
  <enum-item name="OtherRecipes"/>
  <enum-item name="Stone"/>
  <enum-item name="Cages"/>
  <enum-item name="BagsLeather"/>
  <enum-item name="BagsPlant"/>
  <enum-item name="BagsSilk"/>
  <enum-item name="ThreadPlant"/>
  <enum-item name="ThreadSilk"/>
  <enum-item name="RopesPlant"/>
  <enum-item name="RopesSilk"/>
  <enum-item name="Barrels"/>
  <enum-item name="FlasksWaterskins"/>
  <enum-item name="Quivers"/>
  <enum-item name="Backpacks"/>
  <enum-item name="Sand"/>
  <enum-item name="Glass"/>
  <enum-item name="Miscellaneous"/>
  <enum-item name="Buckets"/>
  <enum-item name="Splints"/>
  <enum-item name="Crutches"/>
  <enum-item name="Eggs"/>
  <enum-item name="BagsYarn"/>
  <enum-item name="RopesYarn"/>
  <enum-item name="ClothYarn"/>
  <enum-item name="ThreadYarn"/>
  <enum-item name="Tools"/>
  <enum-item name="Clay"/>
</enum-type>

entities.entity_sell_prices

<struct-type type-name="entity_sell_prices">
  <pointer type-name="entity_sell_requests" name="items"/>
  <static-array count="107" index-enum="entity_sell_category"
      name="price">
    <stl-vector type-name="int32_t"/>
  </static-array>
</struct-type>

entities.entity_sell_requests

<struct-type type-name="entity_sell_requests">
  <static-array count="107" index-enum="entity_sell_category"
      name="priority">
    <stl-vector type-name="int8_t"/>
  </static-array>
</struct-type>

entities.entity_recipe

<struct-type type-name="entity_recipe">
  <int16_t name="subtype" ref-target="itemdef_foodst"/>
  <stl-vector name="item_types">
    <enum base-type="int16_t" type-name="item_type"/>
  </stl-vector>
  <stl-vector name="item_subtypes">
    <int16_t name="item_subtype" refers-to="(item-subtype-target
        $$._parent._parent.item_types[$$._key] $)"/>
  </stl-vector>
  <stl-vector name="mat_types">
    <int16_t ref-target="material"
        aux-value="$$._parent.mat_indices[$._key]"/>
  </stl-vector>
  <stl-vector name="mat_indices" type-name="int16_t"/>
</struct-type>

entities.historical_entity_type

<enum-type type-name="historical_entity_type" base-type="int16_t">
  <enum-item name="Civilization"/>
  <enum-item name="SiteGovernment"/>
  <enum-item name="VesselCrew"/>
  <enum-item name="MigratingGroup"/>
  <enum-item name="NomadicGroup"/>
  <enum-item name="Religion"/>
  <enum-item name="MilitaryUnit"/>
  <enum-item name="Outcast"/>
  <enum-item name="PerformanceTroupe"/>
</enum-type>

entities.historical_entity

<struct-type type-name="historical_entity" key-field="id"
    instance-vector="$global.world.entities.all">
  <enum name="type" base-type="int16_t"
      type-name="historical_entity_type"/>
  <int32_t name="id">
    index in the array
  </int32_t>
  <pointer name="entity_raw" type-name="entity_raw"/>
  <int32_t name="save_file_id">
    changes once has 100 entries
  </int32_t>
  <int16_t name="next_member_idx"/>
  <compound name="name" type-name="language_name"/>
  <int16_t name="race" ref-target="creature_raw"/>
  <bitfield name="flags">
    <flag-bit name="foreign_civ">
      ?
    </flag-bit>
    <flag-bit name="named_civ">
      ?
    </flag-bit>
    <flag-bit name="unk2"/>
    <flag-bit name="unk3"/>
    <flag-bit name="unk4">
      ?
    </flag-bit>
    <flag-bit name="worshipping"/>
  </bitfield>
  <stl-vector name="entity_links" pointer-type="entity_entity_link"/>
  <stl-vector name="site_links" pointer-type="entity_site_link"/>
  <stl-vector name="histfig_ids" type-name="int32_t"
      ref-target="historical_figure"/>
  <stl-vector name="populations" type-name="int32_t"
      ref-target="entity_population">
    1st entry copies to unit.population_id for Adventurer?
  </stl-vector>
  <stl-vector name="nemesis_ids" type-name="int32_t"
      ref-target="nemesis_record"/>
  <compound name="resources">
    <stl-vector name="digger_type" type-name="int16_t"
        ref-target="itemdef_weaponst"/>
    <stl-vector name="weapon_type" type-name="int16_t"
        ref-target="itemdef_weaponst"/>
    <stl-vector name="training_weapon_type" type-name="int16_t"
        ref-target="itemdef_weaponst"/>
    <stl-vector name="armor_type" type-name="int16_t"
        ref-target="itemdef_armorst"/>
    <stl-vector name="ammo_type" type-name="int16_t"
        ref-target="itemdef_ammost"/>
    <stl-vector name="helm_type" type-name="int16_t"
        ref-target="itemdef_helmst"/>
    <stl-vector name="gloves_type" type-name="int16_t"
        ref-target="itemdef_glovesst"/>
    <stl-vector name="shoes_type" type-name="int16_t"
        ref-target="itemdef_shoesst"/>
    <stl-vector name="pants_type" type-name="int16_t"
        ref-target="itemdef_pantsst"/>
    <stl-vector name="shield_type" type-name="int16_t"
        ref-target="itemdef_shieldst"/>
    <stl-vector name="trapcomp_type" type-name="int16_t"
        ref-target="itemdef_trapcompst"/>
    <stl-vector name="toy_type" type-name="int16_t"
        ref-target="itemdef_toyst"/>
    <stl-vector name="instrument_type" type-name="int16_t"
        ref-target="itemdef_instrumentst"/>
    <stl-vector name="siegeammo_type" type-name="int16_t"
        ref-target="itemdef_siegeammost"/>
    <stl-vector name="tool_type" type-name="int16_t"
        ref-target="itemdef_toolst"/>
    <stl-vector type-name="int16_t">
      v0.42.01
    </stl-vector>
    <compound name="metal">
      <compound name="pick" type-name="material_vec_ref"/>
      <compound name="weapon" type-name="material_vec_ref"/>
      <compound name="ranged" type-name="material_vec_ref"/>
      <compound name="ammo" type-name="material_vec_ref"/>
      <compound name="ammo2" type-name="material_vec_ref">
        maybe intended for siege ammo
      </compound>
      <compound name="armor" type-name="material_vec_ref">
        also instruments, toys, and tools
      </compound>
      <compound name="anvil" type-name="material_vec_ref"/>
    </compound>
    <compound name="organic">
      <compound name="leather" type-name="material_vec_ref"/>
      <compound type-name="material_vec_ref">
        v0.42.01
      </compound>
      <compound name="fiber" type-name="material_vec_ref"/>
      <compound name="silk" type-name="material_vec_ref"/>
      <compound name="wool" type-name="material_vec_ref"/>
      <compound name="wood" type-name="material_vec_ref"/>
    </compound>
    <stl-vector name="metals" type-name="int32_t"
        ref-target="inorganic_raw">
      bars
    </stl-vector>
    <stl-vector name="stones" type-name="int32_t"
        ref-target="inorganic_raw">
      boulders and blocks
    </stl-vector>
    <stl-vector name="gems" type-name="int32_t"
        ref-target="inorganic_raw">
      small and large cut
    </stl-vector>
    <compound name="refuse">
      <compound name="bone" type-name="material_vec_ref"/>
      <compound name="shell" type-name="material_vec_ref"/>
      <compound name="pearl" type-name="material_vec_ref"/>
      <compound name="ivory" type-name="material_vec_ref"/>
      <compound name="horn" type-name="material_vec_ref"/>
    </compound>
    <compound name="misc_mat">
      <compound name="others" type-name="material_vec_ref">
        amber and coral
      </compound>
      <compound name="glass" type-name="material_vec_ref"/>
      <compound name="sand" type-name="material_vec_ref"/>
      <compound name="clay" type-name="material_vec_ref"/>
      <compound name="crafts" type-name="material_vec_ref"/>
      <compound name="glass_unused" type-name="material_vec_ref">
        used for vial extracts on embark
      </compound>
      <compound name="barrels" type-name="material_vec_ref">
        also buckets, splints, and crutches
      </compound>
      <compound name="flasks" type-name="material_vec_ref"/>
      <compound name="quivers" type-name="material_vec_ref"/>
      <compound name="backpacks" type-name="material_vec_ref"/>
      <compound name="cages" type-name="material_vec_ref"/>
      <compound name="wood2" type-name="material_vec_ref">
        v0.34.01
      </compound>
      <compound name="rock_metal" type-name="material_vec_ref">
        v0.34.01
      </compound>
      <compound name="booze" type-name="material_vec_ref"/>
      <compound name="cheese" type-name="material_vec_ref"/>
      <compound name="powders" type-name="material_vec_ref"/>
      <compound name="extracts" type-name="material_vec_ref"/>
      <compound name="meat" type-name="material_vec_ref"/>
    </compound>
    <stl-vector name="fish_races" type-name="int32_t"
        ref-target="creature_raw"/>
    <stl-vector name="fish_castes" type-name="int16_t"
        ref-target="caste_raw"
        aux-value="$$._parent.fish_races[$._key]"/>
    <stl-vector name="egg_races" type-name="int32_t"
        ref-target="creature_raw"/>
    <stl-vector name="egg_castes" type-name="int16_t"
        ref-target="caste_raw"
        aux-value="$$._parent.egg_races[$._key]"/>
    <compound name="plants" type-name="material_vec_ref"/>
    <stl-vector name="tree_fruit_plants" type-name="int32_t"
        ref-target="plant_raw"/>
    <stl-vector name="tree_fruit_growths" type-name="int16_t"
        ref-target="plant_growth"
        aux-value="$$._parent.tree_fruit_plants[$._key]"/>
    <stl-vector name="shrub_fruit_plants" type-name="int32_t"
        ref-target="plant_raw"/>
    <stl-vector name="shrub_fruit_growths" type-name="int16_t"
        ref-target="plant_growth"
        aux-value="$$._parent.shrub_fruit_plants[$._key]"/>
    <compound name="seeds" type-name="material_vec_ref"/>
    <compound name="wood_products">
      <stl-vector name="item_type">
        <enum base-type="int16_t" type-name="item_type"/>
      </stl-vector>
      <stl-vector type-name="int16_t" name="item_subtype"/>
      <compound name="material" type-name="material_vec_ref"/>
      lye, charcoal, potash, pearlash, and coke
    </compound>
    <compound name="animals">
      <stl-vector name="pet_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="wagon_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="pack_animal_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="wagon_puller_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="mount_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="minion_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="exotic_pet_races" type-name="int32_t"
          ref-target="creature_raw"/>
      <stl-vector name="pet_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.pet_races[$._key]"/>
      <stl-vector name="wagon_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.wagon_races[$._key]"/>
      <stl-vector name="pack_animal_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.pack_animal_races[$._key]"/>
      <stl-vector name="wagon_puller_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.wagon_puller_races[$._key]"/>
      <stl-vector name="mount_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.mount_races[$._key]"/>
      <stl-vector name="minion_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.minion_races[$._key]"/>
      <stl-vector name="exotic_pet_castes" type-name="int16_t"
          ref-target="caste_raw"
          aux-value="$$._parent.unk728_races[$._key]"/>
    </compound>
    <stl-vector name="meat_fish_recipes"
        pointer-type="entity_recipe"/>
    <stl-vector name="other_recipes" pointer-type="entity_recipe"/>
    <static-array name="unk13" count="3">
      <int16_t name="unk1" init-value="-1"/>
      <int32_t name="unk2"/>
    </static-array>
    <stl-vector name="unk14" pointer-type="item"/>
    <int16_t name="unk15a"/>
    <int16_t name="unk15b"/>
    <static-array name="ethic" count="22" index-enum="ethic_type">
      <enum base-type="int16_t" type-name="ethic_response"/>
    </static-array>
    <static-array name="values" type-name="int32_t" count="32"
        index-enum="value_type"/>
    <static-array name="values_2" type-name="int32_t" count="32"
        index-enum="value_type">
      v0.42.01
    </static-array>
    <int32_t>
      v0.42.01
    </int32_t>
    <static-array name="permitted_skill" type-name="bool"
        index-enum="job_skill" count="135"/>
    <stl-vector type-name="int16_t" name="art_image_types">
      0 = civilization symbol
    </stl-vector>
    <stl-vector type-name="int32_t" name="art_image_ids"/>
    <stl-vector type-name="int16_t" name="art_image_subids"/>
    <stl-vector name="discovered_creature_foods" type-name="bool"
        index-refers-to="(find-creature $)"/>
    <stl-vector name="discovered_creatures" type-name="bool"
        index-refers-to="(find-creature $)"/>
    <stl-vector name="discovered_plant_foods" type-name="bool"
        index-refers-to="(find-plant-raw $)"/>
    <stl-vector name="discovered_plants" type-name="bool"
        index-refers-to="(find-plant-raw $)"/>
    <stl-vector name="unk23" type-name="int16_t"/>
    <stl-vector name="unk24" type-name="int16_t"/>
  </compound>
  <stl-vector name="uniforms" pointer-type="entity_uniform"/>
  <int32_t name="next_uniform_id"/>
  <compound name="unknown1b">
    one of these 4 vectors was removed, not sure which one is worship
    <stl-vector name='unk32a' type-name='int32_t' comment='empty'/>
    <stl-vector name="unk32b" type-name="int32_t"/>
    <stl-vector name="worship" type-name="int32_t"
        ref-target="historical_figure"/>
    <stl-vector name="unk32d" type-name="int32_t"/>
    <stl-vector name="unk32e">
      <pointer>
        <stl-vector type-name="int16_t"/>
        <stl-vector type-name="int16_t"/>
        <int32_t/>
        <int32_t/>
        <stl-vector type-name="int32_t"/>
        <int16_t/>
        <int16_t/>
      </pointer>
    </stl-vector>
    <stl-vector name="diplomacy">
      sorted by group_id
      <pointer>
        <int32_t name="group_id" ref-target="historical_entity"/>
        <int16_t name="relation"/>
        <int32_t/>
        <stl-vector name="historic_events" type-name="int32_t"
            ref-target="history_event"/>
        <stl-vector name="historic_events_collection"
            type-name="int32_t"
            ref-target="history_event_collection"/>
        <int32_t/>
      </pointer>
    </stl-vector>
    <int16_t name="unk33"/>
    <stl-vector name="unk34a" type-name="int16_t"/>
    <stl-vector name="unk34b" type-name="int16_t"/>
    <stl-vector name="unk34c" type-name="int32_t"/>
    <stl-vector name="unk34d" type-name="int32_t">
      empty
    </stl-vector>
    <stl-vector name="unk34e" type-name="int32_t"
        ref-target="historical_figure">
      empty
    </stl-vector>
  </compound>
  <compound name="positions">
    <stl-vector name="own" pointer-type="entity_position"/>
    <stl-vector name="site" pointer-type="entity_position"/>
    <stl-vector name="conquered_site" pointer-type="entity_position"/>
    <int32_t name="next_position_id"/>
    <stl-vector name="assignments"
        pointer-type="entity_position_assignment"/>
    <int32_t name="next_assignment_id"/>
    <stl-vector name="unk_v40_1"
        pointer-type="entity_position_assignment">
      v0.40.01
    </stl-vector>
    <stl-vector name="unk_v40_2"
        pointer-type="entity_position_assignment">
      v0.40.01
    </stl-vector>
    <stl-vector name="unk_v40_3"
        pointer-type="entity_position_assignment">
      v0.40.01
    </stl-vector>
    <stl-vector name="unk_v40_4" type-name="int32_t">
      v0.40.01
    </stl-vector>
    <stl-vector name="unk_v40_5" type-name="int32_t">
      v0.40.01
    </stl-vector>
  </compound>
  <compound name="tissue_styles">
    <stl-vector name="all" pointer-type="entity_tissue_style"/>
    <int32_t name="next_style_id"/>
  </compound>
  <stl-vector name="squads" type-name="int32_t" ref-target="squad"/>
  <compound name="unknown1d">
    <int32_t name="unk42"/>
    <stl-vector name="unk43" type-name="int32_t">
      empty
    </stl-vector>
    <int32_t name="unk44"/>
    <int32_t name="unk44a">
      v0.34.01
    </int32_t>
    <static-array name="unk44b" count="15" type-name="int32_t">
      v0.34.01
    </static-array>
  </compound>
  <pointer name="training_knowledge">
    <stl-vector name="level" index-refers-to="(find-instance
        $creature_raw $)">
      <enum base-type="int32_t" type-name="training_knowledge_level"/>
    </stl-vector>
    <stl-vector name="unk_10" index-refers-to="(find-instance
        $creature_raw $)">
      <int32_t/>
    </stl-vector>
    v0.34.06
  </pointer>
  <stl-vector name="events" pointer-type="entity_event"/>
  <int32_t name="unk_v40_1a">
    v0.40.01
  </int32_t>
  <int32_t name="unk_v40_1b">
    v0.40.01
  </int32_t>
  <int32_t name="unk_v40_1c">
    v0.40.01
  </int32_t>
  <int32_t name="unk_v40_1d">
    v0.40.01
  </int32_t>
  <int32_t name="unk_v40_1e">
    v0.40.01
  </int32_t>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <stl-vector type-name="int32_t">
    v0.42.01
  </stl-vector>
  <pointer name="occasion_info" type-name="entity_occasion_info"/>
  <stl-vector name="meeting_events" pointer-type="meeting_event"/>
  <pointer name="activity_stats"
      type-name="entity_activity_statistics"/>
  <compound name="unknown1e">
    <int16_t name="unk47"/>
    <int32_t name="unk48"/>
    <int32_t name="unk49a"/>
    <int32_t name="unk49b"/>
    <int32_t name="unk49c"/>
    <static-array name="unk49d" count="10" type-name="int32_t"/>
    <int32_t name="unk49e"/>
    <int32_t name="unk49f"/>
    <int32_t>
      v0.40.01
    </int32_t>
  </compound>
  <stl-vector name="armies" pointer-type="army">
    v0.40.01
  </stl-vector>
  <stl-vector name="army_controllers" pointer-type="army_controller">
    v0.40.01
  </stl-vector>
  <stl-vector name="hist_figures" pointer-type="historical_figure"/>
  <stl-vector name="nemesis" pointer-type="nemesis_record"/>
  <compound name="derived_resources">
    <compound name="mill_cookable" type-name="material_vec_ref"/>
    <compound name="mill_dye" type-name="material_vec_ref"/>
    <stl-vector name="armor_leather">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="armor_chain">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="armor_plate">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="armor_under">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="armor_over">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="armor_cover">
      <int16_t ref-target="itemdef_armorst"/>
    </stl-vector>
    <stl-vector name="pants_leather">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="pants_chain">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="pants_plate">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="pants_under">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="pants_over">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="pants_cover">
      <int16_t ref-target="itemdef_pantsst"/>
    </stl-vector>
    <stl-vector name="helm_leather">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="helm_chain">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="helm_plate">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="helm_under">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="helm_over">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="helm_cover">
      <int16_t ref-target="itemdef_helmst"/>
    </stl-vector>
    <stl-vector name="shoes_leather">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="shoes_chain">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="shoes_plate">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="shoes_under">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="shoes_over">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="shoes_cover">
      <int16_t ref-target="itemdef_shoesst"/>
    </stl-vector>
    <stl-vector name="gloves_leather">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
    <stl-vector name="gloves_chain">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
    <stl-vector name="gloves_plate">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
    <stl-vector name="gloves_under">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
    <stl-vector name="gloves_over">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
    <stl-vector name="gloves_cover">
      <int16_t ref-target="itemdef_glovesst"/>
    </stl-vector>
  </compound>
  <static-array name="assignments_by_type" count="25"
      index-enum="entity_position_responsibility">
    <stl-vector pointer-type="entity_position_assignment"/>
  </static-array>
  <compound name="claims">
    <compound name="areas" type-name="coord2d_path">
      in world_data.entity_claims1
    </compound>
    <compound name="unk1" type-name="coord2d_path"/>
    <compound name="unk2" type-name="coord2d_path"/>
  </compound>
  <stl-vector name="children" type-name="int32_t"
      ref-target="historical_entity">
    includes self
  </stl-vector>
  <compound name="unknown2">
    <int32_t name="metal_proficiency">
      best IMPACT_FRACTURE/10000 + MAX_EDGE/1000 for weapon mats plus
      best IMPACT_FRACTURE/10000 for armor mats
    </int32_t>
    <stl-vector name="unk10" type-name="int16_t"/>
    <pointer name="resource_allotment"
        type-name="resource_allotment_data"/>
    <stl-vector>
      v0.42.01
    </stl-vector>
    <stl-vector>
      v0.42.01
    </stl-vector>
    <stl-vector>
      v0.42.01
    </stl-vector>
    <stl-vector>
      v0.42.01
    </stl-vector>
    <int16_t name="unk12a" init-value="-1"/>
    <int16_t name="unk12b">
      uninitialized
    </int16_t>
    <bool name="unk13">
      0
    </bool>
    <int32_t name="unk14">
      0
    </int32_t>
    <int32_t name="unk15">
      uninitialized
    </int32_t>
    <int32_t name="unk16">
      uninitialized
    </int32_t>
    <int16_t name="unk17">
      0
    </int16_t>
    <stl-vector name="unk18" type-name="pointer">
      empty
    </stl-vector>
    <stl-vector name="unk19" type-name="pointer">
      empty
    </stl-vector>
    <int16_t name="unk20">
      0
    </int16_t>
    <int32_t name="unk21">
      0
    </int32_t>
    <int32_t name="unk22">
      0
    </int32_t>
    <int32_t name="unk23">
      0
    </int32_t>
    <stl-vector name="unk24" type-name="pointer">
      empty
    </stl-vector>
    <stl-vector name="unk25" type-name="pointer">
      empty
    </stl-vector>
    <static-array name="unk26" count="177" type-name="int32_t">
      Uninitialized
    </static-array>
    <stl-vector name="unk28" type-name="pointer">
      empty
    </stl-vector>
    <stl-vector name="unk29" type-name="pointer">
      v0.34.01
    </stl-vector>
  </compound>
</struct-type>

entities.entity_tissue_style

<struct-type type-name="entity_tissue_style" key-field="id">
  <stl-string name="name"/>
  <stl-vector name="preferred_shapings" type-name="int16_t"/>
  <stl-vector type-name="int32_t">
    maybe probability?
  </stl-vector>
  <int32_t name="maintain_length_min"/>
  <int32_t name="maintain_length_max"/>
  <int32_t name="id"/>
</struct-type>

entities.training_knowledge_level

<enum-type type-name="training_knowledge_level" base-type="int32_t">
  <enum-item name="None"/>
  <enum-item name="FewFacts"/>
  <enum-item name="GeneralFamiliarity"/>
  <enum-item name="Knowledgeable"/>
  <enum-item name="Expert"/>
  <enum-item name="Domesticated"/>
</enum-type>

entities.entity_position_flags

<enum-type type-name="entity_position_flags">
  <enum-item name="IS_LAW_MAKER"/>
  <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="SUCCESSION_BY_HEIR"/>
  <enum-item name="HAS_RESPONSIBILITIES"/>
  <enum-item name="FLASHES"/>
  <enum-item name="BRAG_ON_KILL"/>
  <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="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="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="QUEST_GIVER"/>
</enum-type>

entities.entity_position

<struct-type type-name="entity_position" key-field="id">
  <stl-string name="code"/>
  <int32_t name="id"/>
  <df-flagarray name="flags" index-enum="entity_position_flags"/>
  <stl-vector name="allowed_creature" type-name="int32_t"
      ref-target="creature_raw"/>
  <stl-vector name="allowed_class" pointer-type="stl-string"/>
  <stl-vector name="rejected_creature" type-name="int32_t"
      ref-target="creature_raw"/>
  <stl-vector name="rejected_class" pointer-type="stl-string"/>
  <static-array type-name="stl-string" name="name" count="2"/>
  <static-array type-name="stl-string" name="name_female" count="2"/>
  <static-array type-name="stl-string" name="name_male" count="2"/>
  <static-array type-name="stl-string" name="spouse" count="2"/>
  <static-array type-name="stl-string" name="spouse_female"
      count="2"/>
  <static-array type-name="stl-string" name="spouse_male" count="2"/>
  <static-array type-name="stl-string" name="squad" count="2"/>
  <stl-string name="land_name"/>
  <int16_t name="squad_size"/>
  <stl-vector name="commander_id" type-name="int32_t"/>
  <stl-vector name="commander_civ" type-name="int32_t"
      ref-target="historical_entity"/>
  <stl-vector name="commander_types" type-name="int16_t"/>
  <int16_t name="land_holder"/>
  <int16_t name="requires_population"/>
  <int16_t>
    v0.34.01
  </int16_t>
  <int32_t name="precedence" init-value="30001"/>
  <int32_t name="replaced_by" init-value="-1"/>
  <int16_t name="number" init-value="1"/>
  <stl-vector name="appointed_by" type-name="int32_t"/>
  <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="25"
      index-enum="entity_position_responsibility"/>
  <static-array type-name="int16_t" name="color" count="3"/>
  <int32_t name="required_boxes"/>
  <int32_t name="required_cabinets"/>
  <int32_t name="required_racks"/>
  <int32_t name="required_stands"/>
  <int32_t name="required_office"/>
  <int32_t name="required_bedroom"/>
  <int32_t name="required_dining"/>
  <int32_t name="required_tomb"/>
  <int32_t name="mandate_max"/>
  <int32_t name="demand_max"/>
</struct-type>

entities.entity_position_assignment

<struct-type type-name="entity_position_assignment" key-field="id">
  <int32_t name="id"/>
  <int32_t name="histfig" ref-target="historical_figure"/>
  <int32_t name="histfig2" ref-target="historical_figure">
    v0.40.01
  </int32_t>
  <int32_t name="position_id" refers-to="(find-by-id
      $$._global._parent._global.positions.own $id $)">
    position within relevant entity
  </int32_t>
  <df-flagarray name="flags"/>
  <int32_t name="squad_id" ref-target="squad"/>
  <int32_t init-value="-1"/>
  <int32_t init-value="-1"/>
  <int32_t init-value="-1">
    v0.40.01
  </int32_t>
  <int32_t init-value="-1">
    v0.40.01
  </int32_t>
  <stl-vector>
    v0.40.01, not saved
  </stl-vector>
</struct-type>

entities.entity_material_category

<enum-type type-name="entity_material_category" base-type="int16_t">
  <enum-item name="None" value="-1"/>
  <enum-item name="Clothing">
    cloth or leather
  </enum-item>
  <enum-item name="Leather">
    organic.leather
  </enum-item>
  <enum-item name="Cloth">
    any cloth
  </enum-item>
  <enum-item name="Wood">
    organic.wood, used for training weapons
  </enum-item>
  <enum-item name="Crafts">
    misc_mat.crafts
  </enum-item>
  <enum-item name="Stone">
    stones
  </enum-item>
  <enum-item name="Improvement">
    misc_mat.crafts
  </enum-item>
  <enum-item name="Glass">
    misc_mat.glass_unused, used for extract vials
  </enum-item>
  <enum-item name="Wood2">
    misc_mat.barrels, also used for buckets
  </enum-item>
  <enum-item name="Bag">
    cloth/leather
  </enum-item>
  <enum-item name="Cage">
    misc_mat.cages
  </enum-item>
  <enum-item name="WeaponMelee">
    metal.weapon
  </enum-item>
  <enum-item name="WeaponRanged">
    metal.ranged
  </enum-item>
  <enum-item name="Ammo">
    metal.ammo
  </enum-item>
  <enum-item name="Ammo2">
    metal.ammo2
  </enum-item>
  <enum-item name="Pick">
    metal.pick
  </enum-item>
  <enum-item name="Armor">
    metal.armor, also used for shields, tools, instruments, and toys
  </enum-item>
  <enum-item name="Gem">
    gems
  </enum-item>
  <enum-item name="Bone">
    refuse.bone
  </enum-item>
  <enum-item name="Shell">
    refuse.shell
  </enum-item>
  <enum-item name="Pearl">
    refuse.pearl
  </enum-item>
  <enum-item name="Ivory">
    refuse.ivory
  </enum-item>
  <enum-item name="Horn">
    refuse.horn
  </enum-item>
  <enum-item name="Other">
    misc_mat.others
  </enum-item>
  <enum-item name="Anvil">
    metal.anvil
  </enum-item>
  <enum-item name="Booze">
    misc_mat.booze
  </enum-item>
  <enum-item name="Metal">
    metals with ITEMS_HARD, used for chains
  </enum-item>
  <enum-item name="PlantFiber">
    organic.fiber
  </enum-item>
  <enum-item name="Silk">
    organic.silk
  </enum-item>
  <enum-item name="Wool">
    organic.wool
  </enum-item>
  <enum-item name="Furniture">
    misc_mat.rock_metal
  </enum-item>
  <enum-item name="MiscWood2">
    misc_mat.wood2
  </enum-item>
</enum-type>

entities.entity_uniform_item

<struct-type type-name="entity_uniform_item">
  <int8_t name="random_dye"/>
  <int8_t name="armorlevel"/>
  <int16_t name="item_color" ref-target="descriptor_color"/>
  <int32_t name="art_image_id"/>
  <int16_t name="art_image_subid"/>
  <int16_t name="image_thread_color" ref-target="descriptor_color"/>
  <enum base-type="int16_t" name="image_material_class"
      type-name="entity_material_category"/>
  <int16_t name="maker_race"/>
  <compound name="indiv_choice" type-name="uniform_indiv_choice"/>
  <int16_t name="mattype" ref-target="material"
      aux-value="$$.matindex"/>
  <int32_t name="matindex"/>
  <enum base-type="int16_t" name="material_class"
      type-name="entity_material_category"/>
</struct-type>

entities.entity_uniform

<struct-type type-name="entity_uniform" key-field="id">
  <int32_t name="id"/>
  <int16_t name="unk_4"/>
  <static-array name="uniform_item_types" count="7"
      index-enum="uniform_category">
    <stl-vector>
      <enum base-type="int16_t" type-name="item_type"/>
    </stl-vector>
  </static-array>
  <static-array name="uniform_item_subtypes" count="7"
      index-enum="uniform_category">
    <stl-vector>
      <int16_t refers-to="(item-subtype-target
          $$._parent._parent._parent.uniform_item_types[$$._parent._ke
          y][$$._key] $)"/>
    </stl-vector>
  </static-array>
  <static-array name="uniform_item_info" count="7"
      index-enum="uniform_category">
    <stl-vector pointer-type="entity_uniform_item"/>
  </static-array>
  <stl-string name="name"/>
  <compound name="flags" type-name="uniform_flags"/>
</struct-type>

entities.entity_event_type

<enum-type type-name="entity_event_type">
  <enum-item name="invasion"/>
  <enum-item name="abduction"/>
  <enum-item name="incident"/>
  <enum-item name="occupation"/>
  <enum-item name="beast"/>
  <enum-item name="group"/>
  <enum-item name="harass"/>
  <enum-item name="flee"/>
  <enum-item name="abandon"/>
  <enum-item name="reclaimed"/>
  <enum-item name="founded"/>
  <enum-item name="reclaiming"/>
  <enum-item name="founding"/>
  <enum-item name="leave"/>
  <enum-item name="insurrection"/>
  <enum-item name="insurrection_end"/>
  <enum-item name="succession"/>
  <enum-item name="claim"/>
  <enum-item name="accept_tribute_offer"/>
  <enum-item name="refuse_tribute_offer"/>
  <enum-item name="accept_tribute_demand"/>
  <enum-item name="refuse_tribute_demand"/>
  <enum-item name="accept_peace_offer"/>
  <enum-item name="refuse_peace_offer"/>
  <enum-item name="cease_tribute_offer"/>
</enum-type>

entities.entity_event

<struct-type type-name="entity_event">
  <compound name="data" is-union="true">
    <compound name="invasion">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="abduction">
      <int32_t name="histfig_id" ref-target="historical_figure"/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="incident">
      <int32_t name="incident_id" ref-target="incident"/>
      <int32_t/>
    </compound>
    <compound name="occupation">
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="beast">
      <int32_t name="histfig_id" ref-target="historical_figure"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t name="region_id" ref-target="world_region"/>
    </compound>
    <compound name="group">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
    </compound>
    <compound name="harass">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
    </compound>
    <compound name="flee">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="abandon">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
    </compound>
    <compound name="reclaimed">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="founded">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="reclaiming">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="founding">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="region_id" ref-target="world_region"/>
      <int32_t/>
      <int32_t/>
    </compound>
    <compound name="leave">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
    </compound>
    <compound name="insurrection">
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t name="entity_id" ref-target="historical_entity"/>
    </compound>
    <compound name="insurrection_end">
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="result">
        0=overthrow, 1=fail, 2=crushed
      </int32_t>
    </compound>
    <compound name="succession">
      <int32_t name="histfig_id" ref-target="historical_figure"/>
      <int32_t/>
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="position_assignment_id"/>
    </compound>
    <compound name="claim">
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="site_id" ref-target="world_site"/>
      <int32_t/>
    </compound>
    <compound name="accept_tribute_offer">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="refuse_tribute_offer">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="accept_tribute_demand">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="refuse_tribute_demand">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="accept_peace_offer">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="refuse_peace_offer">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
    <compound name="cease_tribute_offer">
      <int32_t name="entity1_id" ref-target="historical_entity"/>
      <int32_t/>
      <int32_t name="entity2_id" ref-target="historical_entity"/>
      <int32_t/>
    </compound>
  </compound>
  <int32_t name="year"/>
  <int32_t name="year_tick"/>
  <int32_t/>
  <int32_t/>
  <int32_t/>
  <enum name="type" type-name="entity_event_type"/>
</struct-type>

entities.agreement

<struct-type type-name="agreement" key-field="id"
    instance-vector="$global.world.agreements.all">
  <int32_t name="id"/>
  <stl-vector name="parties">
    <pointer>
      <int32_t name="id"/>
      <stl-vector type-name="int32_t" name="histfig_ids"
          ref-target="historical_figure"/>
      <stl-vector type-name="int32_t" name="entity_ids"
          ref-target="historical_entity"/>
      <stl-vector>
        <pointer>
          <int32_t/>
          <int32_t/>
          <int32_t/>
          <int32_t/>
        </pointer>
      </stl-vector>
    </pointer>
  </stl-vector>
  <int32_t name="next_party_id"/>
  <stl-vector name="details">
    <pointer>
      <int32_t name="id"/>
      <int32_t name="year"/>
      <int32_t name="year_tick"/>
      <compound name="data" is-union="true">
        <pointer name="data0">
          <int32_t/>
          <int32_t/>
          <int32_t/>
          <int32_t/>
          <int32_t/>
          <int32_t/>
        </pointer>
        <pointer name="data1">
          <enum name="reason" base-type="int32_t"
              type-name="agreement_conclusion_reason"/>
          <int32_t/>
          <int32_t/>
          <int32_t name="site" ref-target="world_site"/>
          <int32_t name="artifact" ref-target="artifact_record"/>
          <int32_t/>
        </pointer>
      </compound>
      <int32_t name="type"/>
    </pointer>
  </stl-vector>
  <int32_t name="next_details_id"/>
  <int32_t/>
  <int32_t/>
  <int32_t>
    v0.42.01
  </int32_t>
</struct-type>