How do autotiles actually work? Need lookalikes on map.

So, I am doing something unusual with a map, and I need lookalikes for the walls with different tile properties. I sort of assumed that the autotiles were just a bunch of modular shapes. However, I copied the A4 tiles to a D sheet, and I'm at a loss as to how to "paint" with the tiles. There's a little guy up on the upper left that has borders, and the one with it that has no borders. The corner pieces are easy, but I can't tell how the game is drawing long, straight lines with lines on each side but not the top and bottom.

I can't just clone the A4 tiles and set the passability to 0 because of the way ledge tiles behave.

EDIT: Okay as I have continued to dig, I found this:


So I know how they work now, now I just know how to turn a "bottom" ledge into a walking tile. A4 to A2.

EDIT 2: TIL I can just duplicate the tiles in A2 and change the settings on one set. I still find the "wall" tiles perplexing but I guess it doesn't stand in the way of what I'm doing, so.
Autotiles are handled essentially piecemeal. They have their own behavior, which is why the assets are arranged the way they are, with specific groups and arrangements. Essentially, even though each tile is 48x48 pixels, the engine rarely uses the entire tile as-is. Instead, it grabs sections of it for whatever it's needing to do. Easiest example is the top right of an autotile block (for A2, for this example). It handles what I call "inside corners". You'll almost NEVER see that exact tile pop up in the editor. Instead, the engine usually grabs one quarter of it and slaps it down with pieces of the other tiles in that block when you have the same autotile block used on two sides, but not the corner between those sides.

Not sure if that was coherent or not, I'm terrible at trying to explain visual things with just words.

A4 is for walls, and has similar rules, but slightly different layout, since it handles both tops and sides of walls in two blocks placed together in a vertical arrangement. In the case of drawing a 1 tile-wide vertical wall, it's grabbing roughly a quarter each of the 4 tiles on the "bottom" of the block, and assembling them into a single tile, at least until you get to the ends of the wall.

Bottom line is, even though tiles are stated to be 48x48 pixels in size, the engine generally only uses 24x24 pixel pieces at a time to assemble the tile that actually appears on the map. Sometimes it uses multiple pieces from the same tile, sometimes each piece is from a different tile, depending on the way you paint them on the map.

Basically any tileset used for A follows specific hard-coded rules, with limited ability for the dev to customize their behavior. Theoretically a plugin could modify how they behave in-game, but it wouldn't change how they work in the editor itself.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-autotiles-actually-work-need-lookalikes-on-map.144997/