Question on maps' XML semantics

Hi there,

I have been playing around with the map editor for some minutes and watched the XML output. I think I'm grasping what happens there, but I'm still puzzled by the TileData element. Maybe someone can help me out there?

For instance, I would have something like this:

    <TileData>2665,1,0,0.000000,0,6</TileData>
    <TileData>2,5,0,0.000000,0,10</TileData>
    <TileData>78,1,0,0.000000,0,6</TileData> <!-- etc. -->

What I have gathered so far:

  • the first value is the number of tiles affected; counting happens in a "rows" first, "columns" second manner (if one would see a map as a table)
    for instance, my tiny map is 80 tiles wide, 64 tiles high; the first line would make the first 33 rows and 25 tiles of the 34th row water in my example above. Then there's two more tiles of another type, then 78 water tiles again.
  • the last value is the type as determined by the TerrainTypeInfo

Now I'm still riddling about the other values. I presume the floating-point one (the fourth one, that is) has to do with a tile's ground height. No clue about the others yet. Any ideas?

3,495 views 2 replies
Reply #1 Top

Last Value is not only TerrainTypeInfo, it's limited from [0,10], not using the last [11,17] values.

I've been looking at "seed-tiny-single-072110" and the first TileData Elements are:

 

<TileData>91,1,0,0.000000,0,6</TileData>
  <TileData>1,1,1,0.000000,0,6</TileData>
  <TileData>1,2,1,160.000000,0,7</TileData>
  <TileData>1,1,1,0.000000,0,6</TileData>
  <TileData>77,1,0,0.000000,0,6</TileData>
  <TileData>2,1,1,0.000000,0,6</TileData>
Edit:
I think i got it? Looking at the "seed-tiny-single-072110" map and using your counting method, the 3rd value at 1 is "Fallen environment" and 0 is "Baren environment"

 

Reply #2 Top

I doubt the float is an absolute "from sea level to highest point" height. Maybe something incremental for the engine to render later. Tiles that are counted as "submerged" are rendered as part of mountain ranges because adjacent squares are tall enough.