# Custom properties to tiles on Tile Layer?

**URL:** <https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069>\
**Category:** Questions\
**Created:** [March 13, 2018, 7:43pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069 "2018-03-13T19:43:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 13, 2018, 7:43pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/1 "2018-03-13T19:43:04Z")

</div>

I have been using Tiled for a while, and now I need to add some custom properties to my tiles added to my Tile Layer.

But it is not possible - the tiles added have the static properties defined in the Tileset.

So I suddently discovered the Objects Layer - and started using that, and here I can add/change properties to a tile from the Tileset

But the editor is kinda wierd, probably as it is not meant to be used for adding/setting/removing tiles as on the Tile Layer.

For example i very often find myself not able to remove a Tile from the Objects Layer again - I rightclick, can see that its selected and choose “Remove” but it stays there.

I use MacOS app.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 13, 2018, 8:45pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/2 "2018-03-13T20:45:20Z")

</div>

> [@TonyFonager](#):
>
> For example i very often find myself not able to remove a Tile from the Objects Layer again - I rightclick, can see that its selected and choose “Remove” but it stays there.

In this case, you’ve probably placed multiple of the same objects on top of each other, which means you’re removing the top-most one, but beneath it you see the next one. On tile layers, each cell can contain a single tile, whereas on object layers you can place any number of objects at the same location.

Depending on your use-case, it may be helpful to use rectangle objects instead of tile objects to annotate your level. You can color them by type (or set a color on the object layer) so you can recognize various purposes.

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 7:02am UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/3 "2018-03-14T07:02:16Z")

</div>

You where absolutely right. Had 13 similar objects stacked on the same time position 😉

Ups!

Cool with objects editor - I have seen where to create the objects and love it, - but how do I insert them on the objects layer ?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 14, 2018, 10:58am UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/4 "2018-03-14T10:58:54Z")

</div>

> [@TonyFonager](#):
>
> Cool with objects editor - I have seen where to create the objects and love it, - but how do I insert them on the objects layer ?

Can you elaborate? Creating objects and inserting them sounds like the same thing, so I don’t understand the question.

---

<div class="post-metadata">

**Author:** ![Ron1987](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ron1987/32/1650_2.png) [@Ron1987](https://discourse.mapeditor.org/u/Ron1987)\
**Post date:** [March 14, 2018, 3:13pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/5 "2018-03-14T15:13:21Z")

</div>

I find that I often create several objects on top of each other. I place the object, then I immediately want to move it and click to select (without changing tools), but it creates a new object and I often don’t notice.

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 4:49pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/6 "2018-03-14T16:49:05Z")

</div>

I have found the window “Object Types Editor” where I can add “object tiles”, set a color and a bunch of properties - it feels like exactly the stuff I need, i do not need graphical tiles and have only used them until now, as it was the only types of tiles I know.

So now I know where to create them.

But where / how do I insert them to my tile map ? And which layer are they inserted into ? Layers or Objects Layer ?

Thanks

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 6:36pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/7 "2018-03-14T18:36:46Z")

</div>

I have figured it out now. When you have selected a Tile in the “Objects Layer” you can go to the properties for that tile and there is a “Type” where you can select / choose the predefined “Object Type”.

I just dont know what the color is used for, though ?

And I can only select the “Type” value, when I already have placed a “standard tile” on the objects layer, correct ?

Interesting …

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 7:12pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/8 "2018-03-14T19:12:47Z")

</div>

Sp what happens if my object tile already has a property called “Name” and I then choose a “Type” which also has the “Name” property defined ?

As I can see it for now, it does not “override” with the properties from the “Type” object selected.

All my Tiles have a Name property (used when debugging the game), so when i then select a Type called “Moveable enemy” I would like it to override the properties already defined on the Tile.

Is that not possible ?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 14, 2018, 7:37pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/9 "2018-03-14T19:37:54Z")

</div>

> [@Ron1987](#):
>
> I find that I often create several objects on top of each other. I place the object, then I immediately want to move it and click to select (without changing tools), but it creates a new object and I often don’t notice.

Right, the object creation tool remains selected to allow easily creating multiple objects, but that means you can’t select objects. If you use a development snapshot rather than Tiled 1.1, then pressing Escape provides a quick way to switch from the object creation tool to the object selection tool. Feel free to suggest additional ways to make this more comfortable.

> [@TonyFonager](#):
>
> I have figured it out now. When you have selected a Tile in the “Objects Layer” you can go to the properties for that tile and there is a “Type” where you can select / choose the predefined “Object Type”.
> 
> I just dont know what the color is used for, though ?

For tile objects the color is only used for the label, which appears if you set a name on the object (and by default only for selected objects). The color is also used when rendering rectangle, ellipse and polygon objects with that type.

> [@TonyFonager](#):
>
> And I can only select the “Type” value, when I already have placed a “standard tile” on the objects layer, correct ?
> 
> Interesting …

Actually for tile objects there is a feature where you can set the type on the tile and it will be inherited by the tile object (though not saved, unless overridden). See [Typed Tiles](http://doc.mapeditor.org/en/latest/manual/custom-properties/#typed-tiles).

> [@TonyFonager](#):
>
> So what happens if my object tile already has a property called “Name” and I then choose a “Type” which also has the “Name” property defined ?

The “name” property only determines what is displayed on the label. It is separate from the “type” property. The name of the type has nothing to do with this name property.

> [@TonyFonager](#):
>
> All my Tiles have a Name property (used when debugging the game), so when i then select a Type called “Moveable enemy” I would like it to override the properties already defined on the Tile.
> 
> Is that not possible ?

You can override the properties already defined on the tile, but I’m not sure exactly what you are asking here. Maybe the [Tile Property Inheritance](http://doc.mapeditor.org/en/latest/manual/custom-properties/#tile-property-inheritance) section in the documentation helps?

---

<div class="post-metadata">

**Author:** ![Ron1987](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ron1987/32/1650_2.png) [@Ron1987](https://discourse.mapeditor.org/u/Ron1987)\
**Post date:** [March 14, 2018, 7:54pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/10 "2018-03-14T19:54:17Z")

</div>

> [@bjorn](#):
>
> Feel free to suggest additional ways to make this more comfortable.

Only thing I can think of is if you try and place an object exactly on top of another, it will switch to the selection tool and select the object instead. But that might be fraught with issues as well.

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 8:24pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/11 "2018-03-14T20:24:28Z")

</div>

Hi Bjørn, thanks for the very detailed answer - I really appreciate it.

It nice that you can use “Typed Tiles” but in my case I first need to apply these “sets of properties” when I have added a tile to the “Objects Layer”.

And right now it works totally as I wished for - but the selection / set tile thing is a bit confusing …

I think the difference, which created the confusion is that when you add tiles on the “Tiles” layer, when you move the pointer around the grid, the current selected tile is visible - so you kinda know if you click, that particular tile will be set - but when you work on the “Objects” layer, even though in “tile mode” you just see the pointer - which is more accepted as a “selection or click” pointer, that a “lets drop a tile here” thing 🙂

Where do I find the latest snapshots ? On the downloads page, the snapshot looks older than the released 1.1.3 version ?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 14, 2018, 9:02pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/12 "2018-03-14T21:02:44Z")

</div>

> [@TonyFonager](#):
>
> I think the difference, which created the confusion is that when you add tiles on the “Tiles” layer, when you move the pointer around the grid, the current selected tile is visible - so you kinda know if you click, that particular tile will be set - but when you work on the “Objects” layer, even though in “tile mode” you just see the pointer - which is more accepted as a “selection or click” pointer, that a “lets drop a tile here” thing 🙂

I agree, and there’s an issue open about improving this. It’s an old one, but I’ll try to get around to it sometime soon. See:

> <https://github.com/mapeditor/tiled/issues/537>
>
> When want to add Image on object-layer, the mouse-pointer not change to "translu…cent-selected-image".
> 
> in tile-layer edit mode, the mouse point will changed to translucent-selected-tile.

> [@TonyFonager](#):
>
> Where do I find the latest snapshots ? On the downloads page, the snapshot looks older than the released 1.1.3 version ?

Even though indeed the Tiled 1.1.3 release is newer than the snapshot from 2018.03.04, the difference is that 1.1.3 is a maintenance release made from the “1.1” branch whereas the snapshots are built from the “master” branch and include the changes made so far that will eventually make it into Tiled 1.2. This includes some improvements to the object-related tools as described in [this development update](https://thorbjorn.itch.io/tiled/devlog/21137/improvements-to-object-tools-and-more).

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 14, 2018, 9:06pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/13 "2018-03-14T21:06:13Z")

</div>

> [@Ron1987](#):
>
> Only thing I can think of is if you try and place an object exactly on top of another, it will switch to the selection tool and select the object instead. But that might be fraught with issues as well.

Yeah, I think this would get a little inconsistent. Probably the issue described by @TonyFonager also applies here, since it would make it clearer when you are in “placement mode”, which would reduce the chance of accidentally putting down more objects. Since I’m making some improvements in this area in Tiled 1.2 already, I’ll add it to the roadmap for this release.

---

<div class="post-metadata">

**Author:** ![Ron1987](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ron1987/32/1650_2.png) [@Ron1987](https://discourse.mapeditor.org/u/Ron1987)\
**Post date:** [March 14, 2018, 9:10pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/14 "2018-03-14T21:10:51Z")

</div>

Yeah, @TonyFonager’s solution (changing the cursor) is much better and would solve my problem.

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 14, 2018, 9:12pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/15 "2018-03-14T21:12:12Z")

</div>

Got the new version downloaded - and yes, “escape” key when working on object layers is much better. Thanks!

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 16, 2018, 11:57am UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/16 "2018-03-16T11:57:36Z")

</div>

So, I now use the “Object Types Editor” to define custom property groups, and when I get the tile from the Object Layers, I can see that it has the “Type = MoveLeft”.

But where in the map do I find the Object “MoveLeft” which I defined inside the “Object Types Editor” ?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 16, 2018, 7:52pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/17 "2018-03-16T19:52:22Z")

</div>

> [@TonyFonager](#):
>
> But where in the map do I find the Object “MoveLeft” which I defined inside the “Object Types Editor” ?

You won’t find a “MoveLeft” object unless you place an object and give it that type in the Properties. It’s just a possible _type of object_ that you define in the Object Types Editor.

If you have a tile that you assigned the “MoveLeft” type to, and place that tile as an object, then when you select this object the custom properties you have defined _for that type_ should be visible in the Properties window.

---

<div class="post-metadata">

**Author:** ![TonyFonager](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tonyfonager/32/1656_2.png) [@TonyFonager](https://discourse.mapeditor.org/u/TonyFonager)\
**Post date:** [March 16, 2018, 10:20pm UTC](https://discourse.mapeditor.org/t/custom-properties-to-tiles-on-tile-layer/3069/18 "2018-03-16T22:20:16Z")

</div>

Sorry, I think I mixed up some definitions.

What I meant was, that I cannot find the properties in the map file - which should be “inherited” from assigning the Object Types selection in the “Type” field.

I see the properties when I am INSIDE your editor - and if I change/override some of the values, they can be found in the map file in the objects collection.

But the values “inherited” from assigned an object type to the “Type” property, is nowhere to be found if left as default.

I have now enhanced my mapload function, to load and deserialize then “ObjectTypes.json” file I manually export, and then assign the “missing” properties to the map, before using it in the game.

So problem solved, for now 😉
