UnrealScript for filtering chat log

Mapmaking? Modeling? Discuss all that stuff that's too complicated for most mere mortals here.
Post Reply
Seven_of_69
1337 Haxor
Posts: 321
Joined: Wed Jul 09, 2008 11:00 pm

Is there any way to use UnrealScript to intercept and alter the chat log? Printing TO the chat log is simple but I would like to grab the chat lines before they're displayed and have options to ignore them, alter them, modify their color, etc. I have no idea where to begin, specifically if there is a class I would need to subclass, or if it's even possible. My programming ability is expert but I'm new to UnrealScript. :ssmile:
DW_Ant
DW Clan Member
Posts: 2670
Joined: Sat Jun 21, 2008 11:00 pm
Location: North Carolina

I've seen some unique hacks and codes mappers used to display unique colors within the same message. I'm aware there's a character limit when chatting so there's a good chance that using these codes may prevent you from keeping under the character limit.

As for intercepting the chat logs, that sounds difficult to do since you'll have to write a client function and some how avoid any security programs. I'm fairly certain Anti TCC will yell at you for running an unknown program.

But if you insist on playing only on noncompetative servers then this will be the place to start I think:

Player Controller Source
This link is the UScript reference. Be mindful that you'll come across native code (specially when you get to the console part in your research). Modders don't have access to native code.

Good luck to you.
The difference between successful people from others is
not in the lack of strength,
not in the lack of knowledge,
but rather in the lack of will.

FFE466

_________________________
{F}{AH}{CivFR}{XC}{U}{DF}{CJ}{SD}
Tichinde925
Killer in Training
Posts: 19
Joined: Thu Jul 07, 2011 12:49 am
Xfire: tichinde925
Location: U.S.A. (Warwick, RI)

zEh:

Image
Image
DW_WailofSuicide
DW Clan Member
Posts: 1634
Joined: Wed Dec 28, 2005 12:00 am

I would suggest looking at PlayerChatManager. I don't know if this is the correct place but might be worth a look. What you're suggesting should be possible though: There are servers that filter out cursewords, or alter the color or content of text strings (thinking of Assault Trials servers here).
Anonymouse
1337 Haxor
Posts: 179
Joined: Sat Aug 01, 2009 7:35 pm
Location: Ithaca, NY

UT comp does colored text messages; it is used on pretty much all trial servers. Take a look at that if you can.
Image
Image
Seven_of_69
1337 Haxor
Posts: 321
Joined: Wed Jul 09, 2008 11:00 pm

Thanks for the suggestions. So far it seems like one place to start is with the UnrealGame.UnrealPlayerChatManager.AcceptText method, at least for applying a simple filter.

http://www.wailofsuicide.com/code/ut200 ... r.html#206

I guess I can subclass UnrealGame.UnrealPlayerChatManager and override the AcceptText method. But now the question becomes how do I get my code "installed"/"registered" into UT2k4? Somehow I'd have to get UT to create my subclassed object instead of an UnrealPlayerChatManager object.

Another option is the Engine.PlayerController.TeamMessage event. However I'm not sure if it can be overridden. And it also comes with its own caveats, e.g.

Code: Select all

// This is a built-in Unreal class and it shouldn't be modified.
// for the change in Possess().
And even if either method is possible, I don't want to be flagged for having untrusted client side code. :sdoh:
Post Reply