# Maps, coordinate systems and files

**URL:** <https://discourse.cataclysmdda.org/t/maps-coordinate-systems-and-files/24935>\
**Category:** The Bunker\
**Created:** [October 13, 2020, 4:33am UTC](https://discourse.cataclysmdda.org/t/maps-coordinate-systems-and-files/24935 "2020-10-13T04:33:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Valase](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/valase/32/6972_2.png) [@Valase](https://discourse.cataclysmdda.org/u/Valase)\
**Post date:** [October 14, 2020, 5:41am UTC](https://discourse.cataclysmdda.org/t/maps-coordinate-systems-and-files/24935/7 "2020-10-14T05:41:44Z")

</div>

> [@Zan-Zun](#):
>
> Hey there and first of all thanks for the answer and sorry if I came across a little rude.

Don’t worry, I didn’t consider your answer “rude”… I just wanted to clear things up, before we run into some missunderstandings 😉 .

I use the definitions from [the document linked by Zhilkin](https://github.com/CleverRaven/Cataclysm-DDA/blob/c3caa74656bec138ce56ac6688f1c1dc92f34928/doc/POINTS_COORDINATES.md) for my descriptions in combination with your screenshots (a bit out of order).  
I’ll go through everything, even the “easy” ones, just so I can refer back to stuff here. So, let’s get started…

![map_coords](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/a/ac1467e39bade6a3b3519e3e36646c311216a9b3.png)

These represent the **overmap** coordinates. The `LEVEL 0` is the current z-axis of your marker, the `0'`(173) is the current overmap coordinate of the x-axis, the (0’)`173` is the **overmap terrain** currently marked by your cursor in the x-axis of that overmap, the `-1'`(173) is the current overmap coordinate of the y-axis while the (-1’)`173` is the current overmap terrain (or _overmap tiles_, as I’ll call them from now on) of the y-axis.  
So, from the “middle” of the game, the `overmap 0'0, 0'0`, you moved or started one overmap higher, and on that overmap you’re 173 overmap tiles to the right and just as many tiles down from it’s left- and uppermost point. And you’re also on the surface, since the Level is 0.

![Debug_EditMap](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/9/98285beee513471c977e7ec071d35ff143fd4bac.png)

The `<60,67>` are the coordinates of your cursor, relative to the **Local** coordinates. It starts with `<0,0>` at the left upper edge of the reality bubble (the part of the world that is currently loaded and calculated by the game).  
So your marker is 60 **map squares** (I’ll call them just _tiles_) to the right on the x-axis and 67 down on the y-axis from the start of the reality bubble. The z-axis is not shown here.

![Debug_Info_1](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/c/c2bdda917fb67141fbedf447caa02312a4f06132.png)

The `60:67` is again your position in the reality bubble (as described above), which starting point is located in `341:-19`. The `341:-19` are the coordinates of the **submap** your reality bubble is currently in. From what I can tell, these are **Absolute** coordinates.  
So, based on the overmap coordinates of `0'0, 0'0`, you’re 341 submaps to the right on the x-axis and -19 “down” (since it’s negative, it’s actually “up”) on the y-axis.  
So, let’s check these values…:

- 1 submap is half an overmap tile.
- So 341 submaps mean 170.5 overmap tiles to the right from 0’0 on the x-axis and -9.5 up from 0’0 on the y-axis.
- Now we end up with 0’170(.5) and 0’-9(.5) (or -1’170(.5)) in overmap coordinates.
- Pretty close to the 0’173, -1’173 you’ve got on the overmap, but not quite… but, as written, this is the start of the reality bubble.
- Your position is shifted 60 tiles to the right and shifted 67 down, so (1 overmap tile is 24 map squares) +2.5 overmap tiles to the right and +2.5 overmap tiles (and 7 map squares) down; we’re spot on where you’re standing.

![Debug_Info_2](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/0/065331321711f9d9754977dd64bead1fe1e31cc7.png)

`Your local position: 60, 67, 0` is once again the coordinates relative to the start point of the reality bubble, this time with the z-axis also represented.  
Your noble steed “Horseratio” is (again relative to the start point of the reality bubble) on the coordinates `68, 87, 0`, or 8 tiles to the east of you and 20 tiles south, on the same z-axis as you are.  
`Your overmap position: 173, -7, 0` are straightforward your overmap tiles, this time in absolute coordinates (relative to the 0’0, 0’0 overmap tile).

* * *

> [@Zan-Zun](#):
>
> In the `items` array of a map file, the items look like [example] and I meant the `5,4,` in this example.

Ah, yes. Thank you for your explanation. I thought you were talking about the number that you can find next to terrain, for example the **4** in `[...],["t_grass",4],"t_dirt","t_grass",[...]`. Good thing I asked 😄 .  
Short answer; I think these are indeed coordinates (relative to the submap), but I have to test a bit. Luckily I’ve found my “[older post](https://discourse.cataclysmdda.org/t/save-corruption-proble/23688/3)” mentioned in that other topic, so it should be easier to figure it out again.

I do have to do some other work though (and probably also sleep a bit), so I’m going to add the explanation for the coordinates of the save system tomorrow… I hope the wait isn’t too dramatic.

---

_[View the full topic](https://discourse.cataclysmdda.org/t/maps-coordinate-systems-and-files/24935)._
