# Custom tile IDs (Export with custom ids/names/data values for each tile)

**URL:** <https://discourse.mapeditor.org/t/custom-tile-ids-export-with-custom-ids-names-data-values-for-each-tile/767>\
**Category:** Suggestions\
**Created:** [September 19, 2015, 12:04am UTC](https://discourse.mapeditor.org/t/custom-tile-ids-export-with-custom-ids-names-data-values-for-each-tile/767 "2015-09-19T00:04:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![caleblimb](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@caleblimb](https://discourse.mapeditor.org/u/caleblimb)\
**Post date:** [September 19, 2015, 12:04am UTC](https://discourse.mapeditor.org/t/custom-tile-ids-export-with-custom-ids-names-data-values-for-each-tile/767/1 "2015-09-19T00:04:34Z")

</div>

Is there a way to assign custom tile IDs to each tile? If not, this is something that should be added.  
Below is an example of a small map export with the tile array populated with integers corresponding to the tile type, this is the _perfect_ format for the game I’m making, however I would like to be able to assign a particular value to each tile in the editor to determine the ID it will be exported to. The main reason is so I don’t have to rewrite my loader if I re-size my tile-sheet and to make it easier to sort out when I have multiple tile-sets. It would also be nice to make multiple tiles with the same ID so that they export as the same tile.

[header]  
width=16  
height=16  
tilewidth=16  
tileheight=16  
orientation=orthogonal

[tilesets]  
tileset=…/Documents/eclipse workspace/runes-game/Runes/res/graphics/terrain.png,16,16,0,0

[layer]  
type=Tile Layer 1  
data=  
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,  
9,9,9,6,14,7,9,6,14,7,6,14,7,9,9,9,  
9,6,14,15,3,12,9,10,3,12,11,5,8,9,9,9,  
9,11,4,5,13,14,7,10,8,9,9,11,12,9,9,9,  
9,9,9,11,4,5,13,15,8,9,9,9,9,9,9,9,  
9,9,9,9,9,10,31,3,12,9,9,9,6,7,9,9,  
9,6,7,6,14,15,31,13,7,6,14,14,15,8,9,9,  
9,10,13,15,31,31,3,4,12,11,4,4,4,12,9,9,  
9,10,3,5,31,31,13,7,9,9,9,9,9,9,9,9,  
9,11,12,10,31,3,4,12,9,9,6,14,7,9,9,9,  
9,9,9,11,5,8,9,6,7,6,15,3,12,9,9,9,  
9,6,14,7,10,8,9,10,8,11,4,12,9,6,7,9,  
9,11,5,8,11,12,9,11,12,9,9,9,9,11,12,9,  
14,7,10,13,14,7,9,9,9,9,9,9,9,9,9,9,  
5,8,11,4,4,12,9,9,9,9,9,9,9,9,9,6,  
15,8,9,6,14,7,9,9,9,9,9,9,9,6,14,15

---

<div class="post-metadata">

**Author:** ![TilemapKit](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/tilemapkit/32/255_2.png) [@TilemapKit](https://discourse.mapeditor.org/u/TilemapKit)\
**Post date:** [September 19, 2015, 9:04am UTC](https://discourse.mapeditor.org/t/custom-tile-ids-export-with-custom-ids-names-data-values-for-each-tile/767/2 "2015-09-19T09:04:40Z")

</div>

I believe the only workaround at this time is to use tile properties. For instance in [TilemapKit](http://tilemapkit.com) I assume that every tile property named “[tile.name](http://tile.name)” indicates the key the tile should be stored under, so I can get the tile’s texture from the dictionary (map) by using that “[tile.name](http://tile.name)” key.

Since you seem to have “only” 32 tiles at the moment that workaround seems quite reasonable for your situation.

---

<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:** [September 19, 2015, 2:17pm UTC](https://discourse.mapeditor.org/t/custom-tile-ids-export-with-custom-ids-names-data-values-for-each-tile/767/3 "2015-09-19T14:17:03Z")

</div>

> [@caleblimb](#):
>
> The main reason is so I don’t have to rewrite my loader if I re-size my tile-sheet and to make it easier to sort out when I have multiple tile-sets.

You should definitely not use these IDs directly in your loader. Instead you’ll want to set properties on the tiles as suggested by Steffen.

Another thing I have to note is that you’re using the Flare map format, which was written for the [Flare engine](http://flarerpg.org/). It does not support all Tiled features. Actually it only supports properties on the map and on objects, not on tiles, so I would suggest to pick another format, like the standard TMX format or the JSON format.
