Page 1 of 1

AMF map vs climates

PostPosted: Wed Mar 26, 2014 4:16 pm
by celludriel
I'm wondering about climate and land id's. The amf spec says that a pixel holds the following information Climate Id and LandType Id both one byte. However in the Climate file there is nowhere an ID to be found.

Code: Select all
   <varlist name="LandTypeList">
      <varlist name="Sand">
         <bool name="Enabled">true</bool>
         <colour name="DisplayCol">230, 230, 120</colour>
         <varlist name="Params">
            <float name="BaseProb">0.300000</float>
            <float name="Water">0.860000</float>
            <bool name="MinAltFlag">false</bool>
            <bool name="MaxAltFlag">false</bool>
         </varlist>
         <varlist name="Noise">
            <varlist name="Gen1">
               <float name="Amp">0.005000</float>
               <float name="Freq">1.000000</float>
               <int name="nOct">1</int>
            </varlist>
            <int name="RandKey">12253</int>
         </varlist>
         <int name="BlendRadius">-1</int>
         <string name="MaterialName">std_sand_yellow</string>
      </varlist>
      <varlist name="Pebbles">
         <bool name="Enabled">true</bool>
         <colour name="DisplayCol">175, 160, 131</colour>
         <varlist name="Params">
            <float name="BaseProb">0.270000</float>
            <float name="Grad">0.200000</float>
            <float name="Water">0.860000</float>
            <bool name="MinAltFlag">false</bool>
            <bool name="MaxAltFlag">false</bool>
         </varlist>
         <int name="BlendRadius">2</int>
         <string name="MaterialName">std_pebbles</string>
      </varlist>


So how can I parse the right climate id or landtype id to compare with in the AMF file ?

Re: AMF map vs climates

PostPosted: Thu Mar 27, 2014 11:27 am
by Aaron
Hi Celludriel,

Good question. The land type ID is determined from the order in which the land types are listed in the climate. The first land type (in your example, "Sand") has a land type ID of 1. Note that a land type ID of 0 is reserved, and should never be found in files.

Best regards,
Aaron.

Re: AMF map vs climates

PostPosted: Thu Mar 27, 2014 2:29 pm
by celludriel
Thanks Aaron,

This will get me going, maybe you could consider putting the id's in the xml as an attribute for further versions. This will give you a bit more flexibility suppose one day you want to mix climates together or something. I'm just thinking out of the palm of my hand here.