-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to re-arrange tilesets in tileset window is broken. #1613
Comments
Hmm, this feature was removed because the Tilesets view now displays all loaded external tilesets regardless of which map is selected. Since it no longer reflects just the tilesets used by a single map, I chose to simply order them alphabetically, though that's just for display purposes. The order in which the tilesets appear in the map file should be irrelevant so I'd rather not introduce additional UI for having this option again. How hard would it be for you to use something else than the tileset order to determine when to load each tileset, like a custom tileset property for example? |
Well I'm using a plugin that loads TMX files, and I don't have the source to it. I think the plugin simply reads the tilesets in the order that they are listed in the file, incrementally. There are certain tilesets that I skip loading, and I think this is causing errors that didn't manifest before I installed Tiled 1.0 for some reason. This may be more of an issue on how the plugin I'm using is reading the TMX file, and not necessarily Tiled's fault. Or it could be my own error. I'm gonna play around with it and see if I can find anything. I'll report back if I can figure out what went wrong on my end. Regardless, I do miss the ability to organize my tilesets how I want. But I suppose it is a minor issue, and I can adjust. Keep up the great work! Tiled is such a time saver! |
Just updated from Tiled 0.18 to 1.0.3 and noticed that the feature is missing it was driving me crazy :D another usage I had with this, is that I put a special tileset at index zero, this allows me to handle a special set of tile in my code starting from index zero ... this is very specific tho, and I have a workaround for it as the special tileset is only imported once. |
Thanks for adding another note to this. I definitely agree we need to improve the efficiency of tileset selection, I'm just not sure if manual ordering is still the way to go now that all loaded tilesets are displayed. At least, it would currently be complex to implement since there are both embedded and external tilesets, and the view is not showing tilesets embedded in other loaded maps, since that would lead to a lot of duplicates. Some alternative solutions I could think of:
For this scenario I would say it's preferable to use a custom property to mark your custom tileset rather than its position in the map file. |
This would be a perfect solution, the complete tilesets list could be showed in a checkboxes list, when you can select the visible ones, the arrangement could be done using tabs or within the checkboxes list ... then if a project is used, the checked tilesets list will represent the project tilesets. |
Feature also asked for on the Tiled forum. I've now put it on the roadmap so that it isn't forgotten when I get around to working on project support. |
Replying to questions from here: On the wiki its mentioned in the editing map section that if you are editing a pre-existing map that you can't reorder the tilesets [it suggests adding a Z or something to make sure they load after- but its frustrating that you have to do that] |
@KitteyWolf Hmm, this documentation is rather misleading. When you add a tileset to a map, Tiled always adds it to the end of the list in the map file. There is no way to change the order of any existing tilesets used by the map at all, apart from removing one of them. The Tilesets view will show the tilesets ordered by their name alphabetically, but this is independent of the order in which the tilesets are referenced by the map, so prefixing the name with "z_" seems rather pointless, apart from making it clear that it is an added tileset. |
@bjorn the issue is that whenever i add a new tileset it doesnt add it to the end... it adds it whereever it wants- normally between for example 'paths' and 'untitled' |
@KitteyWolf I think you're confusing the display order of the tilesets with the order in which they are saved in the map file. These are independent. New tilesets are always added to the end of the list of tilesets in the map file, but the tilesets are displayed in alphabetical order in the Tilesets view. Since the latter does not affect the order in the file, the renaming should not be needed and is also not expected to fix anything. |
@bjorn the way i got that error read out in SMAPI was i added a new tileset [which was added BEFORE 'paths' in the viewer. then i did nothing else but SAVE the document, and then i got the unable to load error. So something is wrong with what you're saying.... Because the ONLY way to make it not crash any longer was to append z_ onto the tileset, reopen the map, and then save it with the tilesets having been renamed... |
What bjorn described is correct - if it wasn't, all of my maps would be completely broken in my janky game engine xP Does SMAPI read TMX files, or TBIN files? Perhaps there is an issue with the TBIN exporter sorting tilesets by name. What bjorn said applies to Tiled's own map formats (TMX, TMJ), plugins may behave differently. If it is reading TMX/TMJ files, then it may be an issue with SMAPI - perhaps it sorts the tilesets by name for some reason (this can happen by accident in some languages, e.g. by storing the tilesets in a dictionary by name instead of in an array). |
@eishiya The maps are TBIN in file-type. |
@bjorn I don't think i can be any more clear about how broken this is. |
Edit: I did some tests. Tiled's TBINs have the exact same order as the TMX files - i.e. the order you add the tilesets in. The issue you're experiencing comes from either Stardew Valley or SMAPI, and has nothing to do with Tiled. Tiled is doing what it's supposed to, and behaves exactly as bjorn described. It seems like SV sorts tilesets alphabetically, which is why you need the |
@eishiya its almost like part of the reason why i wanted to bring this to peoples attentions is to bring up the want for reordering your tilesets manually... |
Again, this reordering is happening in SV/SMAPI. Even if the ordering was manual in Tiled, SV would still mess it up by sorting the tilesets alphabetically! SV/SMAPI are the problem here, and the only way around their alphabetical ordering is renaming the tilesets as per their instructions. |
In older versions of Tiled, you were able to re-arrange the tilesets in Tiled's tileset window by click-n-dragging on the the tileset's tab. This also restructured the "firstgid" value in the TMX file, and reorganized the map's data accordingly.
As of 1.0.0 and 1.0.1, this feature no longer works. The only way to re-arrange tilesets now is to delete the tileset, and re-add it at the end of the list. This obviously also breaks your maps, and will remove any tile data on the map.
To verify that this feature did work in past versions, I re-downloaded version 0.18.2 and recorded this GIF:
This feature is vital to me, because my game engine expects certain tilesets to be loaded in a certain order (for example: collision_tileset > level_specific_tilesets > tilesets_only_used_wihle_level_editing)
The text was updated successfully, but these errors were encountered: