What is the most up to date version of Tiled that can save maps as a .txt file?

I need to save maps as a .txt document but the newest version of Tiled doesnt allow that. I know you can save it as .csv but that wont work the same as what I need (I dont think) (I need to pull the collisions from a specific layer then copy it into a seperate file.)

The version im currently using is 0.14.2 and it is missing a ton of features ive grown fond of. If anyone knows the last version this feature was available in, please let me know!

Nevermind, after tinkering around in the newest version, i see that you can manually save the map as a .txt and ignore the warning.

You mean, you want a file with a .txt extension but the contents of the file should be the XML-based TMX format? Why is that?

I need the:

0 0 0 0 1 1 1 0 0 0
0 0 0 1 1 1 1 1 1 1
0 0 1 1 0 0 1 1 1 1

From a specific layer (collisions).

In version 0.14.2 I can simply save as a flare map and if the collisions tilset is the first one, this will work for what I need. I’m very accustomed to version 1 of tiled but it cannot save as a flare map. I tried to manually save a map with .txt extension and it somewhat works. Only issue is the tilesets go in alphabetical order so instead of 1 I get 5335. My workaround is to use notepad++ to find and replace all of 5335 with 1.

Ah, since Tiled 0.15 you need to explicitly enable the Flare plugin. All plugins that were specific to certain engines are disabled by default since that version, mostly to avoid confusion.

However, for your purposes it looks like the CSV export should do what you want so I would recommend trying that first before enabling the Flare plugin.

1 Like

I did try the .csv and it kinda works. Only issue is the very first tile in the set is -1 and not 0. therefore all my 0s are -1s and all my 1’s are 0’s. I am not in a position to edit the tileset to account for this.

I did not know there could be a plugin for the flare map, thank you!

The first tile in the tileset is actually 0. -1 is used for empty cells.

This is different from the other formats, where 0 is the empty cell and 1 is used for the first tile in the tileset.

So i can save as a .txt file now, but Im running into the issue where its not using 0,1,2,3 etc and its using 800,801,802,803 etc. In previous versions of tiled, this meant i needed to move the tileset im using for collisions to be the first in the list. I renamed the tileset so it had a 1 in front of it so it can be first alphabetically but its still not working. I have to use notepad++ to find and replace all of 801 with 1, 802 with 2, 803 with 3, etc. Anything i can do to fix this?

Generally this happens because Tiled encodes the tile id as first-tileset-id + local-tile-id (plus some bit flipping if you use tile rotation, etc…). So whenever you use multiple tilesets you get this.

The real fix here would probably be to alter your map loading code to handle this for you. But if you are on that I would recommend you to look either into parsers which can handle full tmx maps (there are plenty of libraries available at http://doc.mapeditor.org/en/latest/reference/support-for-tmx-maps/. If this is too much work for you, please try the CSV export (you will have to deal with the id recalculation here too).

Actually when using the CSV export he’d only have to deal with the fact that 0 is the first tile and -1 an empty cell. There is no “first gid” system used by the CSV export (it currently doesn’t really support multiple tilesets, unless each layer uses its own tileset and this can be externally derived).