question

10 views
Skip to first unread message

Kawika Heftel

unread,
Jan 12, 2015, 9:27:30 PM1/12/15
to mape...@googlegroups.com
Is there a way to find out which tileset a tile from the map view comes from?  Currently you can see the tile's local id from its tileset, but you can't tell which tileset it comes from.  Unless of course I'm missing something ;).

Use case scenario: I'm consolidating two tilesheets together into one, and want to convert a map I've already drawn with the smaller tilesets to use only the new, consolidated tileset instead. The tiles are visually identical, so I can't tell them apart by looking at them.

Thanks for such an awesome tool! :)

-Kawika

Thorbjørn Lindeijer

unread,
Jan 15, 2015, 4:49:31 PM1/15/15
to mape...@googlegroups.com
Hey Kawika,
 
Unfortunately there isn't currently, though it is something that has been requested before (but I could not find an issue on the tracker about this with a quick search). I think it would make sense to highlight a grabbed tile in the tileset view, though this may also be a little disturbing so I think it would need to be an option that can be toggled off.
 
Btw, I remember The Mana World was in a similar situation, and what they did was to give the previous tilesets a shade of red so that they were easily recognizable as belonging to the old tileset but could still be visually matched with tiles in the new tileset.
 
Alternatively, this is of course something you could write a tool for, since a tool would be able to find perfect matches and do all replacements automatically. It is something I've considered integrating into Tiled but unfortunately it's one of those "yeah would be nice" features that I may never get around to.
 
Regards,
Bjørn

Kawika Heftel

unread,
Jan 16, 2015, 1:55:35 PM1/16/15
to mape...@googlegroups.com
Hey Bjorn,

thanks for your reply! It's always nice to be able to chat with a maintainer :).

Another related tool would be a tool to replace all instances of a particular tile with a different tile.  I'm assuming that doesn't exist either.

Going back to the originla question, maybe this is something that could be added to the info bar along with the tile's (local) id, and maybe gid?

I would be willing to look into writing this myself, I am an experienced programmer (C/C++/AS3/PHP/web stuff, SVN), but have no experience with Qt or Git.

Where would be the best place to get started if I wanted to add the info to the status bar myself?

Thorbjørn Lindeijer

unread,
Jan 16, 2015, 2:18:21 PM1/16/15
to mape...@googlegroups.com
On Fri, Jan 16, 2015, at 19:55, Kawika Heftel wrote:
Hey Bjorn,
 
thanks for your reply! It's always nice to be able to chat with a maintainer :).
 
:-)
 
Another related tool would be a tool to replace all instances of a particular tile with a different tile.  I'm assuming that doesn't exist either.
 
Yeah, doesn't exist yet unfortunately.
 
Going back to the originla question, maybe this is something that could be added to the info bar along with the tile's (local) id, and maybe gid?
 
The problem I have with this is that the "gid" does not really mean anything and is subject to change depending on the order and size of the tilesets. It is only derived while saving the map and used to resolve tile references while loading the map, but outside of the various map formats the tiles do not have a "gid". So what use exactly would be the showing of the gid?
 
I would be willing to look into writing this myself, I am an experienced programmer (C/C++/AS3/PHP/web stuff, SVN), but have no experience with Qt or Git.
 
Where would be the best place to get started if I wanted to add the info to the status bar myself?
 
You're welcome to contribute of course! First of all, do you already have Qt installed, Tiled repository cloned and did you run Tiled from Qt Creator? That'd be a good start at least.
 
Regards,
Bjørn

Petr Viktorin

unread,
Jan 16, 2015, 7:22:39 PM1/16/15
to mape...@googlegroups.com
On Fri, Jan 16, 2015 at 8:18 PM, Thorbjørn Lindeijer
<thor...@lindeijer.nl> wrote:
...
> Another related tool would be a tool to replace all instances of a
> particular tile with a different tile. I'm assuming that doesn't exist
> either.
>
>
> Yeah, doesn't exist yet unfortunately.

Actually, I made such a tool a while back. It got a bit stale but I
updated it for Tiled 0.11 today.
Only works if you're not afraid of Python tough, as it's a Python
library: http://pytmxlib.readthedocs.org/en/v0.2.1/

On a Linux machine you'd install it like this:
pip install --user tmxlib
Otherwise search how to install a Python library on your platform, or
mail me off-list if you're not successful.

Then run the attached script:
python convert-map.py

The script uses GID, which I think is fine for simple one-time use,
but you could modify it to look up based on tileset name & number, for
example.
Hope it works for you.
convert-map.py

Kawika Heftel

unread,
Jan 20, 2015, 3:10:36 PM1/20/15
to mape...@googlegroups.com
As a side note, does it matter whether I use OSX or windows to develop?

Thanks,

Kawika Heftel
Heftel Studios
801-358-9830
http://www.heftelstudios.com

On Fri, Jan 16, 2015 at 12:24 PM, Kawika Heftel <kaw...@heftelstudios.com> wrote:
In my case, showing the gid would allow me to distinguish between visually-identical tiles from different tilesets.  i'm smart enough to know that gids are dependent on tileset ordering in the map, and to calculate which tileset it comes from.  I also use gids in my game to identify tiles instead of local ids since a.) I make sure that each map uses the tilesheets in the same order or the gids will be different and b.) gids are what are stored in the map format.  It would be super useful to be able to know the gid from the tiled application rather than having to calculate it manually in order to insert it into my code :P.  I understand if you still don't want to display the gid, but it would be useful to be able to figure out what number is going in the file without having to actually look at the file in a text editor.

Thanks,

Kawika Heftel
Heftel Studios
801-358-9830
http://www.heftelstudios.com

--
--
Tiled Map Editor mailing list
mape...@googlegroups.com
http://groups.google.com/group/mapeditor

---
You received this message because you are subscribed to a topic in the Google Groups "Tiled Map Editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapeditor/HngjgE5mhY8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapeditor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Kawika Heftel

unread,
Jan 20, 2015, 3:10:36 PM1/20/15
to mape...@googlegroups.com
In my case, showing the gid would allow me to distinguish between visually-identical tiles from different tilesets.  i'm smart enough to know that gids are dependent on tileset ordering in the map, and to calculate which tileset it comes from.  I also use gids in my game to identify tiles instead of local ids since a.) I make sure that each map uses the tilesheets in the same order or the gids will be different and b.) gids are what are stored in the map format.  It would be super useful to be able to know the gid from the tiled application rather than having to calculate it manually in order to insert it into my code :P.  I understand if you still don't want to display the gid, but it would be useful to be able to figure out what number is going in the file without having to actually look at the file in a text editor.

Thanks,

Kawika Heftel
Heftel Studios
801-358-9830
http://www.heftelstudios.com

On Fri, Jan 16, 2015 at 12:18 PM, Thorbjørn Lindeijer <thor...@lindeijer.nl> wrote:

--

Thorbjørn Lindeijer

unread,
Jan 20, 2015, 3:20:13 PM1/20/15
to mape...@googlegroups.com
On Fri, Jan 16, 2015, at 20:24, Kawika Heftel wrote:
As a side note, does it matter whether I use OSX or windows to develop?
 
Well, there are a lot more known OS X specific bugs than Windows specific bugs, but if none of those bother you then there should be no difference apart from personal preference.
 
 
On Fri, Jan 16, 2015 at 12:24 PM, Kawika Heftel <kaw...@heftelstudios.com> wrote:
In my case, showing the gid would allow me to distinguish between visually-identical tiles from different tilesets.  i'm smart enough to know that gids are dependent on tileset ordering in the map, and to calculate which tileset it comes from.  I also use gids in my game to identify tiles instead of local ids since a.) I make sure that each map uses the tilesheets in the same order or the gids will be different and b.) gids are what are stored in the map format.  It would be super useful to be able to know the gid from the tiled application rather than having to calculate it manually in order to insert it into my code :P.  I understand if you still don't want to display the gid, but it would be useful to be able to figure out what number is going in the file without having to actually look at the file in a text editor.
 
I still don't really want to show them because it is just a saving mechanism, so I think we should find alternative ways to highlight for example all tiles from a tileset or an automated way to search and replace duplicates. Comparing gids while hovering tiles can hardly be called effective, right?
 
Best regards,
Bjørn
 

Michael Neel

unread,
Jan 20, 2015, 3:40:54 PM1/20/15
to mape...@googlegroups.com
Can you alter the tile sheets for the merge?

If I understand the issue, you are combining multiple tile sheets - something I do often as well as a project grows.  I load the old tile sheet and put a red circle in the middle of all tiles, and on the other put a blue circle.  Then I can just look for red circles and replace those tiles with the same tile in the new sheet.  Tiled is really good about reloading a tile sheet that has changed, so I don't even close Tiled while doing this.

Now this could also be a method if this were a feature - "tint" all tiles from a sheet (I often make the circles 50% or less opaque), which would make it easy to spot image from the wrong sheet.

Mike

--
You received this message because you are subscribed to the Google Groups "Tiled Map Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapeditor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Michael C. Neel (@ViNull)
http://www.ViNull.com
Reply all
Reply to author
Forward
0 new messages