Page 1 of 1

Modding - Setting Artefacts spawn chance

Posted: 01 Feb 2018, 18:14
by Arszi
I'd like to tweak the artefact spawn system.
I want to decrease the the artefact spawn chance for the heavily populated maps (for example Cordon, Garbage, Swamp), and increase the chance for the remote ones (Zaton, Red Forest, Outskirts, Power plant).

How could I tweak the spawn chance, if I want, for example, that the anomaly should have 10-20% chance to spawn an artefacts? (Tiers do not count)

esc_smart_terrain_8_9_anomal_zone.ltx

[anomal_zone]

respawn_tries = 1
max_artefacts = 1
artefacts = af_medusa, af_cristall_flower, af_ameba_slime, af_night_star, af_ameba_slug, af_vyvert, af_gravi, af_gold_fish, af_ameba_mica
start_artefact = ; af_ameba_slime
coeff = 3, 3, 3, 3, 2, 2, 2, 1, 1
artefact_ways = esc_anomal_way_2
field_name = esc_zone_field_radioactive_weak_0002

Re: Modding - Setting Artefacts spawn chance

Posted: 02 Feb 2018, 03:57
by Balathruin
Arszi wrote:How could I tweak the spawn chance, if I want, for example, that the anomaly should have 10-20% chance to spawn an artefacts? (Tiers do not count)

You might be able to do this by changing how the script works. Without that, I'd go for a 5 or 10% respawn and increase the tries.

Re: Modding - Setting Artefacts spawn chance

Posted: 02 Feb 2018, 15:10
by Arszi
Thank you Balathruin!

I found the script file which spawns the artefacts, so I can work with this even better, than with the meta file.

Could you please tell me the name of the function, which triggers (starts) the blowouts?

Re: Modding - Setting Artefacts spawn chance

Posted: 02 Feb 2018, 19:19
by luppolo

Code: Select all

local sm = surge_manager.SurgeManager
sm:start(true)


it exists also as debug console command, "surge start" (which just runs the code above)

Re: Modding - Setting Artefacts spawn chance

Posted: 04 Feb 2018, 08:11
by Arszi
Thank you! The script worked like a charm :)