Localised Team Switch message  (Read 13745 times)

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Localised Team Switch message
« on: February 10, 2022, 09:46 »
Howdy!

I was wondering if the Equalizer's team switch message (You are on Red/Blue) needs be localised. A well behaved mutator should do that.

Let me know your feelings here!
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Piglet

  • 1337
  • *
  • Posts: 3248
  • Country: gb
Re: Localised Team Switch message
« Reply #1 on: February 10, 2022, 10:18 »
Hi mate,

I'd not thought of that. I think it has to be doesn't it? Do you think the problem we're seeing is that the client and server are out of line in the value being passed to the class

i.e. is the server value of NewTeam different to the client value of NewTeam?

Code: [Select]
Level.Game.BroadcastHandler.BroadcastLocalized(none, Player, class'EQTeamSwitchMessage', NewTeam, Player.PlayerReplicationInfo);

I really get confused as to what is on client and what is on server. One of these days I'm going to have to work through it!

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: Localised Team Switch message
« Reply #2 on: February 10, 2022, 10:35 »
So the code you quoted is executed on Server. Basically the function calls all the boradcast handlers in the chain and executes the function
ReceiveLocalizedMessage (https://ericdives.com/UT2004-UnCodex/engine/playercontroller.html#_ReceiveLocalizedMessage-) in the PlayerController class (note: still on server).

Now the function is declared in the Replication block (line #374 https://ericdives.com/UT2004-UnCodex/Source_engine/playercontroller.html#374) of the class, meaning, it shall be executed on the client. So, naturally, all the arguments gonna replicate to the client, and unless there is some flipflop of bytes during so, the team-to-switch-to variable (NewTeam) shouldn't flip.

That'd result in appropriate teamchange message and sound!
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Piglet

  • 1337
  • *
  • Posts: 3248
  • Country: gb
Re: Localised Team Switch message
« Reply #3 on: February 10, 2022, 10:58 »
Ok. In practice we're hearing the wrong sound. I don't know what message is being generated in that circumstance,

On my test server I only have one player - but it doesn't happen if I'm on blue at the start and get switched to red. I can't reproduce it.

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: Localised Team Switch message
« Reply #4 on: February 10, 2022, 11:42 »
hmm, I asked eveyone to check the sound, but go no response from them.

Personally I am receiving correct sounds!
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Romulus

  • 1337
  • *
  • Posts: 301
  • Country: hu
  • ❤️JL❤️
Re: Localised Team Switch message
« Reply #5 on: February 10, 2022, 13:53 »
Nálam hibás.

kops

Re: Localised Team Switch message
« Reply #6 on: February 10, 2022, 14:26 »
Please stick to English on the forums.

Romulus

  • 1337
  • *
  • Posts: 301
  • Country: hu
  • ❤️JL❤️
Re: Localised Team Switch message
« Reply #7 on: February 10, 2022, 14:27 »
Please stick to English on the forums.
I speak very little English! Sorry.

kops

Re: Localised Team Switch message
« Reply #8 on: February 10, 2022, 15:14 »
You seem to speak English pretty well when it suits you and you certainly speak a lot more English than most people here speak Hungarian.  Nobody's forcing you to speak English here but perhaps try - it'll be good practice and we won't have to go to google translate every time you post :)

Anyway - let's not derail the thread.

Romulus

  • 1337
  • *
  • Posts: 301
  • Country: hu
  • ❤️JL❤️
Re: Localised Team Switch message
« Reply #9 on: February 10, 2022, 15:23 »
You seem to speak English pretty well when it suits you and you certainly speak a lot more English than most people here speak Hungarian.  Nobody's forcing you to speak English here but perhaps try - it'll be good practice and we won't have to go to google translate every time you post :)

Anyway - let's not derail the thread.
Believe it or not, I need it every time  :(
When I post an English post, I always need the google translator
Because unfortunately I don't speak English.
Even in the game, I don’t respond to messages they write to me because I don’t understand.
(Sometimes I feel better if I don’t even understand what they’re writing to me ;D)
« Last Edit: February 10, 2022, 15:27 by Romulus »

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: Localised Team Switch message
« Reply #10 on: February 10, 2022, 21:35 »
Ok, so on topic, I think, create a file in System folder with the name "Equalizer_TC_alpha1" (without quotes) with one of the extensions in the list. The dictionary is like so
  • int = Natural English
(yeah don't get offended!  :)) 8))
  • det = German
  • frt = French
  • itt = Italian
  • est = Spanish
  • rut = Russian

(sorry if I missed some languages, let me know!)

Now in the file, add a section (with quotes)
Code: [Select]
[EQTeamSwitchMessage]
SwitchToRed="You are on Red!"
SwitchToBlue="You are on Blue!"

Finally, translate the characters in between "" to those of your native language!
Should work, haven't tried myself though!! Let me know if doesn't work!!!
« Last Edit: February 11, 2022, 03:09 by The_Cowboy »
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Romulus

  • 1337
  • *
  • Posts: 301
  • Country: hu
  • ❤️JL❤️
Re: Localised Team Switch message
« Reply #11 on: February 11, 2022, 15:42 »
PM @The_Cowboy