Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Map data deciphering [CLOSED]

I'd like to decipher th '0' z-coordinate value of the Map.Data array. It doesn't seems to simply give the Tile ID, but something a little more complex.
Also, if you know why the '1' z-coordinate seems to always be 0, don't hesitate...
The '2' z-ccordinate was way too easy :smile:

For those who ask, the idea is to dynamically alter the map via the $game_map.data array.
 
If by 'z-coordinate', you mean the 3rd 0 in: $game_map.data[0,0,0]
it should return an integer representing the tile_id of the tile on layer 1.

So the '1' z-coordinate, $game_map.data[0,0,1] should return the tile_id on layer 2
If you don't have anything on layer 2, it should return 0
 
Errr... What I forget to say is that I am using VX.

On the '0', I got 2816 for the first grass tile. I don't think this is just the tile ID. Must be something else combined with it.

Also, th '1' always returns 0, even when I got something in the '2'.... like if there is only the 1st and 3rd layers...
 

EOG

Member

Fustel":tf0bauxg said:
Errr... What I forget to say is that I am using VX.

On the '0', I got 2816 for the first grass tile. I don't think this is just the tile ID. Must be something else combined with it.

Also, th '1' always returns 0, even when I got something in the '2'.... like if there is only the 1st and 3rd layers...

Yes it is [x, y, layer] the editor uses only 0 and 2 layer but you can edit 1 layer by code.
I think there are 3 layers in 'cause XP uses 3 layers and tilemap in VX is bares on XP's.
 
Layer 0 gets the base tile (almost everything on TileSetA)
Layer 1 gets things that go just on top of base tiles, like deep water, tall grass, and fences. This layer is also used for auto shadows
Layer 2 gets everything else, the TileSetB-E tiles
 
OK. Thanks for the info on the layer 1.
Now the question is : how to decipher the value found in layer 0. Because, for same tile (1st grass tile on A2), i respectively got a 2810, 2840, 2862, etc... Seems to depend on the surrouding tiles.
What I'd want is to be sure to write the correct number in the 0 Layer. I'll do some more research on my own; but if you got more infos....
 
Is the grass tile an Autotile? If so, it should have 48 possible values (in XP). It looks by your numbers that VX has more cells per autotile. Maybe because they can autotile with more than one base tile?
In VX, can you double-click on an autotile & see all of it's possible tiles?
 
No double-click on VX :cry:
And I think I'll abandon the idea of dynamicaly modify the base layer, because changing a tile is also changing the way the surrouding ones look; and THIS may be a little complicated. Changing the decorative layer will be enought.
Also not sure I'll continue with VX. XP may be less versatile... Just have to reintroduce some of VX features :toot:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top