Named tiles to auto-name objects?

Currently, if I want to place objects from tiles, I have to either duplicate named objects or I have to manually name them if I place tiles as objects. Is there any way of naming individual tiles that could automatically name objects when tiles are placed as objects?

Currently tiles have no name field, but they do have a “type” field which has a similar purpose, so it may not be a bad idea to add a “name” field as well, which could be inherited by tile objects.

@Keshav_Sharma is currently working on issue #1856 and has mentioned that he is adding a “name” field as part of his change. In his change it is for the purpose of being able to sort tiles by their name in the tileset view, but once introduced it would be used for naming tile objects as well.

On the other hand, this “name” field will by default take the value of the file name in case of an image collection tileset. In effect that would mean tile objects from an image collection tileset will by default have their image file name as their name, showing as the name label (when enabled). Does that strike you as potentially annoying or simply useful?

@bjorn i think useful, i wouldn’t personally have tile names on unless it was for objects, due to the way I’m using Tiled to build maps for importing into another tool. In that tool I need to take the name of the objects and assign it to premade game objects, so having named tiles that could be transferred automatically to object names would save time and ensure I didn’t forget to name an object correctly (if it’s not named, it will be ignored).

Can using “type” for individual tiles currently be used in a similar way?

Yes, you can certainly use “type” for the same purpose. Just note that the type set on tiles is not copied to the tile objects, but inherited by them. This means that is it not written explicitly to the saved file, unless the object overrides it. Normally, while reading you can determine which tile is referred to by the object and then get the type from that tile.

I tried “type”, and while useful, it’s still not quite a substitute for defining a name to a tile and having it automatically name an object if the tile is placed as an object. I think this would make visual object placement in TilEd rock-solid for importing maps without having to double-check the names everywhere.

@bjorn just to reiterate, it would be absolutely perfect if the new name field would mean placed tile objects inherit the name and display it in the editor as if currently typed manually. If this is being planned, this is the only current thing I really need to speed things up with tilemap editing!