world-site

world-site.abstract_building_type

<enum-type type-name="abstract_building_type">
  <enum-item name="MEAD_HALL"/>
  <enum-item name="KEEP"/>
  <enum-item name="TEMPLE"/>
  <enum-item name="DARK_TOWER"/>
  <enum-item name="MARKET"/>
  <enum-item name="TOMB"/>
  <enum-item name="DUNGEON"/>
  <enum-item name="UNDERWORLD_SPIRE"/>
  <enum-item name="INN_TAVERN"/>
  <enum-item name="LIBRARY"/>
</enum-type>

world-site.abstract_building_unk

<struct-type type-name="abstract_building_unk">
  used within Tomb and Dungeon
  <stl-vector>
    <pointer>
      <int32_t/>
      <int32_t name="race" ref-target="creature_raw"/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t>
        v0.40.01
      </int32_t>
    </pointer>
  </stl-vector>
  <stl-vector name="histfigs" ref-target="historical_figure"
      type-name="int32_t"/>
</struct-type>

world-site.abstract_building_contents

<struct-type type-name="abstract_building_contents">
  used within Temple, Library, and Inn/Tavern
  <int32_t name="unk_e4"/>
  <int32_t name="desired_goblets"/>
  <int32_t name="desired_instruments"/>
  <int32_t name="desired_paper"/>
  <int32_t name="desired_copies"/>
  <int32_t name="count_goblets"/>
  <int32_t name="count_instruments"/>
  <int32_t name="count_paper"/>
  <int32_t name="unk_104"/>
  <stl-vector name="building_ids" type-name="int32_t"
      ref-target="building"/>
</struct-type>

world-site.abstract_building

<class-type type-name="abstract_building"
    original-name="abstract_buildingst" key-field="id">
  <int32_t name="id"/>
  <stl-vector name="inhabitants">
    <pointer>
      <int16_t/>
      <int32_t name="histfig_id" ref-target="historical_figure"/>
    </pointer>
  </stl-vector>
  <df-flagarray name="flags"/>
  <pointer name="unk1">
    <stl-vector name="hfig" ref-target="historical_figure"
        type-name="int32_t"/>
    <int32_t/>
    <stl-vector type-name="int16_t"/>
    <int16_t name="mat_type" ref-target="material"
        aux-value="$$.mat_index">
      just a guess
    </int16_t>
    <int32_t name="mat_index"/>
    in temples; hfig is the god
  </pointer>
  <stl-vector name="unk2" type-name="int32_t"/>
  <int32_t name="unk3"/>
  <stl-vector name="unk4" type-name="int32_t"/>
  <int32_t name="site_owner_id" ref-target="historical_entity"/>
  <int32_t name="unk_v42_1">
    v0.42.01
  </int32_t>
  <int32_t name="unk_v42_2">
    v0.42.01
  </int32_t>
  <int32_t name="unk_v42_3">
    v0.42.01
  </int32_t>
  <int32_t name="site_id" ref-target="world_site">
    not initialized/saved/loaded, assumed member of base class
  </int32_t>
  <compound name="pos" type-name="coord2d">
    v0.42.01
  </compound>
  <stl-vector name="occupations" pointer-type="occupation">
    v0.42.01
  </stl-vector>
  <virtual-methods>
    <vmethod ret-type="abstract_building_type" name="getType"/>
    <vmethod ret-type="int16_t" name="getSubtype">
      for stores
    </vmethod>
    <vmethod name="getDisplayTile">
      <pointer type-name="uint8_t" name="tile"/>
      <pointer type-name="uint16_t" name="fg"/>
      <pointer type-name="uint16_t" name="bg"/>
      <pointer type-name="uint16_t" name="bright"/>
      on navigation minimap
    </vmethod>
    <vmethod name="getName">
      <ret-type>
        <pointer type-name="language_name"/>
      </ret-type>
    </vmethod>
    <vmethod name="getContents">
      <ret-type>
        <pointer type-name="abstract_building_contents"/>
      </ret-type>
    </vmethod>
    <vmethod name="write_file">
      <pointer name="file" type-name="file_compressorst"/>
    </vmethod>
    <vmethod name="read_file">
      <pointer name="file" type-name="file_compressorst"/>
      <int32_t name="loadversion"/>
    </vmethod>
    <vmethod is-destructor="true"/>
    <vmethod ret-type="int32_t"/>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="int32_t"/>
    <vmethod>
      <ret-type>
        <pointer type-name="abstract_building_unk"/>
      </ret-type>
    </vmethod>
  </virtual-methods>
</class-type>

world-site.abstract_building_mead_hallst

<class-type type-name="abstract_building_mead_hallst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <compound name="item1" type-name="site_building_item"/>
  <compound name="item2" type-name="site_building_item"/>
</class-type>

world-site.abstract_building_keepst

<class-type type-name="abstract_building_keepst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
</class-type>

world-site.abstract_building_templest

<class-type type-name="abstract_building_templest"
    inherits-from="abstract_building">
  <int32_t name="deity" ref-target="historical_figure"/>
  <int32_t name="religion" ref-target="historical_entity">
    returned by the vmethod after the destructor
  </int32_t>
  <compound name="name" type-name="language_name"/>
  <compound name="contents" type-name="abstract_building_contents"/>
</class-type>

world-site.abstract_building_dark_towerst

<class-type type-name="abstract_building_dark_towerst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
</class-type>

world-site.abstract_building_marketst

<class-type type-name="abstract_building_marketst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
</class-type>

world-site.abstract_building_tombst

<class-type type-name="abstract_building_tombst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <compound name="unk" type-name="abstract_building_unk"/>
  <int32_t/>
</class-type>

world-site.abstract_building_dungeonst

<class-type type-name="abstract_building_dungeonst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <enum base-type="int16_t" name="dungeon_type">
    <enum-item name="DUNGEON"/>
    <enum-item name="SEWERS"/>
    <enum-item name="CATACOMBS"/>
  </enum>
  <int32_t/>
  <compound name="unk" type-name="abstract_building_unk"/>
  <int32_t/>
  <int32_t>
    not saved
  </int32_t>
  <int32_t>
    not saved
  </int32_t>
</class-type>

world-site.abstract_building_underworld_spirest

<class-type type-name="abstract_building_underworld_spirest"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <int32_t name="unk_bc"/>
</class-type>

world-site.abstract_building_inn_tavernst

<class-type type-name="abstract_building_inn_tavernst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <compound name="contents" type-name="abstract_building_contents"/>
  <stl-vector name="room_info">
    <pointer>
      <int32_t name="id"/>
      <stl-string/>
      <int32_t name="world_x"/>
      <int32_t name="world_y"/>
      <int32_t name="world_z"/>
    </pointer>
  </stl-vector>
  <int32_t name="next_room_info_id"/>
</class-type>

world-site.abstract_building_libraryst

<class-type type-name="abstract_building_libraryst"
    inherits-from="abstract_building">
  <compound name="name" type-name="language_name"/>
  <stl-vector type-name="int32_t"/>
  <compound name="contents" type-name="abstract_building_contents"/>
</class-type>

world-site.world_site_type

<enum-type type-name="world_site_type" base-type="int16_t">
  <enum-item name="PlayerFortress"/>
  <enum-item name="DarkFortress"/>
  <enum-item name="Cave"/>
  <enum-item name="MountainHalls"/>
  <enum-item name="ForestRetreat"/>
  <enum-item name="Town"/>
  <enum-item name="ImportantLocation"/>
  <enum-item name="LairShrine"/>
  <enum-item name="Fortress"/>
  <enum-item name="Camp"/>
  <enum-item name="Monument"/>
</enum-type>

world-site.world_site_flags

<enum-type type-name="world_site_flags">
  <enum-item name="Undiscovered"/>
  <enum-item/>
  <enum-item/>
  <enum-item name="Town">
    not hamlet
  </enum-item>
</enum-type>

world-site.world_site

<struct-type type-name="world_site" key-field="id"
    instance-vector="$global.world.world_data.sites">
  <compound name="name" type-name="language_name"/>
  <int32_t name="civ_id" ref-target="historical_entity"/>
  <int32_t name="cur_owner_id" ref-target="historical_entity"/>
  <enum base-type="int16_t" name="type" type-name="world_site_type"/>
  <compound name="pos" type-name="coord2d"/>
  <int32_t name="id"/>
  <stl-vector name="nemesis" type-name="int32_t"
      ref-target="nemesis_record"/>
  <stl-vector name="artifacts" pointer-type="artifact_record"/>
  <stl-vector name="animals" pointer-type="world_population"/>
  <stl-vector name="inhabitants"
      pointer-type="world_site_inhabitant"/>
  <stl-vector name="units">
    <pointer>
      <int32_t name="unit_id" ref-target="unit"/>
      <int32_t name="pos_x"/>
      <int32_t name="pos_y"/>
      <int32_t name="pos_z"/>
      <int32_t name="unk_10" init-value="-1"/>
    </pointer>
  </stl-vector>
  <stl-vector name="unk_d4"/>
  <stl-vector name="unk_v40_1a">
    v0.40.1
  </stl-vector>
  <padding size="4"/>
  <stl-vector name="unk_v40_1b">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1c">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1d">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1e">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1f">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1g">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_1h">
    v0.40.1
  </stl-vector>
  <int32_t name="index"/>
  <int16_t name="rgn_min_x">
    in embark tiles
  </int16_t>
  <int16_t name="rgn_max_x"/>
  <int16_t name="rgn_min_y"/>
  <int16_t name="rgn_max_y"/>
  <int16_t name="rgn_min_z"/>
  <int16_t name="rgn_max_z"/>
  <int32_t name="global_min_x">
    in embark tiles
  </int32_t>
  <int32_t name="global_min_y"/>
  <int32_t name="global_max_x"/>
  <int32_t name="global_max_y"/>
  <uint32_t name="seed1">
    random
  </uint32_t>
  <uint32_t name="seed2">
    random
  </uint32_t>
  <int32_t name="resident_count">
    count living in houses and shops
  </int32_t>
  <int32_t name="unk_110"/>
  <int32_t name="unk_114"/>
  <int32_t name="unk_118"/>
  <int32_t name="unk_11c"/>
  <int32_t name="unk_120"/>
  <int32_t name="unk_124"/>
  <int32_t name="unk_128"/>
  <int32_t name="unk_12c"/>
  <int32_t name="unk_130"/>
  <int32_t name="unk_134"/>
  <int32_t name="unk_138"/>
  <int32_t name="site_level">
    v0.34.01
  </int32_t>
  <stl-vector name="unk_13c">
    <pointer>
      <int32_t name="unk_0"/>
      <int32_t name="unk_4"/>
      <int32_t name="unk_8"/>
      <int32_t name="unk_c"/>
      <stl-vector name="unk_10"/>
      <stl-vector name="unk_20"/>
      <int32_t name="unk_30"/>
    </pointer>
    mountain halls
  </stl-vector>
  <stl-vector name="unk_v40_2">
    <pointer>
      <int32_t name="unk_0"/>
      <int32_t name="unk_4"/>
      <int32_t name="unk_8"/>
      <int32_t name="unk_c"/>
      <stl-vector name="unk_10" type-name="int32_t"/>
      <stl-vector name="unk_20" type-name="int32_t"/>
      <int32_t name="unk_30"/>
    </pointer>
    v0.40.1; forest retreat
  </stl-vector>
  <df-flagarray name="flags" index-enum="world_site_flags"/>
  <stl-vector name="buildings" pointer-type="abstract_building"/>
  <int32_t name="next_building_id"/>
  <int32_t name="created_tick"/>
  <int32_t name="created_year"/>
  <int32_t name="unk_170"/>
  <int32_t name="unk_174"/>
  <compound name="unk_178" type-name="coord"/>
  <pointer name="realization" type-name="world_site_realization"/>
  <pointer name="subtype_info">
    <int16_t name="is_tower" init-value="-1">
      1 => not fortress
    </int16_t>
    <int16_t name="is_monument" init-value="-1">
      not tomb
    </int16_t>
    <int16_t name="lair_type">
      2 monument, 3 shrine
    </int16_t>
    <stl-vector name="unk_8" type-name="int16_t"/>
    <int32_t name="unk_14" init-value="-1000000"/>
    <int32_t name="unk_18" init-value="-1000000"/>
    <int32_t name="unk_1c" init-value="-1000000"/>
    <int32_t name="creator" ref-target="historical_figure">
      v0.40.01
    </int32_t>
    <int32_t name="unk_28">
      v0.40.01
    </int32_t>
  </pointer>
  <stl-vector name="unk_21c">
    <pointer>
      <int32_t name="unk_0"/>
      <int32_t name="unk_4"/>
      <int32_t name="unk_8"/>
      <int32_t name="unk_c"/>
      <int32_t name="unk_10"/>
      <int32_t name="unk_14"/>
      <int32_t name="unk_18"/>
      <int32_t name="unk_1c"/>
    </pointer>
    v0.34.01
  </stl-vector>
  <stl-vector name="unk_22c" type-name="int32_t">
    v0.34.01
  </stl-vector>
  <int32_t name="is_mountain_halls">
    v0.40.1
  </int32_t>
  <int32_t name="is_fortress">
    v0.40.1
  </int32_t>
  <stl-vector name="unk_v40_4a">
    <pointer>
      <int32_t name="unk_0"/>
      <int32_t name="entity_id" ref-target="historical_entity"/>
      <int32_t name="year"/>
      <int32_t name="year_tick"/>
      <int32_t name="unk_10"/>
    </pointer>
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_4b">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_4c">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v40_4d">
    v0.40.1
  </stl-vector>
  <int32_t name="unk_v43_1">
    v0.43.1
  </int32_t>
  <stl-vector name="unk_v43_2">
    v0.43.1
  </stl-vector>
  <int32_t name="unk_v43_3">
    v0.43.1
  </int32_t>
  <int32_t name="unk_v40_5">
    v0.40.1
  </int32_t>
  <pointer name="unk_188" type-name="world_site_unk130"/>
  <stl-vector name="unk_18c"/>
  <stl-vector name="unk_19c"/>
  <stl-vector name="entity_links" pointer-type="entity_site_link">
    v0.40.1
  </stl-vector>
  <stl-vector name="cultural_identities"
      pointer-type="cultural_identity">
    v0.40.1
  </stl-vector>
  <stl-vector name="unk_v42_1">
    v0.42.1
  </stl-vector>
  <int32_t name="unk_v43_4">
    v0.43.1; uninitialized
  </int32_t>
</struct-type>

world-site.cultural_identity

<struct-type type-name="cultural_identity" key-field="id"
    instance-vector="$global.world.cultural_identities.all">
  <int32_t name="id"/>
  <int32_t name="site_id" ref-target="world_site"/>
  <int32_t name="civ_id" ref-target="historical_entity"/>
  <stl-vector name="unk_c">
    <pointer>
      <int32_t name="group_id" ref-target="historical_entity"/>
      <int32_t name="unk_4" init-value="-1"/>
      <int32_t name="unk_8" init-value="-1"/>
      <int32_t name="unk_c" init-value="-1"/>
      <int32_t name="unk_10" init-value="-1"/>
      <int32_t name="unk_14" init-value="-1"/>
      <int32_t name="unk_18" init-value="-1"/>
      <int32_t name="unk_1c"/>
      <int32_t name="unk_20"/>
      <stl-vector name="unk_24" type-name="int32_t"/>
      <stl-vector name="unk_34" type-name="int32_t"/>
      <int32_t name="unk_44" init-value="100"/>
    </pointer>
  </stl-vector>
  <static-array name="unk_1c" count="22" type-name="int16_t"/>
  <static-array name="unk_48" count="32" type-name="int32_t"/>
  <static-array name="unk_v42_1" count="32" type-name="int32_t">
    v0.42.01
  </static-array>
  <stl-vector name="unk_c8" pointer-type="entity_event"/>
  <int32_t name="unk_d8"/>
  <stl-vector name="unk_dc" type-name="int32_t"/>
  <int32_t name="unk_ec"/>
  <int32_t name="unk_f0"/>
  <int32_t name="unk_f4"/>
  <int32_t name="unk_f8"/>
</struct-type>

world-site.world_site_inhabitant

<struct-type type-name="world_site_inhabitant">
  <int32_t name="count"/>
  <int32_t name="race" ref-target="creature_raw"/>
  <int32_t name="unk_8"/>
  <int32_t name="outcast_id" ref-target="historical_entity"/>
  <int32_t name="unk_10" init-value="-1">
    v0.40.1
  </int32_t>
  <int32_t name="unk_14" init-value="-1">
    v0.40.1
  </int32_t>
  <int32_t name="unk_18" init-value="-1">
    v0.40.1
  </int32_t>
  <int32_t name="unk_1c" init-value="-1">
    v0.40.1
  </int32_t>
  <int32_t name="unk_20" ref-target="historical_entity">
    v0.40.1
  </int32_t>
  <int32_t name="unk_24" init-value="-1">
    v0.40.1
  </int32_t>
  <int32_t name="unk_28" init-value="-1">
    v0.40.1
  </int32_t>
</struct-type>

world-site.world_site_realization

<struct-type type-name="world_site_realization">
  <stl-vector name="buildings"
      pointer-type="site_realization_building"/>
  <int32_t name="num_buildings"/>
  <int32_t name="unk_14"/>
  <int32_t name="num_areas"/>
  <static-array name="mini_rivers" count="17">
    <static-array count="17" type-name="int8_t">
      2 for river tiles
    </static-array>
  </static-array>
  <static-array name="mini_tiles" count="17">
    <static-array count="17" type-name="uint8_t"/>
  </static-array>
  <static-array name="mini_colors" count="17">
    <static-array count="17" type-name="int16_t">
      bold shl 6|bg shl 3|fg
    </static-array>
  </static-array>
  <static-array name="road_map" count="51">
    <static-array count="51"
        pointer-type="site_realization_crossroads"/>
  </static-array>
  <static-array name="river_map" count="51">
    <static-array count="51">
      <pointer>
        <static-array name="start" type-name="int32_t" count="48"/>
        <static-array name="end" type-name="int32_t" count="48"/>
        <int32_t name="unk_180"/>
        <int32_t name="unk_184"/>
        <int32_t name="start_array_limits"/>
        <int32_t name="end_array_limits"/>
      </pointer>
    </static-array>
  </static-array>
  <static-array name="unk_55e8" count="17">
    <static-array count="17">
      <int32_t name="unk_55e8"/>
      <int32_t name="unk_55ec"/>
      <int32_t name="unk_v40_1a" init-value="-30000">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_1b" init-value="-30000">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_1c" init-value="-30000">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_1d" init-value="-30000">
        v0.40.01
      </int32_t>
      <stl-vector name="unk_v40_2">
        <pointer>
          <int32_t name="unk_0"/>
          <int32_t name="unk_4"/>
          <int16_t name="unk_8"/>
          <int16_t name="unk_a"/>
          <int32_t name="unk_c"/>
          <int32_t name="unk_10"/>
          <int16_t name="unk_14"/>
          <int16_t name="unk_16"/>
          <int32_t name="unk_18"/>
          <int32_t name="unk_1c"/>
        </pointer>
      </stl-vector>
      <int32_t name="unk_55f0"/>
      <int32_t name="unk_55f4"/>
      <int16_t name="unk_55f8"/>
      <int16_t name="unk_55fa"/>
      <int32_t name="unk_55fc"/>
      <int32_t name="unk_5600"/>
      <int32_t name="unk_5604"/>
      <int32_t name="unk_5608"/>
      <int32_t name="unk_560c"/>
      <int32_t name="unk_5610"/>
      <int32_t name="unk_5614"/>
      <stl-vector name="unk_5618"/>
      <int32_t name="unk_5628"/>
      <int32_t name="unk_562c"/>
      <int32_t name="unk_5630"/>
      <int32_t name="unk_5634"/>
      <int32_t name="unk_v40_3a" init-value="-1">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_3b" init-value="-1">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_3c" init-value="-1">
        v0.40.01
      </int32_t>
      <int32_t name="unk_v40_3d" init-value="-1">
        v0.40.01
      </int32_t>
    </static-array>
  </static-array>
  <static-array name="building_map" count="17">
    <static-array count="17">
      <padding size="4"/>
      <stl-vector name="buildings"
          pointer-type="site_realization_building"/>
      <int32_t name="unk4"/>
      <uint32_t name="unk5"/>
      <stl-vector name="unk6"/>
    </static-array>
  </static-array>
  <static-array name="flags_map" count="51">
    <static-array count="51" type-name="uint32_t"/>
    v0.40.01
  </static-array>
  <static-array name="zoom_tiles" count="51">
    <static-array count="51" type-name="uint8_t"/>
  </static-array>
  <static-array name="zoom_colors" count="51">
    <static-array count="51" type-name="int16_t"/>
  </static-array>
  <static-array name="zoom_movemask" count="51">
    <static-array count="51" type-name="int8_t">
      8 left, 4 right, 2 down, 1 up; -1 any dir
    </static-array>
  </static-array>
  <static-array name="area_map" count="52">
    <static-array count="52" type-name="int32_t"
        refers-to="$$._global.areas[$]"/>
  </static-array>
  <stl-vector name="areas">
    <pointer>
      <enum base-type="int32_t" name="type">
        <enum-item name="Crops1"/>
        <enum-item name="Crops2"/>
        <enum-item name="Crops3"/>
        <enum-item name="Meadow"/>
        <enum-item name="Pasture"/>
        <enum-item name="Orchard"/>
        <enum-item name="Woodland"/>
        <enum-item name="Waste"/>
        <enum-item name="Unknown1"/>
      </enum>
      <int32_t name="index"/>
      <int32_t name="unk_8"/>
      <int32_t name="min_x"/>
      <int32_t name="max_x"/>
      <int32_t name="min_y"/>
      <int32_t name="max_y"/>
      <int32_t name="unk_1c" init-value="-1">
        v0.40.01
      </int32_t>
      <int32_t name="unk_20">
        v0.40.01
      </int32_t>
    </pointer>
  </stl-vector>
  <int32_t/>
  <int32_t name="army_controller_pos_x"/>
  <int32_t name="army_controller_pos_y"/>
  <static-array name="unk_193bc" count="500">
    <int32_t/>
    <int32_t/>
    <compound name="unk_8">
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
      <int32_t/>
    </compound>
    <int32_t/>
    <int16_t/>
    <int16_t/>
    <int16_t/>
    <int16_t/>
    <int16_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/>
  </static-array>
  <int32_t name="num_unk_193bc"/>
  <int32_t/>
  <int32_t/>
  <static-array name="building_well"
      pointer-type="site_realization_building" count="20"/>
  <int32_t name="num_building_well"/>
  <static-array name="building_temple"
      pointer-type="site_realization_building" count="20"/>
  <int32_t name="num_building_temple"/>
  <static-array name="building_type22"
      pointer-type="site_realization_building" count="20"/>
  <int32_t name="num_building_type22"/>
  <static-array name="building_type21"
      pointer-type="site_realization_building" count="20"/>
  <int32_t name="num_building_type21"/>
  <stl-vector name="unk_wsr_vector"/>
</struct-type>

world-site.site_realization_crossroads

<struct-type type-name="site_realization_crossroads">
  <static-array name="road_min_y" count="48" type-name="int32_t"/>
  <static-array name="road_max_y" count="48" type-name="int32_t"/>
  <static-array name="road_min_x" count="48" type-name="int32_t"/>
  <static-array name="road_max_x" count="48" type-name="int32_t"/>
  <int32_t name="idx_x"/>
  <int32_t name="idx_y"/>
  <int32_t name="tile_width"/>
  <int32_t name="tile_height"/>
  <int32_t name="unk_310"/>
  <int32_t name="unk_314"/>
  <int32_t name="unk_318"/>
  <int32_t name="unk_31c"/>
  <int32_t name="unk_320"/>
  <int32_t name="unk_324"/>
  <int32_t name="unk_328"/>
  <int32_t name="unk_32c"/>
  <int32_t name="center_x_tile"/>
  <int32_t name="center_y_tile"/>
  <pointer name="up" type-name="site_realization_crossroads"/>
  <pointer name="down" type-name="site_realization_crossroads"/>
  <pointer name="right" type-name="site_realization_crossroads"/>
  <pointer name="left" type-name="site_realization_crossroads"/>
  <int8_t name="unk_348"/>
  <int8_t name="unk_349"/>
  <int32_t name="unk_34c"/>
  <int8_t/>
  <int8_t/>
  <int8_t/>
  <int8_t/>
  <int8_t/>
  <int8_t/>
  <static-array name="unk_356" count="32" type-name="coord"/>
</struct-type>

world-site.site_realization_building_type

<enum-type type-name="site_realization_building_type">
  <enum-item name="cottage_plot"/>
  <enum-item name="castle_wall"/>
  <enum-item name="castle_tower"/>
  <enum-item name="castle_courtyard"/>
  <enum-item name="house"/>
  <enum-item name="temple"/>
  <enum-item name="tomb"/>
  <enum-item name="shop_house"/>
  <enum-item name="warehouse"/>
  <enum-item name="market_square"/>
  <enum-item name="pasture"/>
  <enum-item name="waste"/>
  <enum-item name="courtyard"/>
  <enum-item name="well"/>
  <enum-item name="vault"/>
  <enum-item name="great_tower"/>
  <enum-item name="trenches"/>
  <enum-item name="tree_house"/>
  <enum-item name="hillock_house"/>
  <enum-item name="mead_hall"/>
  <enum-item name="fortress_entrance"/>
  <enum-item name="library"/>
  <enum-item name="tavern"/>
</enum-type>

world-site.site_realization_building

<struct-type type-name="site_realization_building" key-field="id">
  <int32_t name="id"/>
  <enum name="type" type-name="site_realization_building_type"/>
  <int32_t name="min_x">
    in tiles relative to site
  </int32_t>
  <int32_t name="min_y"/>
  <int32_t name="max_x"/>
  <int32_t name="max_y"/>
  <int32_t name="unk_18"/>
  <stl-vector name="inhabitants"
      pointer-type="world_site_inhabitant"/>
  <int32_t name="unk_2c"/>
  <compound name="item" type-name="site_building_item"/>
  <int32_t name="abstract_building_id">
    used for temple and mead hall
  </int32_t>
  <int32_t name="unk_44"/>
  <pointer name="building_info"
      type-name="site_realization_building_infost"/>
  <stl-vector name="unk_4c">
    <pointer>
      <int32_t name="unk_0"/>
      <int32_t name="unk_4"/>
      <int32_t name="owner" ref-target="historical_entity"/>
      <int32_t name="unk_c"/>
      <int32_t name="unk_10"/>
      <int32_t name="unk_14"/>
    </pointer>
  </stl-vector>
  <int32_t name="unk_5c">
    bit 0x01 == abandoned
  </int32_t>
  <stl-vector name="unk_60"/>
  <int32_t name="unk_v40_1" init-value="-1000000">
    v0.40.01
  </int32_t>
</struct-type>

world-site.site_realization_building_infost

<class-type type-name="site_realization_building_infost">
  <virtual-methods>
    <vmethod ret-type="site_realization_building_type"
        name="getType"/>
    <vmethod name="write_file">
      <pointer name="file" type-name="file_compressorst"/>
    </vmethod>
    <vmethod name="read_file">
      <pointer name="file" type-name="file_compressorst"/>
      <int32_t name="loadversion"/>
    </vmethod>
    <vmethod is-destructor="true"/>
  </virtual-methods>
</class-type>

world-site.site_building_item

<struct-type type-name="site_building_item">
  <int32_t name="race" ref-target="creature_raw"/>
  <enum base-type="int16_t" name="item_type" type-name="item_type"/>
  <int16_t name="item_subtype" refers-to="(item-subtype-target
      $$._parent.item_type $)"/>
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index"/>
</struct-type>

world-site.tower_shape

<bitfield-type type-name="tower_shape">
  <flag-bit name="round"/>
  <flag-bit name="hollow">
    no internal floors or fortifications
  </flag-bit>
  <flag-bit name="keep">
    fill with rooms at the bottom
  </flag-bit>
  <flag-bit name="goblin">
    ignore set heights and generate automatically
  </flag-bit>
  <flag-bit name="unk10">
    set on goblin towers. doesnt seem to do anything
  </flag-bit>
</bitfield-type>

world-site.site_realization_building_info_castle_wallst

<class-type type-name="site_realization_building_info_castle_wallst"
    inherits-from="site_realization_building_infost">
  <int32_t name="length"/>
  <int32_t name="door_pos"/>
  <int32_t name="start_x"/>
  <int32_t name="start_y"/>
  <int32_t name="start_z"/>
  <int32_t name="end_x"/>
  <int32_t name="end_y"/>
  <int32_t name="end_z"/>
  <compound name="wall_item" type-name="site_building_item"/>
  <compound name="door_item" type-name="site_building_item"/>
</class-type>

world-site.site_realization_building_info_castle_towerst

<class-type type-name="site_realization_building_info_castle_towerst"
    inherits-from="site_realization_building_infost">
  <int32_t name="roof_z"/>
  <int32_t name="base_z">
    can be below ground, but not above ground
  </int32_t>
  <int32_t name="door_n_elevation"/>
  <int32_t name="door_s_elevation"/>
  <int32_t name="soor_e_elevation"/>
  <int32_t name="door_w_elevation"/>
  <compound name="door_item" type-name="site_building_item"/>
  <compound name="wall_item" type-name="site_building_item"/>
  <compound name="shape" type-name="tower_shape"/>
  <int32_t name="unk_40"/>
  <int32_t name="unk_44"/>
</class-type>

world-site.site_realization_building_info_castle_courtyardst

<class-type
    type-name="site_realization_building_info_castle_courtyardst"
    inherits-from="site_realization_building_infost"/>

world-site.site_shop_type

<enum-type type-name="site_shop_type">
  <enum-item name="GeneralImports"/>
  <enum-item name="FoodImports"/>
  <enum-item name="ClothingImports"/>
  <enum-item name="Cloth"/>
  <enum-item name="Leather"/>
  <enum-item name="WovenClothing"/>
  <enum-item name="LeatherClothing"/>
  <enum-item name="BoneCarver"/>
  <enum-item name="GemCutter"/>
  <enum-item name="Weaponsmith"/>
  <enum-item name="Bowyer"/>
  <enum-item name="Blacksmith"/>
  <enum-item name="Armorsmith"/>
  <enum-item name="MetalCraft"/>
  <enum-item name="LeatherGoods"/>
  <enum-item name="Carpenter"/>
  <enum-item name="StoneFurniture"/>
  <enum-item name="MetalFurniture"/>
  <enum-item name="ImportedGoodsMarket"/>
  <enum-item name="ImportedFoodMarket"/>
  <enum-item name="ImportedClothingMarket"/>
  <enum-item name="MeatMarket"/>
  <enum-item name="FruitAndVegetableMarket"/>
  <enum-item name="CheeseMarket"/>
  <enum-item name="ProcessedGoodsMarket"/>
  <enum-item name="Tavern"/>
</enum-type>

world-site.site_realization_building_info_shop_housest

<class-type type-name="site_realization_building_info_shop_housest"
    inherits-from="site_realization_building_infost">
  <enum base-type="int32_t" name="type" type-name="site_shop_type"/>
  <compound name="name" type-name="language_name"/>
</class-type>

world-site.site_realization_building_info_market_squarest

<class-type type-name="site_realization_building_info_market_squarest"
     inherits-from="site_realization_building_infost">
  <enum base-type="int32_t" name="type" type-name="site_shop_type"/>
</class-type>

world-site.site_realization_building_info_trenchesst

<class-type type-name="site_realization_building_info_trenchesst"
    inherits-from="site_realization_building_infost">
  <int32_t name="unk_4"/>
  <static-array name="spokes" count="4">
    <int32_t name="mound_min">
      -30000 = nothing here
    </int32_t>
    <int32_t name="trench_min"/>
    <int32_t name="trench_max"/>
    <int32_t name="mound_max"/>
    N, S, E, W
  </static-array>
</class-type>

world-site.tree_house_type

<enum-type type-name="tree_house_type">
  <enum-item name="TreeHouse"/>
  <enum-item name="HomeTree"/>
  <enum-item name="ShapingTree"/>
  <enum-item name="MarketTree"/>
  <enum-item name="Unknown1"/>
  <enum-item name="Unknown2"/>
</enum-type>

world-site.site_realization_building_info_tree_housest

<class-type type-name="site_realization_building_info_tree_housest"
    inherits-from="site_realization_building_infost">
  <enum base-type="int32_t" name="type" type-name="tree_house_type"/>
  <int32_t name="unk_8"/>
  <compound name="name" type-name="language_name"/>
</class-type>

world-site.hillock_house_type

<enum-type type-name="hillock_house_type">
  <enum-item/>
  <enum-item name="CivicMound"/>
  <enum-item name="CastleMound"/>
  <enum-item name="DrinkingMound"/>
</enum-type>

world-site.site_realization_building_info_hillock_housest

<class-type type-name="site_realization_building_info_hillock_housest"
     inherits-from="site_realization_building_infost">
  <enum base-type="int32_t" name="type"
      type-name="hillock_house_type"/>
</class-type>