Page 1 of 1

Spawner Control Question

Posted: Mon Jun 15, 2015 3:09 am
by TheSAguy
How do I control the Spawner settings in the control.lua like:
max_count_of_owned_units
max_friends_around_to_spawn
spawning_cooldown

In data.lua I you can change them by using:
data.raw["unit-spawner"]["biter-spawner"].maximum_count_of_owned_units = 25
data.raw["unit-spawner"]["biter-spawner"].max_friends_around_to_spawn = 14
data.raw["unit-spawner"]["biter-spawner"].spawning_cooldown = {900, 150}

I know it's something similar to:

Code: Select all

game.evolutionfactor.pollution_factor = 0
game.evolutionfactor.time_factor = 0
game.onevent(defines.events.onentitydied, function(event)
   if event.entity.force= game.forces.enemy and event.entity.type = "unit-spawner" then
      game.evolutionfactor= game.evolutionfactor + X,
   end
end)
But not sure how... can anyone help me please?


Also, how do you dictate priority for mods, Let's say I have DyTech, Bob's and Vanilla of course. Now I create a mod and want to override/prioritize my settings, how is that handled?
EDIT: Thanks kds71, done through dependencies.

Thanks.

Re: Spawner Control Question

Posted: Mon Jun 15, 2015 6:42 am
by kds71
TheSAguy wrote:Also, how do you dictate priority for mods, Let's say I have DyTech, Bob's and Vanilla of course. Now I create a mod and want to override/prioritize my settings, how is that handled?
The best way to do that is by using dependencies: https://forums.factorio.com/wiki/inde ... dencies.3F

Re: Spawner Control Question

Posted: Tue Jun 16, 2015 9:15 pm
by TheSAguy
Anyone?

Re: Spawner Control Question

Posted: Tue Jun 16, 2015 9:54 pm
by orzelek
Most likely you need to post request in interface requests - I don't think those attributes can be changed during game.