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.
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?
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.
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?
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.
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.
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)
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.
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:
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.
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!