Tile Swap

This script restores an old function from RM2k, namely the ability to swap tiles with others within a map. While VX Ace gave us back the tilesets and the option to change them in-game, the tile swap option has not been restored. So here it is: Download!

Of course, the harsh reality is that this script can be complicated to use, while creating a new map with the desired tile changes is much easier. But it was fun to make. DON’T RUIN MY FUN.

Tainted Swamp

This mysterious (?) artifact will purify the swamp!

Clean!

Indeed it is.

Instructions
There are three possible script calls available to use the Tile Swap.

$game_system.add_swap_tile(map_id, old_tile_id, new_tile_id, layer)
Swaps a tile with another.

$game_system.remove_swap_tile(map_id, old_tile_id, layer)
Remove a swap data.

$game_system.clear_list(map_id)
Clears all the swap data for the map.

Glossary
map_id
The ID of the map where the swap takes place.

old_tile_id
The ID of the tile to be removed. To retrieve this data, you can create a copy of the tile on your map, and use Acquire Position Information on it.

new_tile_id
The ID of the tile the old tile will be replaced with. To retrieve this data, you can create a copy of the tile on your map, and use Acquire Position Information on it.

layer
The layer. Rather self-explanatory but note that it starts at 0, not 1.

Final notes
Swapping autotiles, like in the screenshot example, is rather tricky. You need to know the ID of the autotile from all possible angle. To put it into perspective, here’s an excerpt of the event I made.

Holy shit

And it's not even full.

  1. I don’t get it… RPG Maker VX Ace have built-in tilese swap.
    What is the difference between this script and the event command?

  2. oh niceeeeeeeeeeeeeeeeee ❤

  3. Useful for making a passage route indeed. Or blocking passage.

  4. Is it possible for you to make one for rpg maker vx?
    would be great.

  5. GodOfTetris

    Can I change tiles with regions? if not can you make it please :D, will be great

    • Please be more specific.

      • GodOfTetris

        maybe we can put region 1 for the tiles we want to swap and then configurate our event by making the change calling, like: map id, region id(in this case 1), new tile id,layer). Im getting a little frustated because i cant fit the new tiles i want.
        Anyway thanks for your attention and sorry for my bad english.

        • GodOfTetris

          otherwise can you explain me how to set up my event so i can swap my tiles and looks like yours?

          • GodOfTetris

            Never mind, i just figured it out how this scripts and tiles works, congratulations for such a great script, u save my life 😀 i hope you keep working in vxa cause you are great

  6. Anyone have a working link to this?

Leave a comment