# So how do coordinates work?

**URL:** <https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879>\
**Category:** The Toolbox\
**Created:** [January 27, 2014, 9:55am UTC](https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879 "2014-01-27T09:55:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Candlebury](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/john_candlebury/32/6437_2.png) [@John\_Candlebury](https://discourse.cataclysmdda.org/u/John_Candlebury)\
**Post date:** [January 27, 2014, 9:55am UTC](https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879/1 "2014-01-27T09:55:15Z")

</div>

I was trying me hand at making houses, but I cant figure out how does the placement of the spawn lists actually works. For example most entries follow this format

{ “point”: “terrain”, “id”: “t\_dirt”, “x”: [0,1] “y”: [0, 23], “repeat”: [5, 10] },

The start is pretty straight forward, you define a tile and then a rectangle to fill. What confuses me is what exactly is the [5,10] repeating?

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [January 27, 2014, 8:24pm UTC](https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879/2 "2014-01-27T20:24:33Z")

</div>

It will repeat the command between [a,b] times. It only truly makes sense if the chance is random or if the coordinates are random “x:[5,10]” would put the x value between 5 and 10. If you wanted to define a square of a terrain then you would end up using “square”, not “point”. Further documentation on the exact way to input things may be found [here](https://github.com/CleverRaven/Cataclysm-DDA/blob/9f4d664df8eb12a2a73ab7592417347a79df994d/doc/MAPGEN.md).

---

<div class="post-metadata">

**Author:** ![John\_Candlebury](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/john_candlebury/32/6437_2.png) [@John\_Candlebury](https://discourse.cataclysmdda.org/u/John_Candlebury)\
**Post date:** [January 27, 2014, 8:33pm UTC](https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879/3 "2014-01-27T20:33:24Z")

</div>

Hey thanks i2amroy! That link cleared it up and also solved some other doubts I had about the files.

---

<div class="post-metadata">

**Author:** ![Dominae](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dominae/32/53_2.png) [@Dominae](https://discourse.cataclysmdda.org/u/Dominae)\
**Post date:** [January 27, 2014, 9:15pm UTC](https://discourse.cataclysmdda.org/t/so-how-do-coordinates-work/4879/4 "2014-01-27T21:15:19Z")

</div>

Is the only way to edit/add buildings still raw json coding? I was praying we’d have a world editor so it could be done graphically to make the process less daunting. I’ve had some ideas for buildings for a while but to be honest my brain hurts when I look at the json entries for the current buildings. lol
