-
-
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
Tile Objects with Type attribute already assigned #1248
Comments
Million of upvotes for this feature, the latest Types Editor feature is amazing but without auto assigning of types to objects the process of manual assigning of type after object placing to map is very slow... |
Need this! |
add |
I can totally see the usefulness of this. What I'm not sure about are the details of this change. I could imagine the following:
Does that make sense? Or should, in the case of a type being set on both the object and the tile, the default properties of these types be merged as well? In that case there are three places where default properties for the object could come from (the two types and the tile properties), and I wonder in which order they should override each other. Opinions welcome. |
Just an opinion.
Let me explain why so strict. For example - i have game with 20 levels(maps) using object types set. While editing one of the map, i can accidently start to change custom variables of tile in tile editor window, but it means than i will need to change this vars in all maps. The good practice here is to change custom vars in Object Type Editor thus changing vars of particular object in all maps. So i think this restriction will lead to much better organisation of multi map solutions. |
@todorone Thanks for the feedback! I think you're right that we probably shouldn't make this too complex. The use-case I was seeing is the one where somebody doesn't use the "Type" field at all, but just adds custom properties to his tiles. When doing this, some people expect to see them and be able to override them when having a tile object selected (issue #436). |
Similar request of inheriting the name from the tile posted on the forum. |
I just realized this issue has a duplicate as #432. |
I think I'll have to go with the complex approach with multiple levels of overriding. Example use case:
Here, it would really suck if you could only define stuff like "name", "health" or "weight" at the object instance level. You can't do it at the object type level either, so really it should be done at the tile level. I think this is common for most use-case of tile objects. So I think the model that makes sense is to just add a level of overriding to the custom properties. For any selected tile object:
In the UI, I will use black when the property is set on the currently selected object and gray (disabled color) when it is inherited. In the future, it may be helpful to reserve gray for signaling different values for that property on "other selected objects" and use something else, like italics, for inherited values. Or to display values explicitly set on the currently selected object in bold, like Qt Designer does. On the long term, it probably make sense to re-think the way we do objects and instantiation in Tiled, but in the current version I think the above behavior will work fine. |
This new behavior is now documented on the update page about Custom Properties. |
Loving the new Object Types stuff. For Tile Objects in particular I think it would be useful if we could have the Type attribute assigned to the Tile (maybe through the properties of the Tile?) so that we could drop Tile Objects down in our maps with the "Type" already filled out.
The text was updated successfully, but these errors were encountered: