Alien Loot Rebalanced

by ptx0

Reworked version of the 'Alien Loot Economy' mod, using new textures, icons and rebalanced items, and updated for v1.1 by ptx0.

3 years ago
1.1
1.03K

b Overflow in Module level

3 years ago

Hi,
you might have a correction routine somewhere else, but in control.lua there is this function:

function modulelevel()
return math.max((global.killcount / base)^(1/exponent) + 1, 1)
end

It returns the module level based on kill count, and if you kill enough enemies it will result in a module level 21 or higher. The mod only has 20 levels, so as soon as you hit the 21 the game will crash. I learned it while playing around with this and another mod.

This solves the issue:

function modulelevel()
return math.min(math.max((global.killcount / base)^(1/exponent) + 1, 1),20)
end

3 years ago

thanks, test the fix and let me know. i haven't tested it locally.

New response