Jump to content

TheNet:Talker drawback issue

Recommended Posts

For now all the spoken text is sent to client via the function TheNet:Talker , which is server-side.


This applies to any character speeches, no matter is he(she) belong to client, or not.


So if we have some server, that was localized to some language with PO file, we derive server, which send all the messages translated.

From the other side if we have pure english server, and connect to it with localized client, we will see only pure english messages, no matter is there translation or not.


We could build some hashtable for any players messages, where the key is actual english message, and value is translation for it. Then we can hook up the Networking_GuiSay function to translate everything on the fly. We should remove all player messages translations, and leave only hashtable (see above).

And so then we get the translated text from the client side.


But... there are some situations, when english text, that looks the same in english is translated differently.


As for example:

english phraze: That's burning fast!


Он быстро сгорит! - the sapling is he in russian, so "он".
Она быстро сгорит! - the grass is she in russian, so "она".
Он быстро сгорит! - the marsh bush is he in russian, so "он".


As you can see, there is no way to detect the instance, of what it was talked about.

Maybe it is possible to send STRINGS table keys instead of their actual values?


which could be unpacked in Networking_GuiSay at client side


Could you help with this issue?



Link to comment
Share on other sites

I mostly agree, this makes sense. I think perhaps the best way to do it though would be to send both, as there are potential scenarios where the client won't have the string, but the server will. Talker is also used for announcing stuff people type in chat, so there definitely needs to be a case for that. However with some mods that might be only server-side, it could add more strings that might not exist on the client, such as a more detailed player behavior tracking system than the current "Murderer!", "That Wilson looks shifty...", "Wilson, friend of ghosts" system.


The way to implement this that makes sense to me would be to add another argument, "id", that would be nil if it's player-typed chat, or the STRINGS table address otherwise. If the client doesn't have an entry in the corresponding STRINGS location, then it would just use the text as provided by the server.


But since the only issue we know that touches this so far is gender-matching pronouns, I wouldn't expect it to be rewritten to support this soon.

Link to comment
Share on other sites

But since the only issue we know that touches this so far is gender-matching pronouns, I wouldn't expect it to be rewritten to support this soon.


Yep, i'm afraid you're right.


But the major drawback is that the PO translation system wont work with it's current implementation anymore.


This system was made by Klei, so i hope they should figure out something to resolve this issue.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...