<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mortal</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mortal"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Mortal"/>
	<updated>2026-06-21T22:37:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130047</id>
		<title>User:Mortal/rawparse output</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130047"/>
		<updated>2010-10-23T19:24:27Z</updated>

		<summary type="html">&lt;p&gt;Mortal: /* ./rawparse.pl IS_STONE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ITEMS_HARD		       255&lt;br /&gt;
ITEMS_QUERN		       224&lt;br /&gt;
IS_GEM			       127&lt;br /&gt;
IS_STONE			84&lt;br /&gt;
IS_METAL			26&lt;br /&gt;
ITEMS_BARRED			24&lt;br /&gt;
ITEMS_SCALED			24&lt;br /&gt;
ITEMS_METAL			24&lt;br /&gt;
AQUIFER 			19&lt;br /&gt;
SOIL				17&lt;br /&gt;
SEDIMENTARY			11&lt;br /&gt;
ITEMS_AMMO			 7&lt;br /&gt;
ITEMS_WEAPON			 7&lt;br /&gt;
METAMORPHIC			 6&lt;br /&gt;
ITEMS_WEAPON_RANGED		 6&lt;br /&gt;
ITEMS_DIGGER			 6&lt;br /&gt;
ITEMS_ARMOR			 6&lt;br /&gt;
IGNEOUS_EXTRUSIVE		 5&lt;br /&gt;
SOIL_SAND			 5&lt;br /&gt;
ITEMS_ANVIL			 3&lt;br /&gt;
SEDIMENTARY_OCEAN_SHALLOW	 3&lt;br /&gt;
IGNEOUS_INTRUSIVE		 3&lt;br /&gt;
SOIL_OCEAN			 3&lt;br /&gt;
DEEP_SPECIAL			 2&lt;br /&gt;
CRYSTAL_GLASSABLE		 1&lt;br /&gt;
LAVA				 1&lt;br /&gt;
ITEMS_SOFT			 1&lt;br /&gt;
WAFERS				 1&lt;br /&gt;
UNDIGGABLE			 1&lt;br /&gt;
SEDIMENTARY_OCEAN_DEEP		 1&lt;br /&gt;
DEEP_SURFACE			 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl AQUIFER METAMORPHIC&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AQUIFER&lt;br /&gt;
  black sand			  1	 36000&lt;br /&gt;
  calcareous ooze		  1	 36000&lt;br /&gt;
  conglomerate			  1	 36000&lt;br /&gt;
  loam				  1	 36000&lt;br /&gt;
  loamy sand			  1	 36000&lt;br /&gt;
  peat				  1	 36000&lt;br /&gt;
  pelagic clay			  1	 36000&lt;br /&gt;
  puddingstone			  1	 36000&lt;br /&gt;
  red sand			  1	 36000&lt;br /&gt;
  sand				  1	 36000&lt;br /&gt;
  sandstone			  1	 36000&lt;br /&gt;
  sandy clay loam		  1	 36000&lt;br /&gt;
  sandy loam			  1	 36000&lt;br /&gt;
  siliceous ooze		  1	 36000&lt;br /&gt;
  silt				  1	 36000&lt;br /&gt;
  silt loam			  1	 36000&lt;br /&gt;
  silty clay loam		  1	 36000&lt;br /&gt;
  white sand			  1	 36000&lt;br /&gt;
  yellow sand			  1	 36000&lt;br /&gt;
METAMORPHIC&lt;br /&gt;
  gneiss			  1	 36000&lt;br /&gt;
  marble			  2	 36000&lt;br /&gt;
  phyllite			  1	 36000&lt;br /&gt;
  quartzite			  1	 36000&lt;br /&gt;
  schist			  1	 36000&lt;br /&gt;
  slate 			  1	 36000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl native copper&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Native copper, stone, melts in magma&lt;br /&gt;
Material value 2&lt;br /&gt;
== Uses ==&lt;br /&gt;
* Ore of copper (100%)&lt;br /&gt;
* Masonry&lt;br /&gt;
* Stone crafting&lt;br /&gt;
* Construction&lt;br /&gt;
== Location ==&lt;br /&gt;
Found in igneous extrusive layers as vein&lt;br /&gt;
Found within sandstone as vein&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130046</id>
		<title>User:Mortal</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130046"/>
		<updated>2010-10-23T19:23:34Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Update script to newest version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Novice Dwarffortressdwarf&lt;br /&gt;
&lt;br /&gt;
== rawparse.pl ==&lt;br /&gt;
Put it in your raw/objects folder! [[User:Mortal/rawparse output|Output as of 0.31.16]]&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl&lt;br /&gt;
 &lt;br /&gt;
 use warnings;&lt;br /&gt;
 use strict;&lt;br /&gt;
 &lt;br /&gt;
 sub usage;&lt;br /&gt;
 sub parsefiles;&lt;br /&gt;
 sub parsefile;&lt;br /&gt;
 sub gettoken;&lt;br /&gt;
 sub tabstops;&lt;br /&gt;
 sub find_object;&lt;br /&gt;
 sub find_by_key;&lt;br /&gt;
 &lt;br /&gt;
 sub usage {&lt;br /&gt;
   print STDERR &amp;lt;&amp;lt;USAGE;&lt;br /&gt;
 $0                              List boolean keys and number of objects&lt;br /&gt;
 $0 --all                        List all keys&lt;br /&gt;
 $0 -h|-v|-V|--help|--version    This usage info&lt;br /&gt;
 $0 sandy clay loam              Display info about a single object&lt;br /&gt;
 $0 'nickel silver' 'rose gold'  Display info about several objects&lt;br /&gt;
 $0 ITEMS_AMMO                   List objects by key&lt;br /&gt;
 &lt;br /&gt;
 rawparse.pl written by Mathias Rav, October 2010&lt;br /&gt;
 For Dwarf Fortress 0.31.16 and compatible raw formats&lt;br /&gt;
 Run the script from the df/raw/objects/ directory&lt;br /&gt;
 USAGE&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 {&lt;br /&gt;
   package Object;&lt;br /&gt;
   sub new {&lt;br /&gt;
     my ($class, $type, $id, @tokens) = @_;&lt;br /&gt;
     my $self = bless {type =&amp;gt; $type, id =&amp;gt; $id, tokens =&amp;gt; \@tokens}, $class;&lt;br /&gt;
     $self-&amp;gt;fetchtemplates();&lt;br /&gt;
     $self-&amp;gt;fixstatenames();&lt;br /&gt;
     return $self;&lt;br /&gt;
   }&lt;br /&gt;
   sub matches {&lt;br /&gt;
     my ($token, $prefix) = @_;&lt;br /&gt;
     return 1 if $token eq $prefix;&lt;br /&gt;
     return substr($token, length($prefix)+1) if $prefix.':' eq substr($token, 0, length($prefix)+1);&lt;br /&gt;
     undef;&lt;br /&gt;
   }&lt;br /&gt;
   sub get {&lt;br /&gt;
     my ($self, $prefix) = @_;&lt;br /&gt;
     my @res;&lt;br /&gt;
     for my $token (@{$self-&amp;gt;{tokens}}) {&lt;br /&gt;
       my $match = Object::matches($token, $prefix);&lt;br /&gt;
       push @res, $match if defined $match;&lt;br /&gt;
       return $res[0] if @res and !wantarray;&lt;br /&gt;
     }&lt;br /&gt;
     return @res;&lt;br /&gt;
   }&lt;br /&gt;
   sub remove {&lt;br /&gt;
     my ($self, $prefix) = @_;&lt;br /&gt;
     my @res;&lt;br /&gt;
     $self-&amp;gt;{tokens} = [grep {&lt;br /&gt;
       my $match = Object::matches($_, $prefix);&lt;br /&gt;
       if (defined $match) {&lt;br /&gt;
         push @res, $match;&lt;br /&gt;
         0;&lt;br /&gt;
       } else {&lt;br /&gt;
         1;&lt;br /&gt;
       }&lt;br /&gt;
     } @{$self-&amp;gt;{tokens}}];&lt;br /&gt;
     return @res;&lt;br /&gt;
   }&lt;br /&gt;
   sub set {&lt;br /&gt;
     my ($self, @vals) = @_;&lt;br /&gt;
     unshift @{$self-&amp;gt;{tokens}}, @vals;&lt;br /&gt;
   }&lt;br /&gt;
   sub setdefault {&lt;br /&gt;
     my ($self, @vals) = @_;&lt;br /&gt;
     push @{$self-&amp;gt;{tokens}}, @vals;&lt;br /&gt;
   }&lt;br /&gt;
   sub fetchtemplates {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     my $id = $self-&amp;gt;{id};&lt;br /&gt;
     my @templates = $self-&amp;gt;remove($main::templateincludekey);&lt;br /&gt;
     $self-&amp;gt;applytemplate($_) for @templates;&lt;br /&gt;
   }&lt;br /&gt;
   sub applytemplate {&lt;br /&gt;
     my ($self, $templatename) = @_;&lt;br /&gt;
     my $template = $main::templates{$templatename};&lt;br /&gt;
     unless (defined $template) {&lt;br /&gt;
       printf STDERR &amp;quot;Object %s references a template called $templatename, but it doesn't exist!\n&amp;quot;, $self-&amp;gt;id();&lt;br /&gt;
       return;&lt;br /&gt;
     }&lt;br /&gt;
     $self-&amp;gt;setdefault(@{$template-&amp;gt;{tokens}});&lt;br /&gt;
   }&lt;br /&gt;
   sub fixstatenames {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     if ($self-&amp;gt;get('IS_GEM') =~ /^([^:]+):[^:]+:OVERWRITE_SOLID/) {&lt;br /&gt;
       my $name = $1;&lt;br /&gt;
       $self-&amp;gt;set(&amp;quot;STATE_NAME_ADJ:ALL_SOLID:$name&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     my @tokens = @{$self-&amp;gt;{tokens}};&lt;br /&gt;
     for my $token (reverse @tokens) { # reverse so high priority tokens are set last&lt;br /&gt;
       next unless $token =~ /^STATE_([^:]+_[^:]+):(.*)/;&lt;br /&gt;
       my $states = $1;&lt;br /&gt;
       my $subkey = $2;&lt;br /&gt;
       while ($states =~ /([^_]+)/g) {&lt;br /&gt;
         $self-&amp;gt;set(&amp;quot;STATE_${1}:$subkey&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
     @tokens = @{$self-&amp;gt;{tokens}};&lt;br /&gt;
     for my $token (reverse @tokens) {&lt;br /&gt;
       next unless $token =~ /^(STATE_[^:]+:)ALL_SOLID(:.*)/;&lt;br /&gt;
       my $prefix = $1;&lt;br /&gt;
       my $suffix = $2;&lt;br /&gt;
       $self-&amp;gt;set($prefix.'SOLID'.$suffix);&lt;br /&gt;
       $self-&amp;gt;set($prefix.'SOLID_POWDER'.$suffix);&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub id {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     return $self-&amp;gt;{id};&lt;br /&gt;
   }&lt;br /&gt;
   sub name {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     return scalar($self-&amp;gt;get('STATE_NAME:SOLID')) // scalar($self-&amp;gt;get('STATE_ADJ:SOLID'));&lt;br /&gt;
   }&lt;br /&gt;
   sub type {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     map {if (/^IS_([^:]+)/) {lc $1;} else {();}} @{$self-&amp;gt;{tokens}};&lt;br /&gt;
   }&lt;br /&gt;
   sub layer {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     my %layers = (&lt;br /&gt;
       SOIL =&amp;gt; 'soil layer',&lt;br /&gt;
       SOIL_OCEAN =&amp;gt; 'pelagic sediment layer',&lt;br /&gt;
       SEDIMENTARY =&amp;gt; 'sedimentary layer',&lt;br /&gt;
       METAMORPHIC =&amp;gt; 'metamorphic layer',&lt;br /&gt;
       IGNEOUS_EXTRUSIVE =&amp;gt; 'igneous extrusive layer',&lt;br /&gt;
       SEDIMENTARY_OCEAN_SHALLOW =&amp;gt; 'covers shallow ocean floors',&lt;br /&gt;
       IGNEOUS_INTRUSIVE =&amp;gt; 'igneous intrusive layer',&lt;br /&gt;
       SEDIMENTARY_OCEAN_DEEP =&amp;gt; 'covers deep ocean floors',&lt;br /&gt;
       LAVA =&amp;gt; 'covers magma pools',&lt;br /&gt;
       DEEP_SURFACE =&amp;gt; 'covers the deep surface',&lt;br /&gt;
       AQUIFER =&amp;gt; 'can contain aquifer',&lt;br /&gt;
     );&lt;br /&gt;
     map {$layers{$_}} grep {$self-&amp;gt;get($_)} keys %layers;&lt;br /&gt;
   }&lt;br /&gt;
   sub magmastatus {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     if ($self-&amp;gt;get('BOILING_POINT') &amp;lt;= 12000) {&lt;br /&gt;
       'boils in magma';&lt;br /&gt;
     } elsif ($self-&amp;gt;get('MELTING_POINT') &amp;lt;= 12000) {&lt;br /&gt;
       'melts in magma';&lt;br /&gt;
     } else {&lt;br /&gt;
       'magma-safe';&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub print {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     $self-&amp;gt;print_header;&lt;br /&gt;
     $self-&amp;gt;print_uses;&lt;br /&gt;
     $self-&amp;gt;print_location;&lt;br /&gt;
     #$self-&amp;gt;print_raw;&lt;br /&gt;
   }&lt;br /&gt;
   sub print_header {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     $self-&amp;gt;print_title;&lt;br /&gt;
     $self-&amp;gt;print_value;&lt;br /&gt;
   }&lt;br /&gt;
   sub print_title {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     my $type = join '', map {&amp;quot;, $_&amp;quot;} $self-&amp;gt;type;&lt;br /&gt;
     my $layer = join '', map {&amp;quot;, $_&amp;quot;} $self-&amp;gt;layer;&lt;br /&gt;
     print ucfirst($self-&amp;gt;name()), $type, $layer, ', ', $self-&amp;gt;magmastatus, &amp;quot;\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   sub print_location {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     my $header = &amp;quot;== Location ==\n&amp;quot;;&lt;br /&gt;
     for my $location ($self-&amp;gt;get('ENVIRONMENT')) {&lt;br /&gt;
       my ($layer, $occurrence, $value) = split ':', $location;&lt;br /&gt;
       my %occurrences = (CLUSTER_SMALL =&amp;gt; 'small clusters');&lt;br /&gt;
       if (defined $occurrences{$occurrence}) {&lt;br /&gt;
         $occurrence = $occurrences{$occurrence};&lt;br /&gt;
       } else {&lt;br /&gt;
         $occurrence = lc $occurrence;&lt;br /&gt;
         $occurrence =~ s/_/ /g;&lt;br /&gt;
       }&lt;br /&gt;
       $layer = lc $layer;&lt;br /&gt;
       $layer =~ s/_/ /g;&lt;br /&gt;
       printf &amp;quot;%sFound in %s layers as %s\n&amp;quot;, $header, lc($layer), $occurrence;&lt;br /&gt;
       $header = ''&lt;br /&gt;
     }&lt;br /&gt;
     for my $location ($self-&amp;gt;get('ENVIRONMENT_SPEC')) {&lt;br /&gt;
       my ($layer, $occurrence, $value) = split ':', $location;&lt;br /&gt;
       my %occurrences = (CLUSTER_SMALL =&amp;gt; 'small clusters');&lt;br /&gt;
       if (defined $occurrences{$occurrence}) {&lt;br /&gt;
         $occurrence = $occurrences{$occurrence};&lt;br /&gt;
       } else {&lt;br /&gt;
         $occurrence = lc $occurrence;&lt;br /&gt;
         $occurrence =~ s/_/ /g;&lt;br /&gt;
       }&lt;br /&gt;
       printf &amp;quot;%sFound within %s as %s\n&amp;quot;, $header, $main::objectsbyid{$layer}-&amp;gt;name, $occurrence;&lt;br /&gt;
       $header = '';&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub print_value {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     printf &amp;quot;Material value %d\n&amp;quot;, $self-&amp;gt;get('MATERIAL_VALUE');&lt;br /&gt;
   }&lt;br /&gt;
   sub print_uses {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     print &amp;quot;== Uses ==\n&amp;quot;;&lt;br /&gt;
     $self-&amp;gt;print_ores;&lt;br /&gt;
     $self-&amp;gt;print_crafts;&lt;br /&gt;
     $self-&amp;gt;print_reactions;&lt;br /&gt;
   }&lt;br /&gt;
   sub print_ores {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     for my $ore ($self-&amp;gt;get('METAL_ORE')) {&lt;br /&gt;
       my ($metalid, $chance) = (split(':', $ore, 2));&lt;br /&gt;
       my $metal = $main::objectsbyid{$metalid};&lt;br /&gt;
       my $metalname = defined($metal) ? $metal-&amp;gt;name() : $metalid;&lt;br /&gt;
       printf &amp;quot;* Ore of %s (%d%%)\n&amp;quot;, $metalname, $chance;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub print_crafts {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     if ($self-&amp;gt;get('IS_STONE')) {&lt;br /&gt;
       print &amp;quot;* Masonry\n* Stone crafting\n* Construction\n&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     if ($self-&amp;gt;get('IS_METAL')) {&lt;br /&gt;
       print &amp;quot;* Metal crafting\n* Construction\n&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     if ($self-&amp;gt;get('IS_GEM')) {&lt;br /&gt;
       print &amp;quot;* Gemcrafting\n* Encrusting\n&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub print_reactions {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     for my $reaction (@{$main::reactions-&amp;gt;{objects}}) {&lt;br /&gt;
       my $match = 0;&lt;br /&gt;
       for my $reagent ($reaction-&amp;gt;get('REAGENT')) {&lt;br /&gt;
         my ($name, $quantity, $itemtoken, $itemsubtype, $materialtoken, $materialsubtype) = split ':', $reagent;&lt;br /&gt;
         my @values = map {s/:.*//; $_} $self-&amp;gt;get($itemtoken);&lt;br /&gt;
         #print &amp;quot;My values of $itemtoken are '@values', id $self-&amp;gt;{id}, type $self-&amp;gt;{type}, expecting value $itemsubtype&amp;quot;;&lt;br /&gt;
         #if (defined $materialtoken) {print &amp;quot;, material $materialtoken of type $materialsubtype&amp;quot;;}&lt;br /&gt;
         #print &amp;quot;\n&amp;quot;;&lt;br /&gt;
         if (&lt;br /&gt;
           # does the reaction require anything?&lt;br /&gt;
           ($itemsubtype ne 'NONE' and $itemsubtype ne 'NO_SUBTYPE' or defined $materialtoken and $materialtoken ne 'NONE' or defined $materialsubtype and $materialsubtype ne 'NO_SUBTYPE' and $materialsubtype ne 'NONE') and (&lt;br /&gt;
 &lt;br /&gt;
           # it requires something. do we match the item subtype?&lt;br /&gt;
           (@values ~~ $itemsubtype)&lt;br /&gt;
 &lt;br /&gt;
           # if not, do we match the material?&lt;br /&gt;
           or defined($materialtoken) and ($materialtoken eq $self-&amp;gt;{type} or $self-&amp;gt;get(&amp;quot;IS_$materialtoken&amp;quot;)) and ($materialsubtype eq 'NO_SUBTYPE' or $materialsubtype eq $self-&amp;gt;{id}))) {&lt;br /&gt;
 &lt;br /&gt;
           # we're a match!&lt;br /&gt;
           $match = 1;&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
       if ($match) {&lt;br /&gt;
         printf &amp;quot;* %s\n&amp;quot;, ucfirst scalar($reaction-&amp;gt;get('NAME'));&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   sub print_raw {&lt;br /&gt;
     my ($self) = @_;&lt;br /&gt;
     printf &amp;quot;[%s]\n&amp;quot;, $_ for @{$self-&amp;gt;{tokens}};&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefiles {&lt;br /&gt;
   my ($expecttype, @filenames) = @_;&lt;br /&gt;
   my @objects;&lt;br /&gt;
   my %objectsbyid;&lt;br /&gt;
   for my $filename (@filenames) {&lt;br /&gt;
     my $parsed = parsefile($filename);&lt;br /&gt;
     if ($parsed-&amp;gt;{object} ne $expecttype) {&lt;br /&gt;
       die &amp;quot;Expected objects of type $expecttype in $filename, got $parsed-&amp;gt;{object}&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     push @objects, @{$parsed-&amp;gt;{objects}};&lt;br /&gt;
     %objectsbyid = (%objectsbyid, %{$parsed-&amp;gt;{objectsbyid}});&lt;br /&gt;
   }&lt;br /&gt;
   return {objects =&amp;gt; \@objects, objectsbyid =&amp;gt; \%objectsbyid};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile {&lt;br /&gt;
   my ($filename) = @_;&lt;br /&gt;
   my $fp;&lt;br /&gt;
   unless (open $fp, '&amp;lt;', $filename) {&lt;br /&gt;
     print STDERR &amp;quot;Couldn't open $filename for reading. Are you in the right directory?&amp;quot;;&lt;br /&gt;
     exit 1;&lt;br /&gt;
   }&lt;br /&gt;
   my $expectfilename = $filename;&lt;br /&gt;
   $expectfilename =~ s/^.*\/|\.txt$//g;&lt;br /&gt;
   my $gotfilename = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   $gotfilename =~ s/\r?\n?$//s;&lt;br /&gt;
   if ($expectfilename ne $gotfilename) {&lt;br /&gt;
     print STDERR &amp;quot;Expected filename '$expectfilename' in $filename, got '$gotfilename' (ignoring)\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   local $/ = ']';&lt;br /&gt;
   my $firsttok = gettoken $fp, 1;&lt;br /&gt;
   unless ($firsttok =~ /^OBJECT:(.*)/) {&lt;br /&gt;
     print STDERR &amp;quot;Expected first token to be an OBJECT-token, got $firsttok-&amp;gt;[0]\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   my $objecttype = $1;&lt;br /&gt;
   my $objects = [];&lt;br /&gt;
   my $objectsbyid = {};&lt;br /&gt;
   my $res = {object =&amp;gt; $objecttype, objects =&amp;gt; $objects, objectsbyid =&amp;gt; $objectsbyid};&lt;br /&gt;
   my $objectid;&lt;br /&gt;
   my @object;&lt;br /&gt;
   my $pushobject = sub {&lt;br /&gt;
     if (defined $objectid) {&lt;br /&gt;
       my $object = Object-&amp;gt;new($objecttype, $objectid, @object);&lt;br /&gt;
       push @$objects, $object;&lt;br /&gt;
       $objectsbyid-&amp;gt;{$object-&amp;gt;id()} = $object;&lt;br /&gt;
     }&lt;br /&gt;
     @object = ();&lt;br /&gt;
     $objectid = undef;&lt;br /&gt;
   };&lt;br /&gt;
   my $token;&lt;br /&gt;
   while ($token = gettoken $fp and keys %$token) {&lt;br /&gt;
     last unless keys %$token;&lt;br /&gt;
     next unless defined $token-&amp;gt;{token};&lt;br /&gt;
     $token = $token-&amp;gt;{token};&lt;br /&gt;
     if (substr($token, 0, length($objecttype)) eq $objecttype) {&lt;br /&gt;
       $pushobject-&amp;gt;();&lt;br /&gt;
       $token =~ s/[^:]*://;&lt;br /&gt;
       $objectid = $token;&lt;br /&gt;
     } else {&lt;br /&gt;
       push @object, $token;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   $pushobject-&amp;gt;();&lt;br /&gt;
   close $fp;&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub gettoken {&lt;br /&gt;
   my ($fp, $asserttoken) = @_;&lt;br /&gt;
   $_ = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   my $input = $_;&lt;br /&gt;
   if (!defined) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got EOF&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     return {};&lt;br /&gt;
   }&lt;br /&gt;
   unless (/([^[]*)\[(.*)\]/) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got none&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     my $comment = $_;&lt;br /&gt;
     $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
     return {comment =&amp;gt; $comment};&lt;br /&gt;
   }&lt;br /&gt;
   my ($comment, $token) = ($1, $2);&lt;br /&gt;
   $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
   $comment = undef unless length $comment;&lt;br /&gt;
   return $token if $asserttoken;&lt;br /&gt;
   return {comment =&amp;gt; $comment, token =&amp;gt; $token};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (($ARGV[0] // '') =~ /^(-[hvV]|--help|--version)$/) {&lt;br /&gt;
   usage();&lt;br /&gt;
   exit;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # at the moment only inorganics are supported&lt;br /&gt;
 our $type = 'INORGANIC';&lt;br /&gt;
 our $templatetype = 'MATERIAL_TEMPLATE';&lt;br /&gt;
 our $templateincludekey = &amp;quot;USE_$templatetype&amp;quot;;&lt;br /&gt;
 my $templates = parsefile 'material_template_default.txt';&lt;br /&gt;
 if ($templates-&amp;gt;{object} ne $templatetype) {&lt;br /&gt;
   die &amp;quot;Template file contains objects of type $templates-&amp;gt;{object}, expected $templatetype&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 our %templates = %{$templates-&amp;gt;{objectsbyid}};&lt;br /&gt;
 &lt;br /&gt;
 my $parsed = parsefiles($type, &amp;lt;inorganic_*.txt&amp;gt;);&lt;br /&gt;
 our @objects = @{$parsed-&amp;gt;{objects}};&lt;br /&gt;
 our %objectsbyid = %{$parsed-&amp;gt;{objectsbyid}};&lt;br /&gt;
 &lt;br /&gt;
 our $reactions = parsefiles('REACTION', &amp;lt;reaction_*.txt&amp;gt;);&lt;br /&gt;
 &lt;br /&gt;
 sub tabstops {&lt;br /&gt;
   my ($line) = @_;&lt;br /&gt;
   my $suffix;&lt;br /&gt;
   ($line, $suffix) = $line =~ /^(.*?)([\r\n]*)$/s;&lt;br /&gt;
   my $len = length($line)%8;&lt;br /&gt;
   $line =~ s/ {2,8}(?=(.{8})*.{$len}$)/\t/g;&lt;br /&gt;
   $line.$suffix;&lt;br /&gt;
 }&lt;br /&gt;
 sub find_object {&lt;br /&gt;
   my ($name) = @_;&lt;br /&gt;
   if (exists $objectsbyid{$name}) {&lt;br /&gt;
     $objectsbyid{$name}-&amp;gt;print;&lt;br /&gt;
   } elsif (exists $objectsbyid{uc $name}) {&lt;br /&gt;
     $objectsbyid{uc $name}-&amp;gt;print;&lt;br /&gt;
   } else {&lt;br /&gt;
     for my $obj (@objects) {&lt;br /&gt;
       if (lc($obj-&amp;gt;name) eq lc($name)) {&lt;br /&gt;
         $obj-&amp;gt;print;&lt;br /&gt;
         return 1;&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub find_by_key {&lt;br /&gt;
   my @keys = @_;&lt;br /&gt;
   my %objectsbytype;&lt;br /&gt;
   for my $obj (@objects) {&lt;br /&gt;
     for my $key (@keys) {&lt;br /&gt;
       my @vals = $obj-&amp;gt;get($key);&lt;br /&gt;
       next unless @vals;&lt;br /&gt;
       $objectsbytype{$key} //= [];&lt;br /&gt;
       push @{$objectsbytype{$key}}, $obj;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   return 0 unless keys %objectsbytype;&lt;br /&gt;
   for my $key (keys %objectsbytype) {&lt;br /&gt;
     print &amp;quot;$key\n&amp;quot;;&lt;br /&gt;
     my @rows;&lt;br /&gt;
     my $boolean = 0;&lt;br /&gt;
     my $numeric = 1;&lt;br /&gt;
     for my $obj (@{$objectsbytype{$key}}) {&lt;br /&gt;
       my @row = ($obj-&amp;gt;name);&lt;br /&gt;
       for (qw(MATERIAL_VALUE MOLAR_MASS)) {&lt;br /&gt;
         push @row, scalar($obj-&amp;gt;get($_)) // 0;&lt;br /&gt;
       }&lt;br /&gt;
       my $val = $obj-&amp;gt;get($key);&lt;br /&gt;
       if (defined $val) {&lt;br /&gt;
         push @row, $val;&lt;br /&gt;
         $numeric = 0 if $numeric and $val =~ /\D/;&lt;br /&gt;
       } else {&lt;br /&gt;
         push @row, '';&lt;br /&gt;
         $boolean = 1;&lt;br /&gt;
       }&lt;br /&gt;
       push @rows, \@row;&lt;br /&gt;
     }&lt;br /&gt;
     if ($boolean) {&lt;br /&gt;
       @rows = sort {$a-&amp;gt;[0] cmp $b-&amp;gt;[0]} @rows;&lt;br /&gt;
     } elsif ($numeric) {&lt;br /&gt;
       @rows = sort {$a-&amp;gt;[3] &amp;lt;=&amp;gt; $b-&amp;gt;[3]} @rows;&lt;br /&gt;
     } else {&lt;br /&gt;
       @rows = sort {$a-&amp;gt;[3] cmp $b-&amp;gt;[3]} @rows;&lt;br /&gt;
     }&lt;br /&gt;
     for my $row (@rows) {&lt;br /&gt;
       print tabstops(sprintf &amp;quot;  %-26s %6d %10d %s\n&amp;quot;, @$row);&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   1;&lt;br /&gt;
 }&lt;br /&gt;
 if (@ARGV == 0) {&lt;br /&gt;
   my %booleankeys;&lt;br /&gt;
   for my $obj (@objects) {&lt;br /&gt;
     my @keys = grep {/^IS_|^[^:]+$/} @{$obj-&amp;gt;{tokens}};&lt;br /&gt;
     for my $key (@keys) {&lt;br /&gt;
       $key =~ s/:.*//g;&lt;br /&gt;
       $booleankeys{$key} //= 0;&lt;br /&gt;
       ++$booleankeys{$key};&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (sort {$booleankeys{$b}-$booleankeys{$a}} keys %booleankeys) {&lt;br /&gt;
     print tabstops(sprintf &amp;quot;%-30s %3d\n&amp;quot;, $key, $booleankeys{$key});&lt;br /&gt;
   }&lt;br /&gt;
 } elsif (@ARGV == 1 and $ARGV[0] eq '--all') {&lt;br /&gt;
   my %keys = ();&lt;br /&gt;
   for my $obj (@objects) {&lt;br /&gt;
     for my $token (@{$obj-&amp;gt;{tokens}}) {&lt;br /&gt;
       while ($token =~ /:/g) {&lt;br /&gt;
         my $key = substr($token, 0, $-[0]);&lt;br /&gt;
         $keys{$key} //= 0;&lt;br /&gt;
         ++$keys{$key};&lt;br /&gt;
       }&lt;br /&gt;
       $keys{$token} //= 0;&lt;br /&gt;
       ++$keys{$token};&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   my @keys = grep {/:[^:]*[^:\d][^:]*$/ and ($keys{$_} &amp;gt; 1 or !/:/)} keys %keys;&lt;br /&gt;
   {&lt;br /&gt;
     local $, = ', ';&lt;br /&gt;
     local $\ = &amp;quot;\n&amp;quot;;&lt;br /&gt;
     print map {&amp;quot;$_ ($keys{$_})&amp;quot;} sort {$keys{$b}-$keys{$a}} @keys;&lt;br /&gt;
   }&lt;br /&gt;
 } else {&lt;br /&gt;
   exit if find_object &amp;quot;@ARGV&amp;quot;;&lt;br /&gt;
   exit if map {find_object($_) ? (1) : ()} @ARGV;&lt;br /&gt;
   exit if find_by_key @ARGV;&lt;br /&gt;
   print STDERR &amp;quot;I couldn't understand that.\n&amp;quot;;&lt;br /&gt;
   usage;&lt;br /&gt;
   exit 1;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130037</id>
		<title>User:Mortal/rawparse output</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130037"/>
		<updated>2010-10-23T11:57:34Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Update with output from newest version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ITEMS_HARD		       255&lt;br /&gt;
ITEMS_QUERN		       224&lt;br /&gt;
IS_GEM			       127&lt;br /&gt;
IS_STONE			84&lt;br /&gt;
IS_METAL			26&lt;br /&gt;
ITEMS_BARRED			24&lt;br /&gt;
ITEMS_SCALED			24&lt;br /&gt;
ITEMS_METAL			24&lt;br /&gt;
AQUIFER 			19&lt;br /&gt;
SOIL				17&lt;br /&gt;
SEDIMENTARY			11&lt;br /&gt;
ITEMS_AMMO			 7&lt;br /&gt;
ITEMS_WEAPON			 7&lt;br /&gt;
METAMORPHIC			 6&lt;br /&gt;
ITEMS_WEAPON_RANGED		 6&lt;br /&gt;
ITEMS_DIGGER			 6&lt;br /&gt;
ITEMS_ARMOR			 6&lt;br /&gt;
IGNEOUS_EXTRUSIVE		 5&lt;br /&gt;
SOIL_SAND			 5&lt;br /&gt;
ITEMS_ANVIL			 3&lt;br /&gt;
SEDIMENTARY_OCEAN_SHALLOW	 3&lt;br /&gt;
IGNEOUS_INTRUSIVE		 3&lt;br /&gt;
SOIL_OCEAN			 3&lt;br /&gt;
DEEP_SPECIAL			 2&lt;br /&gt;
CRYSTAL_GLASSABLE		 1&lt;br /&gt;
LAVA				 1&lt;br /&gt;
ITEMS_SOFT			 1&lt;br /&gt;
WAFERS				 1&lt;br /&gt;
UNDIGGABLE			 1&lt;br /&gt;
SEDIMENTARY_OCEAN_DEEP		 1&lt;br /&gt;
DEEP_SURFACE			 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl AQUIFER METAMORPHIC&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AQUIFER&lt;br /&gt;
  black sand			  1	 36000&lt;br /&gt;
  calcareous ooze		  1	 36000&lt;br /&gt;
  conglomerate			  1	 36000&lt;br /&gt;
  loam				  1	 36000&lt;br /&gt;
  loamy sand			  1	 36000&lt;br /&gt;
  peat				  1	 36000&lt;br /&gt;
  pelagic clay			  1	 36000&lt;br /&gt;
  puddingstone			  1	 36000&lt;br /&gt;
  red sand			  1	 36000&lt;br /&gt;
  sand				  1	 36000&lt;br /&gt;
  sandstone			  1	 36000&lt;br /&gt;
  sandy clay loam		  1	 36000&lt;br /&gt;
  sandy loam			  1	 36000&lt;br /&gt;
  siliceous ooze		  1	 36000&lt;br /&gt;
  silt				  1	 36000&lt;br /&gt;
  silt loam			  1	 36000&lt;br /&gt;
  silty clay loam		  1	 36000&lt;br /&gt;
  white sand			  1	 36000&lt;br /&gt;
  yellow sand			  1	 36000&lt;br /&gt;
METAMORPHIC&lt;br /&gt;
  gneiss			  1	 36000&lt;br /&gt;
  marble			  2	 36000&lt;br /&gt;
  phyllite			  1	 36000&lt;br /&gt;
  quartzite			  1	 36000&lt;br /&gt;
  schist			  1	 36000&lt;br /&gt;
  slate 			  1	 36000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== &amp;lt;tt&amp;gt;./rawparse.pl IS_STONE&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IS_STONE&lt;br /&gt;
  alabaster			  1	 36000&lt;br /&gt;
  alunite			  1	 36000&lt;br /&gt;
  andesite			  1	 36000&lt;br /&gt;
  anhydrite			  1	 36000&lt;br /&gt;
  basalt			  1	 36000&lt;br /&gt;
  bauxite			  1	 36000&lt;br /&gt;
  bismuthinite			  1	 36000&lt;br /&gt;
  bituminous coal		  1	 36000&lt;br /&gt;
  borax 			  1	 36000&lt;br /&gt;
  brimstone			  1	 36000&lt;br /&gt;
  calcite			  2	 36000&lt;br /&gt;
  cassiterite			  2	 36000&lt;br /&gt;
  chalk 			  2	 36000&lt;br /&gt;
  chert 			  1	 36000&lt;br /&gt;
  chromite			  1	 36000&lt;br /&gt;
  cinnabar			  1	 36000&lt;br /&gt;
  claystone			  1	 36000&lt;br /&gt;
  cobaltite			  1	 36000&lt;br /&gt;
  conglomerate			  1	 36000&lt;br /&gt;
  cryolite			  1	 36000&lt;br /&gt;
  dacite			  1	 36000&lt;br /&gt;
  diorite			  1	 36000&lt;br /&gt;
  dolomite			  2	 36000&lt;br /&gt;
  gabbro			  1	 36000&lt;br /&gt;
  galena			  5	 36000&lt;br /&gt;
  garnierite			  2	 36000&lt;br /&gt;
  gneiss			  1	 36000&lt;br /&gt;
  granite			  1	 36000&lt;br /&gt;
  graphite			  1	 36000&lt;br /&gt;
  gypsum			  1	 36000&lt;br /&gt;
  hematite			  8	 36000&lt;br /&gt;
  horn silver			 10	 36000&lt;br /&gt;
  hornblende			  1	 36000&lt;br /&gt;
  ilmenite			  1	 36000&lt;br /&gt;
  jet				  1	 36000&lt;br /&gt;
  kaolinite			  1	 36000&lt;br /&gt;
  kimberlite			  1	 36000&lt;br /&gt;
  lignite			  1	 36000&lt;br /&gt;
  limestone			  2	 36000&lt;br /&gt;
  limonite			  8	 36000&lt;br /&gt;
  magnetite			  8	 36000&lt;br /&gt;
  malachite			  2	 36000&lt;br /&gt;
  marble			  2	 36000&lt;br /&gt;
  marcasite			  1	 36000&lt;br /&gt;
  mica				  1	 36000&lt;br /&gt;
  microcline			  1	 36000&lt;br /&gt;
  mudstone			  1	 36000&lt;br /&gt;
  native aluminum		 40	 26981&lt;br /&gt;
  native copper 		  2	 63546&lt;br /&gt;
  native gold			 30	196967&lt;br /&gt;
  native platinum		 40	195084&lt;br /&gt;
  native silver 		 10	107868&lt;br /&gt;
  obsidian			  3	 36000&lt;br /&gt;
  olivine			  1	 36000&lt;br /&gt;
  orpiment			  1	 36000&lt;br /&gt;
  orthoclase			  1	 36000&lt;br /&gt;
  periclase			  1	 36000&lt;br /&gt;
  petrified wood		  1	 36000&lt;br /&gt;
  phyllite			  1	 36000&lt;br /&gt;
  pitchblende			  1	 36000&lt;br /&gt;
  puddingstone			  1	 36000&lt;br /&gt;
  pyrolusite			  1	 36000&lt;br /&gt;
  quartzite			  1	 36000&lt;br /&gt;
  raw adamantine		250	 55845&lt;br /&gt;
  realgar			  1	 36000&lt;br /&gt;
  rhyolite			  1	 36000&lt;br /&gt;
  rock salt			  1	 36000&lt;br /&gt;
  rutile			  1	 36000&lt;br /&gt;
  saltpeter			  1	 36000&lt;br /&gt;
  sandstone			  1	 36000&lt;br /&gt;
  satinspar			  1	 36000&lt;br /&gt;
  schist			  1	 36000&lt;br /&gt;
  selenite			  1	 36000&lt;br /&gt;
  serpentine			  1	 36000&lt;br /&gt;
  shale 			  1	 36000&lt;br /&gt;
  siltstone			  1	 36000&lt;br /&gt;
  slade 			  0	     0&lt;br /&gt;
  slate 			  1	 36000&lt;br /&gt;
  sphalerite			  2	 36000&lt;br /&gt;
  stibnite			  1	 36000&lt;br /&gt;
  stone 			  3	 36000&lt;br /&gt;
  sylvite			  1	 36000&lt;br /&gt;
  talc				  1	 36000&lt;br /&gt;
  tetrahedrite			  3	 36000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130036</id>
		<title>User:Mortal</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130036"/>
		<updated>2010-10-23T11:53:13Z</updated>

		<summary type="html">&lt;p&gt;Mortal: rawparse: Added usage info, and specifying keys on the command line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Novice Dwarffortressdwarf&lt;br /&gt;
&lt;br /&gt;
== rawparse.pl ==&lt;br /&gt;
Put it in your raw/objects folder! [[User:Mortal/rawparse output|Output as of 0.31.16]]&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl&lt;br /&gt;
 &lt;br /&gt;
 use warnings;&lt;br /&gt;
 use strict;&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile;&lt;br /&gt;
 sub parsefile_;&lt;br /&gt;
 sub gettoken;&lt;br /&gt;
 sub fetchtemplates (_);&lt;br /&gt;
 sub fixstatenames (_);&lt;br /&gt;
 &lt;br /&gt;
 sub usage {&lt;br /&gt;
   print STDERR &amp;lt;&amp;lt;USAGE;&lt;br /&gt;
 $0                              Display boolean keys&lt;br /&gt;
 $0 key1 [key2 [...]]            Display items grouped by key&lt;br /&gt;
 $0 -h|-v|-V|--help|--version    Display usage&lt;br /&gt;
 &lt;br /&gt;
 rawparse.pl written by Mathias Rav, October 2010&lt;br /&gt;
 For Dwarf Fortress 0.31.16 and compatible raw formats&lt;br /&gt;
 Run the script from the df/raw/objects/ directory&lt;br /&gt;
 USAGE&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile {&lt;br /&gt;
   my ($filename) = @_;&lt;br /&gt;
   my $fp;&lt;br /&gt;
   unless (open $fp, '&amp;lt;', $filename) {&lt;br /&gt;
     die &amp;quot;Couldn't open $filename for reading&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   my $res = parsefile_ $fp, $filename;&lt;br /&gt;
   close $fp;&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile_ {&lt;br /&gt;
   my ($fp, $filename) = @_;&lt;br /&gt;
   my $expectfilename = $filename;&lt;br /&gt;
   $expectfilename =~ s/^.*\/|\.txt$//g;&lt;br /&gt;
   my $gotfilename = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   $gotfilename =~ s/\r?\n?$//s;&lt;br /&gt;
   if ($expectfilename ne $gotfilename) {&lt;br /&gt;
     print STDERR &amp;quot;Expected filename '$expectfilename' in $filename, got '$gotfilename'\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   local $/ = ']';&lt;br /&gt;
   my $firsttok = gettoken $fp, 1;&lt;br /&gt;
   if ($firsttok-&amp;gt;[0] ne 'OBJECT') {&lt;br /&gt;
     print STDERR &amp;quot;Expected first token to be an OBJECT-token, got $firsttok-&amp;gt;[0]\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   if (!defined $firsttok-&amp;gt;[1]) {&lt;br /&gt;
     print STDERR &amp;quot;In OBJECT-token, 1st arg is undef\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   my $objecttype = $firsttok-&amp;gt;[1];&lt;br /&gt;
   my $objects = [];&lt;br /&gt;
   my $objectsbyid = {};&lt;br /&gt;
   my $object = {};&lt;br /&gt;
   my $res = {object =&amp;gt; $objecttype, objects =&amp;gt; $objects, objectsbyid =&amp;gt; $objectsbyid};&lt;br /&gt;
   my $pushobject = sub {&lt;br /&gt;
     push @$objects, $object if keys %$object;&lt;br /&gt;
     $objectsbyid-&amp;gt;{$object-&amp;gt;{id}} = $object if exists $object-&amp;gt;{id};&lt;br /&gt;
     $object = {};&lt;br /&gt;
   };&lt;br /&gt;
   my $token;&lt;br /&gt;
   while ($token = gettoken $fp and keys %$token) {&lt;br /&gt;
     last unless keys %$token;&lt;br /&gt;
     next unless defined $token-&amp;gt;{key};&lt;br /&gt;
     if ($token-&amp;gt;{key} eq $objecttype) {&lt;br /&gt;
       $pushobject-&amp;gt;();&lt;br /&gt;
       $object-&amp;gt;{'id'} = $token-&amp;gt;{value};&lt;br /&gt;
     } else {&lt;br /&gt;
       $object-&amp;gt;{$token-&amp;gt;{key}} = $token-&amp;gt;{value};&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   $pushobject-&amp;gt;();&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub gettoken {&lt;br /&gt;
   my ($fp, $asserttoken) = @_;&lt;br /&gt;
   $_ = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   my $input = $_;&lt;br /&gt;
   if (!defined) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got EOF&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     return {};&lt;br /&gt;
   }&lt;br /&gt;
   unless (/([^[]*)\[(.*)\]/) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got none&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     my $comment = $_;&lt;br /&gt;
     $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
     return {comment =&amp;gt; $comment};&lt;br /&gt;
   }&lt;br /&gt;
   my ($comment, $token) = ($1, $2);&lt;br /&gt;
   $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
   $comment = undef unless length $comment;&lt;br /&gt;
   my ($key, $value) = ($token);&lt;br /&gt;
   if ($token =~ /^(STATE_[^:]+:[^:]+|[^:]+)(?::(.*))/) {&lt;br /&gt;
     ($key, $value) = ($1, $2);&lt;br /&gt;
   }&lt;br /&gt;
   return [$key, $value] if $asserttoken;&lt;br /&gt;
   return {comment =&amp;gt; $comment, key =&amp;gt; $key, value =&amp;gt; $value};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (($ARGV[0] // '') =~ /^(-[hvV]|--help|--version)$/) {&lt;br /&gt;
   usage();&lt;br /&gt;
   exit;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 my $type = 'INORGANIC';&lt;br /&gt;
 my $templatetype = 'MATERIAL_TEMPLATE';&lt;br /&gt;
 my $templateincludekey = &amp;quot;USE_$templatetype&amp;quot;;&lt;br /&gt;
 my $templates = parsefile 'material_template_default.txt';&lt;br /&gt;
 if ($templates-&amp;gt;{object} ne $templatetype) {&lt;br /&gt;
   die &amp;quot;Template file contains objects of type $templates-&amp;gt;{object}, expected $templatetype&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 my %templates = %{$templates-&amp;gt;{objectsbyid}};&lt;br /&gt;
 &lt;br /&gt;
 my @objects;&lt;br /&gt;
 for my $filename (&amp;lt;inorganic_*.txt&amp;gt;) {&lt;br /&gt;
   my $parsed = parsefile $filename;&lt;br /&gt;
   if ($parsed-&amp;gt;{object} ne $type) {&lt;br /&gt;
     die &amp;quot;Expected objects of type $type in $filename, got $parsed-&amp;gt;{object}&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   push @objects, @{$parsed-&amp;gt;{objects}};&lt;br /&gt;
 }&lt;br /&gt;
 fetchtemplates for @objects;&lt;br /&gt;
 sub fetchtemplates (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   my $id = $obj-&amp;gt;{id};&lt;br /&gt;
   return unless defined $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $templatename = $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $template = $templates{$templatename};&lt;br /&gt;
   unless (defined $template) {&lt;br /&gt;
     print STDERR &amp;quot;Object $id references a template called $templatename, but it doesn't exist!\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   delete $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   for my $key (keys %$template) {&lt;br /&gt;
     $obj-&amp;gt;{$key} //= $template-&amp;gt;{$key};&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 fixstatenames for @objects;&lt;br /&gt;
 sub fixstatenames (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   if (($obj-&amp;gt;{IS_GEM} // '') =~ /^([^:]+):[^:]+:OVERWRITE_SOLID/) {&lt;br /&gt;
     my $name = $1;&lt;br /&gt;
     $obj-&amp;gt;{'STATE_NAME_ADJ:ALL_SOLID'} = $name;&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^STATE_([^:]+_[^:]+):(.*)/;&lt;br /&gt;
     my $states = $1;&lt;br /&gt;
     my $subkey = $2;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     while ($states =~ /([^_]+)/g) {&lt;br /&gt;
       $obj-&amp;gt;{&amp;quot;STATE_${1}:$subkey&amp;quot;} = $value;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^(STATE_[^:]+:)ALL_SOLID/;&lt;br /&gt;
     my $prefix = $1;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID'} = $value;&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID_POWDER'} = $value;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 my %objectsbytype;&lt;br /&gt;
 for my $obj (@objects) {&lt;br /&gt;
   my @keys = grep {/^IS_/ or !defined $obj-&amp;gt;{$_}} keys %$obj;&lt;br /&gt;
   for my $key (@keys) {&lt;br /&gt;
     $objectsbytype{$key} //= [];&lt;br /&gt;
     push @{$objectsbytype{$key}}, $obj;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 sub tabstops {&lt;br /&gt;
   my ($line) = @_;&lt;br /&gt;
   my $suffix;&lt;br /&gt;
   ($line, $suffix) = $line =~ /^(.*?)([\r\n]*)$/s;&lt;br /&gt;
   my $len = length($line)%8;&lt;br /&gt;
   $line =~ s/ {2,8}(?=(.{8})*.{$len}$)/\t/g;&lt;br /&gt;
   $line.$suffix;&lt;br /&gt;
 }&lt;br /&gt;
 if (@ARGV == 0) {&lt;br /&gt;
   for my $key (sort {@{$objectsbytype{$b}}-@{$objectsbytype{$a}}} keys %objectsbytype) {&lt;br /&gt;
     print tabstops(sprintf &amp;quot;%-30s %3d\n&amp;quot;, $key, scalar @{$objectsbytype{$key}});&lt;br /&gt;
   }&lt;br /&gt;
 } else {&lt;br /&gt;
   for my $key (@ARGV) {&lt;br /&gt;
     print &amp;quot;$key\n&amp;quot;;&lt;br /&gt;
     my @rows;&lt;br /&gt;
     for my $obj (@{$objectsbytype{$key}}) {&lt;br /&gt;
       my @row = ($obj-&amp;gt;{'STATE_NAME:SOLID'} // $obj-&amp;gt;{'id'});&lt;br /&gt;
       for (qw(MATERIAL_VALUE MOLAR_MASS)) {&lt;br /&gt;
         push @row, $obj-&amp;gt;{$_} // 0;&lt;br /&gt;
       }&lt;br /&gt;
       push @rows, \@row;&lt;br /&gt;
     }&lt;br /&gt;
     for my $row (sort {$a-&amp;gt;[0] cmp $b-&amp;gt;[0]} @rows) {&lt;br /&gt;
       print tabstops(sprintf &amp;quot;  %-26s %6d %10d\n&amp;quot;, @$row);&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130014</id>
		<title>User:Mortal/rawparse output</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130014"/>
		<updated>2010-10-22T16:50:42Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Added IS_GEM section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ITEMS_ANVIL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 DEEP_SPECIAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 METAMORPHIC&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 IGNEOUS_EXTRUSIVE&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 ITEMS_WEAPON_RANGED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 CRYSTAL_GLASSABLE&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 LAVA&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 ITEMS_BARRED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 SEDIMENTARY&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 ITEMS_HARD&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alexandrite                   20    36000&lt;br /&gt;
 almandine                     20    36000&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 amber opal                    10    36000&lt;br /&gt;
 amethyst                      20    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 aquamarine                    20    36000&lt;br /&gt;
 aventurine                     3    36000&lt;br /&gt;
 banded agate                   2    36000&lt;br /&gt;
 bandfire opal                 20    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 black diamond                 60    36000&lt;br /&gt;
 black opal                    30    36000&lt;br /&gt;
 black pyrope                  20    36000&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 black zircon                  20    36000&lt;br /&gt;
 bloodstone                     2    36000&lt;br /&gt;
 blue diamond                  60    36000&lt;br /&gt;
 blue garnet                   30    36000&lt;br /&gt;
 blue jade                      2    36000&lt;br /&gt;
 bone opal                     10    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 brown jasper                   2    36000&lt;br /&gt;
 brown zircon                  20    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 carnelian                      2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 cat's eye                     20    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 cherry opal                   10    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 chrysoberyl                   20    36000&lt;br /&gt;
 chrysocolla                    2    36000&lt;br /&gt;
 chrysoprase                    2    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 cinnamon grossular            20    36000&lt;br /&gt;
 citrine                        2    36000&lt;br /&gt;
 claro opal                    20    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 clear diamond                 60    36000&lt;br /&gt;
 clear garnet                  20    36000&lt;br /&gt;
 clear tourmaline              10    36000&lt;br /&gt;
 clear zircon                  25    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 crystal opal                  20    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 demantoid                     30    36000&lt;br /&gt;
 dendritic agate                2    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 emerald                       40    36000&lt;br /&gt;
 faint yellow diamond          40    36000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 fire agate                     2    36000&lt;br /&gt;
 fire opal                     15    36000&lt;br /&gt;
 fortification agate            2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 gold opal                     10    36000&lt;br /&gt;
 golden beryl                  20    36000&lt;br /&gt;
 goshenite                     20    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gray chalcedony                2    36000&lt;br /&gt;
 green diamond                 60    36000&lt;br /&gt;
 green jade                    20    36000&lt;br /&gt;
 green tourmaline              20    36000&lt;br /&gt;
 green zircon                  20    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 harlequin opal                20    36000&lt;br /&gt;
 heliodor                      20    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 honey yellow beryl            20    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 indigo tourmaline             25    36000&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 jasper opal                   10    36000&lt;br /&gt;
 jelly opal                    15    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 kunzite                       20    36000&lt;br /&gt;
 lace agate                     2    36000&lt;br /&gt;
 lapis lazuli                   2    36000&lt;br /&gt;
 lavender jade                  2    36000&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 levin opal                    20    36000&lt;br /&gt;
 light yellow diamond          30    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 melanite                      15    36000&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 milk opal                     10    36000&lt;br /&gt;
 milk quartz                    2    36000&lt;br /&gt;
 moonstone                      2    36000&lt;br /&gt;
 morganite                     20    36000&lt;br /&gt;
 morion                         2    36000&lt;br /&gt;
 moss agate                     2    36000&lt;br /&gt;
 moss opal                     10    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 native aluminum               40    26981&lt;br /&gt;
 native copper                  2    63546&lt;br /&gt;
 native gold                   30   196967&lt;br /&gt;
 native platinum               40   195084&lt;br /&gt;
 native silver                 10   107868&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 onyx                           2    36000&lt;br /&gt;
 onyx opal                     10    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 peridot                       20    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 picture jasper                 3    36000&lt;br /&gt;
 pineapple opal                10    36000&lt;br /&gt;
 pinfire opal                  20    36000&lt;br /&gt;
 pink garnet                   20    36000&lt;br /&gt;
 pink jade                      2    36000&lt;br /&gt;
 pink tourmaline               15    36000&lt;br /&gt;
 pipe opal                     10    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 plume agate                    2    36000&lt;br /&gt;
 prase                          2    36000&lt;br /&gt;
 prase opal                    10    36000&lt;br /&gt;
 precious fire opal            20    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 purple spinel                 20    36000&lt;br /&gt;
 pyrite                         2    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 red beryl                     20    36000&lt;br /&gt;
 red diamond                   60    36000&lt;br /&gt;
 red flash opal                20    36000&lt;br /&gt;
 red grossular                 20    36000&lt;br /&gt;
 red pyrope                    20    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 red spinel                    20    36000&lt;br /&gt;
 red tourmaline                15    36000&lt;br /&gt;
 red zircon                    20    36000&lt;br /&gt;
 resin opal                    10    36000&lt;br /&gt;
 rhodolite                     20    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 rose quartz                    3    36000&lt;br /&gt;
 rubicelle                     20    36000&lt;br /&gt;
 ruby                          40    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 sapphire                      40    36000&lt;br /&gt;
 sard                           2    36000&lt;br /&gt;
 sardonyx                       2    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 schorl                         2    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 shell opal                    10    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 smoky quartz                   2    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 star ruby                     60    36000&lt;br /&gt;
 star sapphire                 60    36000&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sunstone                       2    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tanzanite                     20    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 tiger iron                     2    36000&lt;br /&gt;
 tigereye                       2    36000&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 topaz                         20    36000&lt;br /&gt;
 topazolite                    20    36000&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 tsavorite                     30    36000&lt;br /&gt;
 tube agate                     2    36000&lt;br /&gt;
 turquoise                      2    36000&lt;br /&gt;
 variscite                      2    36000&lt;br /&gt;
 violet spessartine            20    36000&lt;br /&gt;
 wax opal                      10    36000&lt;br /&gt;
 white chalcedony               2    36000&lt;br /&gt;
 white jade                     2    36000&lt;br /&gt;
 white opal                    20    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 wood opal                     10    36000&lt;br /&gt;
 yellow diamond                60    36000&lt;br /&gt;
 yellow grossular              20    36000&lt;br /&gt;
 yellow jasper                  2    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 yellow spessartine            20    36000&lt;br /&gt;
 yellow zircon                 20    36000&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 ITEMS_SOFT&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 SOIL&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 ITEMS_DIGGER&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 SEDIMENTARY_OCEAN_SHALLOW&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 WAFERS&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 UNDIGGABLE&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 IS_GEM&lt;br /&gt;
 alexandrite                   20    36000&lt;br /&gt;
 almandine                     20    36000&lt;br /&gt;
 amber opal                    10    36000&lt;br /&gt;
 amethyst                      20    36000&lt;br /&gt;
 aquamarine                    20    36000&lt;br /&gt;
 aventurine                     3    36000&lt;br /&gt;
 banded agate                   2    36000&lt;br /&gt;
 bandfire opal                 20    36000&lt;br /&gt;
 black diamond                 60    36000&lt;br /&gt;
 black opal                    30    36000&lt;br /&gt;
 black pyrope                  20    36000&lt;br /&gt;
 black zircon                  20    36000&lt;br /&gt;
 bloodstone                     2    36000&lt;br /&gt;
 blue diamond                  60    36000&lt;br /&gt;
 blue garnet                   30    36000&lt;br /&gt;
 blue jade                      2    36000&lt;br /&gt;
 bone opal                     10    36000&lt;br /&gt;
 brown jasper                   2    36000&lt;br /&gt;
 brown zircon                  20    36000&lt;br /&gt;
 carnelian                      2    36000&lt;br /&gt;
 cat's eye                     20    36000&lt;br /&gt;
 cherry opal                   10    36000&lt;br /&gt;
 chrysoberyl                   20    36000&lt;br /&gt;
 chrysocolla                    2    36000&lt;br /&gt;
 chrysoprase                    2    36000&lt;br /&gt;
 cinnamon grossular            20    36000&lt;br /&gt;
 citrine                        2    36000&lt;br /&gt;
 claro opal                    20    36000&lt;br /&gt;
 clear diamond                 60    36000&lt;br /&gt;
 clear garnet                  20    36000&lt;br /&gt;
 clear tourmaline              10    36000&lt;br /&gt;
 clear zircon                  25    36000&lt;br /&gt;
 crystal opal                  20    36000&lt;br /&gt;
 demantoid                     30    36000&lt;br /&gt;
 dendritic agate                2    36000&lt;br /&gt;
 emerald                       40    36000&lt;br /&gt;
 faint yellow diamond          40    36000&lt;br /&gt;
 fire agate                     2    36000&lt;br /&gt;
 fire opal                     15    36000&lt;br /&gt;
 fortification agate            2    36000&lt;br /&gt;
 gold opal                     10    36000&lt;br /&gt;
 golden beryl                  20    36000&lt;br /&gt;
 goshenite                     20    36000&lt;br /&gt;
 gray chalcedony                2    36000&lt;br /&gt;
 green diamond                 60    36000&lt;br /&gt;
 green jade                    20    36000&lt;br /&gt;
 green tourmaline              20    36000&lt;br /&gt;
 green zircon                  20    36000&lt;br /&gt;
 harlequin opal                20    36000&lt;br /&gt;
 heliodor                      20    36000&lt;br /&gt;
 honey yellow beryl            20    36000&lt;br /&gt;
 indigo tourmaline             25    36000&lt;br /&gt;
 jasper opal                   10    36000&lt;br /&gt;
 jelly opal                    15    36000&lt;br /&gt;
 kunzite                       20    36000&lt;br /&gt;
 lace agate                     2    36000&lt;br /&gt;
 lapis lazuli                   2    36000&lt;br /&gt;
 lavender jade                  2    36000&lt;br /&gt;
 levin opal                    20    36000&lt;br /&gt;
 light yellow diamond          30    36000&lt;br /&gt;
 melanite                      15    36000&lt;br /&gt;
 milk opal                     10    36000&lt;br /&gt;
 milk quartz                    2    36000&lt;br /&gt;
 moonstone                      2    36000&lt;br /&gt;
 morganite                     20    36000&lt;br /&gt;
 morion                         2    36000&lt;br /&gt;
 moss agate                     2    36000&lt;br /&gt;
 moss opal                     10    36000&lt;br /&gt;
 onyx                           2    36000&lt;br /&gt;
 onyx opal                     10    36000&lt;br /&gt;
 peridot                       20    36000&lt;br /&gt;
 picture jasper                 3    36000&lt;br /&gt;
 pineapple opal                10    36000&lt;br /&gt;
 pinfire opal                  20    36000&lt;br /&gt;
 pink garnet                   20    36000&lt;br /&gt;
 pink jade                      2    36000&lt;br /&gt;
 pink tourmaline               15    36000&lt;br /&gt;
 pipe opal                     10    36000&lt;br /&gt;
 plume agate                    2    36000&lt;br /&gt;
 prase                          2    36000&lt;br /&gt;
 prase opal                    10    36000&lt;br /&gt;
 precious fire opal            20    36000&lt;br /&gt;
 purple spinel                 20    36000&lt;br /&gt;
 pyrite                         2    36000&lt;br /&gt;
 red beryl                     20    36000&lt;br /&gt;
 red diamond                   60    36000&lt;br /&gt;
 red flash opal                20    36000&lt;br /&gt;
 red grossular                 20    36000&lt;br /&gt;
 red pyrope                    20    36000&lt;br /&gt;
 red spinel                    20    36000&lt;br /&gt;
 red tourmaline                15    36000&lt;br /&gt;
 red zircon                    20    36000&lt;br /&gt;
 resin opal                    10    36000&lt;br /&gt;
 rhodolite                     20    36000&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 rose quartz                    3    36000&lt;br /&gt;
 rubicelle                     20    36000&lt;br /&gt;
 ruby                          40    36000&lt;br /&gt;
 sapphire                      40    36000&lt;br /&gt;
 sard                           2    36000&lt;br /&gt;
 sardonyx                       2    36000&lt;br /&gt;
 schorl                         2    36000&lt;br /&gt;
 shell opal                    10    36000&lt;br /&gt;
 smoky quartz                   2    36000&lt;br /&gt;
 star ruby                     60    36000&lt;br /&gt;
 star sapphire                 60    36000&lt;br /&gt;
 sunstone                       2    36000&lt;br /&gt;
 tanzanite                     20    36000&lt;br /&gt;
 tiger iron                     2    36000&lt;br /&gt;
 tigereye                       2    36000&lt;br /&gt;
 topaz                         20    36000&lt;br /&gt;
 topazolite                    20    36000&lt;br /&gt;
 tsavorite                     30    36000&lt;br /&gt;
 tube agate                     2    36000&lt;br /&gt;
 turquoise                      2    36000&lt;br /&gt;
 variscite                      2    36000&lt;br /&gt;
 violet spessartine            20    36000&lt;br /&gt;
 wax opal                      10    36000&lt;br /&gt;
 white chalcedony               2    36000&lt;br /&gt;
 white jade                     2    36000&lt;br /&gt;
 white opal                    20    36000&lt;br /&gt;
 wood opal                     10    36000&lt;br /&gt;
 yellow diamond                60    36000&lt;br /&gt;
 yellow grossular              20    36000&lt;br /&gt;
 yellow jasper                  2    36000&lt;br /&gt;
 yellow spessartine            20    36000&lt;br /&gt;
 yellow zircon                 20    36000&lt;br /&gt;
 SEDIMENTARY_OCEAN_DEEP&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 ITEMS_SCALED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 IGNEOUS_INTRUSIVE&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 SOIL_SAND&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 AQUIFER&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 ITEMS_AMMO&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 IS_METAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth                        2   208980&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 pig iron                      10    55845&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 IS_STONE&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 native aluminum               40    26981&lt;br /&gt;
 native copper                  2    63546&lt;br /&gt;
 native gold                   30   196967&lt;br /&gt;
 native platinum               40   195084&lt;br /&gt;
 native silver                 10   107868&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 SOIL_OCEAN&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 DEEP_SURFACE&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 ITEMS_ARMOR&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 ITEMS_WEAPON&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 ITEMS_METAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 ITEMS_QUERN&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alexandrite                   20    36000&lt;br /&gt;
 almandine                     20    36000&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 amber opal                    10    36000&lt;br /&gt;
 amethyst                      20    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 aquamarine                    20    36000&lt;br /&gt;
 aventurine                     3    36000&lt;br /&gt;
 banded agate                   2    36000&lt;br /&gt;
 bandfire opal                 20    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 black diamond                 60    36000&lt;br /&gt;
 black opal                    30    36000&lt;br /&gt;
 black pyrope                  20    36000&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 black zircon                  20    36000&lt;br /&gt;
 bloodstone                     2    36000&lt;br /&gt;
 blue diamond                  60    36000&lt;br /&gt;
 blue garnet                   30    36000&lt;br /&gt;
 blue jade                      2    36000&lt;br /&gt;
 bone opal                     10    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 brown jasper                   2    36000&lt;br /&gt;
 brown zircon                  20    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 carnelian                      2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 cat's eye                     20    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 cherry opal                   10    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 chrysoberyl                   20    36000&lt;br /&gt;
 chrysocolla                    2    36000&lt;br /&gt;
 chrysoprase                    2    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 cinnamon grossular            20    36000&lt;br /&gt;
 citrine                        2    36000&lt;br /&gt;
 claro opal                    20    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 clear diamond                 60    36000&lt;br /&gt;
 clear garnet                  20    36000&lt;br /&gt;
 clear tourmaline              10    36000&lt;br /&gt;
 clear zircon                  25    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 crystal opal                  20    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 demantoid                     30    36000&lt;br /&gt;
 dendritic agate                2    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 emerald                       40    36000&lt;br /&gt;
 faint yellow diamond          40    36000&lt;br /&gt;
 fire agate                     2    36000&lt;br /&gt;
 fire opal                     15    36000&lt;br /&gt;
 fortification agate            2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 gold opal                     10    36000&lt;br /&gt;
 golden beryl                  20    36000&lt;br /&gt;
 goshenite                     20    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gray chalcedony                2    36000&lt;br /&gt;
 green diamond                 60    36000&lt;br /&gt;
 green jade                    20    36000&lt;br /&gt;
 green tourmaline              20    36000&lt;br /&gt;
 green zircon                  20    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 harlequin opal                20    36000&lt;br /&gt;
 heliodor                      20    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 honey yellow beryl            20    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 indigo tourmaline             25    36000&lt;br /&gt;
 jasper opal                   10    36000&lt;br /&gt;
 jelly opal                    15    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 kunzite                       20    36000&lt;br /&gt;
 lace agate                     2    36000&lt;br /&gt;
 lapis lazuli                   2    36000&lt;br /&gt;
 lavender jade                  2    36000&lt;br /&gt;
 levin opal                    20    36000&lt;br /&gt;
 light yellow diamond          30    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 melanite                      15    36000&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 milk opal                     10    36000&lt;br /&gt;
 milk quartz                    2    36000&lt;br /&gt;
 moonstone                      2    36000&lt;br /&gt;
 morganite                     20    36000&lt;br /&gt;
 morion                         2    36000&lt;br /&gt;
 moss agate                     2    36000&lt;br /&gt;
 moss opal                     10    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 onyx                           2    36000&lt;br /&gt;
 onyx opal                     10    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 peridot                       20    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 picture jasper                 3    36000&lt;br /&gt;
 pineapple opal                10    36000&lt;br /&gt;
 pinfire opal                  20    36000&lt;br /&gt;
 pink garnet                   20    36000&lt;br /&gt;
 pink jade                      2    36000&lt;br /&gt;
 pink tourmaline               15    36000&lt;br /&gt;
 pipe opal                     10    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 plume agate                    2    36000&lt;br /&gt;
 prase                          2    36000&lt;br /&gt;
 prase opal                    10    36000&lt;br /&gt;
 precious fire opal            20    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 purple spinel                 20    36000&lt;br /&gt;
 pyrite                         2    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 red beryl                     20    36000&lt;br /&gt;
 red diamond                   60    36000&lt;br /&gt;
 red flash opal                20    36000&lt;br /&gt;
 red grossular                 20    36000&lt;br /&gt;
 red pyrope                    20    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 red spinel                    20    36000&lt;br /&gt;
 red tourmaline                15    36000&lt;br /&gt;
 red zircon                    20    36000&lt;br /&gt;
 resin opal                    10    36000&lt;br /&gt;
 rhodolite                     20    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rose quartz                    3    36000&lt;br /&gt;
 rubicelle                     20    36000&lt;br /&gt;
 ruby                          40    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 sapphire                      40    36000&lt;br /&gt;
 sard                           2    36000&lt;br /&gt;
 sardonyx                       2    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 schorl                         2    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 shell opal                    10    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 smoky quartz                   2    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 star ruby                     60    36000&lt;br /&gt;
 star sapphire                 60    36000&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sunstone                       2    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tanzanite                     20    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 tiger iron                     2    36000&lt;br /&gt;
 tigereye                       2    36000&lt;br /&gt;
 topaz                         20    36000&lt;br /&gt;
 topazolite                    20    36000&lt;br /&gt;
 tsavorite                     30    36000&lt;br /&gt;
 tube agate                     2    36000&lt;br /&gt;
 turquoise                      2    36000&lt;br /&gt;
 variscite                      2    36000&lt;br /&gt;
 violet spessartine            20    36000&lt;br /&gt;
 wax opal                      10    36000&lt;br /&gt;
 white chalcedony               2    36000&lt;br /&gt;
 white jade                     2    36000&lt;br /&gt;
 white opal                    20    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 wood opal                     10    36000&lt;br /&gt;
 yellow diamond                60    36000&lt;br /&gt;
 yellow grossular              20    36000&lt;br /&gt;
 yellow jasper                  2    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 yellow spessartine            20    36000&lt;br /&gt;
 yellow zircon                 20    36000&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130013</id>
		<title>User:Mortal</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130013"/>
		<updated>2010-10-22T16:49:30Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Added IS_GEM section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Novice Dwarffortressdwarf&lt;br /&gt;
&lt;br /&gt;
== rawparse.pl ==&lt;br /&gt;
Put it in your raw/objects folder! [[User:Mortal/rawparse output|Output as of 0.31.16]]&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl&lt;br /&gt;
 &lt;br /&gt;
 use warnings;&lt;br /&gt;
 use strict;&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile;&lt;br /&gt;
 sub parsefile_;&lt;br /&gt;
 sub gettoken;&lt;br /&gt;
 sub fetchtemplates (_);&lt;br /&gt;
 sub fixstatenames (_);&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile {&lt;br /&gt;
   my ($filename) = @_;&lt;br /&gt;
   my $fp;&lt;br /&gt;
   unless (open $fp, '&amp;lt;', $filename) {&lt;br /&gt;
     die &amp;quot;Couldn't open $filename for reading&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   my $res = parsefile_ $fp, $filename;&lt;br /&gt;
   close $fp;&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile_ {&lt;br /&gt;
   my ($fp, $filename) = @_;&lt;br /&gt;
   my $expectfilename = $filename;&lt;br /&gt;
   $expectfilename =~ s/^.*\/|\.txt$//g;&lt;br /&gt;
   my $gotfilename = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   $gotfilename =~ s/\r?\n?$//s;&lt;br /&gt;
   if ($expectfilename ne $gotfilename) {&lt;br /&gt;
     print STDERR &amp;quot;Expected filename '$expectfilename' in $filename, got '$gotfilename'\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   local $/ = ']';&lt;br /&gt;
   my $firsttok = gettoken $fp, 1;&lt;br /&gt;
   if ($firsttok-&amp;gt;[0] ne 'OBJECT') {&lt;br /&gt;
     print STDERR &amp;quot;Expected first token to be an OBJECT-token, got $firsttok-&amp;gt;[0]\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   if (!defined $firsttok-&amp;gt;[1]) {&lt;br /&gt;
     print STDERR &amp;quot;In OBJECT-token, 1st arg is undef\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   my $objecttype = $firsttok-&amp;gt;[1];&lt;br /&gt;
   my $objects = [];&lt;br /&gt;
   my $objectsbyid = {};&lt;br /&gt;
   my $object = {};&lt;br /&gt;
   my $res = {object =&amp;gt; $objecttype, objects =&amp;gt; $objects, objectsbyid =&amp;gt; $objectsbyid};&lt;br /&gt;
   my $pushobject = sub {&lt;br /&gt;
     push @$objects, $object if keys %$object;&lt;br /&gt;
     $objectsbyid-&amp;gt;{$object-&amp;gt;{id}} = $object if exists $object-&amp;gt;{id};&lt;br /&gt;
     $object = {};&lt;br /&gt;
   };&lt;br /&gt;
   my $token;&lt;br /&gt;
   while ($token = gettoken $fp and keys %$token) {&lt;br /&gt;
     last unless keys %$token;&lt;br /&gt;
     next unless defined $token-&amp;gt;{key};&lt;br /&gt;
     if ($token-&amp;gt;{key} eq $objecttype) {&lt;br /&gt;
       $pushobject-&amp;gt;();&lt;br /&gt;
       $object-&amp;gt;{'id'} = $token-&amp;gt;{value};&lt;br /&gt;
     } else {&lt;br /&gt;
       $object-&amp;gt;{$token-&amp;gt;{key}} = $token-&amp;gt;{value};&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   $pushobject-&amp;gt;();&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub gettoken {&lt;br /&gt;
   my ($fp, $asserttoken) = @_;&lt;br /&gt;
   $_ = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   my $input = $_;&lt;br /&gt;
   if (!defined) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got EOF&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     return {};&lt;br /&gt;
   }&lt;br /&gt;
   unless (/([^[]*)\[(.*)\]/) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got none&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     my $comment = $_;&lt;br /&gt;
     $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
     return {comment =&amp;gt; $comment};&lt;br /&gt;
   }&lt;br /&gt;
   my ($comment, $token) = ($1, $2);&lt;br /&gt;
   $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
   $comment = undef unless length $comment;&lt;br /&gt;
   my ($key, $value) = ($token);&lt;br /&gt;
   if ($token =~ /^(STATE_[^:]+:[^:]+|[^:]+)(?::(.*))/) {&lt;br /&gt;
     ($key, $value) = ($1, $2);&lt;br /&gt;
   }&lt;br /&gt;
   return [$key, $value] if $asserttoken;&lt;br /&gt;
   return {comment =&amp;gt; $comment, key =&amp;gt; $key, value =&amp;gt; $value};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 my $type = 'INORGANIC';&lt;br /&gt;
 my $templatetype = 'MATERIAL_TEMPLATE';&lt;br /&gt;
 my $templateincludekey = &amp;quot;USE_$templatetype&amp;quot;;&lt;br /&gt;
 my $templates = parsefile 'material_template_default.txt';&lt;br /&gt;
 if ($templates-&amp;gt;{object} ne $templatetype) {&lt;br /&gt;
   die &amp;quot;Template file contains objects of type $templates-&amp;gt;{object}, expected $templatetype&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 my %templates = %{$templates-&amp;gt;{objectsbyid}};&lt;br /&gt;
 &lt;br /&gt;
 my @objects;&lt;br /&gt;
 for my $filename (&amp;lt;inorganic_*.txt&amp;gt;) {&lt;br /&gt;
   my $parsed = parsefile $filename;&lt;br /&gt;
   if ($parsed-&amp;gt;{object} ne $type) {&lt;br /&gt;
     die &amp;quot;Expected objects of type $type in $filename, got $parsed-&amp;gt;{object}&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   push @objects, @{$parsed-&amp;gt;{objects}};&lt;br /&gt;
 }&lt;br /&gt;
 fetchtemplates for @objects;&lt;br /&gt;
 sub fetchtemplates (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   my $id = $obj-&amp;gt;{id};&lt;br /&gt;
   return unless defined $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $templatename = $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $template = $templates{$templatename};&lt;br /&gt;
   unless (defined $template) {&lt;br /&gt;
     print STDERR &amp;quot;Object $id references a template called $templatename, but it doesn't exist!\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   delete $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   for my $key (keys %$template) {&lt;br /&gt;
     $obj-&amp;gt;{$key} //= $template-&amp;gt;{$key};&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 fixstatenames for @objects;&lt;br /&gt;
 sub fixstatenames (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   if (($obj-&amp;gt;{IS_GEM} // '') =~ /^([^:]+):[^:]+:OVERWRITE_SOLID/) {&lt;br /&gt;
     my $name = $1;&lt;br /&gt;
     $obj-&amp;gt;{'STATE_NAME_ADJ:ALL_SOLID'} = $name;&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^STATE_([^:]+_[^:]+):(.*)/;&lt;br /&gt;
     my $states = $1;&lt;br /&gt;
     my $subkey = $2;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     while ($states =~ /([^_]+)/g) {&lt;br /&gt;
       $obj-&amp;gt;{&amp;quot;STATE_${1}:$subkey&amp;quot;} = $value;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^(STATE_[^:]+:)ALL_SOLID/;&lt;br /&gt;
     my $prefix = $1;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID'} = $value;&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID_POWDER'} = $value;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 my %objectsbytype;&lt;br /&gt;
 for my $obj (@objects) {&lt;br /&gt;
   my @keys = grep {/^IS_/ or !defined $obj-&amp;gt;{$_}} keys %$obj;&lt;br /&gt;
   for my $key (@keys) {&lt;br /&gt;
     $objectsbytype{$key} //= [];&lt;br /&gt;
     push @{$objectsbytype{$key}}, $obj;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 for my $key (keys %objectsbytype) {&lt;br /&gt;
   print &amp;quot;$key\n&amp;quot;;&lt;br /&gt;
   my @rows;&lt;br /&gt;
   for my $obj (@{$objectsbytype{$key}}) {&lt;br /&gt;
     my @row = ($obj-&amp;gt;{'STATE_NAME:SOLID'} // $obj-&amp;gt;{'id'});&lt;br /&gt;
     for (qw(MATERIAL_VALUE MOLAR_MASS)) {&lt;br /&gt;
       push @row, $obj-&amp;gt;{$_} // 0;&lt;br /&gt;
     }&lt;br /&gt;
     push @rows, \@row;&lt;br /&gt;
   }&lt;br /&gt;
   for my $row (sort {$a-&amp;gt;[0] cmp $b-&amp;gt;[0]} @rows) {&lt;br /&gt;
     printf &amp;quot;%-25s %6d %8d\n&amp;quot;, @$row;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130012</id>
		<title>User:Mortal/rawparse output</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal/rawparse_output&amp;diff=130012"/>
		<updated>2010-10-22T16:41:25Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Create user page with output from rawparse.pl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ITEMS_ANVIL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 DEEP_SPECIAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 METAMORPHIC&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 IGNEOUS_EXTRUSIVE&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 ITEMS_WEAPON_RANGED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 CRYSTAL_GLASSABLE&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 LAVA&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 ITEMS_BARRED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 SEDIMENTARY&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 ITEMS_HARD&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alexandrite                   20    36000&lt;br /&gt;
 almandine                     20    36000&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 amber opal                    10    36000&lt;br /&gt;
 amethyst                      20    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 aquamarine                    20    36000&lt;br /&gt;
 aventurine                     3    36000&lt;br /&gt;
 banded agate                   2    36000&lt;br /&gt;
 bandfire opal                 20    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 black diamond                 60    36000&lt;br /&gt;
 black opal                    30    36000&lt;br /&gt;
 black pyrope                  20    36000&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 black zircon                  20    36000&lt;br /&gt;
 bloodstone                     2    36000&lt;br /&gt;
 blue diamond                  60    36000&lt;br /&gt;
 blue garnet                   30    36000&lt;br /&gt;
 blue jade                      2    36000&lt;br /&gt;
 bone opal                     10    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 brown jasper                   2    36000&lt;br /&gt;
 brown zircon                  20    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 carnelian                      2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 cat's eye                     20    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 cherry opal                   10    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 chrysoberyl                   20    36000&lt;br /&gt;
 chrysocolla                    2    36000&lt;br /&gt;
 chrysoprase                    2    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 cinnamon grossular            20    36000&lt;br /&gt;
 citrine                        2    36000&lt;br /&gt;
 claro opal                    20    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 clear diamond                 60    36000&lt;br /&gt;
 clear garnet                  20    36000&lt;br /&gt;
 clear tourmaline              10    36000&lt;br /&gt;
 clear zircon                  25    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 crystal opal                  20    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 demantoid                     30    36000&lt;br /&gt;
 dendritic agate                2    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 emerald                       40    36000&lt;br /&gt;
 faint yellow diamond          40    36000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 fire agate                     2    36000&lt;br /&gt;
 fire opal                     15    36000&lt;br /&gt;
 fortification agate            2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 gold opal                     10    36000&lt;br /&gt;
 golden beryl                  20    36000&lt;br /&gt;
 goshenite                     20    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gray chalcedony                2    36000&lt;br /&gt;
 green diamond                 60    36000&lt;br /&gt;
 green jade                    20    36000&lt;br /&gt;
 green tourmaline              20    36000&lt;br /&gt;
 green zircon                  20    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 harlequin opal                20    36000&lt;br /&gt;
 heliodor                      20    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 honey yellow beryl            20    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 indigo tourmaline             25    36000&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 jasper opal                   10    36000&lt;br /&gt;
 jelly opal                    15    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 kunzite                       20    36000&lt;br /&gt;
 lace agate                     2    36000&lt;br /&gt;
 lapis lazuli                   2    36000&lt;br /&gt;
 lavender jade                  2    36000&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 levin opal                    20    36000&lt;br /&gt;
 light yellow diamond          30    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 melanite                      15    36000&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 milk opal                     10    36000&lt;br /&gt;
 milk quartz                    2    36000&lt;br /&gt;
 moonstone                      2    36000&lt;br /&gt;
 morganite                     20    36000&lt;br /&gt;
 morion                         2    36000&lt;br /&gt;
 moss agate                     2    36000&lt;br /&gt;
 moss opal                     10    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 native aluminum               40    26981&lt;br /&gt;
 native copper                  2    63546&lt;br /&gt;
 native gold                   30   196967&lt;br /&gt;
 native platinum               40   195084&lt;br /&gt;
 native silver                 10   107868&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 onyx                           2    36000&lt;br /&gt;
 onyx opal                     10    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 peridot                       20    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 picture jasper                 3    36000&lt;br /&gt;
 pineapple opal                10    36000&lt;br /&gt;
 pinfire opal                  20    36000&lt;br /&gt;
 pink garnet                   20    36000&lt;br /&gt;
 pink jade                      2    36000&lt;br /&gt;
 pink tourmaline               15    36000&lt;br /&gt;
 pipe opal                     10    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 plume agate                    2    36000&lt;br /&gt;
 prase                          2    36000&lt;br /&gt;
 prase opal                    10    36000&lt;br /&gt;
 precious fire opal            20    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 purple spinel                 20    36000&lt;br /&gt;
 pyrite                         2    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 red beryl                     20    36000&lt;br /&gt;
 red diamond                   60    36000&lt;br /&gt;
 red flash opal                20    36000&lt;br /&gt;
 red grossular                 20    36000&lt;br /&gt;
 red pyrope                    20    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 red spinel                    20    36000&lt;br /&gt;
 red tourmaline                15    36000&lt;br /&gt;
 red zircon                    20    36000&lt;br /&gt;
 resin opal                    10    36000&lt;br /&gt;
 rhodolite                     20    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 rose quartz                    3    36000&lt;br /&gt;
 rubicelle                     20    36000&lt;br /&gt;
 ruby                          40    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 sapphire                      40    36000&lt;br /&gt;
 sard                           2    36000&lt;br /&gt;
 sardonyx                       2    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 schorl                         2    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 shell opal                    10    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 smoky quartz                   2    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 star ruby                     60    36000&lt;br /&gt;
 star sapphire                 60    36000&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sunstone                       2    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tanzanite                     20    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 tiger iron                     2    36000&lt;br /&gt;
 tigereye                       2    36000&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 topaz                         20    36000&lt;br /&gt;
 topazolite                    20    36000&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 tsavorite                     30    36000&lt;br /&gt;
 tube agate                     2    36000&lt;br /&gt;
 turquoise                      2    36000&lt;br /&gt;
 variscite                      2    36000&lt;br /&gt;
 violet spessartine            20    36000&lt;br /&gt;
 wax opal                      10    36000&lt;br /&gt;
 white chalcedony               2    36000&lt;br /&gt;
 white jade                     2    36000&lt;br /&gt;
 white opal                    20    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 wood opal                     10    36000&lt;br /&gt;
 yellow diamond                60    36000&lt;br /&gt;
 yellow grossular              20    36000&lt;br /&gt;
 yellow jasper                  2    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 yellow spessartine            20    36000&lt;br /&gt;
 yellow zircon                 20    36000&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 ITEMS_SOFT&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 SOIL&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 ITEMS_DIGGER&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 SEDIMENTARY_OCEAN_SHALLOW&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 WAFERS&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 UNDIGGABLE&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 SEDIMENTARY_OCEAN_DEEP&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 ITEMS_SCALED&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 IGNEOUS_INTRUSIVE&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 SOIL_SAND&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 AQUIFER&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 ITEMS_AMMO&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 IS_METAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth                        2   208980&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 pig iron                      10    55845&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 IS_STONE&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 native aluminum               40    26981&lt;br /&gt;
 native copper                  2    63546&lt;br /&gt;
 native gold                   30   196967&lt;br /&gt;
 native platinum               40   195084&lt;br /&gt;
 native silver                 10   107868&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 raw adamantine               250    55845&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 SOIL_OCEAN&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 DEEP_SURFACE&lt;br /&gt;
 slade                          0        0&lt;br /&gt;
 ITEMS_ARMOR&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 ITEMS_WEAPON&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 ITEMS_METAL&lt;br /&gt;
 adamantine                   300    55845&lt;br /&gt;
 aluminum                      40    26981&lt;br /&gt;
 billon                         6    63546&lt;br /&gt;
 bismuth bronze                 6    80000&lt;br /&gt;
 black bronze                  11    63546&lt;br /&gt;
 brass                          7    64000&lt;br /&gt;
 bronze                         5    80000&lt;br /&gt;
 copper                         2    63546&lt;br /&gt;
 electrum                      20   150000&lt;br /&gt;
 fine pewter                    5   118710&lt;br /&gt;
 iron                          10    55845&lt;br /&gt;
 lay pewter                     3   118710&lt;br /&gt;
 lead                           2   207200&lt;br /&gt;
 metal                         30   196967&lt;br /&gt;
 nickel                         2    58693&lt;br /&gt;
 nickel silver                  3    58693&lt;br /&gt;
 platinum                      40   195084&lt;br /&gt;
 rose gold                     23   196967&lt;br /&gt;
 silver                        10   107868&lt;br /&gt;
 steel                         30    55845&lt;br /&gt;
 sterling silver                8   107868&lt;br /&gt;
 tin                            2   118710&lt;br /&gt;
 trifle pewter                  4   118710&lt;br /&gt;
 zinc                           2    65380&lt;br /&gt;
 ITEMS_QUERN&lt;br /&gt;
 alabaster                      1    36000&lt;br /&gt;
 alexandrite                   20    36000&lt;br /&gt;
 almandine                     20    36000&lt;br /&gt;
 alunite                        1    36000&lt;br /&gt;
 amber opal                    10    36000&lt;br /&gt;
 amethyst                      20    36000&lt;br /&gt;
 andesite                       1    36000&lt;br /&gt;
 anhydrite                      1    36000&lt;br /&gt;
 aquamarine                    20    36000&lt;br /&gt;
 aventurine                     3    36000&lt;br /&gt;
 banded agate                   2    36000&lt;br /&gt;
 bandfire opal                 20    36000&lt;br /&gt;
 basalt                         1    36000&lt;br /&gt;
 bauxite                        1    36000&lt;br /&gt;
 bismuthinite                   1    36000&lt;br /&gt;
 bituminous coal                1    36000&lt;br /&gt;
 black diamond                 60    36000&lt;br /&gt;
 black opal                    30    36000&lt;br /&gt;
 black pyrope                  20    36000&lt;br /&gt;
 black sand                     1    36000&lt;br /&gt;
 black zircon                  20    36000&lt;br /&gt;
 bloodstone                     2    36000&lt;br /&gt;
 blue diamond                  60    36000&lt;br /&gt;
 blue garnet                   30    36000&lt;br /&gt;
 blue jade                      2    36000&lt;br /&gt;
 bone opal                     10    36000&lt;br /&gt;
 borax                          1    36000&lt;br /&gt;
 brimstone                      1    36000&lt;br /&gt;
 brown jasper                   2    36000&lt;br /&gt;
 brown zircon                  20    36000&lt;br /&gt;
 calcareous ooze                1    36000&lt;br /&gt;
 calcite                        2    36000&lt;br /&gt;
 carnelian                      2    36000&lt;br /&gt;
 cassiterite                    2    36000&lt;br /&gt;
 cat's eye                     20    36000&lt;br /&gt;
 chalk                          2    36000&lt;br /&gt;
 cherry opal                   10    36000&lt;br /&gt;
 chert                          1    36000&lt;br /&gt;
 chromite                       1    36000&lt;br /&gt;
 chrysoberyl                   20    36000&lt;br /&gt;
 chrysocolla                    2    36000&lt;br /&gt;
 chrysoprase                    2    36000&lt;br /&gt;
 cinnabar                       1    36000&lt;br /&gt;
 cinnamon grossular            20    36000&lt;br /&gt;
 citrine                        2    36000&lt;br /&gt;
 claro opal                    20    36000&lt;br /&gt;
 clay                           1    36000&lt;br /&gt;
 clay loam                      1    36000&lt;br /&gt;
 claystone                      1    36000&lt;br /&gt;
 clear diamond                 60    36000&lt;br /&gt;
 clear garnet                  20    36000&lt;br /&gt;
 clear tourmaline              10    36000&lt;br /&gt;
 clear zircon                  25    36000&lt;br /&gt;
 cobaltite                      1    36000&lt;br /&gt;
 conglomerate                   1    36000&lt;br /&gt;
 cryolite                       1    36000&lt;br /&gt;
 crystal opal                  20    36000&lt;br /&gt;
 dacite                         1    36000&lt;br /&gt;
 demantoid                     30    36000&lt;br /&gt;
 dendritic agate                2    36000&lt;br /&gt;
 diorite                        1    36000&lt;br /&gt;
 dolomite                       2    36000&lt;br /&gt;
 emerald                       40    36000&lt;br /&gt;
 faint yellow diamond          40    36000&lt;br /&gt;
 fire agate                     2    36000&lt;br /&gt;
 fire opal                     15    36000&lt;br /&gt;
 fortification agate            2    36000&lt;br /&gt;
 gabbro                         1    36000&lt;br /&gt;
 galena                         5    36000&lt;br /&gt;
 garnierite                     2    36000&lt;br /&gt;
 gneiss                         1    36000&lt;br /&gt;
 gold opal                     10    36000&lt;br /&gt;
 golden beryl                  20    36000&lt;br /&gt;
 goshenite                     20    36000&lt;br /&gt;
 granite                        1    36000&lt;br /&gt;
 graphite                       1    36000&lt;br /&gt;
 gray chalcedony                2    36000&lt;br /&gt;
 green diamond                 60    36000&lt;br /&gt;
 green jade                    20    36000&lt;br /&gt;
 green tourmaline              20    36000&lt;br /&gt;
 green zircon                  20    36000&lt;br /&gt;
 gypsum                         1    36000&lt;br /&gt;
 harlequin opal                20    36000&lt;br /&gt;
 heliodor                      20    36000&lt;br /&gt;
 hematite                       8    36000&lt;br /&gt;
 honey yellow beryl            20    36000&lt;br /&gt;
 horn silver                   10    36000&lt;br /&gt;
 hornblende                     1    36000&lt;br /&gt;
 ilmenite                       1    36000&lt;br /&gt;
 indigo tourmaline             25    36000&lt;br /&gt;
 jasper opal                   10    36000&lt;br /&gt;
 jelly opal                    15    36000&lt;br /&gt;
 jet                            1    36000&lt;br /&gt;
 kaolinite                      1    36000&lt;br /&gt;
 kimberlite                     1    36000&lt;br /&gt;
 kunzite                       20    36000&lt;br /&gt;
 lace agate                     2    36000&lt;br /&gt;
 lapis lazuli                   2    36000&lt;br /&gt;
 lavender jade                  2    36000&lt;br /&gt;
 levin opal                    20    36000&lt;br /&gt;
 light yellow diamond          30    36000&lt;br /&gt;
 lignite                        1    36000&lt;br /&gt;
 limestone                      2    36000&lt;br /&gt;
 limonite                       8    36000&lt;br /&gt;
 loam                           1    36000&lt;br /&gt;
 loamy sand                     1    36000&lt;br /&gt;
 magnetite                      8    36000&lt;br /&gt;
 malachite                      2    36000&lt;br /&gt;
 marble                         2    36000&lt;br /&gt;
 marcasite                      1    36000&lt;br /&gt;
 melanite                      15    36000&lt;br /&gt;
 mica                           1    36000&lt;br /&gt;
 microcline                     1    36000&lt;br /&gt;
 milk opal                     10    36000&lt;br /&gt;
 milk quartz                    2    36000&lt;br /&gt;
 moonstone                      2    36000&lt;br /&gt;
 morganite                     20    36000&lt;br /&gt;
 morion                         2    36000&lt;br /&gt;
 moss agate                     2    36000&lt;br /&gt;
 moss opal                     10    36000&lt;br /&gt;
 mudstone                       1    36000&lt;br /&gt;
 obsidian                       3    36000&lt;br /&gt;
 olivine                        1    36000&lt;br /&gt;
 onyx                           2    36000&lt;br /&gt;
 onyx opal                     10    36000&lt;br /&gt;
 orpiment                       1    36000&lt;br /&gt;
 orthoclase                     1    36000&lt;br /&gt;
 peat                           1    36000&lt;br /&gt;
 pelagic clay                   1    36000&lt;br /&gt;
 periclase                      1    36000&lt;br /&gt;
 peridot                       20    36000&lt;br /&gt;
 petrified wood                 1    36000&lt;br /&gt;
 phyllite                       1    36000&lt;br /&gt;
 picture jasper                 3    36000&lt;br /&gt;
 pineapple opal                10    36000&lt;br /&gt;
 pinfire opal                  20    36000&lt;br /&gt;
 pink garnet                   20    36000&lt;br /&gt;
 pink jade                      2    36000&lt;br /&gt;
 pink tourmaline               15    36000&lt;br /&gt;
 pipe opal                     10    36000&lt;br /&gt;
 pitchblende                    1    36000&lt;br /&gt;
 plume agate                    2    36000&lt;br /&gt;
 prase                          2    36000&lt;br /&gt;
 prase opal                    10    36000&lt;br /&gt;
 precious fire opal            20    36000&lt;br /&gt;
 puddingstone                   1    36000&lt;br /&gt;
 purple spinel                 20    36000&lt;br /&gt;
 pyrite                         2    36000&lt;br /&gt;
 pyrolusite                     1    36000&lt;br /&gt;
 quartzite                      1    36000&lt;br /&gt;
 realgar                        1    36000&lt;br /&gt;
 red beryl                     20    36000&lt;br /&gt;
 red diamond                   60    36000&lt;br /&gt;
 red flash opal                20    36000&lt;br /&gt;
 red grossular                 20    36000&lt;br /&gt;
 red pyrope                    20    36000&lt;br /&gt;
 red sand                       1    36000&lt;br /&gt;
 red spinel                    20    36000&lt;br /&gt;
 red tourmaline                15    36000&lt;br /&gt;
 red zircon                    20    36000&lt;br /&gt;
 resin opal                    10    36000&lt;br /&gt;
 rhodolite                     20    36000&lt;br /&gt;
 rhyolite                       1    36000&lt;br /&gt;
 rock crystal                   2    36000&lt;br /&gt;
 rock salt                      1    36000&lt;br /&gt;
 rose quartz                    3    36000&lt;br /&gt;
 rubicelle                     20    36000&lt;br /&gt;
 ruby                          40    36000&lt;br /&gt;
 rutile                         1    36000&lt;br /&gt;
 saltpeter                      1    36000&lt;br /&gt;
 sand                           1    36000&lt;br /&gt;
 sandstone                      1    36000&lt;br /&gt;
 sandy clay                     1    36000&lt;br /&gt;
 sandy clay loam                1    36000&lt;br /&gt;
 sandy loam                     1    36000&lt;br /&gt;
 sapphire                      40    36000&lt;br /&gt;
 sard                           2    36000&lt;br /&gt;
 sardonyx                       2    36000&lt;br /&gt;
 satinspar                      1    36000&lt;br /&gt;
 schist                         1    36000&lt;br /&gt;
 schorl                         2    36000&lt;br /&gt;
 selenite                       1    36000&lt;br /&gt;
 serpentine                     1    36000&lt;br /&gt;
 shale                          1    36000&lt;br /&gt;
 shell opal                    10    36000&lt;br /&gt;
 siliceous ooze                 1    36000&lt;br /&gt;
 silt                           1    36000&lt;br /&gt;
 silt loam                      1    36000&lt;br /&gt;
 siltstone                      1    36000&lt;br /&gt;
 silty clay                     1    36000&lt;br /&gt;
 silty clay loam                1    36000&lt;br /&gt;
 slate                          1    36000&lt;br /&gt;
 smoky quartz                   2    36000&lt;br /&gt;
 sphalerite                     2    36000&lt;br /&gt;
 star ruby                     60    36000&lt;br /&gt;
 star sapphire                 60    36000&lt;br /&gt;
 stibnite                       1    36000&lt;br /&gt;
 stone                          3    36000&lt;br /&gt;
 sunstone                       2    36000&lt;br /&gt;
 sylvite                        1    36000&lt;br /&gt;
 talc                           1    36000&lt;br /&gt;
 tanzanite                     20    36000&lt;br /&gt;
 tetrahedrite                   3    36000&lt;br /&gt;
 tiger iron                     2    36000&lt;br /&gt;
 tigereye                       2    36000&lt;br /&gt;
 topaz                         20    36000&lt;br /&gt;
 topazolite                    20    36000&lt;br /&gt;
 tsavorite                     30    36000&lt;br /&gt;
 tube agate                     2    36000&lt;br /&gt;
 turquoise                      2    36000&lt;br /&gt;
 variscite                      2    36000&lt;br /&gt;
 violet spessartine            20    36000&lt;br /&gt;
 wax opal                      10    36000&lt;br /&gt;
 white chalcedony               2    36000&lt;br /&gt;
 white jade                     2    36000&lt;br /&gt;
 white opal                    20    36000&lt;br /&gt;
 white sand                     1    36000&lt;br /&gt;
 wood opal                     10    36000&lt;br /&gt;
 yellow diamond                60    36000&lt;br /&gt;
 yellow grossular              20    36000&lt;br /&gt;
 yellow jasper                  2    36000&lt;br /&gt;
 yellow sand                    1    36000&lt;br /&gt;
 yellow spessartine            20    36000&lt;br /&gt;
 yellow zircon                 20    36000&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130011</id>
		<title>User:Mortal</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=User:Mortal&amp;diff=130011"/>
		<updated>2010-10-22T16:40:35Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Create user page with rawparse.pl&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Novice Dwarffortressdwarf&lt;br /&gt;
&lt;br /&gt;
== rawparse.pl ==&lt;br /&gt;
Put it in your raw/objects folder! [[User:Mortal/rawparse output|Output as of 0.31.16]]&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/perl&lt;br /&gt;
 &lt;br /&gt;
 use warnings;&lt;br /&gt;
 use strict;&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile;&lt;br /&gt;
 sub parsefile_;&lt;br /&gt;
 sub gettoken;&lt;br /&gt;
 sub fetchtemplates (_);&lt;br /&gt;
 sub fixstatenames (_);&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile {&lt;br /&gt;
   my ($filename) = @_;&lt;br /&gt;
   my $fp;&lt;br /&gt;
   unless (open $fp, '&amp;lt;', $filename) {&lt;br /&gt;
     die &amp;quot;Couldn't open $filename for reading&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   my $res = parsefile_ $fp, $filename;&lt;br /&gt;
   close $fp;&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub parsefile_ {&lt;br /&gt;
   my ($fp, $filename) = @_;&lt;br /&gt;
   my $expectfilename = $filename;&lt;br /&gt;
   $expectfilename =~ s/^.*\/|\.txt$//g;&lt;br /&gt;
   my $gotfilename = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   $gotfilename =~ s/\r?\n?$//s;&lt;br /&gt;
   if ($expectfilename ne $gotfilename) {&lt;br /&gt;
     print STDERR &amp;quot;Expected filename '$expectfilename' in $filename, got '$gotfilename'\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   local $/ = ']';&lt;br /&gt;
   my $firsttok = gettoken $fp, 1;&lt;br /&gt;
   if ($firsttok-&amp;gt;[0] ne 'OBJECT') {&lt;br /&gt;
     print STDERR &amp;quot;Expected first token to be an OBJECT-token, got $firsttok-&amp;gt;[0]\n&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   if (!defined $firsttok-&amp;gt;[1]) {&lt;br /&gt;
     print STDERR &amp;quot;In OBJECT-token, 1st arg is undef\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   my $objecttype = $firsttok-&amp;gt;[1];&lt;br /&gt;
   my $objects = [];&lt;br /&gt;
   my $objectsbyid = {};&lt;br /&gt;
   my $object = {};&lt;br /&gt;
   my $res = {object =&amp;gt; $objecttype, objects =&amp;gt; $objects, objectsbyid =&amp;gt; $objectsbyid};&lt;br /&gt;
   my $pushobject = sub {&lt;br /&gt;
     push @$objects, $object if keys %$object;&lt;br /&gt;
     $objectsbyid-&amp;gt;{$object-&amp;gt;{id}} = $object if exists $object-&amp;gt;{id};&lt;br /&gt;
     $object = {};&lt;br /&gt;
   };&lt;br /&gt;
   my $token;&lt;br /&gt;
   while ($token = gettoken $fp and keys %$token) {&lt;br /&gt;
     last unless keys %$token;&lt;br /&gt;
     next unless defined $token-&amp;gt;{key};&lt;br /&gt;
     if ($token-&amp;gt;{key} eq $objecttype) {&lt;br /&gt;
       $pushobject-&amp;gt;();&lt;br /&gt;
       $object-&amp;gt;{'id'} = $token-&amp;gt;{value};&lt;br /&gt;
     } else {&lt;br /&gt;
       $object-&amp;gt;{$token-&amp;gt;{key}} = $token-&amp;gt;{value};&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   $pushobject-&amp;gt;();&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub gettoken {&lt;br /&gt;
   my ($fp, $asserttoken) = @_;&lt;br /&gt;
   $_ = &amp;lt;$fp&amp;gt;;&lt;br /&gt;
   my $input = $_;&lt;br /&gt;
   if (!defined) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got EOF&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     return {};&lt;br /&gt;
   }&lt;br /&gt;
   unless (/([^[]*)\[(.*)\]/) {&lt;br /&gt;
     if ($asserttoken) {&lt;br /&gt;
       die &amp;quot;Expected a token, but got none&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
     my $comment = $_;&lt;br /&gt;
     $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
     return {comment =&amp;gt; $comment};&lt;br /&gt;
   }&lt;br /&gt;
   my ($comment, $token) = ($1, $2);&lt;br /&gt;
   $comment =~ s/^\s+|\s+$//g;&lt;br /&gt;
   $comment = undef unless length $comment;&lt;br /&gt;
   my ($key, $value) = ($token);&lt;br /&gt;
   if ($token =~ /^(STATE_[^:]+:[^:]+|[^:]+)(?::(.*))/) {&lt;br /&gt;
     ($key, $value) = ($1, $2);&lt;br /&gt;
   }&lt;br /&gt;
   return [$key, $value] if $asserttoken;&lt;br /&gt;
   return {comment =&amp;gt; $comment, key =&amp;gt; $key, value =&amp;gt; $value};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 my $type = 'INORGANIC';&lt;br /&gt;
 my $templatetype = 'MATERIAL_TEMPLATE';&lt;br /&gt;
 my $templateincludekey = &amp;quot;USE_$templatetype&amp;quot;;&lt;br /&gt;
 my $templates = parsefile 'material_template_default.txt';&lt;br /&gt;
 if ($templates-&amp;gt;{object} ne $templatetype) {&lt;br /&gt;
   die &amp;quot;Template file contains objects of type $templates-&amp;gt;{object}, expected $templatetype&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 my %templates = %{$templates-&amp;gt;{objectsbyid}};&lt;br /&gt;
 &lt;br /&gt;
 my @objects;&lt;br /&gt;
 for my $filename (&amp;lt;inorganic_*.txt&amp;gt;) {&lt;br /&gt;
   my $parsed = parsefile $filename;&lt;br /&gt;
   if ($parsed-&amp;gt;{object} ne $type) {&lt;br /&gt;
     die &amp;quot;Expected objects of type $type in $filename, got $parsed-&amp;gt;{object}&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   push @objects, @{$parsed-&amp;gt;{objects}};&lt;br /&gt;
 }&lt;br /&gt;
 fetchtemplates for @objects;&lt;br /&gt;
 sub fetchtemplates (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   my $id = $obj-&amp;gt;{id};&lt;br /&gt;
   return unless defined $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $templatename = $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   my $template = $templates{$templatename};&lt;br /&gt;
   unless (defined $template) {&lt;br /&gt;
     print STDERR &amp;quot;Object $id references a template called $templatename, but it doesn't exist!\n&amp;quot;;&lt;br /&gt;
     return;&lt;br /&gt;
   }&lt;br /&gt;
   delete $obj-&amp;gt;{$templateincludekey};&lt;br /&gt;
   for my $key (keys %$template) {&lt;br /&gt;
     $obj-&amp;gt;{$key} //= $template-&amp;gt;{$key};&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 fixstatenames for @objects;&lt;br /&gt;
 sub fixstatenames (_) {&lt;br /&gt;
   my ($obj) = @_;&lt;br /&gt;
   if (($obj-&amp;gt;{IS_GEM} // '') =~ /^([^:]+):[^:]+:OVERWRITE_SOLID/) {&lt;br /&gt;
     my $name = $1;&lt;br /&gt;
     $obj-&amp;gt;{'STATE_NAME_ADJ:ALL_SOLID'} = $name;&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^STATE_([^:]+_[^:]+):(.*)/;&lt;br /&gt;
     my $states = $1;&lt;br /&gt;
     my $subkey = $2;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     while ($states =~ /([^_]+)/g) {&lt;br /&gt;
       $obj-&amp;gt;{&amp;quot;STATE_${1}:$subkey&amp;quot;} = $value;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   for my $key (keys %$obj) {&lt;br /&gt;
     next unless $key =~ /^(STATE_[^:]+:)ALL_SOLID/;&lt;br /&gt;
     my $prefix = $1;&lt;br /&gt;
     my $value = $obj-&amp;gt;{$key};&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID'} = $value;&lt;br /&gt;
     $obj-&amp;gt;{$prefix.'SOLID_POWDER'} = $value;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 my %objectsbytype;&lt;br /&gt;
 for my $obj (@objects) {&lt;br /&gt;
   my @keys = grep {!defined $obj-&amp;gt;{$_}} keys %$obj;&lt;br /&gt;
   for my $key (@keys) {&lt;br /&gt;
     $objectsbytype{$key} //= [];&lt;br /&gt;
     push @{$objectsbytype{$key}}, $obj;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 for my $key (keys %objectsbytype) {&lt;br /&gt;
   print &amp;quot;$key\n&amp;quot;;&lt;br /&gt;
   my @rows;&lt;br /&gt;
   for my $obj (@{$objectsbytype{$key}}) {&lt;br /&gt;
     my @row = ($obj-&amp;gt;{'STATE_NAME:SOLID'} // $obj-&amp;gt;{'id'});&lt;br /&gt;
     for (qw(MATERIAL_VALUE MOLAR_MASS)) {&lt;br /&gt;
       push @row, $obj-&amp;gt;{$_} // 0;&lt;br /&gt;
     }&lt;br /&gt;
     push @rows, \@row;&lt;br /&gt;
   }&lt;br /&gt;
   for my $row (sort {$a-&amp;gt;[0] cmp $b-&amp;gt;[0]} @rows) {&lt;br /&gt;
     printf &amp;quot;%-25s %6d %8d\n&amp;quot;, @$row;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=v0.31:Cave&amp;diff=130007</id>
		<title>v0.31:Cave</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=v0.31:Cave&amp;diff=130007"/>
		<updated>2010-10-22T14:21:57Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Change categories to use the Category template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{av}}{{Quality|Fine|13:29, 10 June 2010 (UTC)}}&lt;br /&gt;
&lt;br /&gt;
A '''cave''' is a natural formation that occurs in or adjacent to any non-mountain region tile, consisting of a 48x48 tile wide site within the non-mountain biome.  Caves most often feature a large rock mound several z-levels high with a downward passage beginning anywhere along the side of the mound. '''Caves''' often, but not always, have deep passages that lead down into {{l|caverns}}; they may also be lacking any passages or, more rarely, the mound itself.&lt;br /&gt;
&lt;br /&gt;
In Dwarf Fortress Mode, you can can choose whether or not to make caves visible on the {{L|embark}} screen when you {{L|World generation|design}} the world you will play in. The default option for '''Make Caves Visible''' is set to No. Caves have the odd feature that the stone they are made of doesn't match the material left after it is dug out; for example, a rock wall will leave behind a clay floor.&lt;br /&gt;
&lt;br /&gt;
Caves are sometimes home to named creatures and semimegabeasts such as {{L|ettin}}s. If a cave is inhabited by creatures fond of stealing items from nearby sites, their hoard will be littered over the area. The distribution of plunder remains within the 48x48 site, from the upper z limit down to any z-levels reachable by walking (no more loot will be found beyond a rampless drop or a waterlogged passage, even if the hoard's owner is a flying creature.) {{L|Dragon}}s are known to hoard jewelry, {{L|ettin}}s and {{L|giant}}s hoard jewelry, food and booze.&lt;br /&gt;
&lt;br /&gt;
Caves can be found by taking quests in {{L|adventure mode}}. The cave will then replace the region tile where it is located, and will become the default entry location when fast traveling there.  Caves separated entirely by mountain or ocean from a quest giver will never be targeted by their quests. They may still be located by scouting, and an announcement will be given when within the site's range, but it will not be mapped to the region tile.&lt;br /&gt;
&lt;br /&gt;
If you're an adventurer looking to make some easy money, try visiting caves and filling your backpack with (twice) stolen crafts. Return to town and sell your loot. &lt;br /&gt;
&lt;br /&gt;
{{World}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Fortress mode}}&lt;br /&gt;
{{Category|Adventurer mode}}&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=v0.31:Climate&amp;diff=130006</id>
		<title>v0.31:Climate</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=v0.31:Climate&amp;diff=130006"/>
		<updated>2010-10-22T14:19:37Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Change category title to uppercase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{av}} {{Quality|Fine|12:24, 9 June 2010 (UTC)}}&lt;br /&gt;
&lt;br /&gt;
'''Climate''' in Dwarf Fortress is a temperature rating only; actual ground cover is called a {{L|Biome|biome}}.  In order from hottest to coldest, they are:&lt;br /&gt;
&lt;br /&gt;
''Note: If temperature is turned off, none of the mentioned effects will occur.''&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|4:1}};font-family:Courier New&amp;quot;&amp;gt;Scorching&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''Temperature:''' +++&lt;br /&gt;
&lt;br /&gt;
'''Availability of water:'''&lt;br /&gt;
Any existing {{L|Murky pool}} will dry up immediately.  &lt;br /&gt;
{{L|River}}s are unaffected.&lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region:'''&lt;br /&gt;
If no river or {{L|ocean}} is available, it is hard to survive in this climate. Your only chance is to find a cave with water (very likely in the latest version).&lt;br /&gt;
Exposed {{L|dwarves}} and {{L|Meat industry|livestock}} may die because of the heat.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|4:1}};font-family:Courier New&amp;quot;&amp;gt;Hot&amp;lt;/span&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
'''Temperature''': ++&lt;br /&gt;
&lt;br /&gt;
'''Availability of water''':&lt;br /&gt;
In dry biomes, {{L|Murky pool}} may evaporate during dry {{L|season}}s (usually {{L|summer}}). But they can be refilled by {{L|rain}}.&lt;br /&gt;
{{L|River}}s are unaffected.&lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region''':&lt;br /&gt;
If you lack a {{L|river}}, be sure to dig out a {{L|reservoir|cistern}} before summer is upon you.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|6:1}};font-family:Courier New&amp;quot;&amp;gt;Warm&amp;lt;/span&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
'''Temperature''': +&lt;br /&gt;
&lt;br /&gt;
'''Availability of water''':&lt;br /&gt;
Any water source can be used during the whole year. This makes it the easiest climate to embark on.&lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region''':&lt;br /&gt;
Nothing of note.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|2:0}};font-family:Courier New&amp;quot;&amp;gt;Temperate&amp;lt;/span&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
'''Temperature''': -&lt;br /&gt;
&lt;br /&gt;
'''Availability of water''':&lt;br /&gt;
Surface pools and rivers will freeze for part of the year.  The length of the freeze varies: They may start out frozen, thaw sometime during {{L|spring}}, and remain liquid until {{L|winter}}, or they may start out liquid and freeze for only a month or so in winter.&lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region''':&lt;br /&gt;
If you lack a {{L|river}}, can dig out a {{L|reservoir|cistern}} in the non-freezing seasons. You can also use a source of heat (such as {{L|magma}}) to obtain liquid {{L|water}}. If the ground is covered in snow when you arrive, be sure to scout out the surface pools so that your none of your dwarves find themselves {{L|Swimming|suddenly submerged}} when the pools thaw later in the spring.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|3:1}};font-family:Courier New&amp;quot;&amp;gt;Cold&amp;lt;/span&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
'''Temperature''': --&lt;br /&gt;
&lt;br /&gt;
'''Availability of water''':&lt;br /&gt;
Surface pools and rivers are usually frozen but can thaw for a few months each year.&lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region''':&lt;br /&gt;
The same measures as in temperate biomes can be taken.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;background-color:black;color:{{fgcolor|3:1}};font-family:Courier New&amp;quot;&amp;gt;Freezing&amp;lt;/span&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
'''Temperature:''' ---&lt;br /&gt;
&lt;br /&gt;
'''Availability of water:'''&lt;br /&gt;
Surface pools and rivers remain frozen throughout the year in the majority of maps. &lt;br /&gt;
&lt;br /&gt;
'''When embarking in this Region:'''&lt;br /&gt;
You must use a source of heat ({{L|magma}}) to obtain liquid {{L|water}}. Glacial ice can also be melted. Underground sources of water are recommended.&lt;br /&gt;
Exposed {{L|dwarves}} and livestock may quickly freeze to death.&lt;br /&gt;
&lt;br /&gt;
==WARNING:==&lt;br /&gt;
Occasionally biomes may make claims to be hotter or colder than they really are.  For example: some &amp;quot;Freezing&amp;quot; biomes may occasionally thaw.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*{{L|Weather}}&lt;br /&gt;
*{{L|Biome}}s&lt;br /&gt;
&lt;br /&gt;
{{Category|World}}&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=v0.31:Pebbles&amp;diff=130005</id>
		<title>v0.31:Pebbles</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=v0.31:Pebbles&amp;diff=130005"/>
		<updated>2010-10-22T14:19:26Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Change category title to uppercase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{av}}{{Quality|Fine}}&lt;br /&gt;
'''Pebbles''' are a naturally occuring {{L|map tile}} found commonly across the surface of the world near {{L|river}}s and {{L|brook}}s, and occasionally as {{L|beach}}es. Usually they are found labelled as ''rock-type'' pebbles, for example ''Basalt'' Pebbles. They can be found near {{L|boulder}}s if you look hard enough.&lt;br /&gt;
&lt;br /&gt;
Unlike {{L|boulder}}s, pebbles cannot currently be designated for smoothing. In order to smooth a tile with pebbles on it, you must first build a {{L|road}} or other construction on the tile, which will destroy the pebbles and turn the tile into an ordinary tile of the base rock-type.&lt;br /&gt;
&lt;br /&gt;
In {{L|Adventurer mode}}, a pebble tile is an unlimited source of small rocks, which can be useful for throwing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Map tiles]]&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Zircon&amp;diff=47630</id>
		<title>Zircon</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Zircon&amp;diff=47630"/>
		<updated>2009-03-01T20:13:04Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Redirecting to Gem&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Gem]]&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=40d_Talk:Urist&amp;diff=42774</id>
		<title>40d Talk:Urist</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=40d_Talk:Urist&amp;diff=42774"/>
		<updated>2009-03-01T11:02:54Z</updated>

		<summary type="html">&lt;p&gt;Mortal: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You know, I don't think I've ever had a dwarf named Urist actually --[[User:Sartain|Sartain]] 10:45, 19 June 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
I've never had any notable Urist, but many Kadols. Kadol the legendary stonecrafter, Kadol the mayor etc., but no Urists.&lt;br /&gt;
Also, all my notable female dorfs are named Tirist... --[[User:Someone-else|Someone-else]] 19:29, 19 June 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
In my current fort (Pop of 158) I don't have any Urists, but do have lots of Kadols. But! Urist IS the name many players would use to name any generic dwarf they are talking about. It's nominal name already. I'm for this article--[[User:Dorten|Dorten]] 23:17, 19 June 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
I've only ever had the one that I can remember... and I've never used the name for a generic dwarf... but I too, as a completely impartial observer, am entirely for this article. --[[User:Eiba|Eiba]] 01:11, 20 June 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
My current expedition leader is named Urist. [[User:Mortal|Mortal]] 06:02, 1 March 2009 (EST)&lt;br /&gt;
&lt;br /&gt;
I think &amp;quot;urist&amp;quot; actually means &amp;quot;dagger&amp;quot; in the game's language system. [[User:Calenth|Calenth]]&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=40d:Your_first_fortress&amp;diff=11125</id>
		<title>40d:Your first fortress</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=40d:Your_first_fortress&amp;diff=11125"/>
		<updated>2009-02-20T17:43:54Z</updated>

		<summary type="html">&lt;p&gt;Mortal: Corrected default shortcut key for -b-uild -D-epot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide to help new players get started on their first [[fortress]] and teach them the basics of keeping their [[dwarf|dwarves]] alive. If you have unanswered questions or find given details confusing, please tell us so on the [[Talk:Your_first_fortress|discussion page]]! Above all else, always remember the [[Dwarf Fortress]] motto: &amp;quot;Losing is fun!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We discuss generating a world, choosing a fortress location, buying [[skill]]s and items, and playing the first month or so. Setting game initialization options is covered in [[technical tricks]]. The advice here is biased for safety; with a little experience you'll do better with strategies customized for your play style and preferred start locations.  For more extended treatment of particular subjects, consult the linked pages or the rest of the Dwarf Fortress Wiki.&lt;br /&gt;
&lt;br /&gt;
== Generating a world ==&lt;br /&gt;
&lt;br /&gt;
It all starts here. The first thing to do when starting Dwarf Fortress is to [[World generation |create a world]]. Later on, you may wish to tweak the parameters to suit your play style, but for now, the ''Create New World Now!'' option is an easy way to get into your first game.&lt;br /&gt;
&lt;br /&gt;
The engine will start to create the world--watch it unfold! You might notice that worlds are rejected, sometimes even after the generator begins running rivers and lakes. This is normal, as the generator seeks a world which meets the criteria for optimum Dwarven Fun.&lt;br /&gt;
&lt;br /&gt;
Generating a standard random world can take several minutes. You can speed things up by selecting ''Design New World with Parameters'' instead of ''Create New World Now!'' and setting a smaller world size. These worlds tend to be less interesting and replayable, but work well if you want to try new things.&lt;br /&gt;
&lt;br /&gt;
Once you've generated a world you will return to the main screen and there will be a new option, &amp;lt;tt&amp;gt;Start Playing&amp;lt;/tt&amp;gt;. Upon selecting that you can choose the game mode - [[Dwarf Fortress]], [[Adventurer]], or [[Legends]]. This article is written with respect to Fortress mode.&lt;br /&gt;
&lt;br /&gt;
See the article on [[world generation]] for a complete guide to the world generation screen.&lt;br /&gt;
&lt;br /&gt;
== Choosing a location ==&lt;br /&gt;
&lt;br /&gt;
=== The interface ===&lt;br /&gt;
&lt;br /&gt;
So long as you have at least one world without an active game, you will be able to choose &amp;quot;Start Playing&amp;quot; from the main menu. Select &amp;quot;Dwarf Fortress&amp;quot; and you'll find a four-section window:&lt;br /&gt;
&lt;br /&gt;
[[Image:FortressLocation_fd2f10.png | caption | This picture is shown with the default tileset. Other [[tilesets]] are available]]&lt;br /&gt;
&lt;br /&gt;
Going from left to right, these windows represent:&lt;br /&gt;
*The local map. The black box represents the area that your fortress will occupy if you decide to embark. The blue line is a stream, the green icons represent forests and swamps, and the gray triangles are mountain slopes.&lt;br /&gt;
*The regional map. This is like zooming out from the local map. The entire local map is represented by that yellow X. Most of the region is forest, with a mountain range in the bottom right. The two light blue lines are minor rivers.&lt;br /&gt;
*The world map. This is zooming out all the way. The yellow X represents the approximate position of the region.&lt;br /&gt;
*Information about the area that the black box is occupying. More on this below.&lt;br /&gt;
&lt;br /&gt;
You can move around the region map with {{k|←}}{{k|↑}}{{k|→}}{{k|↓}}, or at 10x speed with {{k|Shift}}+{{k|←}}{{k|↑}}{{k|→}}{{k|↓}}. Note that using {{k|Shift}} can cause the key to get &amp;quot;stuck&amp;quot; - press it again to cancel.&lt;br /&gt;
&lt;br /&gt;
You can move around the local map with these keys:&lt;br /&gt;
   {{k|u}}&lt;br /&gt;
 {{k|h}}  {{k|k}}&lt;br /&gt;
   {{k|m}}&lt;br /&gt;
&lt;br /&gt;
You cannot directly move around the world map. Movement across the world map is shown relative to your movement on the region map. In world generated with the default settings, each square of the world map contains several squares of the region map.&lt;br /&gt;
&lt;br /&gt;
Your next goal will be choosing the starting location for your fortress.&lt;br /&gt;
&lt;br /&gt;
=== Your surroundings ===&lt;br /&gt;
&lt;br /&gt;
You can discern a lot of information by scrolling through the various modes. The interface has five modes which you cycle through by pressing {{k|TAB}}. In turn, they display the ''biomes'', ''civilizations'', and ''geology'' of the local area.&lt;br /&gt;
&lt;br /&gt;
====Biomes screen====&lt;br /&gt;
This display gives you an idea for the environment you'll be parachuting into.  Click any of the blue links for more information on the subject. [[Biome]]s are determined by the type of life in the area.  On the Biome screen, you'll see:&lt;br /&gt;
* '''[[Temperature]]''': How hot or cold it gets in the area.  Can be ''Freezing'', ''Cold'', ''Temperate'', ''Warm'', ''Hot'', and ''Scorching''.  In a nutshell, temperature extremes make it harder to get and keep a reliable source of [[water]] going.  In Freezing and Scorching climates, you may have to do without water at all.  Temperate and Warm are both good places to start your first fort.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Amount of [[tree]]s, and [[plant|other vegetation]]''': A general indication of the density of plant life in the area.  For trees, this can be ''none'', ''scarce'', ''sparse'', ''woodland'', or ''heavily forested''.  For other plants, you can see ''none'', ''scarce'', ''moderate'', and ''thick''.  Trees are chopped down for [[wood]], which is a critical, if small, part of your fortress.  You can import lots of it from [[caravan]]s, so don't worry too much about it.  However, more trees never hurt anyone, and totally treeless maps are quite a bit more difficult in the early going, so aim for ''sparse'' or greater trees.  Other plants basically means shrubs, bushes, and other vegetation that you can harvest food from with the [[plant gathering]] skill.  Generally speaking, you will use this trick in the first year of your fortress, then never again.  [[Plant]] density is not very important.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Surroundings]]''': This is a hint at how wild the wilderness is.  The outskirts of a jungle might be fairly calm and safe, while the heart of that same jungle could be thick with vicious predators.  In game terms, this will clue you in to the specific types of [[tree]]s and [[plant]]s you will find, in addition to indicating the [[animal]] types you'll run into.  This also clues you in to the ''alignment'' of the surrounding area.  So, the two things this word tells you is how ''good'' or ''evil'' an area is, and how ''calm'' or ''savage'' an area is.  ''Good''-aligned areas, from calm to savage, are ''serene'', ''mirthful'', or ''joyous wilds''.  ''Neutral''-aligned areas are, from calm to savage, ''calm'', ''wilderness'', or ''untamed wilds''.  ''Evil''-aligned areas are, from calm to savage, ''sinister'', ''haunted'', or ''terrifying''.  ''Good'' zones tend to have one of the most aggressive animals in the game, the [[unicorn]], and ''evil'' areas have a multitude of [[undead]] and some of the most vicious [[creature]]s in the game.  For your first fortress, stick to a ''neutral'' alignment.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Major land forms''': A last field, which will not always be full, will mention things you should know about, like [[river]]s.  Rivers provide an unlimited source of [[water]], but can be home to dangerous fish like the [[longnose gar]] and [[carp]].  Still, though, the benefits generally far outweigh the risks.  [[Volcano]]es are also noted here, one of the only guaranteed ways to get [[magma]].  Magma makes a few things a lot easier, but it is dangerous to work with and must be handled very carefully because of the [[fire imp|horrible]] [[magma man|creature]]s that come out of it.  Not critical, especially not for your first time out.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes, you'll be looking at a place with more than one [[biome]] in the same selected square.  You can press {{k|F1}} {{k|F2}} {{k|F3}} or {{k|F4}} to view the different types of biomes.  In the picture above, we are looking at the mountain in the center, which is cold and has no trees or plants because it's too high up for those things to grow.&lt;br /&gt;
&lt;br /&gt;
====Civilization screen====&lt;br /&gt;
These are nearby [[civilization]]s that are capable of interacting with you. Other settlements are shown with various symbols on the regional map.  The possible entries here are ''dwarves'', ''humans'', ''elves'', ''goblins'', and ''kobolds''.&lt;br /&gt;
* '''[[dwarf|Dwarves]]''': You will want to be in contact with dwarves to get [[immigrant]]s and a dwarven trading caravan. However, dwarves are, sometimes seemingly magically, everywhere.  It is impossible to settle anywhere &amp;lt;i&amp;gt;without&amp;lt;/i&amp;gt; dwarves, assuming there is at least one surviving dwarven civilization.  Depending on how remote the area is, though, you may not get some of the features of the game you would otherwise: being cut off from the world will prevent most [[noble]]s from coming to your fort, which will stop the [[dwarven economy]] from ever being activated.  You will also not get a [[liason]] with your dwarven caravan, so you will be unable to request goods.  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Humans]]''': Humans are almost always friendly, and love [[trade]].  They send [[liaison]]s to let you request goods and are generally a huge boon to any fortress.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Elves]]''': Elves are usually friendly and make fair trading partners, but have a [[Trade#Elves|particular ethos]] about trading.  They do not send a trade [[liason]] and their goods are luxuries at best.  They can be very annoying, but are generally not dangerous unless you provoke them.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Goblin]]s''':  Goblins are your main enemies in Dwarf Fortress, and will produce most of the aggression against your fort.  They periodically launch ambushes, consisting of five to ten goblin warriors, and will send [[siege]]s after your fort reaches 80 dwarves.  [[Trap]]ped entrances, [[war dog]]s, and eventually a [[military]] will be needed to repel them.  Just be sure not to start in the middle of a goblin citadel.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Kobold]]''': Kobolds are petty thieves that are little more than irritations in most situations.  If you are careless and let their thieves get away with a lot of stuff, though, they may upgrade to raiding parties of archers.&lt;br /&gt;
&lt;br /&gt;
====Elevation screen====&lt;br /&gt;
Relative [[Z-axis|elevation]]. This is a normal topographic map that you're used to from real-life maps.  It just gives you an idea of the lay of the land.&lt;br /&gt;
&lt;br /&gt;
====Slope screen====&lt;br /&gt;
[[Slope]] steepness. This shows you where large cliffs are.  Try to avoid [[cliff]]s of 4 or more, as the taller maps take a lot more computer power to run. On the other hand, flat areas are boring - a good elevation map contains lots of low elevation changes ranging from 1 to 4. However, choosing areas with high elevation changes gives you much more stone, ore, and gems to work with and may even provide decent protection against invaders. It's your choice in the long run, particularly if you don't really care about performance.&lt;br /&gt;
====Embark alerts====&lt;br /&gt;
When you're satisfied with your area and hit {{k|e}} to embark, you may get some alerts about being in a very difficult area, or about an [[aquifer]].  Aquifers can make it frustrating to get started, so if you are alerted about an aquifer, seriously consider moving somewhere else for your first fortress.  After you have the basics down, tackling an aquifer is much easier.&lt;br /&gt;
====Location recap====&lt;br /&gt;
&lt;br /&gt;
For your first fortress, it's not entirely important. However, there are some general guidelines that can help you decide:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Try to get a temperate or warm climate, since extreme temperatures are more difficult.&lt;br /&gt;
* Trees and vegetation are good for producing lumber and food for your fortress, but you don't need tons of them.&lt;br /&gt;
* ''Neutral''-aligned [[surroundings]] are best for your first fortress, but ''good''-aligned surroundings are also OK.  Avoid ''evil''-aligned surroundings, however.&lt;br /&gt;
* Running water ([[river]]s, streams, and [[brook]]s) are a permanent source of [[water]]. [[Lake]]s and [[pool]]s have a finite amount of water and may dry out.  Not having enough water can be a big obstacle, so try to get some running water your first time out.&lt;br /&gt;
* [[Humans]] and [[elves]] are friendly, so an area they have access to is nice.&lt;br /&gt;
* [[Magma]] is cool (hah!), but not critical.&lt;br /&gt;
* Areas with [[aquifer]]s require some engineering to get to rock. You'll be warned if you chose an area with an aquifer. When in doubt, don't try it.&lt;br /&gt;
** If you insist on starting in an area with an aquifer, read up on the dangers of aquifers, and, if at all possible, choose an embark site that includes an aquifer-less [[biome]].&lt;br /&gt;
* Who cares? If you like what you see, go for it. You can always start over. And remember the DF motto: Losing is fun!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information on specific game mechanics such as [[sand]], [[flux]], and how to find [[iron]], check [[How_to_correctly_start_fortress_mode|this page]].&lt;br /&gt;
&lt;br /&gt;
==== Fortress size ====&lt;br /&gt;
&lt;br /&gt;
Once you've decided on location, you need to decide the size of your fortress area.  This is the size of the game field you're playing on.  Advantages of requesting a large local area include more raw materials, greater diversity of [[rock]]s and special underground features, and the ability to include desired terrain (such as a river, a forest, or a magma vent). Disadvantages include slower game performance (larger areas require more CPU power), higher likelihood of merchants failing to reach your [[trade depot]] before they run out of time, and more risk of losing immigrants as they struggle to your front [[gate]]. (Note that you can [[mine]] many levels deep into the ground, and even a 3x3 area generally contains more raw materials than you're ever likely to need.)&lt;br /&gt;
&lt;br /&gt;
You can adjust the size of your fort's area by using {{k|SHIFT}} + the {{k|u}} {{k|m}} {{k|k}} or {{k|h}} keys.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Embark ===&lt;br /&gt;
&lt;br /&gt;
When done, hit {{k|e}} to embark. A warning may appear if you've chosen a challenging site, or one with an [[aquifer]].&lt;br /&gt;
&lt;br /&gt;
==Buying skills and items==&lt;br /&gt;
After you embark, you're given the option to either start immediately or prepare for the journey carefully.  You should pretty much always prepare carefully if you enjoy staying alive.&lt;br /&gt;
&lt;br /&gt;
Here, presumably, you are the dwarf determining who will go and what they will take. You have a total of 2060☼ to spend in two categories: Skilled dwarves and items. Some items have already been selected for you, but you probably won't want most of these.&lt;br /&gt;
&lt;br /&gt;
There are as many possible ways to approach setting up as there are fortress locations. The [[starting builds]] page offers several examples for you to choose from.  Here, we are only going to discuss some basics that help you understand enough to make your own decisions.  The embark screen opens up on the ''skills'' screen, and can be changed to the ''items'' screen by pressing {{k|TAB}}.&lt;br /&gt;
&lt;br /&gt;
===Skills===&lt;br /&gt;
In Dwarf Fortress, it's not what you have, it's who you have.  Skilled dwarves are the cornerstone of everything, from domestics to security, so it's extremely important to embark with good people.&lt;br /&gt;
&lt;br /&gt;
As you will see in this screen, you have 7 dwarves, all with 10 points to put toward starting skills.  We will want to use all 10 of the points on all 7 of the dwarves.  By default, you won't have enough ☼ to do this, so hit {{k|TAB}} to go to the items screen and hit {{k|-}} over the ''Steel battle axe'' line to give subtract one.  This should give you enough ☼ to assign all your skills.  You can only spend 5 of the 10 points in any one skill, making the maximum skill level upon embark ''proficient''.  This makes a total of 14 ''proficient'' skills, or a larger number of lower skill levels.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a fledgling fortress, the 4 indispensable jobs are [[mason]], [[miner]], [[grower]], and [[carpenter]].  A good beginning strategy is to embark with at least 1 dwarf being ''proficient'' in these 4 skills.  Many people choose to double up on proficient miners and growers, since mining and farming are both pretty big jobs.&lt;br /&gt;
&lt;br /&gt;
Other useful skills to consider:&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Cook]]:''' Cooks make [[prepared meal]]s in the [[kitchen]], which helps you manage your food stock space.  Well-prepared meals are also valuable [[trade]] goods, and make dwarves happy when eaten.  Highly skilled cooks make better meals, and prepare meals faster.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Brewer]]:''' Brewers make [[booze]] in the [[still]].  Dwarves being dwarves, they need alcohol to operate at peak efficiency, and highly-skilled brewers make better tasting booze and finish brewing faster.  Dwarves get happier when they drink good booze.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Herbalist]]:''' Herbalists gather food and seeds from [[shrub]]s in the local area.  Skilled herbalists pick faster and come away with far more food.  Where an unskilled herbalist will come away with one [[wild strawberry]] or none at all, a proficient herbalist will often pick 3, 4, or sometimes 5.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Woodcutter]]:''' Woodcutters fell [[tree]]s for use by [[carpenter]]s.  Highly skilled woodcutters fell trees much faster.  However, since you don't need that much wood, you can get away with a normal (no tag) woodcutter just fine.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Mechanic]]:''' Mechanics build and use [[mechanism]]s, which have myriad uses in [[trap]]s, [[lever]]s and some [[machine]]s.  Highly skilled mechanics finish installing mechanisms much faster, and the mechanisms they build are of higher quality.  However, the quality of the mechanism primarily matters to beginning players for its [[trade]] value, and in early fortresses the need for mechanisms is usually so small that any dwarf can pick it up and handle it well enough.  Still, a solid choice, especially if you like [[trap]]s, which respond more quickly when made with higher-quality mechanisms.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Armorsmith]], [[Weaponsmith]], and [[Siege engineer]]:''' These 3 skills are not useful at all in an early fortress, but become very important later on, and training an unskilled dwarf in these skills is hard and requires a lot of material, so if you're in it for the long haul, consider them.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Military skills ([[Wrestler]], [[Axedwarf]], [[Hammerdwarf]], etc):''' Early on, it's unlikely that you'll need these, since there's generally very few things that will bother a band of dwarves who aren't hurting anyone, but certain places, such as those with a [[chasm]], will have hostile creatures around.  In these areas, you may consider giving your woodcutter the Axedwarf skill so he can use his chopping axe as a weapon.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Social skills ([[Appraiser]], [[Judge of Intent]], [[Consoler]], etc):''' Putting these on one dwarf will make them a shoo-in for the Expedition Leader slot, and ranks in Appraiser and Judge of Intent will make interacting with the first caravan much easier.  However, even if you don't train this at all, some persistence in trading with the first caravan will level your leader up enough to trade with the second caravan like a champion.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once again, examples can be found in the [[starting builds]] page.  What you bring is incredibly dependent on your play style, though.  Some people think bringing Mechanics along is a total waste of time, others consider them indispensable.  Some people like having skills that aren't even on this list, like [[Leatherworker]].  Read the starting builds, ask questions, and explore!  Who cares if your first idea doesn't work out after playing an hour?  Restarting is easy and ''losing is fun''.&lt;br /&gt;
&lt;br /&gt;
===Items===&lt;br /&gt;
Now that we're done with assigning skills, hit {{k|TAB}} to go over to the item screen.  Item worth is another extremely situational thing, and you'll find as many opinions as there are Dwarf Fortress players as to what is good to bring.  Once more, it depends VERY heavily on your play style.  Again, [[starting builds]] can provide some good example reading.  This section will only cover the basics and give you enough information to make your own decisions.&lt;br /&gt;
&lt;br /&gt;
====Tools====&lt;br /&gt;
You'll need a couple of finished tools to get yourself started.&lt;br /&gt;
* '''[[Battle axe]]s''':  Every [[Woodcutter]] needs an axe. Steel battle axes are the only type you can purchase on this screen, and they're expensive. You might want to bring just one, unless you expect to need a lot of lumber and/or axedwarf muscle.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Pick]]s''': Likewise, [[Miner]]s need picks.  All picks work equally well, their material only determines the damage they do in combat.  Thus, copper picks are the budgeting dwarf's choice, at a paltry 20☼ each.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''[[Anvil]]''': One of the big questions to ask yourself is whether to bring an anvil on embark.  It's extremely expensive at 1000☼, but to start a [[metal]] industry, you will either have to start with one or request and purchase (or steal!) one from a [[caravan]] somewhere down the line. &lt;br /&gt;
&lt;br /&gt;
Generally, if you are going to a very mountainous area where you're likely to see lots of ore and you want to be able to make use of it right from the get-go, bring an anvil.  If you're going to spend a few years getting your fortress established before worrying about metal production, drop it and bring more raw commodities. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One occasional problem is that axes and picks are absent entirely.  If this is the case, you can bring the materials to build these things yourself. &lt;br /&gt;
* Purchase an anvil.&lt;br /&gt;
* Purchase 3 rocks that are not [[lignite]], [[bituminous coal]], or [[graphite]].  Any other rocks will work fine.&lt;br /&gt;
* Purchase fuel for the forge.  You can purchase it outright as charcoal at 10☼ per unit, or refine it yourself for a big savings.&lt;br /&gt;
** To refine it yourself, purchase one unit of charcoal, and several (at least 5) units of [[bituminous coal]].  When you arrive on site, make sure someone has the [[furnace operating]] labor enabled ({{k|v}} to select a dwarf, then select {{k|p}}references and {{k|l}}abor to designate a dwarf's labor assignments), and build a [[smelter]] (hit {{k|b}}, then {{k|e}}, then {{k|s}}).  Order the smelter to turn bituminous coal into [[coke]].  [[Coke]] is functionally the same as [[charcoal]], and bituminous coal produces 3 coke for each hunk of rock you bring.  You need the first hunk of charcoal to start the string, but after that it feeds itself.&lt;br /&gt;
* Purchase metal to shape.  You can buy bars directly to save time, or again, smelt it yourself.  Take [[copper]] to start out with.  It's cheap, and with any luck your initial tools aren't going to see heavy combat.  You can take the materials for [[bronze]], [[iron]], or [[steel]] if you like, but this is more expensive.  Still, if you're willing to go through the process, you can end up with 2 steel axes, likely of decent quality, for 82☼, instead of 600☼, with no quality modifiers at all.&lt;br /&gt;
** If you want to save points and smelt it yourself, take copper nuggets instead of copper bars, and use the smelter to convert them into copper bars.&lt;br /&gt;
** A good ore to bring along is [[tetrahedrite]] - it acts simultaneously as the ore for copper and [[silver]], a good crafting metal. (That is, with every piece of tetrahedrite, you will always get a copper bar, and will sometimes get a silver bar as well [about a 20 percent chance, or one in five].) This kills two birds with one stone (heh): you still have your copper, and if you get silver you can smelt metal crafts for use as [[trade]] goods. &amp;lt;!-- This note could be cleaned up -GreyMario --&amp;gt;&lt;br /&gt;
* Fuel and metal in hand, deconstruct the smelter (if needed; {{k|q}} to highlight, then {{k|x}} to deconstruct), and construct a [[metalsmith's forge]].  Make sure someone has [[weaponsmith]]ing on.  After the forge is up, order it to make the axes and picks you need.  Deconstruct the forge when you're done and enjoy your new tools, hopefully with [[quality]] modifiers!&lt;br /&gt;
&lt;br /&gt;
====Raw materials====&lt;br /&gt;
As it was briefly covered above, sometimes it makes more sense to bring a lot of raw materials than some finished goods.  Raw materials are a lot cheaper than finished goods, and so long as you invest heavily in your dwarves' skills (which you should!), you can probably make better quality stuff, anyway.&lt;br /&gt;
*'''[[Stone]]''': Only bring this if you're trying to build some of your tools on the spot, as noted above.  Otherwise, you will get stone coming out of your ears once you start mining.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''[[Metal]]''': Generally not recommended.  However, if you're expecting trouble and you're bringing an anvil, bringing many bars of [[iron]] and [[charcoal]] in lieu of a [[battle axe]] can be a big boon.  If your dwarves can get to a spot that gives them a breather, a proficient [[weaponsmith]] or [[armorsmith]] could stamp out high-quality goods to give your dwarves a better fighting chance.  This is a pretty advanced trick to pull off, though, so don't try to pull it if you're not confident.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''[[Wood]]''': Wood is a bargain at only 3☼ per log, and the 100 logs you can bring in exchange for a steel battle axe will last you a long time.  This is a great technique for making [[Woodcutter]] unneeded in the early game, but you need to budget your wood use for the first year very carefully.  When you're out, you're out!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Consumables====&lt;br /&gt;
Easily the most important part of your preparation is what you're going to eat, drink, and plant once you get on site.  Without food and booze, you're not going much of anywhere.&lt;br /&gt;
*'''[[Food]]''': Most food comes at a mere 2☼ per unit, and 8 units will feed 1 dwarf for a year.  Bringing a year of food will give you a good cushion to getting your farms working, so aim for about 60 food if you can.  If you must cut back, though, 40 will be fine if you make your farms an early priority.  The best food staple to bring along is [[turtle]].  Turtle produces [[shell]] and [[bones]] when eaten, which can be used as raw materials for other things you need, including armor, crossbows, and crossbow bolts.  Further, shell is a common request for [[strange mood]]s and is a pain to produce, so getting some early could save yourself a failed mood and a dead dwarf.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''[[Booze]]''': Dwarves drink twice as often as they eat, and they always want to down some alcohol if at all possible.  They also like different kinds of alcohol.  Bring twice as much booze as you bring food, and divide it evenly among the 4 types of alcohol you can take ([[dwarven wine]], [[dwarven beer]], [[dwarven ale]], [[dwarven rum]]).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''[[Seeds]]''': Your farms have got to start somewhere.  Definitely bring along [[plump helmet spawn]] (for food and booze) and [[pig tails]] (for cloth ropes and booze variety).  How many you bring is dependent on how big you want your initial farms to be.  5 of each is plenty to feed your initial dwarves, and you will get more seeds any time the plants are consumed in any way ''except cooking''.  You may want to use the [[kitchen]] menu to disallow cooking of plump helmets until you have a healthy supply of seeds.  Or, alternatively, just don't make any prepared meals until you've got a healthy supply of seeds.  The other seed types require a lot more labor to use properly, and should probably wait until you have more dwarves in the fortress.  You can buy seeds from the dwarven caravan for almost nothing, but if you want a greater variety along, go for [[rock nuts]].  The [[quarry bush]] that sprouts from it produces the greatest space to yield ratio in the game.  Eventually, though, you should be planting all 6 of the underground [[crop]]s at least.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Food and booze are stored in [[barrel]]s, with each type in its own barrel.  Since barrels have a 10-unit capacity, you can get a lot of free barrels by starting with many, many kinds of food in quantities which in end 1.  Barrels are important, and usually need wood to make, so it's worth it to use this quirk while you can by starting with at least one unit of every type of food. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Seeds are stored in [[bag]]s in multiples of 14, also by type. Bags are not as important as barrels, since making cloth bags is a good way to train up your [[clothier]], but you ''can'' do the math to figure out how to get an extra bag for the cost of a single seed, if you're so inclined: get a multiple of 14, plus 1.&lt;br /&gt;
&lt;br /&gt;
====Animals====&lt;br /&gt;
Not only dwarves live in your fortress, after all.&lt;br /&gt;
*'''[[Dog]]s''':  Dogs are dwarf's best friend.  They can be trained into [[hunting dog]]s or [[war dog]]s, require no food or maintenance, and make good pets for your dwarves.  Always bring at least 2.  Genders alternate when picking them up, so 2 will give you a breeding pair that will have more puppies freely.  They make fantastic security early and fantastic dwarfsaving distractions later on.  Dogs will happily lay down their lives to protect their master, which is huge when it means one of your best legendary dwarves is running away from an angry [[goblin]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''[[Cat]]s''': Cats provide a wonderful function in controlling [[vermin]] in the fort.  Vermin can make your dwarves extremely unhappy, so some cats are more or less a requirement.  The largest problem with cats, however, is that their population is very difficult to control.  Cats will choose their own owners (without the dwarf in question's consent), and after they've done so, you cannot order them butchered to control their numbers.  The resulting [[catsplosion|population explosion]] can clutter hallways and murder your framerate.  The best thing to do is to put all stray cats and kittens in a [[cage]] (one will hold them all).  You can then butcher them without running the risk of the cats adopting dwarves before the butcher gets around to them, and if vermin start to get out of hand, you can always release one or two to help.  If you want vermin control from the start, bring just ONE cat so it cannot breed and cause a population problem early.  However, immigrants will very commonly bring their pet cats to the fortress, so if you can live with vermin early, you'll likely get a cat for free within a year.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''Beasts of burden ([[Horse]]s, [[muskox]]en, etc)''': You will probably get a breeding pair of these for free when you start the game (they pull your starting wagon), and they will breed just as fast as anything else, so don't bring any along, and don't be afraid to use that [[cage]] to contain their numbers.  Unlike cats, dwarves must choose to adopt beasts of burden, which they won't do unless you let them to do so (in z-&amp;gt;animals menu).  That's fairly rare, so the vast majority of the beasts of burden in your fortress will stay strays. Many immigrants may bring useless animals with them though - as they are adopted already you can't butcher or cage them. All newborns belong to the fortress, so you can do what you want with them.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once again, check the [[starting builds]] page for more ideas, read the pages linked above, and experiment.  The learning process is half the fun in Dwarf Fortress; enjoy it!&lt;br /&gt;
&lt;br /&gt;
==Game on!==&lt;br /&gt;
We've chosen an area, selected our supplies, and we're ready to play.  The game opens with your dwarves huddled around the wagon they used to get here.&lt;br /&gt;
==Gameplay overview==&lt;br /&gt;
This section will deal with the tasks you'll need to tackle in your first year of gameplay.  These tasks are ''selecting a dig site'', ''building workshops'' (and ''marking stockpiles''), ''building lodging'', ''starting farms'', and ''trading''.&lt;br /&gt;
===Selecting a dig site===&lt;br /&gt;
You'll have to decide where you're going to dig in and start your fortress.  You should consider the natural formations of the surrounding area when deciding where you want your main entrance.  Ideally, there should be one way in and one way out.  This one way should be fairly sizable, to pander to [[caravans]] and [[traffic]].  Proximity to a good [[water]] source so you can build a [[well]] more easily is also desirable.  You can fix either of these things with extra digging and building later on, though, so don't sweat the decision too much.&amp;lt;r&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most direct way to start is to find the side of a nearby mountain and dig into it, but if you're in a very flat area, you might have to dig downward instead.  To start digging, hit {{k|d}}esignations, then {{k|d}}ig.  Move your cursor using the arrow keys to where you want to dig, and hit {{k|ENTER}}, then move your cursor over to the place you want the digging to end.  Mining designations are rectangular, so you can go both left and right and up and down as you're designating area.  This tells your dwarves to cut into a wall and hollow it out, often leaving behind a [[stone]] if it is a rock wall.  [[Soil]] walls become hollowed out, but never drop anything.  These hollowed out areas are where you'll build the vast majority of everything you need.  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to dig down instead of in, you need to use either a '''[[stairs|stairwell]]''' or a '''[[ramp]]'''.  For a stairwell, use {{k|d}}esignations, and downward stairway ({{k|j}}).  Note that this is only half of a stairwell.  To build the other half, you must go down a z-level ({{k|&amp;gt;}}) and {{k|d}}esignate an {{k|u}}pward stairway to connect to it.  You are then underground and can use {{k|m}}ining normally.  For a ramp, you must go down a z-level ({{k|&amp;gt;}}) and {{k|d}}esignate a {{k|r}}amp on the area you want cut away.  You do not need to build anything above it; your miners will figure it out.  If you are building downward and want [[caravans]] to come down into your fortress, you will need to use [[ramp]]s, at least 3 right next to each other.  Keep this in mind when deciding where you want to dig down.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When designing your main entrance, be mindful that as many as 200 dwarves could be coming and going eventually, and that [[goblin]]s are going to want in at some point or another.  A 3-wide entrance corridor is ideal.  It is wide enough to accept a good amount of traffic and caravans, but narrow enough to use diabolical traps and designs to kill lots of goblins.  Your main doors will have to be only 2-wide, though, as [[door]]s require a wall adjacent to them to build properly.&lt;br /&gt;
&lt;br /&gt;
Once you've decided where you want your main entrance, it's time to move your supplies over there.  We will have to set them outside for now, but we'll want to move them indoors as soon as we can.  Press stock{{k|p}}iles, and designate areas for {{k|f}}ood, {{k|w}}ood, and {{k|r}}efuse.  You can designate all sorts of stockpiles from this screen, so hit {{k|t}} and poke around in the custom stockpile settings for a little bit, figuring out what you can do.  Do '''NOT''' designate a stone stockpile for now.  It will eat up a lot of time unnecessarily.  While we're organizing our supplies, deconstruct your wagon by pressing {{k|q}}uery, putting the cursor over your wagon, and pressing deconstruct ({{k|x}}).  A dwarf with the [[carpentry]] labor enabled will come by and pull the wagon apart, turning it into 3 [[log]]s.  The wagon is useless to you, so there's no reason to not do this. Some people prefer to wait until the wagon has been emptied before deconstructing it. In order to see the contents of a building, use the {{k|t}} command and scroll over the wagon.&lt;br /&gt;
&lt;br /&gt;
Plan for your finished, 200-dwarf fortress right from the get-go.  It's very easy to dig out new area.  It's very HARD to go back and redo something the way it should've been from the start.  3-wide hallways is typically plenty for high-traffic areas.&lt;br /&gt;
&lt;br /&gt;
===Building workshops===&lt;br /&gt;
Time to get some work done!  Taking in raw materials and spitting out stuff that's useful: that's the name of the game for workshops.  You should start putting down workshops as soon as you have raw materials.  You'll need to get basic living provisions like [[bed]]s, [[table]]s, [[chair]]s, [[chest]]s, and the like down for not only your first 7 dwarves, but the [[immigrant]]s that could come at any time as soon as possible, so you can't waste any time.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Stone]] will show up from your miners digging.  Once you have an area with a decent amount of stone, you should get a [[mason's workshop]] built in the area.  Check the [[workshop]] page for full details if you have problems building one. The keyboard command is:&lt;br /&gt;
* {{k|b}}uild order&lt;br /&gt;
* the {{k|w}}orkshops sub-menu&lt;br /&gt;
* {{k|m}}ason's workshop.  &lt;br /&gt;
&lt;br /&gt;
Once the workshop has been built by a dwarf with the [[masonry]] [[labor]], you can {{k|q}}uery the workshop to find out what it's current orders are, {{k|a}}dd or {{k|c}}ancel orders, set an existing order to {{k|r}}epeat,  order the workshop dismantled, and other tasks.&lt;br /&gt;
&lt;br /&gt;
Add orders for a {{k|d}}oor, a {{k|t}}able, and a {{k|c}}hair. Stone chairs will show up as ''thrones'' in the orders.  They are exactly the same.  Then set each order to repeat.  This workshop will now make [[door]]s, [[table]]s, and [[chair]]s until you tell it to stop.  You'll need a lot of these, so that's OK.&lt;br /&gt;
&lt;br /&gt;
Also build a [[carpenter's workshop]] near the wood stockpile you designated earlier, and tell it to make {{k|b}}eds.  Put this on {{k|r}}epeat, also.  The wood you brought along, even after disassembling your wagon, won't last long. If you brought along a [[woodcutter]], now would be a good time to get him to chop down some trees.  Hit {{k|d}}esignations, and then hit chop down {{k|t}}rees.  Chopping designations work exactly like mining designations, but it will only highlight trees in the rectangle you give it.  Don't worry about chopping a ton of wood right now; trees don't go anywhere fast, so you can always come back for more.&lt;br /&gt;
&lt;br /&gt;
While making workshops anywhere the material happens to be works fine right now, you will want a more organized way of doing it later.  Check out the [[Design_strategies#Workshop_Logistics|workshop logistics]] page for ideas on how to set it up.  After you do get things set up, be sure to move your stockpiles underground; aboveground stockpiles are vulnerable to thieves and are usually a long way away.  Don't be afraid to tear down workshops; they are built quickly and easily, and tearing them down does absolutely nothing harmful, even returning the materials used in it's construction.  Be aware that workshops create [[noise]] when they are in use, which can disturb your dwarves' sleep, so don't build them close to any [[bed]]s.&lt;br /&gt;
&lt;br /&gt;
===Building lodging===&lt;br /&gt;
With commodities coming out, it's time to set up places where they can be used.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tell your miners to dig out a large (5x5 minimum) room to become your [[barracks]].  The barracks is essentially a communal sleeping room where dwarves without their own apartment can come to crash.  It is also the place where your [[military]] will come to [[sparring|spar]] once you start recruiting soldiers.  Since your military hangs out in the barracks a lot, it's a good idea to put it near the main entrance of the fortress.  If [[Thief|thieves]] stumble in, they are likely to meet a very grisly end as they bump into a pair of dwarves in the middle of combat training, and later, in case of a more major attack, they are more likely to be closer to where you need them.  Note, however, that sparring dwarves can very seriously [[wound|hurt]] or kill eachother if their sparring area is too crowded, so keep beds stacked along one wall and the rest of the room clear and uncluttered.  You do not need too many beds in the barracks right now.  Beds in the barracks are public, and dwarves have their own schedules, so the entire fortress will not sleep at once.&lt;br /&gt;
&lt;br /&gt;
After the barracks is dug, tell your dwarves to {{k|b}}uild a {{k|b}}ed.  Your cursor will come up, turning red on an unacceptable location and green on an acceptable location.  Unacceptable locations will give you a short reason as to why they're unacceptable.  Again, just stack beds against one wall of the barracks; 5 beds will be fine to start out with.  After indicating the placement of the beds, your dwarves will haul them over and install them.  Once they are installed, {{k|q}}uery a bed, then make a {{k|r}}oom.  Use the {{k|+}} and {{k|-}} keys to size the room that will be considered the barracks.  All beds within the flashing square will be considered public, so there's no need to do this more than once.  Fill up the whole 5x5 area ({{k|b}}uild {{k|d}}oors if you need to cordon off the area to make it a nice square) and hit {{k|ENTER}}.  You've created your first [[room]]!  A room status screen shows up.  Be sure to hit {{k|b}} to confirm that it is a barracks.  If you don't, the first dwarf that sleeps in this room will claim it as his or her apartment, which isn't what we want.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The barracks will keep your dwarves from sleeping on the floor, which would make them [[thought|unhappy]].  As the game goes on, though, it is a very good idea to move dwarves into their own apartments.  They get much [[thought|happier]] for it, it keeps traffic down, and provides you with some more diabolical options such as locking a troublemaker in his room by {{k|q}}uerying the door and {{k|l}}ocking (forbidding) it.  See the [[bedroom design]] page for ideas on how to set up your apartments.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With bedding handled, we need to set up a [[dining room]], which will double as our [[meeting area]].  Dwarves will eat in their apartment sometimes if you install a table and chair in it, but mostly, dwarves prefer to eat in a public [[dining room|dining hall]] with a table all to themselves.  As the [[meeting area]], dwarves will also show up there whenever they have nothing better to do (have 'No Job') to socialize and kill time.  It is a pretty high-traffic area, so be sure to use double-doors as the entrance and exit. It should again be fairly large (25 tiles minimum; this could be 5x5, 4x6, whatever suits your fancy).   Once it's dug out, {{k|b}}uild {{k|t}}ables along the walls, and then {{k|b}}uild {{k|c}}hairs next to the tables, one per table.  Once a table is laid out, {{k|q}}uery the table and make a {{k|r}}oom out of it.  Fill up the dining hall area, and hit {{k|ENTER}}.  Be sure to hit {{k|p}} to set it as a meeting area, and you're done here.&lt;br /&gt;
&lt;br /&gt;
As with most kinds of furniture, dwarves can walk through tiles containing tables, chairs and beds. The most notable exception to this are [[statue]]s.&lt;br /&gt;
&lt;br /&gt;
===Starting farms===&lt;br /&gt;
The basics of life are in place!  Now it's just a matter of getting the farms in place to make sure life goes on.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Farming]] is the most reliable source of food in the game, and the only way to be sure you're going to feed a large population.  The catch is, we can only farm on [[mud]] or [[soil]].  Mud is only created through [[irrigation]], which is complicated and more trouble than it's worth if you have access to any serious quantity of soil.  Avoid using irrigation if you can.  The logistics of controlling enough water to make arable land on stone are extremely annoying.&lt;br /&gt;
&lt;br /&gt;
On [[soil]], however, farming couldn't be easier.  Simply mine out an area of soil (underground, since the seeds you can embark with will NOT grow aboveground), then {{k|b}}uild a farm {{k|p}}lot.  Use {{k|u}}, {{k|m}}, {{k|k}}, and {{k|j}} to resize your plot to the size you want; 3x3 should be plenty to start out, and you will max out at roughly 30 to 40 total squares being used for food and booze production to support a full fortress.  This changes some depending on the skill of your [[grower]]s, but it's a fair guideline.  After placing the farmland, a dwarf with the Farming (Fields) labor enabled will come by and prepare it for use.  After it's done, {{k|q}}uery the new field and decide on your crops for each season.  The crop display will show every crop that can possibly be planted there - it does not nessecerally mean you have seeds to plant.  [[Plump helmet]]s are best for your first field, since they can be brewed to [[booze]], eaten raw, and cooked.  If you find some seasons have red letters, that is because the season has already passed and you cannot edit it again this year.  You will have to pick it up in the spring of the following year.  Be aware that Dwarf Fortress will '''NOT''' give you an error if you attempt to plant something you have no seeds of.  It will give you an error if you '''run out''' of seeds after starting planting, but not if you simply have none to begin with.  If you can't remember what kind of seeds you have, check around your wagon and your designated food stockpile using {{k|k}} for a seeds bag.  Hit {{k|Enter}} when you find it to inspect the bag and see what kind of seeds it carries.  Later on, you will be able to find it more easily using the {{k|z}} key and the &amp;quot;Stocks&amp;quot; menu, but right now your stocks will lack the precision to use the &amp;quot;zoom&amp;quot; key.  See the [[bookkeeper]] article for more information on stockpile precision.&lt;br /&gt;
&lt;br /&gt;
Eventually, you will want to be planting many, many different kinds of crops.  [[Dimple cups]] are great later on, because they produce [[dimple dye]], which can be used to increase the value of the clothing your fortress produces.  [[Cave wheat]] can be used to provide fodder for luxury prepared meals, and to make more brewing fodder.  As your fortress grows and you need more and more luxuries to keep everyone happy, diversifying can only help you.  &lt;br /&gt;
&lt;br /&gt;
On a note about [[irrigation]] before wrapping this section up, mud behaves almost identically to soil.  All below-ground crops can be grown equally well on either, and you build and place the plots exactly the same.  There are a few differences, though.  Mud can be [[Farming#Increasing_yield|fertilized]] with [[potash]], while dry soil cannot.  Some above-ground crops can only be grown in mud, while others can only be planted in dry soil.  Check the [[crops]] page for more details.  Irrigation is a very advanced technique that provides only marginal benefits.  Some &amp;quot;unlivable&amp;quot; areas can be turned around with skillful irrigation and fertilizer, but by and large they're not necessary.  Just use soil whenever you can.&lt;br /&gt;
&lt;br /&gt;
=== Trade ===&lt;br /&gt;
Now that you've given your dwarves a place to sleep and avoided the possibility of starvation, you can start thinking about the finer things in life.  &lt;br /&gt;
&lt;br /&gt;
First, we'll take care of a few organizational considerations, to make trading easier.  Our carpenter will take care of this, since he's done making beds.  Order up 2 or 3 [[bucket]]s.  Buckets are used to carry water to injured, bedridden dwarves from water source [[zone]]s and are one of the requirements to building a [[well]].  Then, get to work stamping out some [[bin]]s.  Bins are used to store a lot of non-perishable items in the same square; they work much the same as [[barrel]]s, but barrels are used on perishables like food and booze.  You'll need a LOT of bins, but for the moment 5 or so will do.  You will also need to make a lot of barrels, but since you brought a number of them with you, you can hold off a bit. Both of these can be made from [[metal]] as well, but producing them from wood is far more economical.&lt;br /&gt;
&lt;br /&gt;
Since you have all this stone lying around, let's put it to use. Build a [[Craftsdwarf's workshop]], assign one of your dwarves to [[stonecrafting]]. Order this [[workshop]] to build rock {{k|c}}rafts of all sorts {{k|r}}epeatedly. Stone mugs are a good trade good - you get three mugs from one stone, adding up to 30☼ at the start. Since your stonecrafter will level up relatively quickly (and if you have several dwarves working on stonecrafts) this can quickly add up to several thousand monies worth of goods.&lt;br /&gt;
&lt;br /&gt;
Now that you've got some goods to [[trade]], we'll need to {{k|b}}uild a trade {{k|D}}epot. Build this somewhere easily accessible from all edges of the map, but close to (or inside) your entrance. [[Trade depot]]s require [[architecture]] and a [[mason]], assuming you make it out of your copious quantities of stone.  Many times you will not have an [[building designer]] on embark, so you will have to assign one to get the [[architecture]] phase of the depot done.&lt;br /&gt;
&lt;br /&gt;
In the long term, you'll want your trade depot to be in a defensible spot. As it is 5x5 squares, and requires a 3-square wide path for the caravans to get in and out of it, you'll eventually want to spend some time thinking about its [[defense]]. Once the depot has been completed, you can check for depot access using the {{k|shift}}-{{k|D}} key.&lt;br /&gt;
&lt;br /&gt;
The first caravan will come in your first autumn: the dwarven caravan from the mountainhome.  When it comes, the game will pause, you'll be alerted, and the screen will center on the [[caravan]].  If you do not have a depot, or they can't get to it, they will wait on the edge of the map for you to build a depot they can get to, or to clear the obstructions.  The two most common obstructions are [[tree]]s and [[boulder]]s.  Trees can be chopped down, and boulders can be eliminated by {{k|d}}esignating them to be {{k|s}}moothed.  This uses the [[stone detailing]] labor, so turn it on if you need.&lt;br /&gt;
&lt;br /&gt;
After the caravan is on its way, you'll need to fill the depot with things to trade, and get a trader there to broker the negotiations.  Hit {{k|q}}uery over the depot and press {{k|g}} to start moving supplies.  Use the arrow keys to navigate the trade goods window.  If you've been making stone crafts, you'll want the ''crafts'' heading to make the game filter out the bins you've been filling.  Otherwise, you'll have to sift through every stone you've created while digging the fortress, which is a huge pain.  Press {{k|ENTER}} on the bins to mark them for trading, and some dwarves will come along to haul the bins to the depot.  Once that's take care of, {{k|q}}uery the depot and {{k|r}}equest a trader there.  By default, only the broker will trade at the depot.  This is generally what you want, since brokers with better [[appraisal]] skills can see the worth of all the commodities and tend to get away with giving the caravan boss a lower profit margin on the trade.  Trading at the depot is a low-priority job, though, so you may have to turn off your broker's other labors temporarily to get him to respond to the request in a timely manner.  Once your broker is at the depot, {{k|q}}uery the depot and start {{k|t}}rading.&lt;br /&gt;
&lt;br /&gt;
On the screen that comes up, the left side shows the trader's goods, while the right side shows your own.  Use the arrow keys to navigate and {{k|ENTER}} to mark something for trading.  If your trader does not have at least Novice Appraiser in his skill set, you will not be able to see the values of everything, so you'll have to guess.  The caravan boss will refuse to sell at a loss, and if you're close to making a deal, he'll give you a counteroffer that he'd accept.  Being able to see the values of things is really helpful, but don't worry if you can't.  It usually only takes one or two successful trades before your broker will hit Novice Appraiser and all will become known to you.  One fun note is that raw materials cost the same from merchants as they do at the embark screen; so you already know that [[plump helmets]] are 4☼, most meat is 2☼, wooden logs are 3☼, and so on.  It's difficult to know the value of your crafts, and some things must be bought as a package deal (you cannot buy seeds alone, you must also buy the bag they come in), though, so it can still be hard to trade without Appraiser.&lt;br /&gt;
&lt;br /&gt;
On your first year, you're probably pretty light on things to trade with, so start small.  Wood [[log]]s are very useful and cheap.  Extra food can be useful if your farms are lagging behind.  Maybe a barrel or two.  Sell what goods you have and don't fret about it any longer. &lt;br /&gt;
&lt;br /&gt;
Next year, after you get some immigrants you can think about exploring other kinds of industry as well, like the [[furniture industry]], [[meat industry]], or [[clothing industry]], but this is a great place to start.&lt;br /&gt;
&lt;br /&gt;
The last element to trading is the [[liason]].  The dwarven liason will want to meet with your [[expedition leader]] to work out your requests for next year, and let you know what their requests are.  By making a request of the caravan, you are essentially promising to pay more (up to double the normal price) for various things, which entices the traders to bring more of those things. Wood logs are always a great thing to request.  Even at double the normal price, they're still very cheap, and merchants bring a lot of them.  It's not unusual to get 50 logs from a single caravan.  It saves you a massive amount of time and effort.  [[Barrel]]s and [[bag]]s are also good to request, as are [[dog]]s.  You can also request [[seed]]s to get your more diverse crops started.  Look around, explore, and experiment.  That's half the fun of the game.&lt;br /&gt;
&lt;br /&gt;
The liason will also tell you what they want from you, with the same deal: they'll pay more for it if you build it.  Unfortunately, they usually want stupid things that don't trade well (such as stone [[block]]s) or things you'd rather keep to yourself (such as [[booze]]).  Many players simply ignore their liason's requests and build the same things they always build.  Diplomatic relations will not suffer at all.  &lt;br /&gt;
&lt;br /&gt;
Your expedition leader must actually pick up the job ''conduct meeting'' to get this process done, and it ends up being a very low-priority job, so again, you may consider turning off your leader's other labors to make sure he gets to it.  If you really want to force the liason to take the meeting, move him to the meeting spot by enlisting him in the [[Military]] and [[Military#Controlling your squads|stationing]] him at the meeting spot. Then [[Door#Door settings|forbid the door]] behind him and the liason, locking them in until the meeting is completed (when the Liason says &amp;quot;Goodbye&amp;quot; in a message).&lt;br /&gt;
&lt;br /&gt;
=== The future ===&lt;br /&gt;
&lt;br /&gt;
After this point, you'll be able to start exploring the other intricacies of the game. Here is a list of some other gameplay commands which have not been covered:&lt;br /&gt;
&lt;br /&gt;
* [[labor]]&lt;br /&gt;
* [[noble]]s&lt;br /&gt;
* [[military]]&lt;br /&gt;
&lt;br /&gt;
==Sample games==&lt;br /&gt;
These are sample games that others have played and recorded to provide good learning examples.  They are not routinely updated, so some information may be out of date, but they still provide good hands-on tutorials of how to prepare for your fortress and play the game.&lt;br /&gt;
&lt;br /&gt;
[[Indecisive's illustrated fortress mode tutorial]]&amp;lt;Br&amp;gt;&lt;br /&gt;
[[Savok's first fortress playthrough]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[ThunderClaw's 0.28.181.40d graphical tileset playthrough]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
&lt;br /&gt;
{{Starting FAQ}}&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=40d:Adventurer_mode&amp;diff=19805</id>
		<title>40d:Adventurer mode</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=40d:Adventurer_mode&amp;diff=19805"/>
		<updated>2009-02-18T15:44:58Z</updated>

		<summary type="html">&lt;p&gt;Mortal: /* Throwing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In '''adventurer mode''', you pick a race ([[dwarf]], [[human]], or [[elf]]) and start out in either a [[Site|town]] of your race or in a previous [[fortress]] you played on. You can receive [[quest]]s, venture into the wilderness to find [[caves]], abandoned towers and other [[Site|villages]]. You can even visit your old [[Fortress|fortresses]] and find whatever riches were left to be guarded by the [[creatures]] that sealed the fate of your [[fortress]].&lt;br /&gt;
&lt;br /&gt;
The user interface differs somewhat from [[fortress mode]]; you may want to refer to the [[Adventure Mode quick reference|quick reference]] guide, or examine the detailed [[controls]] page. [[Site map]] may also prove useful.&lt;br /&gt;
&lt;br /&gt;
== Your first adventure ==&lt;br /&gt;
&lt;br /&gt;
=== Picking a race ===&lt;br /&gt;
When it comes to picking a race, there is difference in [[skills]]. [[Dwarves]] cannot wear [[human]] sized [[armor]], and are somewhat limited in the [[weapons]] they can wield due to their size. [[Elves]] have a slightly different set of [[skills]]. [[Humans]] are generally fairly well-balanced, and are the easiest to acquire quests from. Each race fares differently in combat; you may wish to look at the races' pages for the finer details.&lt;br /&gt;
&lt;br /&gt;
=== Choosing skills ===&lt;br /&gt;
Basically, if you want to start with a [[weapon]], you need to avoid having the most points spent in unarmored/[[wrestling]]. If you, for example, choose to start out with most points in [[swordsman]], you will start out with a [[sword]]. When you have chosen your preferred set of [[skills]], you can press {{key|Enter}} to embark.  The higher the [[skills]] in [[weapons]]/[[armor]] determine the quality of the equipment you start out with.&lt;br /&gt;
&lt;br /&gt;
If you start out with a high [[weapon]] [[skill]] (except [[bow]]s and [[crossbow]]s) and also an above novice [[armor]] and/or [[Armor#Shields and Bucklers|shield]] [[skill]], you'll start out with [[armor]] and/or [[Armor#Shields and Bucklers|shield]] as well.&lt;br /&gt;
&lt;br /&gt;
=== Setting out ===&lt;br /&gt;
If you chose human, you will start out inside the Mayor's house. You will see the Mayor (purple) and probably several [[drunks]]. Press {{key|k}} and talk to the Mayor. Press 'services' for a [[quest]]. You can talk to the drunks and recruit them to your party for some additional combat aid. Be sure to read the [[Adventure Mode quick reference]] or use the help files for more information on the commands in Adventure mode.&lt;br /&gt;
&lt;br /&gt;
=== Trading ===&lt;br /&gt;
In towns you can find merchants inside some [[buildings]]. Talk to them to trade with them. After buying an item, you must pick it up manually from somewhere in the shop.  {{K|l}}ook around for an item without $ signs around it.&lt;br /&gt;
&lt;br /&gt;
==== Selling ====&lt;br /&gt;
You can also sell things to traders. Bones, corpses, body parts and rocks are not valuable, no matter how attached you are to a particularly aerodynamic kobold head. Small creatures discovered while {{k|L}}ooking Carefully may be worth a small amount of money. In order to sell or buy items, stand adjacent to the shopkeeper in his store, and {{k|k}}onverse with the shopkeeper. Select &amp;quot;Trade&amp;quot; and press {{k|enter}} to open the trade window.&lt;br /&gt;
&lt;br /&gt;
Select each non-worthless item you wish to sell, and then set a price using the following format{{verify}}:&lt;br /&gt;
* {{k|a}} asking for 9000☼&lt;br /&gt;
* {{k|s}} +100☼&lt;br /&gt;
* {{k|d}} +10☼&lt;br /&gt;
* {{k|f}} +1☼&lt;br /&gt;
* {{k|g}} reset to 0☼&lt;br /&gt;
* {{k|h}} -1☼ (offering)&lt;br /&gt;
* {{k|j}} -10☼&lt;br /&gt;
* {{k|k}} -100☼&lt;br /&gt;
* {{k|l}} offer 9000☼&lt;br /&gt;
&lt;br /&gt;
The use of these keys may seem non-intuitive, and this is further complicated by the limit on your available offers by your current financial health.&lt;br /&gt;
&lt;br /&gt;
Shopkeepers are used to adventurers with inflated ideas about the value of their goods, so it may be simplest to ask for 9000☼ for your goods, or offer 1☼ for theirs and suggest a {{k|t}}rade. The shopkeeper will counteroffer with the actual value of the goods, and will be quite delighted to accept a {{k|t}}rade at the price they've just quoted to you. You can then purchase things with your store credit. After the trade sessions, the balance of your coins will appear on a small table next to a chest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Adventurer mode]]&lt;br /&gt;
&lt;br /&gt;
====Theft====&lt;br /&gt;
You may also pick up the item before buying it, but you should never walk out of a shop carrying an unbought item, as that is theft. It is punishable by death if you are caught, and excommunication if you are not. On any occasion when you have stolen goods from a store, ie goods bounded by the $$ signs, the game requires you to exit the site ''and'' travel a considerable distance before allowing you to travel. This may make a getaway more difficult if your adventurer is not already faster than anyone else. This only applies to goods in stores; killing townsfolk and taking their personal things, including those of the shopkeep still only requires exiting the site. The moment you are out of sight, you will be able to warp out as usual. Theft and murder remain within entities; even depopulating one country and stealing all its things will not generate ill response in another country.&lt;br /&gt;
&lt;br /&gt;
=== Equipping your adventurer === &lt;br /&gt;
After acquiring [[armor]] from one source or another, you'll most likely want to equip it. To do this, first make sure it is in your possession--not on the ground. You can then {{key|w}}ear it, granted you don't already have too much on that equipment slot already. You can {{key|r}}emove or {{key|d}}rop inferior equipment as necessary.&lt;br /&gt;
&lt;br /&gt;
[[Weapons]] and [[Armor#Shields and Bucklers|shields]] are handled differently. There is no explicit equipment command. Instead, they are automatically equipped when you either {{k|g}}et them from the ground or {{k|r}}emove them from your [[backpack]] - provided the hand that would wield them is free. So in order to change [[weapons]] or [[Armor#Shields and Bucklers|Shields]] you would need to {{k|p}}ut your equipped weapon into your [[backpack]] and then {{k|r}}emoving your new desired weapon. You do not need to drop weapons and equip new ones etc. Simply remember the {{k|r}}emove command and the {{k|p}}ut into container command.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the world of DF seems to have a lot of left handers, so do not be surprised if your character holds the weapon with the left hand and the [[Armor#Shields and Bucklers|shield]] with the right hand.&lt;br /&gt;
&lt;br /&gt;
== Traveling the world ==&lt;br /&gt;
&lt;br /&gt;
=== How-to ===&lt;br /&gt;
You can walk around the whole world tile by tile if you wish, but given the size of the world, you might want to consider using another method. Pressing {{key|T}} will let see a very zoomed out map of the surrounding area. Moving about on this map is much faster, as well as it heals your adventurer, keeps him from starving, dehydrating, or getting tired. To exit this screen and explore the area you've reached, press {{k|&amp;gt;}}.&lt;br /&gt;
&lt;br /&gt;
If there is more than one feature such as a [[Site|town]] or group of [[creatures]] on that map tile you will get to choose which one you want to arrive near.&lt;br /&gt;
&lt;br /&gt;
Also while traveling on the world map, there is a chance that your adventurer can get randomly ambushed by enemies.  When that happens, you must survive by either fighting them off or hide from them.&lt;br /&gt;
&lt;br /&gt;
Jumping off [[Cliff|cliffs]] is not normally advisable; however, it is possible to do so by holding {{key|Alt}} while pressing the appropriate movement key.  Jumping off [[Cliff|cliffs]], depending on how high you jumped, will most of the time cover your eyes in blood, which lessens visuals.&lt;br /&gt;
&lt;br /&gt;
=== Finding quest locations ===&lt;br /&gt;
After receiving a [[quest]], you will be able to track its location using the {{key|Q}}uest log. Initially it will just give you the location on the {{key|T}}ravel map, though a lesser-known feature is its use in finding the cave entry (or other such target) once you're already in the [[Site map|local map]]. Bring up the quest log again, highlight the quest objective you're after, and {{key|z}}oom to it. It should then provide you with a local map of your current area, complete with a 3x3 box of flashing squares. This box indicates the general location of the cave's mouth. You'll still have to do some searching, but at least it's narrowed down for you. You can bring up this map at any time that you're in the local area of a quest objective.&lt;br /&gt;
&lt;br /&gt;
The compass on the left of the screen will also greatly help you in finding the entrance; the direction indicated should place you within one screen's distance of the entrance before it turns into &amp;quot;---&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Visiting abandoned fortresses ===&lt;br /&gt;
If you start an adventure in a world with one or more abandoned [[Fortress|fortresses]], you can take your adventurer to see the sites of your previous endeavors. When you find one of your old [[Fortress|fortresses]], you will find that everything is a mess. Items are scattered about, things are smashed up and there are probably new hostile inhabitants that you will need to fend off. Visiting your old [[Fortress|fortresses]] might prove to be rewarding, since you can find [[armor]] and [[weapons]] you made (if you made any). The best thing to be found in your [[fortress]] would probably be any left behind [[Legendary artifact|artifact]] [[weapon]] or [[armor]]. This is also probably the best (and only?) way to get [[Legendary artifact|artifact-quality]] [[weapons]] and [[armor]].&lt;br /&gt;
&lt;br /&gt;
Also remember to check out any [[Engraving#Engravings|engravings]] you made while in [[fortress mode]]. When checking out [[Engraving#Engravings|engravings]] in adventure mode, they reveal a lot more specific information about the event that is engraved.&lt;br /&gt;
&lt;br /&gt;
== Combat ==&lt;br /&gt;
Fighting is extremely detailed in adventure mode! This adds a lot of fun in the battle, since there are so many ways to injure your opponents/victims.&lt;br /&gt;
&lt;br /&gt;
=== Ranged ===&lt;br /&gt;
If you have a [[weapon | bow]] or [[weapon | crossbow]], you can shoot [[arrow]]s or [[bolt]]s at enemies. You can also throw anything you can carry at enemies. Ranged attacks are highly efficient when you hit.&lt;br /&gt;
To fire your bow or crossbow, press {{key|f}}, and move the marker to the enemy you wish to fire upon, and press {{key|Enter}}. Same with throwing stuff, only press {{key|t}} and choose which item to throw, then choose the victim.&lt;br /&gt;
''Note: Throwing is slightly bugged, but in a good and fun way. You can throw captured flies, socks and even [[vomit]] if you want, with lethal effects. (Sand piercing lungs, flies piercing hearts etc..)''&lt;br /&gt;
&lt;br /&gt;
=== Close combat ===&lt;br /&gt;
To fight a [[creature]] by hitting it, you just need to walk towards the [[creature]]. Alternatively, you can press {{key|A}} and choose your target. After you've pressed {{key|A}} and are given the list of targets to attack, you can use {{key|Enter}} to choose between a normal attack and [[wrestling]] before selecting which opponent you wish to target.&lt;br /&gt;
A normal attack will make the adventurer hit the target with whatever [[weapon]] he holds. If he is holding no [[weapon]], he will bash with his [[Armor# Shields and Bucklers|shield]]. If he has neither a weapon nor a [[Armor# Shields and Bucklers|shield]], he will either punch his target or grab a random appendage.&lt;br /&gt;
In [[wrestling]], you must spend a few rounds locking the target's limbs to be able to break and splinter them (good times). Alternately, you could try gouging, pinching, or strangling them instead.&lt;br /&gt;
&lt;br /&gt;
=== Wounds ===&lt;br /&gt;
Adventurers are liable to be [[Wound|wounded]] by the slings and *&amp;lt;&amp;lt;-iron arrows-&amp;gt;&amp;gt;* of outrageous fortune, as well as an assortment of environmental hazards. Healing works the same way as in Fortress mode; Scrapes and bruises heal up very quickly, but broken and mangled limbs take months, and nervous system injuries never heal.&lt;br /&gt;
&lt;br /&gt;
Fortunately, by pressing {{key|T}}, and travel at least 1 tile in any direction on the regional map, all wounds will be miraculously healed. Lost limbs and other bodyparts will not be regenerated, however, so if you're not careful (or very unlucky) your adventurer may soon be investing in an eyepatch. (Now if only there were peg legs...) For more information, see [[Wound]].&lt;br /&gt;
&lt;br /&gt;
== Tips for survival ==&lt;br /&gt;
Dying is easy in adventurer mode, especially if you've just started out. Following these simple tips will increase your chance to survive, and reach those nice stats and legendary [[skills]]! These tips are for the faint of heart only. If you like the challenges of the game, feel free to do the opposite of what these tips say.&lt;br /&gt;
&lt;br /&gt;
=== Basic Needs ===&lt;br /&gt;
Your adventurer gets hungry, thirsty, and drowsy. Make sure your [[waterskin]] is always filled (fresh [[water]] at the [[Temple|temples]]); you carry 1-2 stacks[5] of [[food]]; and get some sleep sooner or later. &lt;br /&gt;
&lt;br /&gt;
Fresh [[water]] can be found sometimes at [[Temple|temples]] and always in [[River|rivers]]. [[Water]] from [[Murky pool|pools]] is not considered fresh [[water]]. &lt;br /&gt;
&lt;br /&gt;
In order to obtain [[water]], you need a [[waterskin]]. Unless you are an [[elf]], you will start with a full one at the beginning of the game, but you can also buy additional ones in the [[Site|towns]].&lt;br /&gt;
&lt;br /&gt;
Move right next to the [[water]] source and press {{k|I}} (capital 'i', that is) to interact in a complex manner with an item. You will be shown your [[inventory]]. Select your [[waterskin]] by pressing the letter shown to its left. If the [[inventory]] is so long that the [[waterskin]] is not shown, you may need to press {{k|/}} or {{k|*}} on the number pad to move through the pages. If you have done everything correctly, the game should offer you one or more options from which specific tile you wish to draw the [[water]]. Simply select one choice by pressing the letter to its left and the remaining free space in the [[waterskin]] will be filled with [[water]].&lt;br /&gt;
&lt;br /&gt;
Note that you can not refill [[Waterskin|waterskins]] that are inside of [[Backpack|backpacks]]. You need to {{k|r}}emove it from the [[backpack]] first. Also note that you can't put [[Waterskin|waterskins]] you are holding directly into the [[backpack]] (it is not accepted as a container for that purpose). First, {{k|d}}rop the [[waterskin]] and then {{k|g}}et it again. It should be put inside the [[backpack]] automatically.&lt;br /&gt;
&lt;br /&gt;
Solid food will eventually rot away. However, if you move on the travel map, you will not consume any food or water. Only if you stay on a [[Site map]] for a longer time will you first feel thirst and later hunger. A normal random [[encounter]] usually never last long enough to even generate thirst. Searching a [[quest]] [[cave]] can take longer (they are quite winding), but usually, you will not go beyond thirst if you only want to find the [[quest]] monster and kill it. Thus, carrying large stocks of food is not recommended, unless you plan something that will take a lot of time.&lt;br /&gt;
&lt;br /&gt;
(''Warning:'' NEVER, EVER sleep in a hostile place, next thing you know you will be cloven asunder by your own sword, or some nasty critters will be feasting upon you)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;s&amp;gt;Living Shields&amp;lt;/s&amp;gt; Companions ===&lt;br /&gt;
&lt;br /&gt;
If you recruit some members to your party, you will not only gain extra damage output. You will also have someone else to take the damage instead of you!&lt;br /&gt;
&lt;br /&gt;
When you first start out, the easiest &amp;lt;s&amp;gt;human shields&amp;lt;/s&amp;gt; friends to recruit are the drunks. They are found in human towns inside the [[tavern]] with the [[Mayor]] (the building you start in if you play a human). They will gladly come with you and block some blows for you. Drunks will usually attempt low-skill wrestling and (mostly) damage-less punches. Don't expect them to last long when you meet that [[Giant]] you are supposed to kill.&lt;br /&gt;
&lt;br /&gt;
To recruit someone into your party, press tal{{k|k}}, move the cursor over them, and press {{k|enter}}. Then in the conversation that follows, simply pick 'Join' from the list of options to ask them to accompany you. [[Children]], the Mayor, and [[Guard]]s don't want any part of this silly adventuring malarkey, but the occasional peasant will be bored enough to join you.&lt;br /&gt;
&lt;br /&gt;
More detailed searches of towns of various races can yield other adventurers with some actual skills. The generally have a single weapon skill ([[Maceman]], [[Swordsman]], [[Spearman]] and so on) and some armor appropriate to the wealth of the town they were occupying. You will also find Guards around towns, and while they are combat-capable they will not shirk their duty in order to accompany you on your adventures.&lt;br /&gt;
&lt;br /&gt;
=== Avoid the impossible ===&lt;br /&gt;
Some things are harder than others. Decide for yourself if this is due to unbalancing of the game, realism or simply to add to the variety of challenges.&lt;br /&gt;
&lt;br /&gt;
==== [http://en.wikipedia.org/wiki/Shelob Shelob]'s in-laws, aka Giant Cave Spiders ====&lt;br /&gt;
Unless you are a legendary or better (ok, its not possible to go beyond legendary..) bow-/crossbowman, you should at all costs AVOID giant cave spiders (Unless, of course, you enjoy [[Fun]])!! They shoot a web at you, making you immobilized while they rip your limbs off one by one. Then when you finally break free from the web, and can attack again, you've probably lost your arms while lying on the floor and the spider is about to throw you by your head up into the roof. Cave Spiders bleed to death eventually, but they know no fear nor pain, meaning they will not black out even if you manage to inflict serious damage including severed limbs. They are also capable of surviving red-level wounds to the body and legs and multiple severed limbs for long enough to eviscerate an adventurer. Leave these for the living shields to deal with while you slip out the other way, ideally from the cave entirely, never to return.&lt;br /&gt;
&lt;br /&gt;
Even if you are a legendary projectile weapon user, reconsider attacking a giant cave spider because in the tight quarters of a cave you might be shooting it from stealth when a giant rat or something similarly stupid walks next to you and triggers your loss of cover. The spider would then punish your arrogance immensely.&lt;br /&gt;
&lt;br /&gt;
''Note'': If absolutely required they ARE killable, but you need luck, and lots of it. Adept swordsman + Proficient [[shield]] user + Skilled ambusher manages to sneak up on it and then counterstrike + block does the job. In a suicide swordsman test run I had dethoraxation (decapitation for spiders) = instakill on the first counterstrike, second GCS got a mortal wound before it webbed me and bled to death while trying to chew through me, only broke sword wielding hand and leg. Third spider broke my shield hand and had me mortally wounded in no time after that, although I eventually killed it after unwebbing myself. That makes it ~2.5/3 chances to win, not bad for a rookie. And I was healed after each successful spider kill.&lt;br /&gt;
&lt;br /&gt;
''To conclude'': Basically, as long as your shield wielding hand is intact (and shield skill is high of course) you have pretty good chances of survival in 1 on 1, otherwise you're dead. Any extra armor (in my case exceptional full plate + normal armor skill) also helps in glancing off their bites.&lt;br /&gt;
&lt;br /&gt;
Another interesting thing is that before fighting one of them I threw a spear at it and it lodged in the wound, and it seems that the spider has a priority to break my grip as it repeatedly successfully broke my grip every time(that happened ~5-6 times in a row) I grabbed the lodged spear. That points to a possible distraction for a GCS in case of soloing it.&lt;br /&gt;
&lt;br /&gt;
==== Arrows ====&lt;br /&gt;
Don't take on quests where you need to kill elite bow-/crossbowmen! Generally, avoid flying arrows! Why? Because bow/crossbowmen have the tendency to see farther than you can. They are therefore able to fire at you from beyond your sight, making it hard to see where the arrow(s) are coming from. You may therefor end up chasing the shooter in the wrong direction, giving the shooter even MORE time to turn you into a pin-cushion. Of course, this is only the case if you manage to survive the first 3-4 arrows, because arrows are BAD for anyone but the shooter's health. Piercing hits like arrows are much more likely to damage internal organs, and while you might shrug off a moderate blunt hit to the chest a similar piercing hit could directly damage one or both lungs or your heart and instantly kill you.&lt;br /&gt;
&lt;br /&gt;
One extremely useful survival tip is to immediately drop prone (with the s key) as soon as you notice you are being shot at.  Prone targets move more slowly, but seem to be much harder to hit with ranged attacks than standing ones.  This is also worth noting to avoid wasting ammunition on fallen targets.&lt;br /&gt;
&lt;br /&gt;
If you do accept a quest against an elite bowman or crossbowman and manage to reach melee range, immediately grapple its weapon, ideally by dropping yours and pulling the weapon out of its grasp entirely before throwing it away.&lt;br /&gt;
&lt;br /&gt;
=== Training yourself ===&lt;br /&gt;
Gaining stats ([[Attributes|strength, agility, toughness]]) helps a lot when fighting. How to best train yourself?&lt;br /&gt;
&lt;br /&gt;
==== Throwing ====&lt;br /&gt;
To find rocks simply hit {{k|l}} and look at any  rock coulored tiles some of these will be simply called by the rock name (e.g. [[limestone]]) and cannot be picked up but some will be called pebbles. Rocks are practically free ammo. When you find a tile with pebbles, pick up a lot of them (there are infinite rocks), and start throwing them. You can simply throw them at the tile you are standing at. Every throw will gain you 30 points toward the skill &amp;quot;Throwing&amp;quot;, and will after a while increase your stats (Strength, agility, toughness). You will need to throw 600 rocks to reach legendary Thrower (starting with no skill).&lt;br /&gt;
&lt;br /&gt;
For best efficiency, drop all of your gear (including held but not worn items) and empty out your backpack near your throwing location. This is done in order to keep your inventory simple for the rock-throwing portion. Then pick up a ton of rocks by pressing {{k|g}}-{{k|a}} over and over- ideally one would pick up 600 rocks at a single time, but you will probably get bored before then. Then, mash {{k|t}}-{{k|a}}-{{k|enter}} over and over until all of your rocks are thrown back at the floor. If you are not a legendary Thrower after this, repeat. Afterwards, remember to pick up your gear and re-fill your backpack.&lt;br /&gt;
&lt;br /&gt;
''Alternate way'' : It could be difficult to repeat the {{k|t}}-{{k|a}}-{{k|enter}} sequence without making mistake. So you can just alternate {{k|t}}-{{k|enter}} quickly : The first {{k|t}} will open the inventory, the second will chose the rock which is in &amp;quot;t&amp;quot; position, and {{k|enter}} will throw it. In the same fashion, when collecting rock, prefer a tile where the rock is on &amp;quot;b&amp;quot; position : If you quickly alternate {{k|g}} and {{k|a}}, sometime you will open the [a]nnouncement panel, which will slow you down. Another solution to this is to switch the ''pick up'' and ''announcements'' keys, so you can press {{k|a}} to pick up an item and {{k|a}} to pick up rock.&lt;br /&gt;
&lt;br /&gt;
Thrown objects are also a cheap way to injure enemies before they reach you if you are a melee fighter.&lt;br /&gt;
&lt;br /&gt;
You can also throw other stuff you find, like flies, beetles, worms, and even vomit or [[sand]]. If you have a tendency to chop off enemy limbs, you can even throw these limbs. Killing zombies with their companion's severed heads and feet is always good for a laugh. [[iron_man|Iron men]] are fun, because they leave behind a nice [[statue]] for the taking which can be thrown. Arrows and weapons seem to be particularly deadly when thrown because they deal the same damage as they would in melee, including piercing or slashing damage type, but even the most innocuous or silly items can come up with a kill.&lt;br /&gt;
&lt;br /&gt;
Most thrown objects deal blunt type damage, so they will break and bruise limbs, but arrows and weapons can deal their normal damage types. This is particularly useful to consider when trying for a desperate one-shot kill on a [[Giant Cave Spider]] that's about to web you and shred you into little chunks, as piercing attacks like thrown arrows and [[spear]]s damage internal organs (making them more likely to get a one-hit kill, as an enemy can live through having the outside of their head moderately damaged but not from having the same amount of damage done to their brain) and thrown axes or swords can sever body parts and leave deep gashes (leading to massive bleeding or slit throats).&lt;br /&gt;
&lt;br /&gt;
==== Bow/Crossbow-skill ====&lt;br /&gt;
This skill trains in the same fashion as throwing. You gain skill per shot, not per hit. This is a more expensive skill to train than throwing because you need to buy (or find) arrows/bolts, but is also a much more deadly skill.  Fired projectiles do much more damage than thrown ones, and are also piercing type weapons which can do crippling damage to internal organs. The majority of thrown weapons are blunt and will do much more superficial bruising and bone-breaking damage- at best, a lucky hit will break someone's spine or damage internal organs to a small degree. Shooting arrows at enemies is fun, because it is very efficient and will destroy enemies quite easily. &lt;br /&gt;
&lt;br /&gt;
Sadly, this also goes for enemy bow/crossbowmen. You will often be shot in the leg and crippled by an enemy you can't even see, who will then proceed to shoot you in the face until you die - which won't be very long afterwards unless you manage to find something to hide behind. This is somewhat avoidable - train in sneaking to avoid being seen by enemies that could otherwise perforate your skin, and get a good shield and armor to better keep arrows. (See below for both skills).&lt;br /&gt;
&lt;br /&gt;
Make sure to take extra &amp;lt;s&amp;gt;meat shields&amp;lt;/s&amp;gt; companions along with you if you're planning on using ranged weapons, it'll take time before you level the appropriate skill to bash things with your weapon in melee so it's imperative you stay out of the fighting till then. Drunks are particularly useful here, as they love to dive on things and collapse into a massive wrestling pile which you can take pot-shots at. Don't worry, you can't hit your guys. Not that you'd care.&lt;br /&gt;
&lt;br /&gt;
==== Wrestling ====&lt;br /&gt;
Since melee weapon skills are hard train because not every hit gives points towards the skill, why not train your [[wrestling]]? When you are alone with a unconscious enemy, why not break some limbs before finishing it off? Monsters often try to break your arms and legs, so having a bit of skill in wrestling will help break those locks a lot, and breaking that legendary swordsmans sword hand at the begging of the fight will make him laughably weak. Also, training wrestling is a quicker way to better stats (strength, agility, toughness) because gain points per move instead of per &amp;quot;hit&amp;quot;. Wrestling also handles dodging skill which is very handy to have.&lt;br /&gt;
&lt;br /&gt;
A good way to train wrestling is to find an undead region on the map- preferrably Sinister if you remember the map layout from Fortress Mode. Obtain a pack of zombie herbivores therein, preferably of small size- do not attempt this with zombie [[elephants]]. Slaughter every zombie in the vicinity of this pack of herbivores but the one that you think is the most crippled, making sure to pick one with a throat to leave alive.&lt;br /&gt;
&lt;br /&gt;
Press {{k|c}} and change your combat preferences from Strike to Close Combat. This means that your default attack when you press towards an enemy to making a random wrestling move, or the continuation (joint lock, break) or (strangle) if you have a break/strangle-able area held.&lt;br /&gt;
&lt;br /&gt;
Then, walk over, and grab the zombie's neck (yes, with your weapon or shield- it is quite optional to drop what you're holding) and begin strangulation by holding the direction the zombie is strangling in. You will make several strangles per second and gain approximately 15 XP (tentative measure) per strangulation. Zombies cannot die from this, so you will earn enough XP to become legendary within a few minutes.&lt;br /&gt;
&lt;br /&gt;
When your character becomes tired, break off from strangling and walk it off- you become less tired by ambling about aimlessly. If you become too hungry or thirsty to continue, just run away or destroy the zombie, {{k|T}}ravel, and then repeat after moving a square and back.&lt;br /&gt;
&lt;br /&gt;
This can also be done at ruins, but you run the risk of weapon-carrying enemies and especially weaponmaster quest-zombies. In an undead ruin, there are also far, far more monsters in the area compared to hunting down a pack of undead animals.&lt;br /&gt;
&lt;br /&gt;
Alternatively, wait until nightfall, and wrestle a sleeping enemy. Sleeping enemies are unconscious, and cannot detect you if you sneak.  The autocombat will cause your adventurer to break limbs, grab and release bits of clothing, and other nonlethal attacks. Occasionally random chance will cause a chokehold; simply step back a tile and then resume. In this manner, you can train wrestling extremely quickly without the dangers of wandering in an undead zone.&lt;br /&gt;
&lt;br /&gt;
Yet another alternative is presented by fish.  No harmful wrestling moves can be performed on them so cornering a carp, tigerfish, or milkfish will raise wrestling quickly, while training swimming.  Avoid hippopotamus infested waters.&lt;br /&gt;
&lt;br /&gt;
A final option presents itself when exploring caves, there are many weak enemies to be found here, choose one (say a ratman) and walk up to it, grabbing it perform a takedown. Before it can stand up grab its arm and try to break it, as soon as it gets up perform another takedown, continue to break all the joints in both of your &amp;lt;s&amp;gt;toy's&amp;lt;/s&amp;gt; &amp;lt;s&amp;gt;victim's&amp;lt;/s&amp;gt; opponent's arms and then move on to legs, finaly gouge out its eyes and begin strangling it to death. This gives you plenty of wrestling exp with very little risk as the enemy will only get in one or two strikes before being taken down after which it will prioritise standing back up.&lt;br /&gt;
&lt;br /&gt;
==== Swimming ====&lt;br /&gt;
Having no swimming skill in Adventure Mode is not a particularly good thing if you intend to go near water. Anyone with no swimming skill who falls or is pulled/pushed into water will begin to drown immediately if it is over 4/7 deep, and will also be unable to climb out of water this deep - usually resulting in instant death.&lt;br /&gt;
&lt;br /&gt;
To voluntarily jump into a pond or [[river]] you have to {{k|Alt}}-move off the edge of the land. This will present you with a choice of walking out into the open space above the water (immediately and unsurprisingly followed by a one-story fall) or moving directly into the water. To get back out, {{k|Alt}}-move into the riverbank/pond edge.&lt;br /&gt;
&lt;br /&gt;
As long as you have at least some Swimming skill, you will be able to move around in deeper water and will gain Swimming skill for every tile you move. Without Swimming, you will have to find depth 4 water to voluntarily paddle about in with your water wings on for your first skill points. Any deeper and you'll start to drown, any shallower and you can't swim in it. Hit {{k|m}} to set your swimming options.&lt;br /&gt;
&lt;br /&gt;
Another option is to find a body of water with a ramp into it. Walk down the ramp into the water, which will cause you to start &amp;quot;drowning&amp;quot;. However, you can simply walk back out after 10 turns or so to stop drowning, and you will have gained some swimming skill. Repeat until you reach novice skill. If you don't have an abandoned fortress set up for this, slopes into water can be found at ocean beaches.&lt;br /&gt;
&lt;br /&gt;
All in all this makes Novice Swimming an excellent starting skill, as you can (eventually) get Legendary skill simply by swimming back and forth in two squares of water and get lots of stat points in the process. However, this is mind-numbingly dull so good luck with that.  One should also keep in mind that water in cooler areas may suddenly freeze when the sun starts to go down, and thus instantly kill any creatures within.  As such, it's a good idea to do your training laps somewhere warm.&lt;br /&gt;
&lt;br /&gt;
It also seems that you are not able to move out of water of less than (7/7) onto the river bank. In addition, while you are swimming, you can not move to the travel map! You must first leave the water.&lt;br /&gt;
&lt;br /&gt;
You can crosstrain Ambushing while Swimming to save time- if you start with no Ambushing and Novice Swimming, you will be an Accomplished or Expert Ambusher, give or take, by the time you are a Legendary Swimmer. For more on Ambushing, see below.&lt;br /&gt;
&lt;br /&gt;
==== Ambushing ====&lt;br /&gt;
The Ambusher skill is the parent to the {{k|S}}neak ability, which makes you character move more slowly and stealthily to avoid being noticed. Sneak cannot be activated if an enemy can currently see you, but you can use it immediately if you break line of sight somehow. Sneaking around will increase your Ambusher skill even if nobody is around to see you.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the best way to train Ambushing is to start sneaking and just hold a direction to run, until you've run 18,000 squares (assuming you started with no skill). This takes a long time, so you may wish to train sneaking just by sneaking whenever possible while playing the game normally in order to avoid boredom.&lt;br /&gt;
&lt;br /&gt;
Sneaking is particularly useful for avoiding ranged attacks, as even Novice skill allows you to get within four or five squares of an enemy before they spot you reliably. It is relatively easy at normal levels of skill to stand anywhere but right next to an enemy and not be spotted for a long time, if ever. However, standing next to sombody without them spotting you is difficult even with legendary skill. However, even if they spot you moving next to them they will only get one shot at you which is a lot better than the hundreds they would have had if you'd been blundering around in the dark too far away to even see them when they opened fire.&lt;br /&gt;
&lt;br /&gt;
If you are far faster than the enemy you can sometimes swoop in, attack, and back off to 1-square distance where you are less visible. Sometimes they will spot you, but other times you can literally slice off the opponent's leg and retreat to a safe distance. This may occur because enemies can only make checks to see if you are sneaking during their own turns, and a very fast (2000+ speed) player can run in, stab them, and retreat to a safe distance before their turn comes up.&lt;br /&gt;
&lt;br /&gt;
The skill also has a valuable part to play in the noble art of running away. As long as you can get out of sight of all the enemies after you at once - such as around a corner indoors, or ducking behind a tree outside - you can start sneaking and head off in another direction. If your skill is too low however the enemies might be close enough to see you as soon as you try to sneak off.&lt;br /&gt;
&lt;br /&gt;
The most useful part of sneaking is undoubtedly the 'stealth throw'. While firing a missile weapon or attacking in melee will get you noticed immediately, throwing things at people will not. Stock up on dead enemies' weapons, clothing and severed body parts and you can pretend you're some gruesome comedy version of Sam Fisher. You know you want to.&lt;br /&gt;
&lt;br /&gt;
==== Armor and Shield Use ====&lt;br /&gt;
&lt;br /&gt;
Armor User lets you wear heavy armor without slowing down, and might control the passive block rate of armor - a very useful skill, if true, because it controls how often your shiny full plate suit will actually work. &lt;br /&gt;
&lt;br /&gt;
Shield User helps the block roll you make when you are attacked. A Legendary Shield User is far, far more capable of taking on enemies, especially projectile-based weaponmasters whose bolts and arrows are blockable with a shield to a far greater degree than with one's torso, so it is worthwhile to train these two skills.&lt;br /&gt;
&lt;br /&gt;
Normally, you gain 10 Shield User XP per time you block an attack with a shield, and 2 Armor User XP per time you are attacked while wearing armor. This means that to gain the 18,000 XP necessary for legendary, you must block 1800 strikes, and be attacked at least 9000 times. Naturally, this could take some time- time in which a low-skill adventurer may die from attacks by worthy opponents.&lt;br /&gt;
&lt;br /&gt;
However, a useful shortcut exists- if you find a small zombie herbavore to strangle in the above wrestling training method, you can also (if it is a small and non-dangerous animal such as a zombie [[groundhog]]) {{k|s}}it down next to it (to minimize your own speed and thus get attacked more often) and hold {{k|5}} to sit down next to the animal and block its attacks over and over. This is still slow, but leagues faster than waiting to train while fighting- it also means that you are probably not in any danger assuming you picked a sufficiently pathetic type of animal.&lt;br /&gt;
&lt;br /&gt;
Warnings- Make sure that you have your {{k|c}}ombat preference set to Close Combat, otherwise you may counterstrike and kill the zombie. This way, you will wrestle it during a counterstrike instead of doing something that may actually hurt it such as counterstriking with your weapon.&lt;br /&gt;
&lt;br /&gt;
It is probably also preferable to start with a modicum of skill in Armor and Shield using to make sure you don't accidentally get instakilled or crippled and are good at blocking with your shield to gain XP fast. You'll also want to have non-crappy armor and a good shield or two (dual wielding shields may increase your ability to block) to maximize your ability to block and to make sure you are taking as little as possible damage, if any at all, during training.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
*Recruit some living spear-catchers&lt;br /&gt;
*Avoid flying arrows&lt;br /&gt;
*Throw rocks/statues/socks/bugs/sand at enemies that still haven't reached you&lt;br /&gt;
*Train your stats before taking on your first quest-monster&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
[[Category:Adventurer mode]]&lt;/div&gt;</summary>
		<author><name>Mortal</name></author>
	</entry>
</feed>