Expanded autotile reference

I'm posting this here as a point of reference for anyone working with Map Data and are scratching their heads over the autotile ids. I know I was.

If we look in the core scripts we can infer that the first autotile, for whatever reason, begins at id 2048. There are 48 tile variations to an autotile. So the ID numbers count up from there.
Knowing this, we can reduces any autotile variation down to a number 0-47
by taking (*Tile ID* - 2048) / 48.

Ok, but what tile variation is what? Luckly, I remembered RMXP included an Expanded Autotile selection window, and I had a good hunch that MZ is still using the same arrangement. Because of course they are.
So this is what it looks like:
[img]https://i.imgur.com/BgmEX1l.png[/img]

With this knowledge, it was a lot easier to formulate conditional statements regarding specific tile edges. For instance, I wanted the Bush Flag to ignore the bottom edge of water autotile.
The could also be applied to exempt floor damage tile too. Such as the purple water that would damage the character just for touching the tile, but in someplace their feet aren't actually in the water.

[img]https://i.imgur.com/DbigPiI.png[/img]
Useful knowledge, but it seems a bit more appropriate in Learning Javascript in my opinion since it's about understanding the data structure of $mapData.

I've moved this thread to Learning Javascript. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/expanded-autotile-reference.147608/