Translator for MonsterHunt

Search, find and discuss about Mutators!
Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Translator for MonsterHunt

Post by Buggie » Sat Mar 27, 2021 10:29 pm

This mutator implement translator in game (and give one at start for each player) for read TranslatorEvent messages.

Created for MonsterHunt, but not depends from it. So can be used for any UT99 game type.

For text used 'CriticalEvent' messages. Usually it render on center of screen.

You can change this by UnrealTournament.ini:

Code: Select all

[MHTranslator2.MHTranslatorMutator]
MessageType=Say
Full list of messages depends from your HUD.
Usually it can be:
Say, TeamSay, CriticalEvent, DeathMessage, Pickup, Default

If you activate this Translator as item, last message appear on screen again.

Translator properly work with text up to 20 000 chars.

All work on of all kind of server types: Standalone, Listen and Dedicated.

Any user can run commands:
mutate TranslatorEvents show
mutate TranslatorEvents hide
Which spawn/hide visible for this client actors "Flag1" at each "TranslatorEvent" actor.
Useful for view were TranslatorEvents located on map.
scr_1616880300.png
scr_1616880365.png
MHTranslator2.zip
old
Show
MHTranslator.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Buggie on Tue Apr 13, 2021 6:33 am, edited 1 time in total.

User avatar
EvilGrins
Godlike
Posts: 7895
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Re: Translator for MonsterHunt

Post by EvilGrins » Sat Mar 27, 2021 11:25 pm

How do you activate it?

There was an Unreal Translator that exists in ut99 but it never worked right because it's dead-set on F2 being how you activate it, which causes conflicts with UT.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Sat Mar 27, 2021 11:38 pm

It is always active. But if you need last message again you can use InventoryPrevious, InventoryNext and InventoryActivate.

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

Re: Translator for MonsterHunt

Post by OjitroC » Sun Mar 28, 2021 12:57 am

That's brilliant - works in SP with OldSkool Amp'd - much better having the text on the screen rather than trying to read the small Universal Translator screen. The text in SP is still quite small but more easily read now :gj:

A refinement would be to have the length of time that the message remains on screen configurable - in the MH map I tried the mutator out in, a couple more seconds would have been good, just so I could read the whole of long messages without having to press the InventoryActivate key. Not a big deal though.

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Sun Mar 28, 2021 1:11 am

Time to fade message depends from HUD, not from message poster. So tune HUD for this. Maybe exists some options - IDK.

--- EDIT ---

Also old translator is removed from Inventory if use this mutator and you not able pickup it anymore. For prevent mess with Translators where messages must appear.

Also message from this Translator duplicated to console. So just open console (tilda) for read it very sloooow.

User avatar
Barbie
Godlike
Posts: 2069
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Translator for MonsterHunt

Post by Barbie » Tue Mar 30, 2021 11:50 am

Good job! :gj:
Some suggestions for improvements for further versions:
1) add source code, versioning and some kind of CopyRight/CopyLess hints 8)
2) make the type of ClientMessage ("CriticalEvent" in current version) configurable so that a HUD can be customized for it
3) add something like "mutate TranslatorEvents show" and spawn/remove something visible on clients
4) consider setting bDisplayableInv to FALSE to suppress its display in HUD
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Tue Mar 30, 2021 12:58 pm

1. Source code does not exists. I build this package with UnrealEd only. No umake/ucc/uc scripts. So use UnrealEd for get sources.
Versiong will be simple - MHTranslatorNNN for package name. Where NNN is 2, 3, 4, ...
License - WTFPL.
2. OK.
3. Spawn some deco maybe. IDK. I will look for which actor best fit for this.
4. OK.

User avatar
EvilGrins
Godlike
Posts: 7895
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Re: Translator for MonsterHunt

Post by EvilGrins » Tue Mar 30, 2021 5:48 pm

Lives "999"?!?
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

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

Re: Translator for MonsterHunt

Post by OjitroC » Tue Mar 30, 2021 5:55 pm

EvilGrins wrote:
Tue Mar 30, 2021 5:48 pm
Lives "999"?!?
Don't you do that? It ensures that the game doesn't finish before you complete the map - one could set it lower but there's no real reason not to set that limit to the maximum. I've always done that, coupled with no time limit.

User avatar
EvilGrins
Godlike
Posts: 7895
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA

Re: Translator for MonsterHunt

Post by EvilGrins » Tue Mar 30, 2021 11:58 pm

OjitroC wrote:
Tue Mar 30, 2021 5:55 pm
EvilGrins wrote:
Tue Mar 30, 2021 5:48 pm
Lives "999"?!?
Don't you do that? It ensures that the game doesn't finish before you complete the map
You do know there's a setting for no limit of lives, right?
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758

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

Re: Translator for MonsterHunt

Post by OjitroC » Wed Mar 31, 2021 12:16 am

EvilGrins wrote:
Tue Mar 30, 2021 11:58 pm
OjitroC wrote:
Tue Mar 30, 2021 5:55 pm
EvilGrins wrote:
Tue Mar 30, 2021 5:48 pm
Lives "999"?!?
Don't you do that? It ensures that the game doesn't finish before you complete the map
You do know there's a setting for no limit of lives, right?
Yes - there is or was a reason why I use 999 rather than 0 - can't remember what it was now, perhaps using 0 caused an issue; maybe it didn't work properly, I have a vague memory of games ending prematurely and unexpectedly - what it was precisely is now lost in the mists of time.

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Sat Apr 03, 2021 10:38 am

Barbie wrote:
Tue Mar 30, 2021 11:50 am
3) add something like "mutate TranslatorEvents show" and spawn/remove something visible on clients
You mean something like this:
Admin can run debug command:
mutate TranslatorEvents show
Which spawn visible for client Actor "Flag1" at each "TranslatorEvent" actor.
Useful for debug TranslatorEvent's on server.

Code: Select all

function Mutate(string MutateString, PlayerPawn Sender)
{
	local TranslatorEvent te;
	local Flag1 marker;

	if (MutateString ~= "TranslatorEvents show") {
		if (Sender != None && Sender.bAdmin) {
			foreach AllActors(class'Flag1', marker, 'MHTranslatorMarker') {
				marker.Destroy();
			}
			foreach AllActors(class'TranslatorEvent', te) {
				te.Spawn(class'Flag1', self, 'MHTranslatorMarker');
			}
		}
		return;
	}
	Super.Mutate(MutateString, Sender);
}
scr_1617442687.png
?
You do not have the required permissions to view the files attached to this post.

User avatar
Barbie
Godlike
Posts: 2069
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Translator for MonsterHunt

Post by Barbie » Sat Apr 03, 2021 11:30 am

Very close - but I thought that it could be done by each player individually, so that only that player can see the markers.

And instead of spawning a flag maybe change the visibility of a TanslatorEvent simply?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Sat Apr 03, 2021 4:17 pm

Barbie wrote:
Sat Apr 03, 2021 11:30 am
maybe change the visibility of a TanslatorEvent simply?
TranslatorEvent not exists on client.
You can check by self via
editactor class=TranslatorEvent
This is main problem. So if you need make this on client only - you in big trouble.
Barbie wrote:
Sat Apr 03, 2021 11:30 am
done by each player individually, so that only that player can see the markers.
Possible it can be done via subclass the Flag1 with special replication rule with include bOwner...
Also set bOnlyOwnerSee to true...
For each player make own subset of actors on server with individual tags...
Set Owner to caller of mutate command...
And so on.

So problem maybe can be solved. But I do not understand reason for all this mess. For what?
Who (except admin which debug map) need this feature? For what?

--- EDIT ---

Second fast attempt:

Code: Select all

function Mutate(string MutateString, PlayerPawn Sender)
{
	local TranslatorEvent te;
	local Flag1 marker;
	local string msg;
	local bool show;

	if (Sender != None) {
		msg = "TranslatorEvents ";
		if (Left(MutateString, Len(msg)) ~= msg) {
			show = Mid(MutateString, Len(msg), 100) ~= "show";
			foreach Sender.ChildActors(class'Flag1', marker) {
				marker.Destroy();
			}
			if (show) {
				foreach AllActors(class'TranslatorEvent', te) {
					marker = te.Spawn(class'Flag1', Sender);
					marker.bOnlyOwnerSee = true;
				}
			}
			return;
		}
	}
	Super.Mutate(MutateString, Sender);
}
If this enough for you, I can add this implementattion.

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Translator for MonsterHunt

Post by Buggie » Tue Apr 13, 2021 6:35 am

Barbie wrote:
Tue Mar 30, 2021 11:50 am
Good job! :gj:
Some suggestions for improvements for further versions:
1) add source code, versioning and some kind of CopyRight/CopyLess hints 8)
2) make the type of ClientMessage ("CriticalEvent" in current version) configurable so that a HUD can be customized for it
3) add something like "mutate TranslatorEvents show" and spawn/remove something visible on clients
4) consider setting bDisplayableInv to FALSE to suppress its display in HUD
Added MHTranslator2 (first post updated).