
and how i can change how much spawners i have to kill to reach 30% in 1.3.1 version
I've fixed that. Thanks for your response.XBBX wrote:i get this error with test version 1.4.1
In line 54 to 56 of the control.lua there stands this:XBBX wrote:and how i can change how much spawners i have to kill to reach 30% in 1.3.1 version
Code: Select all
if global.pollution_spawner < 60 then
pollution_spawner_anzahl = global.pollution_spawner / 20
end
Code: Select all
if global.pollution_spawner < 90 then
pollution_spawner_anzahl = global.pollution_spawner / 30
end
Code: Select all
function spawnertot(event)
if (global.pollution_spawner < 60 and (event.entity.name == "spitter-spawner" or event.entity.name == "biter-spawner")) then
global.pollution_spawner = global.pollution_spawner + 1
end
end
It SHOULD work, but only partially. The extra functionality at high evo factor should work, as should the altered expanstion mechanics. Anything that mod does to alter the evolution factor will be blocked, or rather overwritten constantly, so no increased decay factor.Kitsune wrote:Hey there, is it possible or make even sense to use this mod with misanthrope?I like the way misanthrope handles expansion ect. but i like the scaling of the evolution factor from this mod. Because of that i would like to use them together. ^~^
Seems like the processing this does once a second eventually takes longer than a tick.Ranakastrasz wrote:Here.
I have modified it however. Added config options, altered formulas and balance, and so on, but it should work at least.
Spawner kills cap at 120 intead of 60 or 40, whatever it was originally, and decay every 12 minutes, instead of each hour, and it is continous.
Pollution has a square root equation, so it goes up fast, then slows down massively. Also caps at 30 million, or rather 240 million. Kinda. The equation was already a bit confusing.
Time is unchanged.
Code: Select all
local s = game.surfaces["nauvis"]
for c in s.get_chunks() do
summe = summe + s.get_pollution({c.x *32,c.y *32})
anzahl = anzahl + 1
end
No, that just applies to the spawner kill decay, not to the counting how many chunks for pollution.Peppe wrote:Seems like the processing this does once a second eventually takes longer than a tick.Ranakastrasz wrote:Here.
I have modified it however. Added config options, altered formulas and balance, and so on, but it should work at least.
Spawner kills cap at 120 intead of 60 or 40, whatever it was originally, and decay every 12 minutes, instead of each hour, and it is continous.
Pollution has a square root equation, so it goes up fast, then slows down massively. Also caps at 30 million, or rather 240 million. Kinda. The equation was already a bit confusing.
Time is unchanged.
If i had to guess the long processing time is probably looping through all the chunks?Makes the game slow down for the one tick it processes every chunk once a second, so you don't get 60/60 FPS/UPS.Code: Select all
local s = game.surfaces["nauvis"] for c in s.get_chunks() do summe = summe + s.get_pollution({c.x *32,c.y *32}) anzahl = anzahl + 1 end
Maybe a strategy could be used to check the same amount of chunks still, but staggered so you only check a percentage every tick. Like 1/3 every 20 ticks. Or calculate pollution in a way that does not visit every chunk on the map...
Why do you think so?Ranakastrasz wrote: No, that just applies to the spawner kill decay, not to the counting how many chunks for pollution.
Oh, I thougt you were refering to the change I made, which did not touch that part. Yes, that occurs each second, but so far as I can tell, that doesn't cost much.BenediktMagnus wrote:Why do you think so?Ranakastrasz wrote: No, that just applies to the spawner kill decay, not to the counting how many chunks for pollution.
Looping through all the chunks is much more work to do than decrease an integer value. And even if you remove all the spawner features, the 59.9 FPS/UPS is still there.
Ranakastrasz wrote:No, that just applies to the spawner kill decay, not to the counting how many chunks for pollution.Peppe wrote:Seems like the processing this does once a second eventually takes longer than a tick.Ranakastrasz wrote:Here.
I have modified it however. Added config options, altered formulas and balance, and so on, but it should work at least.
Spawner kills cap at 120 intead of 60 or 40, whatever it was originally, and decay every 12 minutes, instead of each hour, and it is continous.
Pollution has a square root equation, so it goes up fast, then slows down massively. Also caps at 30 million, or rather 240 million. Kinda. The equation was already a bit confusing.
Time is unchanged.
If i had to guess the long processing time is probably looping through all the chunks?Makes the game slow down for the one tick it processes every chunk once a second, so you don't get 60/60 FPS/UPS.Code: Select all
local s = game.surfaces["nauvis"] for c in s.get_chunks() do summe = summe + s.get_pollution({c.x *32,c.y *32}) anzahl = anzahl + 1 end
Maybe a strategy could be used to check the same amount of chunks still, but staggered so you only check a percentage every tick. Like 1/3 every 20 ticks. Or calculate pollution in a way that does not visit every chunk on the map...
Code: Select all
--[[
for c in s.get_chunks() do
summe = summe + s.get_pollution({c.x *32,c.y *32})
anzahl = anzahl + 1
end
]]--
summe = 1000
anzahl = 1000000
cool thx for the infoBenediktMagnus wrote:Yes. As soon as 0.13 will be stable and I will have the time to update the mod.