refs

refs.general_ref_type

<enum-type type-name="general_ref_type">
  <enum-item name="ARTIFACT"/>
  <enum-item name="IS_ARTIFACT"/>
  <enum-item name="NEMESIS"/>
  <enum-item name="IS_NEMESIS"/>
  <enum-item name="ITEM"/>
  <enum-item name="ITEM_TYPE"/>
  <enum-item name="COINBATCH"/>
  <enum-item name="MAPSQUARE"/>
  <enum-item name="ENTITY_ART_IMAGE"/>
  <enum-item name="CONTAINS_UNIT"/>
  <enum-item name="CONTAINS_ITEM"/>
  <enum-item name="CONTAINED_IN_ITEM"/>
  <enum-item name="PROJECTILE"/>
  <enum-item name="UNIT"/>
  <enum-item name="UNIT_MILKEE"/>
  <enum-item name="UNIT_TRAINEE"/>
  <enum-item name="UNIT_ITEMOWNER"/>
  <enum-item name="UNIT_TRADEBRINGER"/>
  <enum-item name="UNIT_HOLDER"/>
  <enum-item name="UNIT_WORKER"/>
  <enum-item name="UNIT_CAGEE"/>
  <enum-item name="UNIT_BEATEE"/>
  <enum-item name="UNIT_FOODRECEIVER"/>
  <enum-item name="UNIT_KIDNAPEE"/>
  <enum-item name="UNIT_PATIENT"/>
  <enum-item name="UNIT_INFANT"/>
  <enum-item name="UNIT_SLAUGHTEREE"/>
  <enum-item name="UNIT_SHEAREE"/>
  <enum-item name="UNIT_SUCKEE"/>
  <enum-item name="UNIT_REPORTEE"/>
  <enum-item name="BUILDING"/>
  <enum-item name="BUILDING_CIVZONE_ASSIGNED"/>
  <enum-item name="BUILDING_TRIGGER"/>
  <enum-item name="BUILDING_TRIGGERTARGET"/>
  <enum-item name="BUILDING_CHAIN"/>
  <enum-item name="BUILDING_CAGED"/>
  <enum-item name="BUILDING_HOLDER"/>
  <enum-item name="BUILDING_WELL_TAG"/>
  <enum-item name="BUILDING_USE_TARGET_1"/>
  <enum-item name="BUILDING_USE_TARGET_2"/>
  <enum-item name="BUILDING_DESTINATION"/>
  <enum-item name="BUILDING_NEST_BOX"/>
  <enum-item name="ENTITY"/>
  <enum-item name="ENTITY_STOLEN"/>
  <enum-item name="ENTITY_OFFERED"/>
  <enum-item name="ENTITY_ITEMOWNER"/>
  <enum-item name="LOCATION"/>
  <enum-item name="INTERACTION"/>
  <enum-item name="ABSTRACT_BUILDING"/>
  <enum-item name="HISTORICAL_EVENT"/>
  <enum-item name="SPHERE"/>
  <enum-item name="SITE"/>
  <enum-item name="SUBREGION"/>
  <enum-item name="FEATURE_LAYER"/>
  <enum-item name="HISTORICAL_FIGURE"/>
  <enum-item name="ENTITY_POP"/>
  <enum-item name="CREATURE"/>
  <enum-item name="UNIT_RIDER"/>
  <enum-item name="UNIT_CLIMBER"/>
  <enum-item name="UNIT_GELDEE"/>
  <enum-item name="KNOWLEDGE_SCHOLAR_FLAG"/>
  <enum-item name="ACTIVITY_EVENT"/>
  <enum-item name="VALUE_LEVEL"/>
  <enum-item name="LANGUAGE"/>
  <enum-item name="WRITTEN_CONTENT"/>
  <enum-item name="POETIC_FORM"/>
  <enum-item name="MUSICAL_FORM"/>
  <enum-item name="DANCE_FORM"/>
</enum-type>

refs.general_ref

<class-type type-name="general_ref" original-name="general_refst">
  <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>
    <vmethod ret-type="general_ref_type" name="getType"/>
    <vmethod name="getItem">
      <ret-type>
        <pointer type-name="item"/>
      </ret-type>
    </vmethod>
    <vmethod name="getUnit">
      <ret-type>
        <pointer type-name="unit"/>
      </ret-type>
    </vmethod>
    <vmethod name="getProjectile">
      <ret-type>
        <pointer type-name="projectile"/>
      </ret-type>
    </vmethod>
    <vmethod name="getBuilding">
      <ret-type>
        <pointer type-name="building"/>
      </ret-type>
    </vmethod>
    <vmethod name="getEntity">
      <ret-type>
        <pointer type-name="historical_entity"/>
      </ret-type>
    </vmethod>
    <vmethod name="getArtifact">
      <ret-type>
        <pointer type-name="artifact_record"/>
      </ret-type>
    </vmethod>
    <vmethod name="getNemesis">
      <ret-type>
        <pointer type-name="nemesis_record"/>
      </ret-type>
    </vmethod>
    <vmethod name="getEvent">
      <ret-type>
        <pointer type-name="activity_event"/>
      </ret-type>
    </vmethod>
    <vmethod name="setID">
      <int32_t/>
    </vmethod>
    <vmethod ret-type="int32_t" name="getID"/>
    <vmethod name="setLocation">
      <int32_t/>
      <int32_t/>
      <int32_t/>
    </vmethod>
    <vmethod name="getLocation">
      <pointer type-name="int32_t"/>
      <pointer type-name="int32_t"/>
      <pointer type-name="int32_t"/>
    </vmethod>
    <vmethod is-destructor="true"/>
    <vmethod name="clone">
      <ret-type>
        <pointer type-name="general_ref"/>
      </ret-type>
    </vmethod>
    <vmethod>
      <int32_t/>
      <pointer type-name="stl-string"/>
    </vmethod>
    <vmethod name="getDescription">
      <pointer name="str" type-name="stl-string"/>
    </vmethod>
    <vmethod name="getDescription2">
      <pointer name="str" type-name="stl-string"/>
    </vmethod>
    <vmethod name="getDescription3">
      <pointer name="str" type-name="stl-string"/>
      for scholar flags
    </vmethod>
  </virtual-methods>
</class-type>

refs.general_ref_artifact

<class-type type-name="general_ref_artifact"
    inherits-from="general_ref"
    original-name="general_ref_artifactst">
  <int32_t name="artifact_id" ref-target="artifact_record"/>
</class-type>

refs.general_ref_nemesis

<class-type type-name="general_ref_nemesis"
    inherits-from="general_ref" original-name="general_ref_nemesisst">
  <int32_t name="nemesis_id" ref-target="nemesis_record"/>
</class-type>

refs.general_ref_item

<class-type type-name="general_ref_item" inherits-from="general_ref"
    original-name="general_ref_itemst">
  <int32_t name="item_id" ref-target="item"/>
</class-type>

refs.general_ref_item_type

<class-type type-name="general_ref_item_type"
    inherits-from="general_ref"
    original-name="general_ref_item_typest">
  <enum base-type="int32_t" name="type" type-name="item_type"/>
  <int32_t name="subtype" refers-to="(item-subtype-target
      $$._parent.type $)"/>
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int16_t name="mat_index" init-value="-1"/>
</class-type>

refs.general_ref_coinbatch

<class-type type-name="general_ref_coinbatch"
    inherits-from="general_ref"
    original-name="general_ref_coinbatchst">
  <int32_t name="batch"/>
</class-type>

refs.general_ref_mapsquare

<class-type type-name="general_ref_mapsquare"
    inherits-from="general_ref"
    original-name="general_ref_mapsquarest">
  <enum base-type="int16_t" name="tiletype" type-name="tiletype"/>
  <int16_t name="mat_type" ref-target="material"
      aux-value="$$.mat_index"/>
  <int32_t name="mat_index" init-value="-1"/>
</class-type>

refs.general_ref_entity_art_image

<class-type type-name="general_ref_entity_art_image"
    inherits-from="general_ref"
    original-name="general_ref_entity_art_imagest">
  <int32_t name="entity_id" ref-target="historical_entity"/>
  <int32_t name="index">
    lookup in entity.resources.art_image_*
  </int32_t>
</class-type>

refs.general_ref_projectile

<class-type type-name="general_ref_projectile"
    inherits-from="general_ref"
    original-name="general_ref_projectilest">
  <int32_t name="projectile_id" ref-target="projectile"/>
</class-type>

refs.general_ref_unit

<class-type type-name="general_ref_unit" inherits-from="general_ref"
    original-name="general_ref_unitst">
  <int32_t name="unit_id" ref-target="unit"/>
</class-type>

refs.general_ref_building

<class-type type-name="general_ref_building"
    inherits-from="general_ref"
    original-name="general_ref_buildingst">
  <int32_t name="building_id" ref-target="building"/>
</class-type>

refs.general_ref_entity

<class-type type-name="general_ref_entity" inherits-from="general_ref"
     original-name="general_ref_entityst">
  <int32_t name="entity_id" ref-target="historical_entity"/>
</class-type>

refs.general_ref_locationst

<class-type type-name="general_ref_locationst"
    inherits-from="general_ref">
  <int32_t/>
  <int32_t/>
  <int32_t/>
</class-type>

refs.general_ref_interactionst

<class-type type-name="general_ref_interactionst"
    inherits-from="general_ref">
  <int32_t name="interaction_id" ref-target="interaction"/>
  <int32_t name="source_id" ref-target="interaction_source"
      aux-value="$$.interaction_id"/>
  <int32_t name="unk_08"/>
  <int32_t name="unk_0c"/>
</class-type>

refs.general_ref_abstract_buildingst

<class-type type-name="general_ref_abstract_buildingst"
    inherits-from="general_ref">
  <int32_t name="site_id" ref-target="world_site"/>
  <int32_t name="building_id" ref-target="abstract_building"
      aux-value="$$.site_id"/>
</class-type>

refs.general_ref_historical_eventst

<class-type type-name="general_ref_historical_eventst"
    inherits-from="general_ref">
  <int32_t name="event_id" ref-target="history_event"/>
</class-type>

refs.general_ref_spherest

<class-type type-name="general_ref_spherest"
    inherits-from="general_ref">
  <enum base-type="int16_t" name="sphere_type"
      type-name="sphere_type"/>
</class-type>

refs.general_ref_sitest

<class-type type-name="general_ref_sitest"
    inherits-from="general_ref">
  <int32_t name="site_id" ref-target="world_site"/>
</class-type>

refs.general_ref_subregionst

<class-type type-name="general_ref_subregionst"
    inherits-from="general_ref">
  <int32_t name="region_id" ref-target="world_region"/>
</class-type>

refs.general_ref_feature_layerst

<class-type type-name="general_ref_feature_layerst"
    inherits-from="general_ref">
  <int32_t name="underground_region_id"
      ref-target="world_underground_region"/>
</class-type>

refs.general_ref_historical_figurest

<class-type type-name="general_ref_historical_figurest"
    inherits-from="general_ref">
  <int32_t name="hist_figure_id" ref-target="historical_figure"/>
</class-type>

refs.general_ref_entity_popst

<class-type type-name="general_ref_entity_popst"
    inherits-from="general_ref">
  <int32_t/>
  <int32_t name="race" ref-target="creature_raw"/>
  <int32_t/>
  <bitfield name="flags">
    <flag-bit name="animated_corpse"/>
    <flag-bit name="ghostly"/>
  </bitfield>
</class-type>

refs.general_ref_creaturest

<class-type type-name="general_ref_creaturest"
    inherits-from="general_ref">
  <int32_t name="race" ref-target="creature_raw"/>
  <int32_t name="caste" ref-target="caste_raw" aux-value="$$.race"/>
  <int32_t/>
  <int32_t/>
  <bitfield name="flags">
    <flag-bit name="animated_corpse"/>
    <flag-bit name="ghostly"/>
  </bitfield>
</class-type>

refs.general_ref_knowledge_scholar_flagst

<class-type type-name="general_ref_knowledge_scholar_flagst"
    inherits-from="general_ref">
  <compound name="knowledge"
      type-name="knowledge_scholar_category_flag"/>
</class-type>

refs.general_ref_activity_eventst

<class-type type-name="general_ref_activity_eventst"
    inherits-from="general_ref">
  <int32_t/>
  <int32_t/>
</class-type>

refs.general_ref_value_levelst

<class-type type-name="general_ref_value_levelst"
    inherits-from="general_ref">
  <enum name="value" base-type="int32_t" type-name="value_type"/>
  <int32_t name="level">
    see
    http://dwarffortresswiki.org/index.php/DF2014:Personality_trait
  </int32_t>
</class-type>

refs.general_ref_languagest

<class-type type-name="general_ref_languagest"
    inherits-from="general_ref">
  <int32_t/>
</class-type>

refs.general_ref_written_contentst

<class-type type-name="general_ref_written_contentst"
    inherits-from="general_ref">
  <int32_t name="written_content_id" ref-target="written_content"/>
</class-type>

refs.general_ref_poetic_formst

<class-type type-name="general_ref_poetic_formst"
    inherits-from="general_ref">
  <int32_t name="poetic_form_id" ref-target="poetic_form"/>
</class-type>

refs.general_ref_musical_formst

<class-type type-name="general_ref_musical_formst"
    inherits-from="general_ref">
  <int32_t name="musical_form_id" ref-target="musical_form"/>
</class-type>

refs.general_ref_dance_formst

<class-type type-name="general_ref_dance_formst"
    inherits-from="general_ref">
  <int32_t name="dance_form_id" ref-target="dance_form"/>
</class-type>

refs.general_ref_is_artifactst

<class-type type-name="general_ref_is_artifactst"
    inherits-from="general_ref_artifact"/>

refs.general_ref_is_nemesisst

<class-type type-name="general_ref_is_nemesisst"
    inherits-from="general_ref_nemesis"/>

refs.general_ref_contains_unitst

<class-type type-name="general_ref_contains_unitst"
    inherits-from="general_ref_unit"/>

refs.general_ref_contains_itemst

<class-type type-name="general_ref_contains_itemst"
    inherits-from="general_ref_item"/>

refs.general_ref_contained_in_itemst

<class-type type-name="general_ref_contained_in_itemst"
    inherits-from="general_ref_item"/>

refs.general_ref_unit_milkeest

<class-type type-name="general_ref_unit_milkeest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_traineest

<class-type type-name="general_ref_unit_traineest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_itemownerst

<class-type type-name="general_ref_unit_itemownerst"
    inherits-from="general_ref_unit">
  <bitfield name="flags">
    <flag-bit name="litter">
      apparetly set after 1000 ticks, then confiscated in 1000 more
      ticks
    </flag-bit>
    v0.34.06
  </bitfield>
</class-type>

refs.general_ref_unit_tradebringerst

<class-type type-name="general_ref_unit_tradebringerst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_holderst

<class-type type-name="general_ref_unit_holderst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_workerst

<class-type type-name="general_ref_unit_workerst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_cageest

<class-type type-name="general_ref_unit_cageest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_beateest

<class-type type-name="general_ref_unit_beateest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_foodreceiverst

<class-type type-name="general_ref_unit_foodreceiverst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_kidnapeest

<class-type type-name="general_ref_unit_kidnapeest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_patientst

<class-type type-name="general_ref_unit_patientst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_infantst

<class-type type-name="general_ref_unit_infantst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_slaughtereest

<class-type type-name="general_ref_unit_slaughtereest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_sheareest

<class-type type-name="general_ref_unit_sheareest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_suckeest

<class-type type-name="general_ref_unit_suckeest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_reporteest

<class-type type-name="general_ref_unit_reporteest"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_riderst

<class-type type-name="general_ref_unit_riderst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_climberst

<class-type type-name="general_ref_unit_climberst"
    inherits-from="general_ref_unit"/>

refs.general_ref_unit_geldeest

<class-type type-name="general_ref_unit_geldeest"
    inherits-from="general_ref_unit"/>

refs.general_ref_building_civzone_assignedst

<class-type type-name="general_ref_building_civzone_assignedst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_triggerst

<class-type type-name="general_ref_building_triggerst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_triggertargetst

<class-type type-name="general_ref_building_triggertargetst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_chainst

<class-type type-name="general_ref_building_chainst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_cagedst

<class-type type-name="general_ref_building_cagedst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_holderst

<class-type type-name="general_ref_building_holderst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_well_tag

<class-type type-name="general_ref_building_well_tag"
    inherits-from="general_ref_building"
    original-name="general_ref_building_well_tagst">
  <int8_t name="direction"/>
</class-type>

refs.general_ref_building_use_target_1st

<class-type type-name="general_ref_building_use_target_1st"
    inherits-from="general_ref_building"/>

refs.general_ref_building_use_target_2st

<class-type type-name="general_ref_building_use_target_2st"
    inherits-from="general_ref_building"/>

refs.general_ref_building_destinationst

<class-type type-name="general_ref_building_destinationst"
    inherits-from="general_ref_building"/>

refs.general_ref_building_nest_boxst

<class-type type-name="general_ref_building_nest_boxst"
    inherits-from="general_ref_building"/>

refs.general_ref_entity_stolenst

<class-type type-name="general_ref_entity_stolenst"
    inherits-from="general_ref_entity"/>

refs.general_ref_entity_offeredst

<class-type type-name="general_ref_entity_offeredst"
    inherits-from="general_ref_entity"/>

refs.general_ref_entity_itemownerst

<class-type type-name="general_ref_entity_itemownerst"
    inherits-from="general_ref_entity"/>

refs.specific_ref_type

<enum-type type-name="specific_ref_type">
  <enum-item/>
  <enum-item name="UNIT_INVENTORY"/>
  <enum-item name="JOB"/>
  <enum-item name="BUILDING_PARTY"/>
  <enum-item name="ACTIVITY"/>
  <enum-item name="ITEM_GENERAL"/>
  <enum-item name="EFFECT"/>
  <enum-item name="PETINFO_PET">
    unused
  </enum-item>
  <enum-item name="PETINFO_OWNER">
    unused
  </enum-item>
  <enum-item name="VERMIN_EVENT"/>
  <enum-item name="VERMIN_ESCAPED_PET"/>
  <enum-item name="ENTITY"/>
  <enum-item name="PLOT_INFO"/>
  <enum-item name="VIEWSCREEN"/>
  <enum-item name="UNIT_ITEM_WRESTLE"/>
  <enum-item name="NULL_REF"/>
  <enum-item name="HIST_FIG"/>
  <enum-item name="SITE"/>
  <enum-item name="ARTIFACT"/>
  <enum-item name="ITEM_IMPROVEMENT"/>
  <enum-item name="COIN_FRONT"/>
  <enum-item name="COIN_BACK"/>
  <enum-item name="DETAIL_EVENT"/>
  <enum-item name="SUBREGION"/>
  <enum-item name="FEATURE_LAYER"/>
  <enum-item name="ART_IMAGE"/>
  <enum-item name="CREATURE_DEF"/>
  <enum-item/>
  <enum-item/>
  <enum-item name="ENTITY_POPULATION"/>
  <enum-item name="BREED"/>
</enum-type>

refs.specific_ref

<struct-type type-name="specific_ref">
  <enum name="type" base-type="int32_t"
      type-name="specific_ref_type"/>
  <compound is-union="true">
    <pointer name="object"/>
    <pointer name="unit" type-name="unit"/>
    <pointer name="activity" type-name="activity_info"/>
    <pointer name="screen" type-name="viewscreen"/>
    <pointer name="vermin" type-name="vermin"/>
    <pointer name="effect" type-name="effect_info"/>
    <pointer name="job" type-name="job"/>
  </compound>
  <compound is-union="true" name="arg2">
    <pointer name="wrestle" type-name="unit_item_wrestle"/>
  </compound>
</struct-type>