You won't drop your weapon when you take damage or punches. Neutral stalkers won't try to steal your weapon when you talk to them. This is fundamentally the same as the 1.5.1 version, but updated for 1.5.2 files. Added optional files to stop burers from making you drop your weapon (testing needed).
Don't let your weapon get away! With this mod, 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. Now with optional burer immunity!
Tosser made a patch to make this mod work with Talk to Anyone; while it was made to work with v. 1.5.1, it might still function: Moddb.com
Made after the example of TimMiner's older mod, following some advice from Feel_Fried.
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, or MO2 if you use a lot of them.
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. Any advice is always appreciated.
In xrs_facer.script:
vanilla: local enable_drop_item = true
modded: local enable_drop_item = false . This removes dropping weapons from punches.
In actor_effects.script:
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
actor:drop_item(active_item)
end
end--]]
by adding --[[ and --]] (thanks Feel_Fried!)
This removes dropping weapons from damage.
In xr_meet.script
vanilla:
-- Проверяем включать ли обижание на заюзывание
local abuse = xr_logic.pick_section_from_condlist(db.actor, self.npc, self.a.abuse)
if self.abuse_mode ~= abuse then
if abuse == "true" then
xr_abuse.enable_abuse(self.npc)
else
xr_abuse.disable_abuse(self.npc)
end
self.abuse_mode = abuse
end
modded:
-- Проверяем включать ли обижание на заюзывание
local abuse = xr_logic.pick_section_from_condlist(db.actor, self.npc, self.a.abuse)
if self.abuse_mode ~= abuse then
if abuse == "true" then
xr_abuse.disable_abuse(self.npc)
else
xr_abuse.disable_abuse(self.npc)
end
self.abuse_mode = abuse
end
This way, friendly and neutral stalkers won't try to punch your weapon away when you try to talk to them.
In m_burer.ltx
vanilla:
weapon_drop_stamina_k = 0.6
modded:
weapon_drop_stamina_k = 0.0
This should make it impossible for the burer to make you lose your weapon.
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).
call this addon. Weapon Irongrip
Another amazing, very useful mod.
Ah finally, thank you
What annoys me the most is that NPC's can punch you and knock your weapon out of your hands, but you as a player do not have this option.
And if I remember correctly NPC's don't drop their weapons if they are wounded,
Awesome mod!
I wouldn't care so much about this mechanic, but a lot of the time when your weapon drops, it either flings through a wall, through the floor and/or gets immediately vacuumed up by the AI seemingly before it even hits the ground. That and it's always fun when the enemy punches you through concrete walls.
Now if there was only a definitive solution for getting stuck inside AI collision bubbles.
Anyway, thanks a lot for this. Shall give it a try.
yay no more butterfingers
Believe this mod is causing the error since it is the only one I have that uses "actor_effects.script"
I got this CTD when equiping a gun on a new game:
! [LUA] 0 : [C ] __index
! [LUA] 1 : [main] [string "txr_actor_effects.use_weapon(0)"](1) :
! [LUA] 2 : [Lua] c:/games/anomaly\gamedata\scripts\actor_effects.script(752) : Update_Animations
! [LUA] 3 : [Lua] c:/games/anomaly\gamedata\scripts\actor_effects.script(1663) : func_or_userdata
! [LUA] 4 : [Lua] c:/games/anomaly\gamedata\scripts\axr_main.script(271) : make_callback
! [LUA] 5 : [Lua] c:/games/anomaly\gamedata\scripts\_g.script(119) : SendScriptCallback
! [LUA] 6 : [Lua] c:/games/anomaly\gamedata\scripts\bind_stalker_ext.script(104) : actor_on_update
! [LUA] 7 : [Lua] c:/games/anomaly\gamedata\scripts\bind_stalker.script(310) :
! [LUA] SCRIPT RUNTIME ERROR
! [LUA] [string "txr_actor_effects.use_weapon(0)"]:1: attempt to index global 'txr_actor_effects' (a nil value)
! [SCRIPT ERROR]: [string "txr_actor_effects.use_weapon(0)"]:1: attempt to index global 'txr_actor_effects' (a nil value)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 204
[error]Description : fatal error
[error]Arguments : LUA error: [string "txr_actor_effects.use_weapon(0)"]:1: attempt to index global 'txr_actor_effects' (a nil value)
The string "actor_effects.use_weapon" is on lines 1401 & 1413 of "actor_effects.scrip" of this mod.
Hi, I don't play much Anomaly any more, so it took me a while to test this... I don't have any crash when equipping a weapon. It's been a while, but, if the problem is still there, you could write the gamemode and which weapons cause the crash, and whether you are using this mod with others, and also whether you are using the Burer files too, and if they are DLTX or normal. I have tried the mod on a clean install, and it worked right.
Fantastic mod, I dunno who would make a mechanic NPCs can do that the PC cannot do.
ФАТАЛЬНАЯ ОШИБКА
[ошибка]Выражение: <нет выражения>
[ошибка]Функция: CScriptEngine::lua_pcall_failed
[ошибка]Файл: ..\xrServerEntities\script_engine.cpp
[ошибка]Строка: 204
[ошибка]Описание: фатальная ошибка
[ошибка]Аргументы: LUA ошибка: [строка "txr_actor_effects.use_weapon(0)"]:1: попытка проиндексировать глобальный "txr_actor_effects" (нулевое значение
This comment is currently awaiting admin approval, join now to view.