NoHeadShots.u, .int mutator?

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

Re: NoHeadShots.u, .int mutator?

Post by OjitroC »

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
Average
Posts: 76
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Dinghy-O-Death Cap'n
Location: Lost at Sea

Re: NoHeadShots.u, .int mutator?

Post by Peamole »

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: 3630
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC »

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
Average
Posts: 76
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Dinghy-O-Death Cap'n
Location: Lost at Sea

Re: NoHeadShots.u, .int mutator?

Post by Peamole »

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: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: NoHeadShots.u, .int mutator?

Post by sektor2111 »

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: 3630
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC »

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
(3.19 KiB) Downloaded 13 times
User avatar
Peamole
Average
Posts: 76
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Dinghy-O-Death Cap'n
Location: Lost at Sea

Re: NoHeadShots.u, .int mutator?

Post by Peamole »

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: 3630
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC »

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
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).
User avatar
Peamole
Average
Posts: 76
Joined: Tue Jan 05, 2021 5:12 pm
Personal rank: Dinghy-O-Death Cap'n
Location: Lost at Sea

Re: NoHeadShots.u, .int mutator?

Post by Peamole »

Sorry for the late reply — I'm a slacker with hundreds of unfinished maps, missing files, broken *.u files, et cetera. :loool: I do have some old Unreal work that's almost done...
Thanks, OjitroC and everyone in this thread. I'll try joining and asking in that forum. I still don't know what to do with a lot of the code that some of you posted. Do I paste it into a Botpack.u game type actor or something? Around 80% of what I do in UEd 2.0 makes the program crash and sometimes I lose hours of work. :sad2: Hours.
User avatar
OjitroC
Godlike
Posts: 3630
Joined: Sat Sep 12, 2015 8:46 pm

Re: NoHeadShots.u, .int mutator?

Post by OjitroC »

Peamole wrote: Tue Feb 16, 2021 5:45 pm I'll try joining and asking in that forum.
I have actually raised the issue and asked if an enhancement is possible - see issue 204 on the OldUnreal/UnrealTournamentPatches Issues page.
Peamole wrote: Tue Feb 16, 2021 5:45 pm I still don't know what to do with a lot of the code that some of you posted. Do I paste it into a Botpack.u game type actor or something?
No - it's more complicated than that - you would need to write new game types to remove all the messages (or at least make them optional).
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: NoHeadShots.u, .int mutator?

Post by sektor2111 »

Unreal Editor is used to crash because it's not stable, crashes are accelerated by bad mapper moves, trying to gain unexistent features, bad imports, assigning a bad class in another variable type, aligning at grid a complex brush, toggling viewports while sound is playing and driver going down-hill (this was newer...), and so on with much more. The only way is getting used to SAVE your work or set automatic saving at each 5 minutes (at the cost of filling HDD space). I always hit save button each 5-8 minutes based on my human bio-timer installed in ages when I was a student writing various docs...

In topic.... Forget messing with AudioSystem - that has not much to do with the Root where messages are fired. It's DeathMatchPlus all day long and TournamentPlayer, simple as that. By switching game-type or lowering volume in a moment using whatever mutator, you'll will prevent sounds to take place. AudioSystem doesn't do anything unless you want a muted game out of any sound.
Post Reply