As the title suggests this addon introduces a stamina system for aiming.
The intention is to limit the maximum time the player can aim a gun without any effect to make combat more challenging. It basically works the same as normal stamina. There are two operational modes and three gameplay modes.
Operational Modes
Mode 1: weapon sway is introduced below a certain aim stamina threshold. When aim stamina reaches zero aiming is interrupted.
Mode 2: when aim stamina reaches zero you can still aim but weapon sway is introduced. Btw this is my very first animation so don't expect it to be very sophisticated.
Gameplay Modes (Hardcore Modes)
"Off": this is normal mode. When aiming you drain aim stamina and recover it when not aiming. Lowering the gun recovers aim stamina faster.
"Light": aim stamina is drained when aiming, keeps its value when not aiming but having the gun in ready position and recovers when lowering the gun.
"Heavy": aim stamina is slowly drained when the gun is in aim ready position, drained at normal rate when aiming and recovered only when the gun is lowered.
The gun weight influences how fast aim stamina is drained/recovered. Holding no gun in your hands always recovers aim stamina the fastest. Nearly every aspect of how the addon functions can be tweaked in MCM.
HUD
The addon features a simple HUD that shows the aim stamina value as a number and/or an energy bar and can be fully customized to your liking. The MCM settings also allow you to move the HUD wherever you want on screen so no matter what hud addon you use I am sure you'll find the right place for the aim stamina HUD!
NEW: The addon features optional HUD integrations into Grok's BHS (see below).
left: Grok's HUD, center: EFT HUD, right: EFT HUD (GAMMA)
Installation
MO2 is recommended but not necessary (I guess). In the FOMOD installer you can choose which HUD design you want. It's safe to install/uninstall midgame.
Important Notes
1. If you don't use MCM you can tweak the settings in the aim_stamina_mcm.script. This requires a restart of the game for the changes to apply.
2. Please report any bugs/crashes in the comments or write me on Discord --> privatepirate.97
3. This addon has been tested on Anomaly 1.5.2. For those still playing Anomaly 1.5.1: there seems to be a bug in Operational Mode 1 that causes a fast periodic switch between aim cancellation and aiming upon reaching zero aim stamina when the aim toggle option is turned off and you keep pressing the aim button. One user has reported this bug so far. Maybe if more 1.5.1 users could test this specific scenario you could varify if the bug appears due to different game versions. Maybe I can find a solution to this problem.
Ideas For Future Updates
These are only ideas after all so it's not certain if those will be implemented in the future. Of course I am open to suggestions. :)
- take properties like stamina/hunger/thirst/sleep into account for aim stamina behavior
- introduce a kind of weapon sway that starts shortly before aim stamina is depleted
- aim stamina recovers faster when lowering the gun (or only when gun is lowered - "hardcore mode")
Credits
xcvb, RavenAscendant, NLTP_ASHES who gave me useful tips and provided me with the fundamental code snippets.
jaymorrow who helped me testing and gave some useful advise on the HUD design.
lizzardman who wrote the russian translation for the MCM settings.
Blackjeison who wrote the spanish translation for the MCM settings.
daemon_stark who helped with the BHS HUD integration.
Update History
v1.3 - optional BHS integration, bugfixes/QOL stuff
- BHS HUD for GAMMA was made with help from daemon_stark. Huge thanks dude! Also thanks to Grok for permission!
- now items like binoculars, knives/axes, bolts, PDA,... no longer drain stamina or stop its recovery but their weight still influences recovery when holding them in the hand
- When you are below the stamina threshold for weapon sway and use the binoculars the animation stops when the sway start threshold is exceeded
v1.2.1 - bugfix
- fixed error "aim_stamina.script:204: attempt to compare table with number" (happened in GAMMA)
v1.2 - major update, new features, bugfix
- 2 operational modes
- implemented weapon sway
- max. aim stamina limit increased to 180
- if HUD hide timer = 0 the HUD is always visible
- addon can be disabled temporarily via MCM. Useful in debug mode e.g. when using the weapon HUD editor
- fixed a bug in "Heavy" hardcore mode where the gun wouldn't be lowered automatically when not aiming if aim stamina = 0
- updated russian and spanish MCM menu translations (thanks to lizzardman and Blackjeison)
v1.1.1 - bugfix
- Fixed a critical bug that crashed the game when the player died (thanks to bvcx for the hint!)
v1.1 - major update
- added two hardcore modes
- in normal mode aim stamina is now recovered faster when lowering the gun
- HUD now hides after a certain amount of time when not aiming (customizable via MCM)
- updated russian and spanish MCM menu translations (thanks to lizzardman and Blackjeison)
- fixed weird behavior of the calculation formula where lowering the rate range would make guns weighing less than 1 kg "become heavier"
v1.0.2 - spanish translation added
v1.0.1 - russian translation added
v1.0 - initial release
Average
9.421 votes submitted.
[RESERVED]
UPDATE HISTORY
v1.3 - optional BHS integration, bugfixes/QOL stuff
- BHS HUD for GAMMA was made with help from daemon_stark. Huge thanks dude! Also thanks to Grok for permission!
- now items like binoculars, knives/axes, bolts, PDA,... no longer drain stamina or stop its recovery but their weight still influences recovery when holding them in the hand
- when below the stamina threshold for weapon sway and using binoculars the sway animation stops when the sway start threshold is exceeded
v1.2.1 - bugfix
- fixed error "aim_stamina.script:204: attempt to compare table with number" (happened in GAMMA)
v1.2 - major update, new features, bugfix
- 2 operational modes
- implemented weapon sway
- max. aim stamina limit increased to 180
- if HUD hide timer = 0 the HUD is always visible
- addon can be disabled temporarily via MCM. Useful in debug mode e.g. when using the weapon HUD editor
- fixed a bug in "Heavy" hardcore mode where the gun wouldn't be lowered automatically when not aiming if aim stamina = 0
- updated russian and spanish MCM menu translations (thanks to lizzardman and Blackjeison)
v1.1.1 - bugfix
- fixed a critical bug that crashed the game when the player died (thanks to bvcx for the hint!)
v1.1 - major update
- added two hardcore modes
- in normal mode aim stamina is now recovered faster when lowering the gun
- HUD now hides after a certain amount of time when not aiming (customizable via MCM)
- russian and spanish MCM menu translations updated (thanks to lizzardman and Blackjeison)
- fixed weird behavior of the calculation formula where lowering the rate range would make guns weighing less than 1 kg "become heavier"
v1.0.2 - spanish translation added. Thank you Blackjeison!
v1.0.1 - russian translation added. Thank you lizzardman!
v1.0 - initial release
Neat, but sadly makes LMG's even worse by default.
Does this work with Gamma out of the box?
Try tweaking the rate range. Lowering the value makes heavy guns behave more like light guns.
Don't know. Have tested it with normal (but modded) Anomaly. Just try and tell if it works. :)
Seems to work fine. Thanks for the mod.
Small suggestion, make the bar fade out after some time if not drained.
Good to hear, enjoy the addon!
Yes, I have thought about that too but yet don't know how to implement it. I'll give it a try.
Why? I don't lose my breath from aiming my Remington IRL. You Tarkov fanboys really love gimping yourselves, huh?
You don't lose your breath but holding a heavy object away from your body still makes your arms tired after some time
(buried)
@[Tosox](members:tosox:4554300)
Okay come to the range with me some time, lets put that to the test. Lol.
Classic "I played airsoft couple of times I know how guns work irl and let me tell you how it should be in video game".
Seeing these debates in gamma discord 10 times per day. And surprisingly everyone has different opinion (I guess the laws of physics are different for everyone).
(buried)
Ooh, we got an armchair warrior over here. Did you serve? Sit down.
Your forearms get tired from holding the weapon in the ready position
That is what the mod is simulating
Dont like it? Dont use it
Yeah, I hate to break it to the OP of this mod but Spigot is making a really good point.
If you spend any time at all - literally have any training or experience aiming or shooting rifles - ... this really is not a terribly huge issue.
You might have a problem 'aiming' a SAW or some sort of heavy weapon. But any soldier or marine with even a slight bit of physical training has almost no problem aiming a rifle, shotgun, etc. We carry 80+ lbs of gear for field training on ops.
This isn't an issue - ever. ... There are other ways to make this game 'hard' or 'difficult' but just gonna say ... this mod is very artificial.
If you want unrealistic difficulty "Just to make the game hard" -- uh, neat. The M.I.S.E.R.Y. guys would love you.
Just a thought: you could also reduce stamina when having the weapon at the ready. That way lowering your weapon would have an actual use
No bad idea. I'll ponder my orb about this. It would fit the hardcore mode that I might implement.
eshkerk from krakov)))
I'd like to propose two ideas... One is that once the seconds hit zero, it could start to drain the player's stamina, thus making it difficult if they have to run or whatever. Or once the count reaches zero, you could simulate a large jitter in your aim, making it difficult to target your enemy.
Thanks for your suggestions!
Yea, I think that this, rather than forcing the player out of ADS, is the best implementation. Increased weapon sway and stamina drain.
Thanks for your contribution to the topic.
I'd keep the force out of aim feature. Otherwise what would happen once your normal stamina is depleted too, nothing?
Weapon sway is something that I think is a good idea. I will probably implement this (just have to figure out how).
That's right, having 40 kilos on your back walking for more than a kilometer for days wet and hungry, with a vest that crushes your lungs is very little what the mod does compared to real life, so the mod is perfect thanks author it will be first on my list
Glad you like it! :)
It seems incompatible with "ITEON'S PDA TASKBOARD", but I still like your mod (machine translation)
OK? I just tested my addon with the taskboard addon and didn't encounter any obvious issues. Can you explain what happened please? Did the game crash or did one of the two addons not work properly?
It's a game crash. When I use the PDA Refresh tasks button, the game freezes for a second and then crashes. However, if I don't install "private aim stationary", it seems to be fine. Do you need to check my crash log
I did the same and the game didn't crash, mh . . .
Yes, send me the crash log please. :)
The location where the game crashes is Dead City, Mercenary Base
Ah ok. I tested in Cordon. I'll do another test in Dead City.
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : C:\anomaly_src\xray-monolith\src\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: e:/game/v6\gamedata\scripts\tmrs_tasks.script:323: attempt to call field 'get_random_freq' (a nil value)
This crash doesn't seem to be related to either the taskboard addon or my addon. Do you use MO2? if yes, on the right side underneath the launch button in the "data" tab where the Anomaly folder structure is shown, at the bottom of that window there is a filter bar. Type "tmrs_tasks.script" (without "") to see the addon that has this file.
If the window doesn't show the addon name then try the same in the explorer. Navigate to the folder where all the addons are installed and type the script name in the search bar. This should show you the file path leading to the addon that has that script file. This addon causes the crash.
I deleted the mod containing "tmrs_tasks. script", but there are still game crashes
Which one was it and did you try with my addon installed?
This error is still a problem with the "taskboard"Mod and "aim stamina"Mod but I cannot find the file "tasksfate.script"
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : C:\anomaly_src\xray-monolith\src\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: e:/game/v6\gamedata\scripts\tasks_fate.script:120: attempt to call field 'get_random_freq' (a nil value)
This is the new crash log
It's interesting that I couldn't find this "tasks_fate.script" file in both the game directory and MO2 Manager
Maybe it was part of the addon you just deleted. I think we should continue this conversation in the private chat. Are you ok with that?
Okay
I've sent you a message. Check your inbox. :)
tmrs_tasks.script is from the Task Timers addon btw Moddb.com (if you didn't figure it out yet)
We did. Thank you still. :)
translation to Spanish Drive.google.com
Thank you very much! Just updated the addon. :)
Great job on this mod, this'll make it better sneaking around with a ghillie and a sniper
Thank you! Enjoy the addon. :)
an interesting addon, I like it. but.. unfortunately, this does not go well with the add-on "DRAGGABLE HUD EDITOR" (https://www.moddb.com/mods/stalker-anomaly/addons/draggable-hud-editor).
If you try to adjust the sight of the weapon using "DHE" - a failure will occur caused by your addon - the sight will stop working. For those who use "DHE", it is necessary to disable "privates-aim-stamina" during editing.
Yeah. I know this something to keep in mind. Maybe I can implement a bypass switch for the addon when draggable hud editor is activated.
Expression : <no expression>
Function : CScriptEngine::lua_pcall_failed
File : D:\a\xray-monolith\xray-monolith\src\xrServerEntities\script_engine.cpp
Line : 262
Description : fatal error
Arguments :
1 : [Lua] ....k.e.r anomaly 1.5.2\gamedata\scripts\aim_stamina.script(340) : f
LUA error: ....k.e.r anomaly 1.5.2\gamedata\scripts\aim_stamina.script:340: attempt to index global 'HUD' (a nil value)
Check log for details
stack trace:
Can you explain when the crash happened? What did you do when the game crahed?
Time event fires when HUD is already destroyed, add a check for if HUD not nil.
Thank you for the hint! :)
At the death of a character
can you tell me if it can be fixed quickly? maybe fix some line in the script files?
this error is not permanent, it is triggered randomly
I updated the addon already. Should be fixed now.
You are the best
You're welcome! :)