RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
(VX) Map data

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 82
So I'm playing around with an idea and I'm a little unsure what exactly these numbers mean that are churned out from the code below (from the @map.data that's held in $game_map).

I have this code set up to nosy into the map data for the current map:

Code: [Select]
d = $game_map.data
for x in 0..d.xsize
  for y in 0..d.ysize
    for z in 0..d.zsize
      p d[x, y, z]
    end
  end
end

I'm intrigued by the contents of the element of the array referenced by [x, y, z]. On the map that I'm calling this code on, I get a 1536, followed by 2 zero values and a nil value.

I'm hoping that someone can give me some clue as to what these all mean, and in the case of the numbers, how they're used to get what the tile actually is.

I know both Modern and Cozzie have played with these numbers as I'm using those to get an idea of what's going on, but having spent all day reading a lot of maths on graphical projection and other related things like algorithms, my brain's a little cooked as it is and I'm going a little code blind looking at it.

Any clue/pointers would definitely be appreciated.

Thanks in advance.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
If I recall correctly, it's supposed to be the Tile ID on the layer at X and Y.

As for how they get the tile from those large ID's, that is one messy math problem... Dervvulfman made a script which allow you to set terrain tags to specific tiles, even auto tiles which means that he might have figured out the exact math for it, sadly he encrypted the project which had the script.
« Last Edit: February 06, 2012, 06:51:27 AM by TDS »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Yeah, VX's tile id system is kinda weird. There's a few different types of tiles on different layers. 1536 is the first tile on TileA5. I think 2048 is the first tile on TileA1, and each tile has 48 iterations (for different autotiles). Tall grassIand and deep water like overlay tiles have a Z value of 1. TileB to E objects have a Z value of 2 and start at the tile id 0. I was actually planing to write a guide on this, but then I got kinda lazy, but that's tile id in as much as I could fit on my PSP.

*
Rep:
Level 82
If I recall correctly, it's supposed to be the Tile ID on the layer at X and Y.

As for how they get the tile from those large ID's, that is one messy math problem... Dervvulfman made a script which allow you to set terrain tags to specific tiles, even auto tiles which means that he might have figured out the exact math for it, sadly he encrypted the project which had the script.

That's awfully nice of him. I'll see if I can get anything from him.

Yeah, VX's tile id system is kinda weird. There's a few different types of tiles on different layers. 1536 is the first tile on TileA5. I think 2048 is the first tile on TileA1, and each tile has 48 iterations (for different autotiles). Tall grassIand and deep water like overlay tiles have a Z value of 1. TileB to E objects have a Z value of 2 and start at the tile id 0. I was actually planing to write a guide on this, but then I got kinda lazy, but that's tile id in as much as I could fit on my PSP.

Whilst I'm somewhat happy enough to trust the way it's designed, with a lot of hesitation that's for sure, it would be nice to know what it's doing. It would definitely be nice for the whole of the RGSS to be transparent. I get that you might not want people fiddling with key stuff, but a scripter could do a lot more, a lot easier, if you could see what was going on properly.

For now I'll keep looking through your Tilemap to Bitmap script. More comments would have been nicer, though :P

Thanks for the responses, guys. And if you do feel like writing up even a bit of a guide, Cozzie, I'm sure it'll be very useful for a lot of people (if not, then definitely for me).

On a side random: does VXA use the same type of math/strangely assigned numbers to handle tilemaps? It'd be nice to know because I intend to convert over to VXA when I get a proper unlimited version of it.
(Why do I always feel like it's the end of the world and I'm the last man standing?)