Quick way to do auto-mapping?


I’m using auto-mapping for a 2D platformer, currently every time I use a different tileset, I have to redraw the auto-mapping rule by hand. Is there a faster way of doing this?

This is the rule, for context:

Thank you

What do you mean by using a different tileset in this case?

If you mean that literally, and the tilesets are compatible (i.e. laid out the same), you should be able to just make copies of your rules, replace the tileset, and use the new rules without redrawing anything. Or, you could use one set of rules, build all your rooms using one tileset, and then swap tilesets later.

If the layouts are predictable but the tilesets can’t just be swapped out (e.g. if they’re all part of the same physical tileset, just in different parts of it), you could write a script to generate these rules.

If the tilesets are all laid out differently, then there isn’t really a way to automate it. You should be able to copy your existing rules and replace the tiles in them though, so it at least saves some work.

1 Like

Hi thanks for your suggestions!

The tilesets are laid out the same, so swapping tilesets seems like a good solution (I didn’t realise you could do this)

Thanks again, all the best :slight_smile:

I don’t think you can swap them out “officially” (within Tiled), but if you edit the tileset reference in the map file in a text editor, it works just fine. You don’t even have to close the map in Tiled, the program will offer to reload it for you when the map file changes externally.

I think I’ve managed to get it working by editing the tileset in Tiled then changing the image reference here:

I had a little look at the map file after changing it and I’m prettty sure it does the same thing as what you’re saying

This method is different - it replaces the image, which is fine if you only want to have the maps look different in the editor temporarily, and are alright with all the maps using this tileset using these tiles. Changing the tileset reference allows you to actually assign different tilesets to different maps and have them all coexist simultaneously, which is more useful if you need this for a game or otherwise permanently.

1 Like

You couldn’t up until Tiled 1.3, but since Tiled 1.4 there is a “Replace Tileset” button in the tool bar below the tileset view, which can be used for this purpose.

Based on the screenshot above it seems @SnoopoDuck would need to update his version of Tiled to see this new action.


Oh man I thought I already had updated, the “Replace Tileset” button works perfectly, thank you for all the help!

1 Like