map

map.coord2d

<struct-type type-name="coord2d" custom-methods="true">
  <int16_t name="x" init-value="-30000"/>
  <int16_t name="y" init-value="-30000"/>
  <custom-methods>
    <cmethod name="isValid"/>
    <cmethod name="clear"/>
  </custom-methods>
</struct-type>

map.coord2d_path

<struct-type type-name="coord2d_path" custom-methods="true">
  <stl-vector type-name="int16_t" name="x"/>
  <stl-vector type-name="int16_t" name="y"/>
  <custom-methods>
    <cmethod name="size"/>
    <cmethod name="erase"/>
  </custom-methods>
</struct-type>

map.coord

<struct-type type-name="coord" custom-methods="true">
  <int16_t name="x" init-value="-30000"/>
  <int16_t name="y" init-value="-30000"/>
  <int16_t name="z" init-value="-30000"/>
  <custom-methods>
    <cmethod name="isValid"/>
    <cmethod name="clear"/>
  </custom-methods>
</struct-type>

map.coord_path

<struct-type type-name="coord_path" custom-methods="true">
  <stl-vector type-name="int16_t" name="x"/>
  <stl-vector type-name="int16_t" name="y"/>
  <stl-vector type-name="int16_t" name="z"/>
  <custom-methods>
    <cmethod name="empty"/>
    <cmethod name="size"/>
    <cmethod name="clear"/>
    <cmethod name="erase"/>
  </custom-methods>
</struct-type>

map.tile_traffic

<enum-type type-name="tile_traffic" base-type="uint32_t">
  <enum-item name="Normal"/>
  <enum-item name="Low"/>
  <enum-item name="High"/>
  <enum-item name="Restricted"/>
</enum-type>

map.tile_dig_designation

<enum-type type-name="tile_dig_designation" base-type="uint32_t">
  <enum-item name="No">
    no designation
  </enum-item>
  <enum-item name="Default">
    dig walls, remove stairs and ramps, gather plants, fell trees
  </enum-item>
  <enum-item name="UpDownStair"/>
  <enum-item name="Channel"/>
  <enum-item name="Ramp"/>
  <enum-item name="DownStair"/>
  <enum-item name="UpStair"/>
</enum-type>

map.tile_liquid

<enum-type type-name="tile_liquid" base-type="uint32_t">
  <enum-item name="Water"/>
  <enum-item name="Magma"/>
</enum-type>

map.tile_designation

<bitfield-type type-name="tile_designation">
  <flag-bit name="flow_size" count="3">
    liquid amount
  </flag-bit>
  <flag-bit name="pile">
    stockpile?
  </flag-bit>
  <flag-bit name="dig" count="3" type-name="tile_dig_designation"/>
  <flag-bit name="smooth" count="2"/>
  <flag-bit name="hidden"/>
  <flag-bit name="geolayer_index" count="4"/>
  <flag-bit name="light"/>
  <flag-bit name="subterranean"/>
  <flag-bit name="outside"/>
  <flag-bit name="biome" count="4"/>
  <flag-bit name="liquid_type" type-name="tile_liquid"/>
  <flag-bit name="water_table">
    aquifer
  </flag-bit>
  <flag-bit name="rained"/>
  <flag-bit name="traffic" count="2" type-name="tile_traffic"/>
  <flag-bit name="flow_forbid"/>
  <flag-bit name="liquid_static"/>
  <flag-bit name="feature_local"/>
  <flag-bit name="feature_global"/>
  <flag-bit name="water_stagnant"/>
  <flag-bit name="water_salt"/>
</bitfield-type>

map.tile_building_occ

<enum-type type-name="tile_building_occ" base-type="uint32_t">
  <enum-item name="None">
    no building
  </enum-item>
  <enum-item name="Planned">
    nothing built yet
  </enum-item>
  <enum-item name="Passable"/>
  <enum-item name="Obstacle">
    workshop tile; ~fortification
  </enum-item>
  <enum-item name="Well"/>
  <enum-item name="Floored">
    depot; lowered bridge
  </enum-item>
  <enum-item name="Impassable"/>
  <enum-item name="Dynamic">
    doors, grates, etc
  </enum-item>
</enum-type>

map.tile_occupancy

<bitfield-type type-name="tile_occupancy">
  <flag-bit name="building" count="3" type-name="tile_building_occ"/>
  <flag-bit name="unit">
    standing
  </flag-bit>
  <flag-bit name="unit_grounded">
    prone
  </flag-bit>
  <flag-bit name="item"/>
  <flag-bit name="edge_flow_in">
    if set on an edge tile, water or magma will flow in
  </flag-bit>
  <flag-bit name="moss"/>
  <flag-bit name="arrow_color" count="4"/>
  <flag-bit name="arrow_variant"/>
  <flag-bit name="unk13_noncitizen_unit">
    when noncitizen moves in, something happens and it is cleared
  </flag-bit>
  <flag-bit name="monster_lair">
    A monster lair. Items placed wont be moved.
  </flag-bit>
  <flag-bit name="no_grow">
    seems to be set on terrain tiles where grass growth is impossible
  </flag-bit>
  <flag-bit name="unk16"/>
  <flag-bit name="unk17"/>
  <flag-bit name="carve_track_north"/>
  <flag-bit name="carve_track_south"/>
  <flag-bit name="carve_track_east"/>
  <flag-bit name="carve_track_west"/>
  <flag-bit name="unk22"/>
  <flag-bit name="unk23"/>
  <flag-bit name="dig_marked"/>
  <flag-bit name="dig_auto"/>
</bitfield-type>

map.block_flags

<bitfield-type type-name="block_flags">
  <flag-bit name="designated">
    for jobs etc
  </flag-bit>
  <flag-bit name="update_temperature"/>
  <flag-bit name="update_liquid"/>
  <flag-bit name="update_liquid_twice">
    Protects UpdateLiquid from being cleared the first time.
  </flag-bit>
  <flag-bit name="repath_on_freeze">
    reindex_pathfinding set and flag cleared if temperature below
    10000
  </flag-bit>
  <flag-bit name="repath_on_melt">
    reindex_pathfinding set and flag cleared if temperature above
    10000
  </flag-bit>
  <flag-bit name="has_aquifer">
    has actual aquifer tiles (?)
  </flag-bit>
  <flag-bit name="check_aquifer">
    has tiles that may get flooded by an adjacent aquifer
  </flag-bit>
</bitfield-type>

map.z_level_flags

<bitfield-type type-name="z_level_flags">
  <flag-bit name="update"/>
  <flag-bit name="can_stop"/>
  <flag-bit name="update_twice"/>
</bitfield-type>

map.tile_liquid_flow_dir

<enum-type type-name="tile_liquid_flow_dir" base-type="uint16_t">
  <enum-item name="none"/>
  <enum-item name="south"/>
  <enum-item name="east"/>
  <enum-item name="northeast"/>
  <enum-item name="west"/>
  <enum-item name="northwest"/>
  <enum-item name="southeast"/>
  <enum-item name="southwest"/>
  <enum-item name="inv_8"/>
  <enum-item name="inv_9"/>
  <enum-item name="north"/>
  <enum-item name="inv_b"/>
  <enum-item name="inv_c"/>
  <enum-item name="inv_d"/>
  <enum-item name="inv_e"/>
  <enum-item name="inv_f"/>
</enum-type>

map.tile_liquid_flow

<bitfield-type type-name="tile_liquid_flow" base-type="uint16_t">
  <flag-bit name="temp_flow_timer" count="3">
    set when water sloshes around, counts down to zero
  </flag-bit>
  <flag-bit name="unk_1" count="3"/>
  <flag-bit name="perm_flow_dir" count="4"
      type-name="tile_liquid_flow_dir"/>
  <flag-bit name="unk_2" count="6">
    periodically set whenever perm_flow_dir is nonzero
  </flag-bit>
</bitfield-type>

map.tile_bitmask

<struct-type type-name="tile_bitmask" custom-methods="true">
  <static-array name="bits" count="16">
    <uint16_t/>
  </static-array>
  <custom-methods>
    <cmethod name="clear"/>
    <cmethod name="set_all"/>
    <cmethod name="has_assignments"/>
  </custom-methods>
</struct-type>

map.block_burrow

<struct-type type-name="block_burrow" custom-methods="true">
  <int32_t name="id" ref-target="burrow"/>
  <compound name="tile_bitmask" type-name="tile_bitmask"/>
  <pointer name="link" type-name="block_burrow_link"/>
  <custom-methods>
    <cmethod name="has_assignments"/>
  </custom-methods>
</struct-type>

map.map_block

<struct-type type-name="map_block">
  <compound name="flags" type-name="block_flags"/>
  <stl-vector name="block_events" pointer-type="block_square_event"/>
  <df-linked-list name="block_burrows" type-name="block_burrow_link"/>
  <int32_t name="local_feature" init-value="-1">
    index into world_data.region_map
  </int32_t>
  <int32_t name="global_feature" init-value="-1"
      ref-target="world_underground_region"/>
  <int32_t name="unk2" init-value="-1"/>
  <int16_t name="layer_depth">
    uninitialized
  </int16_t>
  <int32_t name="dsgn_check_cooldown"/>
  <compound type-name="tile_designation" name="default_liquid"/>
  <stl-vector name="items">
    <int32_t ref-target="item"/>
  </stl-vector>
  <stl-vector name="flows" pointer-type="flow_info"/>
  <compound name="flow_pool" type-name="flow_reuse_pool"/>
  <stl-vector name='plants' pointer-type='plant'/>
  <compound name="map_pos" type-name="coord"/>
  <compound name="region_pos" type-name="coord2d"/>
  <static-array name="tiletype" count="16">
    <static-array count="16">
      <enum base-type="int16_t" type-name="tiletype"
          init-value="OpenSpace"/>
    </static-array>
  </static-array>
  <static-array name="designation" count="16">
    <static-array count="16">
      <compound type-name="tile_designation"/>
    </static-array>
  </static-array>
  <static-array name="occupancy" count="16">
    <static-array count="16">
      <compound type-name="tile_occupancy"/>
    </static-array>
  </static-array>
  <static-array name="fog_of_war" count="16">
    <static-array count="16" type-name="uint8_t"/>
    for adventure mode
  </static-array>
  <static-array name="path_cost" count="16">
    flood; 256*cost for straight, 362*cost for diagonal
    <static-array count="16">
      <int32_t/>
    </static-array>
  </static-array>
  <static-array name="path_tag" count="16">
    flood; sync to path_distance; same value; inc per run; reset to 0
    on wraparound
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="walkable" count="16">
    0 = non-walkable; same nonzero at A and B = walkable from A to B
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="map_edge_distance" count="16">
    1 at walkable map edge; then +1 per 10 tiles it seems; 0 in dug
    tunnels
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="temperature_1" count="16">
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="temperature_2" count="16">
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="unk13" count="16">
    <static-array count="16">
      <uint16_t/>
    </static-array>
  </static-array>
  <static-array name="liquid_flow" count="16">
    <static-array count="16">
      <compound type-name="tile_liquid_flow"/>
    </static-array>
  </static-array>
  <static-array name="region_offset" count="9">
    <uint8_t/>
  </static-array>
</struct-type>

map.cave_column

<class-type type-name="cave_column" original-name="cave_columnst">
  <int16_t/>
  <int16_t/>
  <int16_t init-value="30000"/>
  <int8_t/>
  <virtual-methods>
    <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>
  </virtual-methods>
</class-type>

map.cave_column_rectangle

<class-type type-name="cave_column_rectangle"
    original-name="cave_column_rectanglest">
  <int32_t/>
  <int16_t/>
  <int16_t/>
  <int16_t/>
  <int16_t/>
  <int16_t/>
  <stl-vector type-name="int16_t"/>
  <stl-vector type-name="int16_t"/>
  <stl-vector type-name="int16_t"/>
  <int32_t/>
  <virtual-methods>
    <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>
  </virtual-methods>
</class-type>

map.map_block_column

<struct-type type-name="map_block_column">
  <int16_t name="sink_level">
    water at or above this level sinks into aquifer tiles
  </int16_t>
  <int16_t name="beach_level">
    water at this level disappears if above more water
  </int16_t>
  <int16_t name="ground_level">
    for coloring unallocated blocks
  </int16_t>
  <stl-vector name="unmined_glyphs">
    <pointer>
      <static-array name="x" count="4" type-name="int16_t"/>
      <static-array name="y" count="4" type-name="int16_t"/>
      <static-array name="tile" count="4" type-name="uint8_t"/>
    </pointer>
  </stl-vector>
  <int16_t name="z_base"/>
  <static-array name="cave_columns" count="16">
    <static-array count="16">
      <df-linked-list type-name="cave_column_link"/>
    </static-array>
  </static-array>
  <stl-vector name="column_rectangles"
      pointer-type="cave_column_rectangle"/>
  <int16_t name="z_shift">
    seems to be 0 originally, but updated when map is shifted
  </int16_t>
  <df-flagarray name="flags">
    0 process cave columns for caveins
  </df-flagarray>
  <static-array name="unk_v40_1" count="16">
    <static-array count="16" type-name="int16_t" init-value="100"/>
    v0.40.1
  </static-array>
  <compound name="map_pos" type-name="coord2d">
    top left in tiles
  </compound>
  <int16_t name="unk_c3c">
    uninitialized
  </int16_t>
  <compound name="region_pos" type-name="coord2d"/>
  <stl-vector name="plants" pointer-type="plant"/>
</struct-type>

map.block_square_event_type

<enum-type type-name="block_square_event_type">
  <enum-item name="mineral"/>
  <enum-item name="frozen_liquid"/>
  <enum-item name="world_construction"/>
  <enum-item name="material_spatter"/>
  <enum-item name="grass"/>
  <enum-item name="spoor"/>
  <enum-item name="item_spatter"/>
  <enum-item name="designation_priority"/>
</enum-type>

map.block_square_event

<class-type type-name="block_square_event"
    original-name="block_square_eventst">
  <virtual-methods>
    <vmethod ret-type="block_square_event_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 ret-type="bool" name="isEmpty"/>
    <vmethod is-destructor="true"/>
    <vmethod name="checkTemperature">
      <int16_t name="x"/>
      <int16_t name="y"/>
      <int16_t name="temperature"/>
    </vmethod>
  </virtual-methods>
</class-type>

map.block_square_event_mineralst

<class-type type-name="block_square_event_mineralst"
    inherits-from="block_square_event" custom-methods="true">
  <int32_t name="inorganic_mat" ref-target="inorganic_raw"/>
  <compound name="tile_bitmask" type-name="tile_bitmask"/>
  <bitfield name="flags">
    <flag-bit name="discovered"/>
    <flag-bit name="cluster"/>
    <flag-bit name="vein"/>
    <flag-bit name="cluster_small"/>
    <flag-bit name="cluster_one"/>
  </bitfield>
  <custom-methods>
    <cmethod name="has_assignments"/>
  </custom-methods>
</class-type>

map.block_square_event_frozen_liquidst

<class-type type-name="block_square_event_frozen_liquidst"
    inherits-from="block_square_event">
  <static-array name="tiles" count="16">
    <static-array count="16">
      <enum base-type="int16_t" type-name="tiletype"/>
    </static-array>
  </static-array>
  <static-array name="liquid_type" count="16">
    <static-array count="16">
      <enum base-type="int8_t" type-name="tile_liquid"/>
    </static-array>
  </static-array>
</class-type>

map.block_square_event_world_constructionst

<class-type type-name="block_square_event_world_constructionst"
    inherits-from="block_square_event">
  <int32_t name="construction_id" ref-target="world_construction"/>
  <compound name="tile_bitmask" type-name="tile_bitmask"/>
</class-type>

map.block_square_event_material_spatterst

<class-type type-name="block_square_event_material_spatterst"
    inherits-from="block_square_event">
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index"/>
  <int16_t name="mat_state"/>
  <static-array name="amount" count="16">
    <static-array count="16" type-name="uint8_t"/>
  </static-array>
  <uint16_t name="min_temperature"/>
  <uint16_t name="max_temperature"/>
</class-type>

map.block_square_event_grassst

<class-type type-name="block_square_event_grassst"
    inherits-from="block_square_event">
  <int32_t name="plant_index" ref-target="plant_raw"/>
  <static-array name="amount" count="16">
    <static-array count="16" type-name="int8_t"/>
  </static-array>
</class-type>

map.block_square_event_spoorst

<class-type type-name="block_square_event_spoorst"
    inherits-from="block_square_event">
  <static-array count="16">
    <static-array count="16" type-name="int16_t"/>
  </static-array>
  <static-array count="16">
    <static-array count="16" type-name="int8_t"/>
  </static-array>
  <static-array count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
  <static-array count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
  <static-array count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
  <static-array count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
  <int32_t/>
  <int32_t/>
</class-type>

map.block_square_event_item_spatterst

<class-type type-name="block_square_event_item_spatterst"
    inherits-from="block_square_event">
  <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="mattype" ref-target="material"
      aux-value="$$.matindex"/>
  <int32_t name="matindex"/>
  <int32_t name="unk1"/>
  <static-array name="amount" count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
  <static-array name="unk2" count="16">
    <static-array count="16" type-name="int8_t"/>
  </static-array>
  <uint16_t name="temp1"/>
  <uint16_t name="temp2"/>
</class-type>

map.block_square_event_designation_priorityst

<class-type type-name="block_square_event_designation_priorityst"
    inherits-from="block_square_event">
  <static-array name="priority" count="16">
    <static-array count="16" type-name="int32_t"/>
  </static-array>
</class-type>

map.feature_type

<enum-type type-name="feature_type">
  <enum-item name="outdoor_river"/>
  <enum-item name="cave"/>
  <enum-item name="pit"/>
  <enum-item name="magma_pool"/>
  <enum-item name="volcano"/>
  <enum-item name="deep_special_tube"/>
  <enum-item name="deep_surface_portal"/>
  <enum-item name="subterranean_from_layer"/>
  <enum-item name="magma_core_from_layer"/>
  <enum-item name="feature_underworld_from_layer"/>
</enum-type>

map.feature

<class-type type-name="feature" original-name="featurest">
  <stl-vector name="population" pointer-type="world_population"/>
  <int32_t/>
  <int16_t/>
  <compound name="embark_pos" type-name="coord2d_path"/>
  <stl-vector name="min_map_z" type-name="int16_t"/>
  <stl-vector name="max_map_z" type-name="int16_t"/>
  <virtual-methods>
    <vmethod ret-type="feature_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>
      <int32_t/>
      <int32_t/>
      <int32_t/>
    </vmethod>
    <vmethod/>
    <vmethod is-destructor="true"/>
  </virtual-methods>
</class-type>

map.feature_outdoor_riverst

<class-type type-name="feature_outdoor_riverst"
    inherits-from="feature"/>

map.feature_cavest

<class-type type-name="feature_cavest" inherits-from="feature"/>

map.feature_pitst

<class-type type-name="feature_pitst" inherits-from="feature"/>

map.feature_magma_poolst

<class-type type-name="feature_magma_poolst" inherits-from="feature">
  <int32_t name="magma_fill_z"/>
</class-type>

map.feature_volcanost

<class-type type-name="feature_volcanost" inherits-from="feature">
  <int32_t name="magma_fill_z"/>
</class-type>

map.feature_deep_special_tubest

<class-type type-name="feature_deep_special_tubest"
    inherits-from="feature"/>

map.feature_deep_surface_portalst

<class-type type-name="feature_deep_surface_portalst"
    inherits-from="feature"/>

map.feature_subterranean_from_layerst

<class-type type-name="feature_subterranean_from_layerst"
    inherits-from="feature"/>

map.feature_magma_core_from_layerst

<class-type type-name="feature_magma_core_from_layerst"
    inherits-from="feature"/>

map.feature_underworld_from_layerst

<class-type type-name="feature_underworld_from_layerst"
    inherits-from="feature"/>

map.feature_init_flags

<enum-type type-name="feature_init_flags">
  <enum-item/>
  <enum-item/>
  <enum-item/>
  <enum-item name="Discovered"/>
</enum-type>

map.feature_init

<class-type type-name="feature_init" original-name="feature_initst">
  <df-flagarray name="flags" index-enum="feature_init_flags"/>
  <stl-vector name="alterations" pointer-type="feature_alteration"/>
  <int16_t name="start_x"/>
  <int16_t name="start_y"/>
  <int16_t name="end_x"/>
  <int16_t name="end_y"/>
  <int16_t name="start_depth">
    in underground layers
  </int16_t>
  <int16_t name="end_depth"/>
  <virtual-methods>
    <vmethod ret-type="feature_type" name="getType"/>
    <vmethod name="write_file">
      <pointer name="file" type-name="file_compressorst"/>
      <int32_t/>
    </vmethod>
    <vmethod name="read_file">
      <pointer name="file" type-name="file_compressorst"/>
      <int32_t name="loadversion"/>
      <int32_t/>
    </vmethod>
    <vmethod name="createFeature">
      <ret-type>
        <pointer type-name="feature"/>
      </ret-type>
    </vmethod>
    <vmethod name="recreateFeature">
      <ret-type>
        <pointer type-name="feature"/>
      </ret-type>
      destroyFeature(), then createFeature()
    </vmethod>
    <vmethod name="destroyFeature"/>
    <vmethod name="getFeature">
      <ret-type>
        <pointer type-name="feature"/>
      </ret-type>
    </vmethod>
    <vmethod is-destructor="true"/>
    <vmethod name="getMaterial">
      <pointer name="mat_type" type-name="int16_t"/>
      <pointer name="mat_index" type-name="int32_t"/>
    </vmethod>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="bool"/>
    <vmethod name="getColor">
      <pointer name="foreground" type-name="int16_t"/>
      <pointer name="background" type-name="int16_t"/>
      <pointer name="bright" type-name="int8_t"/>
    </vmethod>
    <vmethod name="getName">
      <pointer name="name" type-name="stl-string"/>
    </vmethod>
    <vmethod name="isWater" ret-type="bool"/>
    <vmethod name="isSubterranean" ret-type="bool"/>
    <vmethod name="isMagma" ret-type="bool"/>
    <vmethod name="isChasm" ret-type="bool"/>
    <vmethod name="isLayer" ret-type="bool"/>
    <vmethod ret-type="bool"/>
    <vmethod ret-type="int32_t" name="getLayer"/>
  </virtual-methods>
</class-type>

map.feature_init_outdoor_riverst

<class-type type-name="feature_init_outdoor_riverst"
    inherits-from="feature_init">
  <pointer name="feature" type-name="feature_outdoor_riverst"/>
</class-type>

map.feature_init_cavest

<class-type type-name="feature_init_cavest"
    inherits-from="feature_init">
  <pointer name="feature" type-name="feature_cavest"/>
</class-type>

map.feature_init_pitst

<class-type type-name="feature_init_pitst"
    inherits-from="feature_init">
  <pointer name="feature" type-name="feature_pitst"/>
</class-type>

map.feature_init_magma_poolst

<class-type type-name="feature_init_magma_poolst"
    inherits-from="feature_init">
  <pointer name="feature" type-name="feature_magma_poolst"/>
</class-type>

map.feature_init_volcanost

<class-type type-name="feature_init_volcanost"
    inherits-from="feature_init">
  <pointer name="feature" type-name="feature_volcanost"/>
</class-type>

map.feature_init_deep_special_tubest

<class-type type-name="feature_init_deep_special_tubest"
    inherits-from="feature_init">
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index"/>
  <pointer name="feature" type-name="feature_deep_special_tubest"/>
</class-type>

map.feature_init_deep_surface_portalst

<class-type type-name="feature_init_deep_surface_portalst"
    inherits-from="feature_init">
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index"/>
  <pointer name="feature" type-name="feature_deep_surface_portalst"/>
</class-type>

map.feature_init_subterranean_from_layerst

<class-type type-name="feature_init_subterranean_from_layerst"
    inherits-from="feature_init">
  <int32_t name="layer" ref-target="world_underground_region"/>
  <pointer name="feature"
      type-name="feature_subterranean_from_layerst"/>
</class-type>

map.feature_init_magma_core_from_layerst

<class-type type-name="feature_init_magma_core_from_layerst"
    inherits-from="feature_init">
  <int32_t name="layer" ref-target="world_underground_region"/>
  <pointer name="feature"
      type-name="feature_magma_core_from_layerst"/>
</class-type>

map.feature_init_underworld_from_layerst

<class-type type-name="feature_init_underworld_from_layerst"
    inherits-from="feature_init">
  <int32_t name="layer" ref-target="world_underground_region"/>
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index"/>
  <pointer name="feature"
      type-name="feature_underworld_from_layerst"/>
</class-type>

map.feature_alteration_type

<enum-type type-name="feature_alteration_type">
  <enum-item name="new_pop_max"/>
  <enum-item name="new_lava_fill_z"/>
</enum-type>

map.feature_alteration

<class-type type-name="feature_alteration"
    original-name="feature_alterationst">
  <virtual-methods>
    <vmethod ret-type="feature_alteration_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>

map.feature_alteration_new_pop_maxst

<class-type type-name="feature_alteration_new_pop_maxst"
    inherits-from="feature_alteration">
  <int32_t/>
  <int32_t/>
</class-type>

map.feature_alteration_new_lava_fill_zst

<class-type type-name="feature_alteration_new_lava_fill_zst"
    inherits-from="feature_alteration">
  <int32_t name="magma_fill_z"/>
</class-type>

map.world_construction_type

<enum-type type-name="world_construction_type">
  <enum-item name="ROAD"/>
  <enum-item name="TUNNEL"/>
  <enum-item name="BRIDGE"/>
  <enum-item name="WALL"/>
</enum-type>

map.world_construction_square

<class-type type-name="world_construction_square"
    original-name="world_construction_squarest">
  <compound name="region_pos" type-name="coord2d"/>
  <int32_t name="construction_id" ref-target="world_construction"/>
  <stl-vector name="embark_x" type-name="int16_t"/>
  <stl-vector name="embark_y" type-name="int16_t"/>
  <stl-vector name="embark_unk" type-name="int16_t"/>
  <stl-vector name="embark_z" type-name="int16_t"/>
  <virtual-methods>
    <vmethod ret-type="world_construction_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>

map.world_construction_square_roadst

<class-type type-name="world_construction_square_roadst"
    inherits-from="world_construction_square">
  <enum type-name="item_type" base-type="int16_t" 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"/>
</class-type>

map.world_construction_square_tunnelst

<class-type type-name="world_construction_square_tunnelst"
    inherits-from="world_construction_square"/>

map.world_construction_square_bridgest

<class-type type-name="world_construction_square_bridgest"
    inherits-from="world_construction_square">
  <int32_t name="road_id" ref-target="world_construction">
    guess
  </int32_t>
  <enum type-name="item_type" base-type="int16_t" 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"/>
</class-type>

map.world_construction_square_wallst

<class-type type-name="world_construction_square_wallst"
    inherits-from="world_construction_square">
  <enum type-name="item_type" base-type="int16_t" 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"/>
</class-type>

map.world_construction

<class-type type-name="world_construction"
    original-name="world_constructionst"
    instance-vector="$global.world.world_data.constructions.list"
    key-field="id">
  <int32_t name="id"/>
  <stl-vector name="square_obj"
      pointer-type="world_construction_square"/>
  <compound name="square_pos" type-name="coord2d_path"/>
  <virtual-methods>
    <vmethod ret-type="world_construction_type" name="getType"/>
    <vmethod name="getName">
      <ret-type>
        <pointer type-name="language_name"/>
      </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"/>
  </virtual-methods>
</class-type>

map.world_construction_roadst

<class-type type-name="world_construction_roadst"
    inherits-from="world_construction">
  <compound type-name="language_name" name="name"/>
</class-type>

map.world_construction_tunnelst

<class-type type-name="world_construction_tunnelst"
    inherits-from="world_construction">
  <compound type-name="language_name" name="name"/>
</class-type>

map.world_construction_bridgest

<class-type type-name="world_construction_bridgest"
    inherits-from="world_construction">
  <compound type-name="language_name" name="name"/>
</class-type>

map.world_construction_wallst

<class-type type-name="world_construction_wallst"
    inherits-from="world_construction">
  <compound type-name="language_name" name="name"/>
</class-type>

map.biome_type

<enum-type type-name="biome_type">
  <enum-item name="MOUNTAIN"/>
  <enum-item name="GLACIER"/>
  <enum-item name="TUNDRA"/>
  <enum-item name="SWAMP_TEMPERATE_FRESHWATER"/>
  <enum-item name="SWAMP_TEMPERATE_SALTWATER"/>
  <enum-item name="MARSH_TEMPERATE_FRESHWATER"/>
  <enum-item name="MARSH_TEMPERATE_SALTWATER"/>
  <enum-item name="SWAMP_TROPICAL_FRESHWATER"/>
  <enum-item name="SWAMP_TROPICAL_SALTWATER"/>
  <enum-item name="SWAMP_MANGROVE"/>
  <enum-item name="MARSH_TROPICAL_FRESHWATER"/>
  <enum-item name="MARSH_TROPICAL_SALTWATER"/>
  <enum-item name="FOREST_TAIGA"/>
  <enum-item name="FOREST_TEMPERATE_CONIFER"/>
  <enum-item name="FOREST_TEMPERATE_BROADLEAF"/>
  <enum-item name="FOREST_TROPICAL_CONIFER"/>
  <enum-item name="FOREST_TROPICAL_DRY_BROADLEAF"/>
  <enum-item name="FOREST_TROPICAL_MOIST_BROADLEAF"/>
  <enum-item name="GRASSLAND_TEMPERATE"/>
  <enum-item name="SAVANNA_TEMPERATE"/>
  <enum-item name="SHRUBLAND_TEMPERATE"/>
  <enum-item name="GRASSLAND_TROPICAL"/>
  <enum-item name="SAVANNA_TROPICAL"/>
  <enum-item name="SHRUBLAND_TROPICAL"/>
  <enum-item name="DESERT_BADLAND"/>
  <enum-item name="DESERT_ROCK"/>
  <enum-item name="DESERT_SAND"/>
  <enum-item name="OCEAN_TROPICAL"/>
  <enum-item name="OCEAN_TEMPERATE"/>
  <enum-item name="OCEAN_ARCTIC"/>
  <enum-item name="POOL_TEMPERATE_FRESHWATER"/>
  <enum-item name="POOL_TEMPERATE_BRACKISHWATER"/>
  <enum-item name="POOL_TEMPERATE_SALTWATER"/>
  <enum-item name="POOL_TROPICAL_FRESHWATER"/>
  <enum-item name="POOL_TROPICAL_BRACKISHWATER"/>
  <enum-item name="POOL_TROPICAL_SALTWATER"/>
  <enum-item name="LAKE_TEMPERATE_FRESHWATER"/>
  <enum-item name="LAKE_TEMPERATE_BRACKISHWATER"/>
  <enum-item name="LAKE_TEMPERATE_SALTWATER"/>
  <enum-item name="LAKE_TROPICAL_FRESHWATER"/>
  <enum-item name="LAKE_TROPICAL_BRACKISHWATER"/>
  <enum-item name="LAKE_TROPICAL_SALTWATER"/>
  <enum-item name="RIVER_TEMPERATE_FRESHWATER"/>
  <enum-item name="RIVER_TEMPERATE_BRACKISHWATER"/>
  <enum-item name="RIVER_TEMPERATE_SALTWATER"/>
  <enum-item name="RIVER_TROPICAL_FRESHWATER"/>
  <enum-item name="RIVER_TROPICAL_BRACKISHWATER"/>
  <enum-item name="RIVER_TROPICAL_SALTWATER"/>
  <enum-item name="SUBTERRANEAN_WATER"/>
  <enum-item name="SUBTERRANEAN_CHASM"/>
  <enum-item name="SUBTERRANEAN_LAVA"/>
</enum-type>

map.construction_flags

<bitfield-type type-name="construction_flags" base-type="uint8_t">
  <flag-bit name="no_build_item">
    build item is created from scratch upon removing construction,
    does not exist beforehand
  </flag-bit>
  <flag-bit name="top_of_wall">
    used on the floors above constructed walls so you cannot remove
    them
  </flag-bit>
</bitfield-type>

map.construction

<struct-type type-name="construction"
    instance-vector="$global.world.constructions" key-field="pos">
  <compound name="pos" type-name="coord"/>
  <enum type-name="item_type" base-type="int16_t" 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"/>
  <compound type-name="construction_flags" name="flags"/>
  <enum base-type="int16_t" type-name="tiletype"
      name="original_tile"/>
</struct-type>

map.flow_type

<enum-type type-name="flow_type" base-type="int16_t">
  <enum-item name="Miasma"/>
  <enum-item name="Steam">
    only if mat_type=1
  </enum-item>
  <enum-item name="Mist"/>
  <enum-item name="MaterialDust"/>
  <enum-item name="MagmaMist"/>
  <enum-item name="Smoke"/>
  <enum-item name="Dragonfire"/>
  <enum-item name="Fire"/>
  <enum-item name="Web"/>
  <enum-item name="MaterialGas"/>
  <enum-item name="MaterialVapor"/>
  <enum-item name="OceanWave"/>
  <enum-item name="SeaFoam"/>
  <enum-item name="ItemCloud"/>
</enum-type>

map.flow_info

<struct-type type-name="flow_info">
  <enum type-name="flow_type" base-type="int16_t" name="type"/>
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index" init-value="-1"/>
  <int16_t name="density"/>
  <compound name="pos" type-name="coord"/>
  <compound name="dest" type-name="coord"/>
  <bool name="expanding" init-value="1"/>
  <bool name="reuse"/>
  <int32_t name="guide_id" ref-target="flow_guide"/>
</struct-type>

map.flow_reuse_pool

<struct-type type-name="flow_reuse_pool">
  <int32_t name="reuse_idx" init-value="-1"/>
  <bitfield name="flags">
    <flag-bit name="active"/>
  </bitfield>
</struct-type>

map.flow_guide_type

<enum-type type-name="flow_guide_type">
  <enum-item name="TrailingFlow"/>
  <enum-item name="ItemCloud"/>
</enum-type>

map.flow_guide

<class-type type-name="flow_guide" original-name="flow_guidest"
    key-field="id" instance-vector="$global.world.flow_guides.all">
  <int32_t name="id"/>
  <int8_t name="unk_8"/>
  <virtual-methods>
    <vmethod ret-type="flow_guide_type" name="getType"/>
    <vmethod>
      <int16_t name="x"/>
      <int16_t name="y"/>
      <int16_t name="z"/>
    </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>
      <pointer type-name="flow_info"/>
    </vmethod>
    <vmethod is-destructor="true"/>
  </virtual-methods>
</class-type>

map.flow_guide_trailing_flowst

<class-type type-name="flow_guide_trailing_flowst"
    inherits-from="flow_guide">
  <static-array type-name="coord" count="15"/>
</class-type>

map.flow_guide_item_cloudst

<class-type type-name="flow_guide_item_cloudst"
    inherits-from="flow_guide">
  <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="mattype" ref-target="material"
      aux-value="$$.matindex"/>
  <int32_t name="matindex"/>
  <int32_t name="unk_18"/>
  <int32_t name="unk_1c"/>
  <static-array type-name="coord" count="15"/>
</class-type>

map.effect_info

<struct-type type-name="effect_info">
  <int32_t name="id">
    assigned during Save
  </int32_t>
  <pointer type-name="job"/>
  <int16_t name="type">
    2 = falling into chasm
  </int16_t>
  <int16_t name="foreground"/>
  <int16_t name="background"/>
  <int8_t name="bright"/>
  <compound type-name="coord" name="pos"/>
  <int32_t name="timer"/>
</struct-type>