Page 1 of 1

evolution factor for biters

Posted: Mon Jun 03, 2019 1:25 pm
by IVAN_PIDORVAN
i have this piece of code

data.raw["unit-spawner"]["biter-spawner"].result_units = (function()
local res = {}
res[1] = {"behemoth-biter", {{0.85, 0.0}, {0.90, 0.1}, {1.0, 0.25}}} end
return res
end)()

and i know what i should put it in data-final-fixes.lua

but code is incorrect + i want to change this parameters for all 8 types of enemies (4 biters 4 spitters)

how this should look?

Re: evolution factor for biters

Posted: Mon Jun 03, 2019 1:35 pm
by darkfrei
Find this parameters here
viewtopic.php?f=135&t=45107

Re: evolution factor for biters

Posted: Mon Jun 03, 2019 1:54 pm
by IVAN_PIDORVAN
darkfrei wrote:
Mon Jun 03, 2019 1:35 pm
Find this parameters here
viewtopic.php?f=135&t=45107
I am illiterate, my abilities is very basic, all i want is shift appearance of tier3 from 0.5 to 0.6 evo and behemoths from 0.9 to 0.85 evo + remore tier2 aliens from spawn table after ~0.9

what should i do with all this stuff what you suggest, i am not even able to scroll base tables in your post because i too dumb.

Actually, moderator move my post from mod suggestion topic to mod help, i am just realise it...

Re: evolution factor for biters

Posted: Mon Jun 03, 2019 4:04 pm
by darkfrei
IVAN_PIDORVAN wrote:
Mon Jun 03, 2019 1:54 pm
I am illiterate, my abilities is very basic, all i want is shift appearance of tier3 from 0.5 to 0.6 evo and behemoths from 0.9 to 0.85 evo + remore tier2 aliens from spawn table after ~0.9
The code that you need:
2019-06-03T17_49_56-Window.png
2019-06-03T17_49_56-Window.png (26.38 KiB) Viewed 1740 times
It's not easy to use it as list.
The same can be get as table with
log ('biter_spawner_result_units = ' ..serpent.line (data.raw["unit-spawner"]["biter-spawner"].result_units))
vanilla result (added lines and spaces):

Code: Select all

biter_spawner_result_units = {
  {"small-biter", {{0, 0.3}, {0.6, 0}}}, 
  {"medium-biter", {{0.2, 0}, {0.6, 0.3}, {0.7, 0.1}}}, 
  {"big-biter", {{0.5, 0}, {1, 0.4}}}, 
  {"behemoth-biter", {{0.9, 0}, {1, 0.3}}}
}
As you see, it's not to difficult to change all this parameters.

Set parameters as you want:

Code: Select all

biter_spawner_result_units = {
  {"small-biter", {{0, 0.3}, {0.6, 0}}}, 
  {"medium-biter", {{0.2, 0}, {0.6, 0.3}, {0.7, 0.1}, {0.9, 0}}}, -- by 90% evolution will be 0% chance of medium biter spawning
  {"big-biter", {{0.6, 0}, {1, 0.4}}}, -- first argument is now 0.6
  {"behemoth-biter", {{0.85, 0}, {1, 0.3}}} -- first argument is now 0.85
}
data.raw["unit-spawner"]["biter-spawner"].result_units = biter_spawner_result_units
Just set this code to data.lua and it's ready.
2019-06-03T18_12_35-Window.png
2019-06-03T18_12_35-Window.png (7.89 KiB) Viewed 1732 times
2019-06-03T18_09_34-Window.png
2019-06-03T18_09_34-Window.png (6.82 KiB) Viewed 1733 times
spitters

Re: evolution factor for biters

Posted: Mon Jun 03, 2019 9:03 pm
by IVAN_PIDORVAN
Thak you m8! I appreciate this :)