NoHeadShots.u, .int mutator?

Search, find and discuss about Mutators!
User avatar
OjitroC
Godlike
Posts: 1998
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC » Sun Jan 10, 2021 7:05 pm

No there is no option for toggling whether one can hear VPs over announcements or other VPs - as noted earlier the Announcer is not a VP per se but the calls to 'broadcast' announcements/messages come from the Gamtypes. You can remove taunts or all messages but that's not what you want to do.

What happens if you set the Announcer volume to 0 (in the in-game menu ->Options ->Preferences ->Audio)? Certainly in 469 doing this means there is no sound from the Announcer (at least when I tried in DM - no FirstBlood announcement, no Headshot announcement) though one still gets the on-screen text messages (in 469 you can set the font size of on-screen messages so these can be as small or large as you want). I should say that I'm using the 2k4Sounds mutator with one of the non-default Announcer sound packs so I don't know what happens with the default Announcer sounds.

If that doesn't work and you are playing off-line, it might be worth experimenting with a blank Announcer.uax.

User avatar
Peamole
Novice
Posts: 5
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Lurkster

Re: NoHeadShots.u, .int mutator?

Post by Peamole » Sun Jan 10, 2021 9:31 pm

To OjitroC,
Please read the bold parts of my last post. This is what I'm talking about, condensed.

I'm using UT99:GOTY version 432 or 451 whatever, it doesn't matter.
Game type doesn't matter.
Making a blank version of Announcer.uax doesn't do what I want. The player's voice still gets muted.

User avatar
OjitroC
Godlike
Posts: 1998
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC » Sun Jan 10, 2021 11:35 pm

The Announcer volume therefore controls the volume of all 'voices' in the game, not just that of the Announcer, which I didn't appreciate before. So, as sektor says, it looks like the only solution is a custom gametype or gametypes.

User avatar
Peamole
Novice
Posts: 5
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Lurkster

Re: NoHeadShots.u, .int mutator?

Post by Peamole » Mon Jan 11, 2021 3:55 am

OjitroC wrote:
Sun Jan 10, 2021 11:35 pm
The Announcer volume therefore controls the volume of all 'voices' in the game, not just that of the Announcer, which I didn't appreciate before.
I'm sorry but that's incorrect. "Sound Volume" controls Botpack.ChallengeVoicePack, a subset of Engine.VoicePack; whereas, "Announcer Volume" controls Botpack.LocalMessagePlus a subset of Engine.LocalMessage.

:wink:

Go into the class browser:
|
[-] Actor
| |
| [-]Info
| |
| [-]LocalMessage
| |
| [-]LocalMessagePlus
: |
There you'll find all kinds of actors which are triggered to play Announcer messages.
For example a Botpack.FirstBloodMessage... Read the code.

Code: Select all

class FirstBloodMessage expands CriticalEventPlus;

var localized string FirstBloodString;

static function string GetString(
	optional int Switch,
	optional PlayerReplicationInfo RelatedPRI_1, 
	optional PlayerReplicationInfo RelatedPRI_2,
	optional Object OptionalObject
	)
{
	if (RelatedPRI_1 == None)
		return "";
	if (RelatedPRI_1.PlayerName == "")
		return "";
	return RelatedPRI_1.PlayerName@Default.FirstBloodString;
}

static simulated function ClientReceive( 
	PlayerPawn P,
	optional int Switch,
	optional PlayerReplicationInfo RelatedPRI_1, 
	optional PlayerReplicationInfo RelatedPRI_2,
	optional Object OptionalObject
	)
{
	Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);

	if (RelatedPRI_1 != P.PlayerReplicationInfo)
		return;

	P.ClientPlaySound(sound'Announcer.FirstBlood',, true);
}
At the end is what makes sound'Announcer.FirstBlood' play.
I think the issue is deeper, at Core.u, where the programmer(s) may have conveniently hidden the scripts of most subclasses of Core.Object (via some method unbeknownst to me). But that is just my uncertain speculation.

Is the issue at Engine.AudioSubsystem, Engine.Sound or something else? :noidea Anyone?

User avatar
sektor2111
Godlike
Posts: 4970
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: NoHeadShots.u, .int mutator?

Post by sektor2111 » Mon Jan 11, 2021 7:18 am

Like I said, these messages are resident in BotPack and launched from game-type which is class DeathMatchPlus spread also in the rest of child classes when are used TDM, CTF, etc. Why you don't simply check/look into class already described ? Core.u has nothing to do with these messages, these are resident in BotPack and other types are coming from Engine.

Code: Select all

function Killed(pawn killer, pawn Other, name damageType)
{
	local int NextTaunt, i;
	local bool bAutoTaunt, bEndOverTime;
	local Pawn P, Best;
...
...
	if ( !bFirstBlood )
		if ( Killer.bIsPlayer && (Killer != Other) )
			if (!Self.IsA('TrainingDM'))
			{
				bFirstBlood = True;
				BroadcastLocalizedMessage( class'FirstBloodMessage', 0, Killer.PlayerReplicationInfo );
			}
"FirstBlood" can be removed by simply putting variable bFirstBlood = True in first second of game before all events. If bFirstBlod goes True this type of message won't be shown, for the rest, out of making changes at stock files, a new game-type with these functions rewritten will solve the problem.

If you screw audio part from Core, every single sound from game goes removed as well (weapons, explosions, etc) - Why over-thinking ?

User avatar
OjitroC
Godlike
Posts: 1998
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC » Mon Jan 11, 2021 11:51 am

Peamole wrote:
Mon Jan 11, 2021 3:55 am
OjitroC wrote:
Sun Jan 10, 2021 11:35 pm
The Announcer volume therefore controls the volume of all 'voices' in the game, not just that of the Announcer, which I didn't appreciate before.
I'm sorry but that's incorrect. "Sound Volume" controls Botpack.ChallengeVoicePack, a subset of Engine.VoicePack; whereas, "Announcer Volume" controls Botpack.LocalMessagePlus a subset of Engine.LocalMessage.
I'm curious why setting AnnouncerVolume to 0 mutes all voice sounds in the game - which it does (and so there must be a direct relationship) - since, on the face of it, this would appear to be the solution to what you want - mute the Announcer but not other 'voices'.

AnnouncerVolume does not appear in LocalMessagePlus - 'Announcer.FirstBlood' is merely the sound to be played when FirstBloodMessage is called.

The effect of AnnouncerVolume is actually found in Botpack.TournamentPlayer:-

Code: Select all

//Play a sound client side (so only client will hear it
simulated function ClientPlaySound(sound ASound, optional bool bInterrupt, optional bool bVolumeControl )
{   
    local actor SoundPlayer;
    local int Volume;

    if ( b3DSound )
    {
        if ( bVolumeControl && (AnnouncerVolume == 0) )
            Volume = 0;
        else
            Volume = 1;
    }
    else if ( bVolumeControl )
        Volume = AnnouncerVolume;
    else
        Volume = 4;

    LastPlaySound = Level.TimeSeconds;  // so voice messages won't overlap
    if ( ViewTarget != None )
        SoundPlayer = ViewTarget;
    else
        SoundPlayer = self;

    if ( Volume == 0 )
        return;
    SoundPlayer.PlaySound(ASound, SLOT_None, 16.0, bInterrupt);
    if ( Volume == 1 )
        return;
    SoundPlayer.PlaySound(ASound, SLOT_Interface, 16.0, bInterrupt);
    if ( Volume == 2 )
        return;
    SoundPlayer.PlaySound(ASound, SLOT_Misc, 16.0, bInterrupt);
    if ( Volume == 3 )
        return;
    SoundPlayer.PlaySound(ASound, SLOT_Talk, 16.0, bInterrupt);
}
It's better to use the UnCodeX for looking at this kind of thing as, inter alia, it has a glossary to look up 'terms' (actors, functions, etc, etc) and it is clearer and more informative than trying to use individual classes in the UEd Actor tree as one can easily see what has been inherited from superior classes - this is more difficult and time consuming using UEd.

As sektor says, the solution to what you want lies in new gametypes that remove (or alter) the calls to 'broadcast' the messages (though see below).


---------------------- ------------------------------------- --------------------------------- UPDATE ---------------------------------- -------------------------------------- ----------------------------------- --------------
I've found a mutator that removes the FirstBlood and Headshot announcements from DM - only tried it briefly and it worked (it removes the sound and replaces the text with something else). It may partially solve your problem and it could be used as a base to (try to) remove other unwanted announcements
CustomMessages.zip
You do not have the required permissions to view the files attached to this post.

User avatar
Peamole
Novice
Posts: 5
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Lurkster

Re: NoHeadShots.u, .int mutator?

Post by Peamole » Tue Jan 12, 2021 5:51 pm

OjitroC wrote:
Mon Jan 11, 2021 11:51 am
I'm curious why setting AnnouncerVolume to 0 mutes all voice sounds in the game - which it does (and so there must be a direct relationship) - since, on the face of it, this would appear to be the solution to what you want - mute the Announcer but not other 'voices'.
Here's an idea... Maybe it does not. Maybe it plays on the same audio channel, at the same time as the one taunt. Even when the Announcer is muted, it is still tripped to play but somehow takes precedence over the current taunt, therefore, immediately cutting the sound of it right off.

Does anyone have a link to the hidden code of Engine.Sound or Engine.AudioSubsystem? I know there is code there! :omfg: The programmers have hid it with the "'AudioSubsystem' has no script to edit." shenanigan. :lol2: Yeah, right... How is one to learn programming if coders hide scripts?

User avatar
OjitroC
Godlike
Posts: 1998
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC » Tue Jan 12, 2021 7:10 pm

Peamole wrote:
Tue Jan 12, 2021 5:51 pm
Does anyone have a link to the hidden code of Engine.Sound or Engine.AudioSubsystem? I know there is code there!
Is the CustomMessages mutator of any use to you?

A suggestion - go to the 469 update thread at GitHub and create an issue asking if an option to turn of all Announcer sounds (without muting taunts, etc) can be implemented in the patch?

On Engine.AudioSubSystem
Spoiler
Show
First Core.Subsystem which defines what a SubSystem is

//=============================================================================
// Subsystem: The base class all subsystems. Subsystems usually
// correspond to large C++ classes. The benefit of defining a C++ class as
// a subsystem is that you can make some of its variables script-accessible,
// and you can make some of its properties automatically saveable as part
// of the configuration.
//
// This is a built-in Unreal class and it shouldn't be modified.
//=============================================================================
class Subsystem extends Object
native
noexport;

// Internal.
var private native const int ExecVtbl;

defaultproperties
{
}
Then Engine.AudioSubSystem
//=============================================================================
// Engine: The base class of the global application object classes.
// This is a built-in Unreal class and it shouldn't be modified.
//=============================================================================
class Engine extends Subsystem
native
noexport
transient;

// Drivers.
var config class<RenderDevice> GameRenderDevice;
var(Drivers) config class<AudioSubsystem> AudioDevice;
var(Drivers) config class<Console> Console;
var(Drivers) config class<NetDriver> NetworkDevice;
var(Drivers) config class<Language> Language;

// Variables.
var primitive Cylinder;
var const client Client;
var const renderbase Render;
var const audiosubsystem Audio;
var int TickCycles, GameCycles, ClientCycles;
var(Settings) config int CacheSizeMegs;
var(Settings) config bool UseSound;
var(Settings) float CurrentTickRate;

defaultproperties
{
CacheSizeMegs=2
UseSound=True
}
---------------------------- Addendum --------------------------------
The reason I thought setting AnnouncerVolume=0 mutes all player voice sounds in the game is because it does in 469b but, of course, in 436, it does not. Using the Voice Menu in 469b with the Announcer volume set at 0 results in no Acks/FFs/Orders/etc/etc playing at all and not just when an Announcer sound is being broadcast (as it is in 436).