Is there a way I can Find and Replace a tile?

(Dylan9) #1

Just like the Find and Find+Replace tool in text editors

This would be immensly useful. Apologies if this has been asked. I did some searching and didn’t find it.

(Erik Schilling) #2


unfortunatly there is no such tool there at the moment.

Sometimes it can be solved with the magic tool + fill tool, but that is
only for continuous areas. Otherwise you could temporarily switch your
tile layer format to CSV and then open the map in a text editor and use
search and replace on the ids there (Just note that flipping/rotating
does bit magic, so you might need to take that into account too if you
do that).


(Thorbjørn Lindeijer) #3

Well actually there is now also a Select Same Tile tool, which would be more suitable for this purpose. After selecting all the same tiles, you can replace them by using the fill tool with the Shift modifier (which makes it fill the entire selection). The main downside is that it only works on a single layer at a time, and not for tile objects.

(Erik Schilling) #4

Ah… cool. Did not know that.

(Dylan9) #5

Thank you bjorn! That works! My game has only 3 layers so the downside isn’t bad at all. However, I noticed that in the new version there’s no option to export as Flare (txt) map file? Thats what we use right now.

Do I need to install a plugin or something? I looked over the release notes and couldn’t find anything about txt being removed.

(Thorbjørn Lindeijer) #6

You must have missed the release notes for 0.15, in which is included a section about plugins. The Flare format is specific to the Flare RPG engine. Though you are free to use it, it does not save all information about the map so you have to be careful. Hence this plugin is disabled by default, along with other engine or game-specific formats.

(Dylan9) #7

Yeah I just read all the release note summaries. Didn’t go into detail.

Thanks a lot though. :slight_smile: This works well and it saves a lot of time for us!

(Eric) #8

This is awesome! I wish that there was a way to choose even the flipped/rotated tiles and replace them with flipped/rotated versions of the fill-tile. That would help a lot with iteration.

(Thorbjørn Lindeijer) #9

There is only one action which does something like that now, which is the new “Swap Tiles” action in the context menu of the tileset view when having exactly 2 tiles selected. Though of course, that replaces all tiles A with tile B and all tiles B with tile A. The action is available in the development snapshots.

What I could imagine is to add an option to the “Select Same Tile” and the “Bucket Fill” tools for ignoring the flipping flags. Though at the moment there isn’t a good place in the UI for adding this. It could also be a more global toggle like the “Random Mode” button.

(Eric) #10

And you wouldn’t want to fully ignore. There are times when we update the tile-sheet and tiles get messed up. Say, a corner tile gets moved for some reason. It would be nice to select ALL of the tiles that used to be corner tiles (flipped, rotated, etc) and replace them with the tile that had to be relocated for some reason with all the old flips and rotations. We try not to move things on the tile-sheet, but sometimes it is unavoidable.

(Thorbjørn Lindeijer) #11

Yeah, for this reason the Swap Tiles action was added. Would it work in your case?