Understanding spawner parameters

Place to get help with not working mods / modding interface.
Post Reply
kaldskryke
Inserter
Inserter
Posts: 27
Joined: Mon Nov 17, 2014 3:49 am
Contact:

Understanding spawner parameters

Post by kaldskryke »

Hey guys,

I'm tinkering with the behavior of biter/spitter spawners and I'm curious about these two keys:

max_count_of_owned_units
max_friends_around_to_spawn

The first one seems somewhat self-explanatory. I'm assuming that the spawner will create a new unit every (spawning_cooldown) ticks, which "belong" to the spawner. When the max count is reached, the spawner stops creating new units. Is this correct? If so, is it possible to vary this value with evolution? It's nice that the spawning_cooldown speeds up with evolution, but I'd be interested in increasing this limit with evolution also.

I'm not sure what the second key means at all. Does it have something to do with how nests are generated and distributed?

Thanks

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: Understanding spawner parameters

Post by SuperSandro2000 »

I think the max_friends_around_to_spawn is for units that are right next to the spawner and max_count_of_owned_units is for the total number. For excample if a unit walks away to attack you it still belongs to the spawner but not to the max_friends_around_to_spawn limit.

kaldskryke
Inserter
Inserter
Posts: 27
Joined: Mon Nov 17, 2014 3:49 am
Contact:

Re: Understanding spawner parameters

Post by kaldskryke »

Thanks. I'm trying to create a mod that increases the size of biter attacks, and if possible also reducing the overall frequency of attacks.

The "pollution_to_join_attack" key for biters/spitters is interesting. Do biters absorb pollution directly? I always assumed that only spawners could absorb pollution. I'm guessing this is what causes individual enemies to join an attack group.

I'm hoping that a combination of low "pollution_to_join_attack" and high "max_friends_around_to_spawn" will help achieve my goal, but I still don't understand what triggers an attack group to stop waiting and to start moving towards polluters.

Edit: I've done a bit more reading and yet I'm still confused. I've now learned that attacking groups of biters are a separate object, UnitGroup, and that at some point they change state from 0 (gathering) to 1 (moving) to 2 (attacking). I thought maybe the freeplay control.lua would be responsible for managing these UnitGroups, but so far as I can tell that script mostly just handles the ship landing attack event.

Edit2: so I finally found something in map-settings.lua.

Code: Select all

unit_group=
    {
      -- pollution triggered group waiting time is a random time between min and max gathering time
      min_group_gathering_time = 3600,
      max_group_gathering_time = 10 * 3600,
      -- after the gathering is finished the group can still wait for late members,
      -- but it doesn't accept new ones anymore
      max_wait_time_for_late_members = 2 * 3600,
      -- limits for group radius (calculated by number of numbers)
      max_group_radius = 30.0,
      min_group_radius = 5.0,
      -- when a member falls behind the group he can speedup up till this much of his regular speed
      max_member_speedup_when_behind = 1.4,
      tick_tolerance_when_member_arrives = 60,
    }
I don't understand what a "late member" is, but at least I can read/write the min/max group gathering time. It would appear that the size of the group only really depends on how many enemies decide to join-up within the attack timeframe, somehow according to "polution_to_join_attack". I don't know whether that means "biter/spitter has to absorb this much polution" or "biter/spitter exists in chunk with this much total pollution. Either way, lowering this value is probably one of the things I want.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Understanding spawner parameters

Post by cube »

  • max_friends_around_to_spawn is there to prevent overcrowding if there are several spawners close to each other
  • late member is an unit that is registered as member of a group, but for some reason didn't come to the group meeting location. This happens when there are obstacles in the way or if the pathfinder is overloaded for a long time.
  • polution_to_join_attack would make more sense in spawner -- it says how much polution the spawner must have absorbed to release one unit to attack.
to make larger and more frequent attacks you should decrease spawner's spawning cooldown, pollution cooldown, and unit's pollution to join attack

Post Reply

Return to “Modding help”