Updated 22.02.2021 You won't drop your weapon when you take damage or punches.
Don't let your weapon get away! With this mode, you won't let your weapon slip from your fingers and fall to the ground, even if you get shot, electrocuted, punched, or suffer any other sort of damage.
Made after the example of TimMiner's older mod, but this one works with 1.5.1 Final (the older one makes my game crash after loading). actor_effects.script was modified in a different way, which should work better (see Feel_Fried's comment below).
I have tested it, but please report any bugs or problems.
How to install
Manually: drop the folder in gamedata in the main Anomaly folder. However, I advise learning how to use JSGME to manage your mods.
How you make this mod
This is some instruction for mod-makers, in case something in Anomaly changes and I can't make a different version, or if you want to integrate these changes in a different mod that modifies the same files, or tell me how to do it better.
vanilla: local enable_drop_item = true
modded: local enable_drop_item = false . This removes dropping weapons from punches.
commented lines 1072-1077
--[[if (math.random() < (prev_health - actor.health)/2.5) then
local active_item = actor:active_item()
if active_item and (not opt.health.no_drop_wnp[active_item:section()]) then
by adding --[[ and --]] (thanks Feel_Fried!)
This removes dropping weapons from damage.
Keep in mind that new versions of the game might shift these lines around and put them into different files (the old mod for example edited txr_actor_effects.script instead of actor_effects.script).