Spawn settings

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?

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.

I would really like to know as well.

I went code diving, and I think this is the code in question.

Does anyone know what all that means?

i added some comments:

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.

[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).

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