# Which file contains the code for where starting locations are chosen from?

**URL:** <https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820>\
**Category:** The Toolbox\
**Created:** [May 5, 2016, 12:41am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820 "2016-05-05T00:41:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RipRoarinBoogerPenis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/riproarinboogerpenis/32/20_2.png) [@RipRoarinBoogerPenis](https://discourse.cataclysmdda.org/u/RipRoarinBoogerPenis)\
**Post date:** [May 5, 2016, 12:41am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/1 "2016-05-05T00:41:55Z")

</div>

I always seem to spawn within the center most (0 x and 0y) map chunk even though I’ve ventured far past. Where would I be able to see how the game decides what map chunk to pick a specific location (boarded house, hospital, mall, etc) the player spawns in at?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [May 5, 2016, 1:05am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/2 "2016-05-05T01:05:06Z")

</div>

data/json/start\_locations.json maps location names with location ids.  
src/start\_location.cpp has functions that find and prepare the starting location.

---

<div class="post-metadata">

**Author:** ![RipRoarinBoogerPenis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/riproarinboogerpenis/32/20_2.png) [@RipRoarinBoogerPenis](https://discourse.cataclysmdda.org/u/RipRoarinBoogerPenis)\
**Post date:** [May 5, 2016, 1:38am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/3 "2016-05-05T01:38:28Z")

</div>

Thanks fam

---

<div class="post-metadata">

**Author:** ![RipRoarinBoogerPenis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/riproarinboogerpenis/32/20_2.png) [@RipRoarinBoogerPenis](https://discourse.cataclysmdda.org/u/RipRoarinBoogerPenis)\
**Post date:** [May 5, 2016, 1:42am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/4 "2016-05-05T01:42:03Z")

</div>

Can’t find the src folder. Should I not be attempting this with experimental?

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [May 5, 2016, 1:58am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/5 "2016-05-05T01:58:14Z")

</div>

src is in the source distribution, it isn’t bundled with the .exe

---

<div class="post-metadata">

**Author:** ![BorkBorkGoesTheCode](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/borkborkgoesthecode/32/2343_2.png) [@BorkBorkGoesTheCode](https://discourse.cataclysmdda.org/u/BorkBorkGoesTheCode)\
**Post date:** [May 5, 2016, 2:00am UTC](https://discourse.cataclysmdda.org/t/which-file-contains-the-code-for-where-starting-locations-are-chosen-from/11820/6 "2016-05-05T02:00:40Z")

</div>

Ninja’d

[The source is here: [https://github.com/CleverRaven/Cataclysm-DDA](https://github.com/CleverRaven/Cataclysm-DDA)]
