Use multiple tilesets

I know how to manipulate a tile map and change a tile to another or read a tile value from the tile map. But that only works if I have embedded tilesets in the same map.

How to do it if I dont use “Embed in map” and have external tilesets?

I use libGDX.

Is it possible to have one map file (.tmx) with multiple external tilesets (.tsx)? I don’t want to embed the tilesets in the map (that’s outdated method)…

It’s quite hard to find documentation about how to use multiple external tilesets with one map. Why?

I have fixed the problem myself. This forum is quite dead. Why?

I’m not sure what were asking here. In Tiled, it is obviously possible to add multiple tilesets to map, whether they are embedded or external. Were you asking about libGDX? In that case you should probably ask in the libGDX community instead.

You ask a question and if you don’t get an answer the same day, the forum must be dead?

Btw, I would be really interested to hear how you have fixed your problem!

You know how to find the New Tileset dialogue? It can be found in the File menu and the Tilesets view. Its use is described in the introduction.
Through the Map menu multiple external tilesets can be added using the Add External Tileset menu item.

That have nothing to do with my problem. Please read the thread before you answer. As I already have stated: it was the xml-file that was the problem…

I’m sorry, but I cannot understand your words in any other way. Have you reread your own messages? Are you sure you said what you meant say?

Yes, and if you have read the whole thread you should see that I already solved the problem and the problem was inside the xml-file…

But… how did it get there? That’s what I’m wondering.

Because I used “desert.tmx” that was included in the Tiled software, in the “examples” folder. That example used one tileset only.

And it seems to me like you used a text editor to add a second tileset, correct?

Yes, quite easy way.

So, why didn’t you use Tiled to do that? Using the dialogue I mentioned earlier. That would seem easier.

Yes that´s will work too. But it is a good thing to know how the .xml-code works and I prefer to know everything from the core.

Whatever floats your dingo! :slight_smile:

Sure it is good to also understand the XML format, because some modifications are indeed easier to perform with a text editor than with Tiled! When asking questions about the format you do need to make sure we understand you’re talking about the file and not about how to do it in the editor. This wasn’t clear to me either.

And of course you could also link to multiple external tileset files by modifying the XML directly. When doing so, you only need to make sure not to choose a high enough value for the firstgid property, otherwise the global tile IDs will refer to the wrong tileset. For example:

<map version="1.0" tiledversion="1.1.5" orientation="orthogonal" renderorder="right-down" width="40" height="40" tilewidth="32" tileheight="32" infinite="0" nextlayerid="2" nextobjectid="1">
 <tileset firstgid="1" source="desert.tsx"/>
 <tileset firstgid="50" source="forest.tsx"/>