Plays a Sound when you switch Fire-Modes on your Weapon.
I was annoyed that when I switch Fire-Modes there is no sound cue, so I wanted to make one. The First iterations of this addon, were just pure basic ltx edits and added/replaced sounds effects, with many issues. As time went by, people worked on it, so the addon can truly shine, with scripts, bugfixes, additional features. This is truly a team work of many talented authors, I just had an idea and some sounds first, they perfected the addon, to be what it is today.
The addon is now supports AMCM with Update 6. While it is not required ( you can change things manually in scripts ), I highly recommend and encourage fellow Stalkers to use it.
Anomaly Mod Configuration Menu aka AMCM and MCM addon - Mod DB
The addon now adds support for JSRS, Blindside's Reanimation Pack - Loner and Anomaly Weapons Animation Redux. Read the readme file carefully.
ATTENTION !
Depending on what other addons you use, you might not need any Compatiblity Patches at all. If you use Sneakydud's new updated EFT Weapon Reposition ( updated 1.8 ) then you in theory don't need any compatiblity patches.Reason is, all these patches contains just commented out fire mode switcher sounds. If it causes a crash, don't use it. Other cause that you might have a wrong load order.
Please, take your time and check out these Legend's addons, they do a great work.
HarukaSai :
Ishmaeel :
TheMrDemonized :
Addons - TheMrDemonized - Mod DB
Thanks for stopping by. Have a good one.
Changelog.
UPDATE :
Deleted .ltx files for compatibility. If you use MO2, use replace function to remove old files.
UPDATE 2 : Fixed, it should work now. Sorrrrryyy.
UPDATE 3 : Added two Alt Sounds.
UPDATE 4 : Fixed the distance of all three sound files, NPC's won't hear you from miles away. It can still be heard by NPC's up to 5 meters. ( Sorry that it took so long )
UPDATE 5 :
So this is a bigger one. Thanks to Ishmaeel ( Big Legend ) the addon got a considerate amount of QoL update, and it's now a generally 100% better addon than it was before. Let's see what has changed.
* Do not play sound when inventory is open or game is paused.
* Do not play sound when weapon not idle (firing/reloading).
* Do not play sound for weapons with single firing modes.
* Do not play sound for weapons that have own switch animations via other addons.
UPADTE 6 :
This is a huge one. Bloody Legends did it again, and worked on, to make this addon 100% better. Huge thanks and respect to - not in any particular order - HarukaSai, Ishmaeel and TheMrDemonized. Let's see.
* AMCM support. You can change the kind of Sound you want to be played, as well as the volume
* Pitch scaling based on Fire Mode
* Fix for Guns which only capable of switching fire mode, after upgrade.
* Added 3 new sounds to choose from, now with the convenient AMCM.
* Added Compatibility Patches for JSRS, Blindside's Reanimation Pack - Loner and Anomaly Weapons Animation Redux.
HOTFIX for UPDATE 6 :
* Fixed a crash ( Thanks Ishy).
HOTFIX 2 for UPDATE 6 :
* added missing Blindside's Reanimation Pack - Loner + JSRS Compatiblity Patch
UPDATE 7 :
Script updated by Sneaky
Thanks for stopping by.
Average
9.880 votes submitted.
Great idead this one! thx
Enjoy it mate :)
I'm going to try on my Anomaly, it seems like a good idea, it adds to have more immersion. Thank you very much mate
ok it works and I like it, you are incredible modders in this community, it seems all invented, but you still find something. 10/10
Oh man, small thing but I really wanted something like this, thank you. If I may; the sound is a tad loud, imo. And it would be great if it could be tied to the actual fire-mode switch on a weapon; as it is it will play even if you try to switch fire modes on a weapon with a single fire mode.
I updated the archive, I added two Alternative Sounds. Also, there is a way to "be tied to the actual fire-mode switch on a weapon" but that way you will have a compatibility nightmare, since I have to include weapon .ltx files. That was the "first" version of the mod, after that I've realised it would be better with a script, which I had help for. The idea is that no matter what Gun, Gun Addon you want to use, Upon Fire-Mode switch, the sound plays. Editing Weapon .ltx files is not a route I want to go back for.
I also thought that the sound was a little loud. It's just fine now. Thanks for your update.
If it is technically possible, would you be able to consider changing the sound for each Fire-Mode. If it's too difficult to assign a sound to every mode, how about making the sound stronger only when changing to one round mode? The other modes shift one by one, but when you switch back to one round mode, you move it all at once, which is immersive.
I.imgur.com
Probably, It can be done. However, I think it would require .ltx file editing, which as I stated above, doesn't want to meddle with, since it can cause compatibility nightmares. I just wanted a simple, yet effective and working solution to play a sound when changing Fire-Modes. This addon does exactly that.
Yeah, I got it. There are many popular mods that edit .ltx files, and making a patch to deal with conflicts with all of them is a nightmare. I'm sorry to say nonsense.
No it's not nonsense, no worries mate. I just like this one the way it is.
Cheers, thanks for the update. Yeah, tying the sound to the actual fire mode switch sounds like a nightmare alright. Fair enuff, i get the reasoning for the script.
Question
BaS compatibility issue
It makes a fire-mod switch sound when you change the optic site?
I use BaS myself, and I haven't encountered that issue.
Big moments are not complete without the small things.
This one, in particular, makes my gameplay much more enjoyable now. Now I don't need to divert my attention to the lower left of my screen to check what fire mode I am at. Or do I even successfully changed fire mode. Thank you, TheVoidPancake for completing my Anomaly. ^ ^
Glad to hear you like it. Enjoy mate :)
Really good addition, thanks!
Top notch goodie.
hmm, switching firemodes gets npcs on high alert and firing from as far as 10 metres away - as if the sound was too loud. will try and test further but I recall that in xray engine the actual audio level of the file is connected to how much it can be perceived in detection checks. worth looking into
EDIT: TESTED NOW, VOLUME MAKES NO DIFFERENCE, THE SOUND OF SWITCHING ITSELF ALERTS EVERYONE FROM A VERY FAR DISTANCE REGARDLESS.
seen it happen at about 30 metres or so now, instant alert for every enemy. same thing is happening with blindside's reanimation pack - the weapon switch sound specifically alerts everyone from miles away so there's something there specifically to do with that input.
Fixed now.
Hi!
In my current play through, I had not noticed the switch sound alert anyone. In fact, I tested this in debug mode by positioning myself near enemies and repeatedly switching fire-mode, and they did not respond. I will totally upgrade to this version though!
Someone introduced me to 'SAVandT.exe' where you can see the OGG comments, and I can see you've lowered the values. People on Discord mentioned the OGG files can contain additional information, I had NO idea, clever stuff!
Does this mean that ANY sound that is added to an addon needs to be run through SAVandT for this very reason?
Cheers!
EDIT:
Did some tests today with some new OGG files without editing the OGG comments.
Using the method to play sounds "xr_effects.play_snd" does not appear to actually alert NPCs.
I tested this using the "npc_on_hear_callback" in a small script using "actor_menu.set_msg" so I can see what sounds NPCs hear on-screen.
NPCs can hear player footsteps and gunshots as expected, but at no point do they return any data when the player switches fire-mode.
I also set the OGG comments to "max dist = 200" and "max AI dist = 200", with the same result, they cannot hear sounds played with the method "xr_effects.play_snd".
For those who state otherwise, I'd like to know how they came to this conclusion!
I tried to make an addon where you can press a key to whistle to distract the enemy, but all script methods to play a sound file at the player position don't alert NPCs :(
Yes!
It's fixed now. Distance reduced by a large margin. As for other addons, I can't comment on that.
How would you describe the two alt sounds? Could you add a bit more about these to the description?
Just play the sound files with VLC or such, and listen to the difference. Then use whichever you like more.
Can you give an example of how to set a preferred switch sound by editing the script "void_sound.script"?
local sound_default = "weapons\\generic\\switch_mode_gfmss0"
local sound_alt_001 = "weapons\\generic\\switch_mode_gfmss1"
local sound_alt_002 = "weapons\\generic\\switch_mode_gfmss2"
-- Customize your preferred switch sound here:
function Get_Selected_Switch_Sound()
return sound_default
end
Have you tried replacing
return sound_default
to
return sound_alt_001
?
This is BaS compliant?
Yes, I use it with BaS myself.
TheVoidPancake Thanks!
So if I've got it right, the example would be to edit line 17 of "void_fmode_sound.script" by replacing "sound_default" with any one of the sound files named in lines 12 and 13.
Line 12: local sound_alt_001 = "weapons\\generic\\switch_mode_gfmss1"
Line 13: local sound_alt_002 = "weapons\\generic\\switch_mode_gfmss2"
Examples:
-- Customize your preferred switch sound here:
function Get_Selected_Switch_Sound()
return localsound_alt_001
end
OR
-- Customize your preferred switch sound here:
function Get_Selected_Switch_Sound()
return localsound_alt_002
The new version (6) doesn't play a sound for my pistol (the "FNX-45 Tactical(Custom)"). The version I was using before (4) did. It works with the other guns I have, just not the pistol.
Idk why but after update 5 I can't hear switching sound from my gun....
I think there is a hiccup in the latest update. The switching sound doesn't play at all and I had a look at the script and found this:
-- Customize your preferred switch sound here:
function Get_Selected_Switch_Sound()
return sound_alt_default
end
... where "sound_alt_default" should rather be "sound_default" or "sound_alt_001"/"sound_alt_002".
After changing this line it works.
Yeah, I credit Ishmaeel in the script and I renamed that line to default but left the _alt_ there by mistake. Fixed
With the new version (9), get this error when switching fire modes on "FNX-45 Tactical(Custom)" pistol-
! [LUA] SCRIPT RUNTIME ERROR
! [LUA] ....e.r. - anomaly\gamedata\scripts\void_fmode_sound.script:123: attempt to index global 'wpn' (a nil value)
! [SCRIPT ERROR]: ....e.r. - anomaly\gamedata\scripts\void_fmode_sound.script:123: attempt to index global 'wpn' (a nil value)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: ....e.r. - anomaly\gamedata\scripts\void_fmode_sound.script:123: attempt to index global 'wpn' (a nil value)
EDIT: In case it helps, with version 4 it works fine. Versions newer than 4 (up to version 8) the sound doesn't work on that pistol, but there's no error or crash. With version 9 I get this crash.
Thank you for your feedback. An updated version has been uploaded, please make sure to update the addon, and see whether the crash occurs still. Cheers.
Just tested it and no more crash. Thanks a lot. Awesome add-on!
Nice, enjoy it mate!
Excuse me, I use both Blindsides and JSRS, and when applying the 2 patches you provided do they conflict with each other? Which one should I use or prioritize and in what position?
Hello there. I uploaded the patch for those, who use Blindside's and JSRS. Make sure you install the one called "Blindside's Reanimation Pack - Loner + JSRS Patch" after all of those addons.
Cheers.
I understand, the problem is that when both patches are used together for their respective plugins, they overwrite each other
Sorry for the inconvenience, I could fix it when downloading the new version, I needed that combined patch, thank you very much :)
Hello, thanks for the mod, but a couple of things of notice: selector sound is WAY too loud, much louder then the reload sound and it shouldn't be that way, a selector sound on must real weapons I ever used is much lighter. Also, the "volume" option in MCM doesn't change anything. I brought it to 0.1 and still as loud as at 1.
Hello, first of all, thank you for the feedback.
For your "Volume" issue. I tested it before upload, and after read your message, I went ahead and tested it again. The Volume slider works as it should. Please, make sure you installed the addon properly, and used Compatiblity Patches if needed. If you use the JSRS, Blindeside's Reanimation, AWAR you will need the correct patch.
For "WAY too loud" feedback.
Stalker Anomaly is a video game. Realism and Gameplay mechanics often go against each other, or have to make a compromise. This addon made, to have a sound cue to begin with, so you'll know if you switched Fire modes, either willingly or accidentally, as well adding a little immersion effect. Between guns firing, ambience sound, yelling, and an occasional Helicopter, people might want to have higher or lower volumes depends on their taste. That's why the Volume slider exists.
Again.
Make sure you installed the addon, and required patches correctly.
Cheers.
Found another minor bug. With the newest version, on the OTS-14-1a groza-1 (the one you can buy from Nimble), switching to the underbarrel grenade launcher doesn't have a sound effect (it does with version 4 of this mod and in unmodded vanilla). Don't know if this matters, but the grenade launcher is integrated with that gun.
Heya. It seems weapons where Blindside adds a fire-mode switch animation interfere with your mod. The ones I've noticed are the AKS-74 and the AKMN so far. I might try to just disable the animation in Blindside's mod anyway, I find them kind of obnoxious.
EDIT: Just commenting out "anm_switch_mode" in the weapon config file fixes it.
Some of the BaS guns that have fire mode switch animations don't make a sound, seems like it's all of the Rifle Dynamics AK variants. Also does the JSRS patch go after JSRS? Everything seems fine with or without the JSRS patch. I looked at the weapon sounds ltx files between the main JSRS file and the fire switch patch and everything seems the same. I guess I'm a little confused why the patch is needed, especially since the main fire switch gamedata file doesn't conflict with the main JSRS mod. I'm not super familiar with how all the code works together, apologies for any stupid questions.
Compatibility patches just make guns with actual switches silent when switching modes.
Aw thanks, I couldn't figure this out for the life of me!
When I install the JSRS patch, it just crashes on start up. How needed is the patch anyways?
Please tell me how to switch the shooting mode in Anomaly 1.5.1
which button should I press?