v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "v0.31:XML dump"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(this is pretty incomplete right now, I just started by culling examples out of a pocket world's history. Probably lots of rare cases that I haven't seen.)
 
(→‎historical_events: added detailed to each event here, there are ~32 events I've found, I'll add the rest next)
Line 71: Line 71:
  
 
The other elements of the historical_event will depend on the contents of the type element. Types include:
 
The other elements of the historical_event will depend on the contents of the type element. Types include:
 +
 +
=== add hf hf link ===
 +
This is an event that links two historical figures (hf) together.  This event could either be a marriage, the beginning of hfid worshipping hfid_target, or something else.
 +
*hfid
 +
*hfid_target
 +
 +
===add hf site link===
 +
This event shows that some (unexported) HF took up residence in some site (site_id)
 +
*site_id
 +
 +
=== attacked site ===
 +
This is an event that marks when a group (attacker_civ_id) attacked another group (site_civ_id) at a site (site_id) owned by a civ (defender_civ_id).  The attack was led by a HF (attacker_general_hfid) and the defense was led by another hfid (defender_general_hfid).
 +
*attacker_civ_id
 +
*defender_civ_id
 +
*site_civ_id
 +
*site_id
 +
*attacker_general_hfid
 +
*defender_general_hfid
 +
 +
=== change hf job ===
 +
This event shows that some HF (hfid) took up a different job (unexported) at some site (site_id)
 +
* hfid
 +
* site_id
 +
* subregion_id (always -1?)
 +
* feature_layer_id (always -1?)
  
 
===change hf state ===
 
===change hf state ===
 +
This event shows that some HF (hfid) changed state (to state) at site_id, in subregion_id, or in feature_layer_id, located at coords.
 
*state - tells what state the historical figure is changing to.
 
*state - tells what state the historical figure is changing to.
**wandering
+
**settled (site,coords given)
** scouting
+
**scouting (site,coords given)
** settled
+
**theif (site,coords given)
** hunting
+
**snatcher (site,coords given)
** refugee
+
**wandering (feature_layer given)
 +
**refugee (subregion_id,coords given)
 +
**hunting (subregion_id,coords given)
 
*hfid - ID number of the historical figure whose state is changing
 
*hfid - ID number of the historical figure whose state is changing
 
*site_id
 
*site_id
Line 84: Line 112:
 
*feature_layer_id
 
*feature_layer_id
 
*coords
 
*coords
 
===add hf site link===
 
*site_id
 
  
 
=== remove hf site link===
 
=== remove hf site link===
 +
This even shows that some HF (unexported) moved out of site_id.
 
* site_id
 
* site_id
  
=== add hf hf link ===
 
* hfid
 
* hfid_target
 
  
 
=== hf travel ===
 
=== hf travel ===
 +
This event shows that some HF (group_hfid):
 +
:escaped from the underworld (has <escape/> and feature_layer_id given)
 +
:returned to a site (has "<return/>" listed and a site)
 +
:left a site to a region (has subregion_id,coords and site_id)
 
* group_hfid
 
* group_hfid
 
* site_id
 
* site_id
Line 101: Line 128:
 
* feature_layer_id
 
* feature_layer_id
 
* coords
 
* coords
 
May also include a <return/> tag.
 
 
=== change hf job ===
 
* hfid
 
* site_id
 
* subregion_id
 
* feature_layer_id
 
  
 
=== hf new pet ===
 
=== hf new pet ===
 +
This event shows that some HF (group_hfid) tamed some animal in sub_region_id at coords.
 
* group_hfid
 
* group_hfid
* site_id
+
* site_id (always -1?)
 
* subregion_id
 
* subregion_id
* feature_layer_id
+
* feature_layer_id (always -1?)
 
* coords
 
* coords
  
 
=== hf wounded ===
 
=== hf wounded ===
 
+
This event shows that some HF (woundee_hfid) was wounded at site/region (site_id or subregion_id) by some HF (wounder_hfid)
 
*woundee_hfid
 
*woundee_hfid
 
*wounder_hfid
 
*wounder_hfid
Line 126: Line 146:
  
 
=== creature devoured ===
 
=== creature devoured ===
 +
This event shows that some HF (unexported) devoured another HF (unexported) at some site/region (site_id or subregion_id)
 
* site_id
 
* site_id
 
* subregion_id
 
* subregion_id
Line 131: Line 152:
  
 
===hf died ===
 
===hf died ===
 +
This event shows that some HF (hfid) was killed by some HF (slayer_hfid) at site/region (site_id or subregion_id)
 
* hfid - the historical figure who died
 
* hfid - the historical figure who died
 
* slayer_hfid - the historical figure who slew him
 
* slayer_hfid - the historical figure who slew him
Line 144: Line 166:
  
 
===hf simple battle event===
 
===hf simple battle event===
 +
This shows that some HF (group_1_hfid) did something (subtype) to another HF (group_2_hfid) at some site/region (site_id or subregion_id)
 
*subtype
 
*subtype
 
**attacked
 
**attacked
Line 157: Line 180:
  
 
===field battle===
 
===field battle===
 +
This event shows that some entity (attacker_civ_id) attacked some entity (defender_civ_id) at some region (subregion_id) led by a HF (attacker_general_hfid), the defenders are led by another HF (defender_general_hfid).
 
*attacker_civ_id
 
*attacker_civ_id
 
*defender_civ_id
 
*defender_civ_id
Line 166: Line 190:
  
 
=== created structure ===
 
=== created structure ===
 +
Some entity (site_civ_id) of entity/civ (civ_id) built structure (structure_id) at some site (site_id)
 
* civ_id
 
* civ_id
 
* site_civ_id
 
* site_civ_id
Line 172: Line 197:
  
 
=== hf razed structure ===
 
=== hf razed structure ===
 +
Some HF (hist_fig_id) razed a structure (structure_id) at some site (site_id)
 
* hist_fig_id
 
* hist_fig_id
 
* site_id
 
* site_id

Revision as of 00:36, 25 July 2010

An XML dump of a world's history can be generated from Legends mode.

The XML file this produces is currently not well-formed, lacking a root element that encapsulates the other contents of the dump. Some XML manipulation programs may need to have this taken into account to handle the file properly.

The XML dump consists of the following elements:

regions

Each dump contains one <regions> element, which contains a large number of <region> elements. Each <region> element has the following attributes stored as elements within it:

  • id - a reference number used to identify the region elsewhere
  • name - the name of the region (eg, "the colorless desert" or "the perplexing forests"). The names are all lower-case.
  • type - the type of region. Types include:
    • Ocean
    • Hills
    • Desert
    • Forest
    • Mountains
    • Glacier

underground_regions

Similar to the <regions> element. The <underground_region> elements contain the following:

  • id - reference number used to identify the region
  • type - can be:
    • cavern
    • magma
    • underworld
  • depth

Note that underground regions don't have names.

sites

Each <site> element contains the following:

  • id - reference number
  • name
  • type
    • city
    • tree city
    • cave
    • dwarf fortress
  • coords - an X, Y coordinate giving the location of the site on the world map.

structures

Each site may contain a <structures> tag.

historical_figures

The <historical_figure> elements contain only the very most basic information:

  • id
  • name

Other information such as birth and death dates are stored in the historical_events element.

entity_populations

Each <entity_population> element contains only a single tag, giving an id number.

entities

Each <entity> element contains an id tag, and may also contain a name tag.

historical_events

The <historical_event> element is the most complex. Each contains:

  • id - a reference number
  • year - the year in which the event took place
  • seconds72 -
  • type - a label indicating what sort of event this is.

The other elements of the historical_event will depend on the contents of the type element. Types include:

add hf hf link

This is an event that links two historical figures (hf) together. This event could either be a marriage, the beginning of hfid worshipping hfid_target, or something else.

  • hfid
  • hfid_target

add hf site link

This event shows that some (unexported) HF took up residence in some site (site_id)

  • site_id

attacked site

This is an event that marks when a group (attacker_civ_id) attacked another group (site_civ_id) at a site (site_id) owned by a civ (defender_civ_id). The attack was led by a HF (attacker_general_hfid) and the defense was led by another hfid (defender_general_hfid).

  • attacker_civ_id
  • defender_civ_id
  • site_civ_id
  • site_id
  • attacker_general_hfid
  • defender_general_hfid

change hf job

This event shows that some HF (hfid) took up a different job (unexported) at some site (site_id)

  • hfid
  • site_id
  • subregion_id (always -1?)
  • feature_layer_id (always -1?)

change hf state

This event shows that some HF (hfid) changed state (to state) at site_id, in subregion_id, or in feature_layer_id, located at coords.

  • state - tells what state the historical figure is changing to.
    • settled (site,coords given)
    • scouting (site,coords given)
    • theif (site,coords given)
    • snatcher (site,coords given)
    • wandering (feature_layer given)
    • refugee (subregion_id,coords given)
    • hunting (subregion_id,coords given)
  • hfid - ID number of the historical figure whose state is changing
  • site_id
  • subregion_id
  • feature_layer_id
  • coords

remove hf site link

This even shows that some HF (unexported) moved out of site_id.

  • site_id


hf travel

This event shows that some HF (group_hfid):

escaped from the underworld (has <escape/> and feature_layer_id given)
returned to a site (has "<return/>" listed and a site)
left a site to a region (has subregion_id,coords and site_id)
  • group_hfid
  • site_id
  • subregion_id
  • feature_layer_id
  • coords

hf new pet

This event shows that some HF (group_hfid) tamed some animal in sub_region_id at coords.

  • group_hfid
  • site_id (always -1?)
  • subregion_id
  • feature_layer_id (always -1?)
  • coords

hf wounded

This event shows that some HF (woundee_hfid) was wounded at site/region (site_id or subregion_id) by some HF (wounder_hfid)

  • woundee_hfid
  • wounder_hfid
  • site_id
  • subregion_id
  • feature_layer_id

creature devoured

This event shows that some HF (unexported) devoured another HF (unexported) at some site/region (site_id or subregion_id)

  • site_id
  • subregion_id
  • feature_layer_id

hf died

This event shows that some HF (hfid) was killed by some HF (slayer_hfid) at site/region (site_id or subregion_id)

  • hfid - the historical figure who died
  • slayer_hfid - the historical figure who slew him
  • slayer_item_id - -1 if no notable item was used
  • slayer_shooter_item_id - -1 if no notable item was used
  • site_id - -1 if not killed at a site
  • subregion_id
  • feature_layer_id
  • cause - causes include:
    • shot
    • struck
    • dragonfire

hf simple battle event

This shows that some HF (group_1_hfid) did something (subtype) to another HF (group_2_hfid) at some site/region (site_id or subregion_id)

  • subtype
    • attacked
    • scuffle
    • confront
    • ambushed
    • 2 lost after receiving wounds
  • group_1_hfid
  • group_2_hfid
  • site_id
  • subregion_id
  • feature_layer_id

field battle

This event shows that some entity (attacker_civ_id) attacked some entity (defender_civ_id) at some region (subregion_id) led by a HF (attacker_general_hfid), the defenders are led by another HF (defender_general_hfid).

  • attacker_civ_id
  • defender_civ_id
  • subregion_id
  • feature_layer_id
  • coords
  • attacker_general_hfid
  • defender_general_hfid

created structure

Some entity (site_civ_id) of entity/civ (civ_id) built structure (structure_id) at some site (site_id)

  • civ_id
  • site_civ_id
  • site_id
  • structure_id

hf razed structure

Some HF (hist_fig_id) razed a structure (structure_id) at some site (site_id)

  • hist_fig_id
  • site_id
  • structure_id

historical_event_collections

historical_eras

Each <historical_era> element contains a name and a start_year element.