PowerSilencer powerup

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

PowerSilencer powerup

Post by 22alpha22 »

I've been busy creating a Quake II resource mod (http://forum.zdoom.org/viewtopic.php?f=37&t=45628) and now I've gotten to a point where I'm trying to implement Quake II's silencer. I initially tried to make it with the "A_ChangeFlag" action function to toggle a weapon's NOALERT flag when the silencer was active. However, that flag doesn't work with the action function, so I had to find alternate means of achieving the silencer effect. The relevant thread can be found here: (http://forum.zdoom.org/viewtopic.php?f=3&t=47143)

Currently I'm using messy ACS and duplicate silenced versions of my weapons to achieve the silencer effect. This is both breakable and not authentic to Quake II. This brings me to the point of this feature request.
Graf Zahl wrote:Frankly, the only viable option I see would be to add a PowerSilencer powerup that not only disables alerting monsters but also reduces the weapon's sounds (i.e. anything being played on CHAN_WEAPON.)
This would allow me to implement the silencer completely faithful to Quake II and minimize the ability of the player to break it. Another option would be to add another powerup similar to "PowerWeaponLevel2" so I could seamlessly switch to a silenced version of the weapon without the player noticing.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PowerSilencer powerup

Post by Enjay »

Simply reducing the sounds might not be the best seeing as how suppressed weapons are not merely quieter, but sound different. Some way of specifying an alternative sound would be good. Unfortunately, the many way of causing a weapon to make a sound would complicate this I suspect. Perhaps the "PowerWeaponLevel2" idea is better?
User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: PowerSilencer powerup

Post by 22alpha22 »

Enjay wrote:Simply reducing the sounds might not be the best seeing as how suppressed weapons are not merely quieter, but sound different. Some way of specifying an alternative sound would be good. Unfortunately, the many way of causing a weapon to make a sound would complicate this I suspect. Perhaps the "PowerWeaponLevel2" idea is better?
Quake II's silenced weapon sounds were just reduced, they didn't sound any different. I personally don't care if either a new silencer powerup is added or another "PowerWeaponLevel2" type powerup is. Both will achieve the same result for me so either will do. I can't use the existing "PowerWeaponLevel2" for the silencer because I'm already using it for the Quad Damage.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PowerSilencer powerup

Post by Enjay »

22alpha22 wrote:Quake II's silenced weapon sounds were just reduced, they didn't sound any different.
So, that would be fine for a Quake II mod (which is obviously where your current interest lies) but would, perhaps, be a bit limited/specific for general use. But, perhaps, simple is better in this case?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

At worst a secondary attack sound needs to be added. Big deal!
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PowerSilencer powerup

Post by Enjay »

I was thinking of cases a modder wasn't using attack sounds but perhaps playing sounds via some other pointers, perhaps not on the weapon channel, or perhaps if the "weapon" sound is actually coming from a projectile or whatever.

However, I guess a modder who wants to do things in a non-standard way, and who wants to have a silencer powerup, should be able to work out how to get his non-standard sound system to work with his own version of the powerup.

I'm all for keeping the core idea nice and simple. :)
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: PowerSilencer powerup

Post by Snarboo »

This is a pretty cool idea for a powerup! Could be used to replace the invisibility sphere in Doom mods. :p
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PowerSilencer powerup

Post by Enjay »

Snarboo wrote:This is a pretty cool idea for a powerup! Could be used to replace the invisibility sphere in Doom mods. :p
Or augment it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

Enjay wrote: However, I guess a modder who wants to do things in a non-standard way, and who wants to have a silencer powerup, should be able to work out how to get his non-standard sound system to work with his own version of the powerup.
Precisely that. If someone feels some need to overcomplicate matters, they need to work out their problems on their own.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: PowerSilencer powerup

Post by Matt »

So would such a powerup reduce volume for all sounds generated by the player through some state in the weapon, or everything played through the weapon channel, or all sounds generated by the player at all?

(And if this is implemented it should definitely be something that can be accessed through (A_)CheckInventory like berserk or invulnerability rather than say the map revealer)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

I'd make it simple: It silences the weapon sound channel (meaning, ANY sound on it, no matter where it got started) and nothing else. Anything else would be too confusing and prone to errors.
User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: PowerSilencer powerup

Post by Xaser »

I'd reeeeeeeally hate it if the default behavior is to literally play no sound at all. How's that going to make any sense? o_O

An alternative AttackSound is the better approach since that'd let us define a proper suppressed-fire sound; nonstandard sound-plays can take advantage of A_JumpIfInventory to achieve the same effect, and the default AttackSound will still play if the new property ("SilentAttackSound" or whatever) is left blank.

The important functional piece is the NOTARGET simulation; if we can't access that without also losing a sound channel unconditionally, it'd be a pain. x:
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: PowerSilencer powerup

Post by jpalomo »

How about using powerup.strength to determine how much to silence the weapon channel?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

My idea would be:

If an alternative is specified, that one will be played at full volume.
If not, the original sound will be played at, say 10% of its original volume. Powerup.Strength is probably not the best way to handle it. If you really want a silencer you should specify a silenced sound.

In any case, the silenced sound should probably be defined through SNDINFO as an alternative by appending some name extension, to allow adding a silenced attack sound to existing weapons.
We'd also need a WEAPON.NOSILENCER flag because it's almost a guarantee that there's weapons which are not supposed to be silenced by such a powerup.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: PowerSilencer powerup

Post by Arctangent »

Graf Zahl wrote:We'd also need a WEAPON.NOSILENCER flag because it's almost a guarantee that there's weapons which are not supposed to be silenced by such a powerup.
Nonsense, missile launchers are perfect stealth weapons!

Return to “Feature Suggestions [GZDoom]”