Spawner Control Question

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1455
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Spawner Control Question

Post 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.
Last edited by TheSAguy on Mon Jun 15, 2015 9:52 pm, edited 1 time in total.
kds71
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Contact:

Re: Spawner Control Question

Post 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
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1455
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Spawner Control Question

Post by TheSAguy »

Anyone?
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Spawner Control Question

Post by orzelek »

Most likely you need to post request in interface requests - I don't think those attributes can be changed during game.
Post Reply

Return to “Modding help”