# Spawn settings

**URL:** <https://discourse.cataclysmdda.org/t/spawn-settings/12796>\
**Category:** The Bunker\
**Created:** [October 25, 2016, 1:30pm UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796 "2016-10-25T13:30:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/michi/32/2213_2.png) [@Michi](https://discourse.cataclysmdda.org/u/Michi)\
**Post date:** [October 25, 2016, 1:30pm UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/1 "2016-10-25T13:30:57Z")

</div>

Hey,

I want to validate some assumptions here:

If Static Spawn is set to TRUE then when an area comes into the reality bubble for the first time, critters are spawned. Right? So, if I clear an area, then it is zombie/critter free for the rest of the game, right?

If Wander Spawn are set to TRUE, (and Static is TRUE), it means that the aforementioned static spawns walk around, and even have a tendency to group up with each other, right?

If Static is set to FALSE, then critters will just poof into existence from time to time?

Spawn rate scaling factor: This affects how many things spawn when the reality bubble hits for the first time. Is 2.0 twice as many spawns at 1.0?

Monster Evolution: Does this affect just new spawns in a new area that I enter, or can it also go back and evolve previously spawned critters?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [October 25, 2016, 2:09pm UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/2 "2016-10-25T14:09:08Z")

</div>

Spawn rate scaling factor is weird. 2.0 is I think a pool of spawn points twice the size of 1.0, but the game tries to limit the number of zombies on screen at one time, so some of those spawn points get turned into upgraded zombies. At 1.5 and above, it’s common to see brutes, hulks, and masters on day 1. So you don’t necessarily see twice as many zombies - you see maybe 25% more, and a lot more upgraded variants.

---

<div class="post-metadata">

**Author:** ![Chezzo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/chezzo/32/429_2.png) [@Chezzo](https://discourse.cataclysmdda.org/u/Chezzo)\
**Post date:** [October 25, 2016, 4:06pm UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/3 "2016-10-25T16:06:24Z")

</div>

I would really like to know as well.

I went code diving, and I think [this](https://github.com/CleverRaven/Cataclysm-DDA/blob/142f3fd76b784e0430d3d5a120be124f4389634c/src/overmap.cpp#L4230) is the code in question.

Does anyone know what all that means?

---

<div class="post-metadata">

**Author:** ![User1](https://avatars.discourse-cdn.com/v4/letter/u/5daacb/32.png) [@User1](https://discourse.cataclysmdda.org/u/User1)\
**Post date:** [October 25, 2016, 4:20pm UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/4 "2016-10-25T16:20:40Z")

</div>

i added some comments:

```auto
void overmap::place_mongroups()
{
    // Cities are full of zombies
    // do the following for each city in the 'cities' list
    // the current city is called 'elem' because the dev was a lazy bastard
    for( auto &elem : cities ) {
        if( get_world_option<bool>( "WANDER_SPAWNS" ) ) {
            // i assume 'elem.s' means city size, so:
            // roll a d16, if you roll a 1 or if the city is larger than '5', then...
            if( !one_in( 16 ) || elem.s > 5 ) {
                // create a monster group, but i have no idea what the arguments mean
                mongroup m( mongroup_id( "GROUP_ZOMBIE" ), ( elem.x * 2 ), ( elem.y * 2 ), 0, int( elem.s * 2.5 ),
                            elem.s * 80 );
// m.set_target( zg.back().posx, zg.back().posy );
                // configure the monster group to be a horde and wandering
                m.horde = true;
                m.wander(*this);
               // add to list of monster groups
                add_mon_group( m );
            }
        }
        if( !get_world_option<bool>( "STATIC_SPAWN" ) ) {
            // create another monster group with exactly the same arguments as before (if you have wander spawns activated and rolled a 1 or the city is big)
            add_mon_group( mongroup( mongroup_id( "GROUP_ZOMBIE" ), ( elem.x * 2 ), ( elem.y * 2 ), 0,
                                     int( elem.s * 2.5 ), elem.s * 80 ) );
        }
    }
```

So guess it means when you have large cities or bad luck you have more zombies.

The multiplier code is in mapgen.cpp map::place\_spawns(…)  
It’s used like this

`if (one_in(chance / multiplier)) {
    // spawn zombies
}`  
But i have no idea how chance is calculated. It’s also called “density” elsewhere and probably configured for each type of building and area in .json.

---

<div class="post-metadata">

**Author:** ![proxiehunter](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@proxiehunter](https://discourse.cataclysmdda.org/u/proxiehunter)\
**Post date:** [October 26, 2016, 12:33am UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/5 "2016-10-26T00:33:02Z")

</div>

[quote=“Michi, post:1, topic:12796”]Hey,

I want to validate some assumptions here:

If Static Spawn is set to TRUE then when an area comes into the reality bubble for the first time, critters are spawned. Right? So, if I clear an area, then it is zombie/critter free for the rest of the game, right?

If Wander Spawn are set to TRUE, (and Static is TRUE), it means that the aforementioned static spawns walk around, and even have a tendency to group up with each other, right?

If Static is set to FALSE, then critters will just poof into existence from time to time?

Spawn rate scaling factor: This affects how many things spawn when the reality bubble hits for the first time. Is 2.0 twice as many spawns at 1.0?

Monster Evolution: Does this affect just new spawns in a new area that I enter, or can it also go back and evolve previously spawned critters?[/quote]

My understanding is that wander spawn and static spawn are two separate things. Having both on doesn’t make the static spawns group up it gives you the static spawn and it gives you the wander spawn (where they show up in response to noise).

---

<div class="post-metadata">

**Author:** ![Michi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/michi/32/2213_2.png) [@Michi](https://discourse.cataclysmdda.org/u/Michi)\
**Post date:** [October 26, 2016, 5:12am UTC](https://discourse.cataclysmdda.org/t/spawn-settings/12796/6 "2016-10-26T05:12:20Z")

</div>

> [@proxiehunter](#):
>
> My understanding is that wander spawn and static spawn are two separate things. Having both on doesn’t make the static spawns group up it gives you the static spawn and it gives you the wander spawn (where they show up in response to noise).

The code snippet above does seem to indicate that you are correct.
