Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BUG: Tilesets (even embeded ones) are being added to other maps! #2002
I'm not entirely sure what this issue is, or if it has been fixed. But I have experienced it on version 1.1.4
Basically if I am editing Map_A with an external Tileset_A, and then open Map_B external Tileset_A will be in the tilesets window of Map_B, even though Map_B wasn't suppose to use Tileset_A.
What makes matters worse is that if I were to save Map_B, it will also add Tileset_A to its .tmx file, even though I never used it to map with.
Since Tiled 1.1, tilesets are added to the map automatically when you first use them on a map, and all loaded external tilesets are available on all maps. This was mainly done for convenience, though I understand it makes it harder to make sure you're not using a particular tileset.
This should really only happen when you have actually used the tileset, though at the moment tilesets are not automatically removed from a map when they are no longer used. So when you accidentally placed a tile from a tileset you didn't intend to use, and then erase that tile again, the tileset is still part of the map. You can remove the tileset from the current map by clicking the small button for this below the tileset view.
I wanted to get rid of the manual management of the tilesets referred to by each map and the order in which they do so, because I considered this a tedious and unnecessary process. Instead, especially once Tiled supports projects, I thought it would be much nicer if the Tilesets view simply provides access to all tilesets in your project so you can use them on your maps at will. But maybe I'm wrong?
Thanks for getting back to me so quickly.
This feature "and all loaded external tilesets are available on all maps" is what I'm reporting. I do not like this functionality. And it breaks things for my workflow; it clutters tileset selector, when we are working on two different maps for example at the same time. Could you please add a config option to disable the "shared tileset" functionality.
Thank you so much for your time!
I realized I streamed this issue occurring and I decided to rewatch my broadcast to see if I did something wrong to cause this issue. After watching I realized that not only did I not have both maps open at the same time, but the tileset in question was embedded, not even external. This made me realize that what is happening is more than what even you intended (at least based on what you described above). And while I wholeheartedly disagree with your desired feature, there is definitely a bug at play here.
Steps Recreating the error:
This is not good! These steps can be followed and it recreates the error each time.
Thank you for reading.
changed the title from
Bug: Tilesets crossing between maps
Tileset Management crossing between maps
Sep 8, 2018
Just wanted to add:
Please see previous post for full details on recreating the error.
I have tested it with Tiled version 1.1.4 and 1.1.6
I just want to add, that I love Tiled. As you know, you have seen my stream. I have been a huge fan of Tiled since it was a Java application. Keep up the great work, and I hope you consider my input on this matter.
I really appreciate your feedback, @phanxgames! Unfortunately I think it's too late to reconsider the general behavior for Tiled 1.2, though of course I will try to reproduce the bug and see if I can fix it.
What I'm unclear about in the steps to reproduce is what change you are making in this step: "Now I open a second map, any map really. Make a small change. Save it.". If the small change means using the current tile stamp on that map, then indeed that will necessarily add the tileset referenced by your tile stamp to the map. But if it's a change that has nothing to do with that tileset, then there must be a bug.
Also, does this bug really only reproduce by starting with a tileset that has a broken image path? Cause that would at least limit exposure to the bug considerably.
Downgrading to Tiled 1.0 should definitely resolve this issue for you. Of course, I will do my best, probably for Tiled 1.3, to get to a workflow that suits you as well. I hope we can keep the automatic adding of tilesets, since it is also simply convenient to capture a brush on one map and use it on another, without first needing to make sure they both reference the needed tileset(s) (in Tiled 1.0, you could do this only using copy/paste, and paste would add those tilesets). But I can definitely see the downsides. Maybe it would help to also automatically remove tileset references (though that's problematic for embedded tilesets, due to possible loss of information), or to provide some way to pin certain tilesets for quickly accessing them. Or some toggle button in the Tilesets view to switch between "all loaded tilesets / tilesets in project" and "tilesets used by current map".
This small change would be doing anything to trigger the .tmx to be able to save. In my tests I took an existing, intended external tileset that was already included in the map and added a tile to the map.
At this time it does appear that to be the case, however, when working with my team this does occur quite often when maps are passed between our computers and the paths different in our environments. I have tried to limit this by ensuring we are always working with a similar directory structure though.
I was thinking about this and I believe this could definitely lead to issues for my workflow. Since we often add tilesets and not use them, well in advance.
If you make anything automatic you really should make it so it's optional. Tiled is a great map editor, in fact, the best map editor in the world, because it is highly versatile, customizable and allows you to use it the way you want to use it. It does this job extremely well. Adding in automatic features makes it become not a general purpose map editor but an editor with a specific vision. Which breaks its versatility, which makes it amazing!
I urge you to consider before making any automatic things to make sure they are optional and you don't force people into it.
This is a great idea and would make it optional and provide the functionality to people who need it. Love it. The idea of a toggle could also work.
Thank you for your reply, considering everything I have to say, and looking into the bug! You the best.
I tried to reproduce the issue without success. Tried to carefully follow the steps twice but no tileset was getting added to the other map. I think we're missing something, so we need to make the steps more concrete. Can you provide an archive with the two map files that are involved? You can upload ZIP files here by dragging them into your comment.
I recreated the bug with the most simplest example of files following the steps.
But here are the files attached:
These steps are the same as the ones above, just written again, hopefully in a bit more clear manner.
It's late now so I'll try your latest instructions again tomorrow, but in the meantime, I realized you've only tested it with the current stable version of Tiled, whereas I have so far been trying to reproduce it with the latest development version. Could you please try if the issue still happens for you with the latest snapshot? It's version 2018.08.22 at https://thorbjorn.itch.io/tiled.
Alright, I found a problem in that previously selected stamps could end up affecting the list of tilesets scheduled to be added during painting, which was caused by the list not getting cleared when it should. I think that should resolve this problem, at least in this particular case.
The only way to get tilesets added should be to actually use those tilesets. So in the steps to reproduce, if you do not select an orange tile but paint with the still selected green tile, then the green tileset will still get added to the second map.
That should at least improve the behavior in Tiled 1.2. For Tiled 1.3 we can look into improving the workflow in general, which I think will come along with support for projects.
Thanks for your help in tracking down this issue!