Frost Biters


Adds a nest of Frost Aliens and Worms! These aliens will cause frost damage, and may launch a frost cloud over your factory. Defeated aliens will drop artifacts that can be further processed into weapons and armors (optional). With Alien-biomes, nests will only spawn in cold areas.

Content
23 days ago
0.17 - 2.0
60.0K
Enemies

b Loot Table Code

5 years ago
(updated 5 years ago)

Hi, I am the author of Schall Alien Loot. I tried to add compatible to your mod, so your new aliens will also give loots,
I find a problem in your code, that will gives wrong results though.
In cold_weapons.lua lines 705-713, you have used:

local Medium_Loot = {{ item = "cb_alien_cold_gland", probability = MEDIUM_LOOT_PROBABILITY, count_min = 1, count_max = 5 }}
data.raw["unit-spawner"]["cb-cold-spawner"].loot = Medium_Loot

The property loot is table though. Assignments like the above will only set the POINTER to it, not the VALUE. Therefore, you will set "cb-cold-spawner", "behemoth-cold-worm-turret", "leviathan-cold-worm-turret" to have pointed to "share" exactly the same TABLE. E.g., by adding a coal to "cb-cold-spawner" loot table, the "behemoth-cold-worm-turret" will be affected too.

The correct way should be using `table.insert' instead of direct assignment. So lines 705-713 should be something like below:

local Medium_Loot = { item = "cb_alien_cold_gland", probability = MEDIUM_LOOT_PROBABILITY, count_min = 1, count_max = 5 }
table.insert(data.raw["unit-spawner"]["cb-cold-spawner"].loot, Medium_Loot)

Other lines should be adjusted similarly.

Such a change would be compatible to not only my mod, but also any mods dealing with loot tables as well.

5 years ago

Wow! Thanks! I Will change that

1 year, 12 days ago

I've noticed the drop rate for frost glands is very low, Ive only got 4 in the 100 hr game I'm into :(

New response