# How Are Exported Tile Values Generated?

**URL:** https://discourse.mapeditor.org/t/how-are-exported-tile-values-generated/4222
**Category:** Questions
**Created:** [November 22, 2019, 9:23pm UTC](https://discourse.mapeditor.org/t/how-are-exported-tile-values-generated/4222 "2019-11-22T21:23:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kayoscape](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/kayoscape/32/2540_2.png) [@Kayoscape](https://discourse.mapeditor.org/u/Kayoscape)
#### Post date: [November 22, 2019, 9:23pm UTC](https://discourse.mapeditor.org/t/how-are-exported-tile-values-generated/4222/1 "2019-11-22T21:23:53Z")

</div>

I’m having trouble interpreting how flipping or rotating a tile changes its numerical value in the exported .json file. It looks as though it adds a number that’s based upon the Int32 max value, but it’s not clear how it determines what to add to each tile value. I’ve tried searching the documentation, but there doesn’t seem to be any mention of how the exported files are constructed. Does anyone know?

---

<div class="post-metadata">

### Author: ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)
#### Post date: [November 23, 2019, 2:06am UTC](https://discourse.mapeditor.org/t/how-are-exported-tile-values-generated/4222/2 "2019-11-23T02:06:42Z")

</div>

It sets bit flags, each bit corresponds to a particular type of flip (horizontal, vertical, diagonal). The documentation has more info, and sample code for parsing the tiles: [https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tile-flipping](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tile-flipping)

---

<div class="post-metadata">

### Author: ![Kayoscape](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/kayoscape/32/2540_2.png) [@Kayoscape](https://discourse.mapeditor.org/u/Kayoscape)
#### Post date: [November 23, 2019, 3:20am UTC](https://discourse.mapeditor.org/t/how-are-exported-tile-values-generated/4222/3 "2019-11-23T03:20:38Z")

</div>

This is exactly what I needed. Thank you!
