I’m having a weird problem with Tiled. I’m currently using it to build some simple tilemaps that I need as CSV files. In fact, I only need the CSV part, so I manually rip out the CSV values from the TMX file. However, the exported CSV values seem to be offset by one when compared to the values show inside the editor. For example: a tile with ID 17 inside the editor is saved as ID 18 in the CSV table of the TMX file.
It’s probably a simple configuration error, but for the life of me I can’t find it anywhere? Any ideas?
Please read the section of the file format definition carefully. It explains why there is an offset. (In short: the offset is the firstgid of the tileset you used. If you only have one tileset it is +1 everywhere. But with more tilesets you can get higher numbers.
Also: If you only need the CSV part. You might want to check out the new CSV export format in tiled 0.11.0! Then you can save yourself from ripping the csv part out always
Yep It would need to subtract the firstgid of the tileset which has the highest firstgid lower or equal than the actual tile id (the tile belongs to the tileset with that firstgid then).