Json export of tmx - wrong (offset?) id in chunks array

Hello,

I added a second tile set to my map, and in the exported json, I get values like 32769 instead of 1 for my tiles ids

that number comes from nowhere, I use 128x128 tiles set, so 32769 is not even a multiple of these

it’s probably an offset id or something, but it would be nice to have the offset in the exported json file for refrerence, it really seems like a Tiled internal value so it should rather be trimed to 1

I did that in my import and indeed it does the trick but it is a workaround and I am afraid I would have to adjust that offset everytime I add another tileset or if Tiled gets updated

regards

found it :slight_smile:

 "tilesets":[
        {
         "firstgid":1,
         "source":"..\/..\/..\/graphics_sources\/tiles.tsx"
        }, 
        {
         "firstgid":16385,
         "source":"..\/..\/..\/graphics_sources\/props.tsx"
        }, 
        {
         "firstgid":32769,
         "source":"..\/..\/..\/graphics_sources\/physics.tsx"
        }],
1 Like

Yeah, this is not a hardcoded offset but it’s based on the number of tiles in each tileset. This is documented on the TMX Map Format page, but a link to this is missing from the JSON Format page, which in general is lacking some information (#925) and needs some corrections (#1924).