Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Automatic translation of multiplayer chat

bladeshriekbladeshriek Member Posts: 6
edited October 22 in General Discussions NWN:EE
Forgive me if this is already defined on Trello or in the forums; I searched but did not see anything relevant. It would be incredibly useful for Persistent Worlds that have audiences across different nationalities to have a method of automatic translation of multiplayer chat, in real-time.

When NWN was released, this would not have been technically feasible. However, these days there are multiple API-based services that provide live and accurate text translation between major languages.

NWN is unique for many reasons, but these three are particularly relevant to this feature:
  • Text-based chat is predominantly used to communicate instead of voice (using 3rd party applications like Discord or Ventrilo, since it's not built in)
  • Roleplaying is popular in multiplayer, since NWN is a D&D-based game. Roleplaying in games is usually performed over text for somewhat obvious reasons.
  • Persistent worlds tend to harbor users from various nationalities across different regions. Other games deliberately segment regions for both user experience and network performance.

Functionally, each user would have a configuration for their native language (likely pulled through the OS). With this feature enabled, any users who receive chat messages with a different configured language and a different character set would automatically see post-translation results. It is likely that the persistent world server instance would make the required API calls to handle the translation, as opposed to the clients. The server could minimize the number of API calls by making only the required translations and distributing the results per a publisher-subscriber model, which the chat functionality likely already follows.

With the above points in mind, being able to automatically translate text from users would be useful and practical. Services like Google Translate, Yandex and Azure have really comprehensive and streamlined APIs so it's actually technically feasible now instead of circa 2002. However, I don't believe any of these services are free. I cannot say confidently if this feature request is feasible from a pricing or business perspective. Many PWs are already stretched thin with regard to server hosting costs, so they'd likely not be able to contribute to this feature from a pricing perspective. I think Beamdog would have to subsidize the cost. Thoughts?

Comments

  • SherincallSherincall Member Posts: 287
    There's just no way BD could front the cost of the translation APIs (without some serious usage caps), this is something that PWs would need to do themselves.

    Also, as this is a niche PW-only feature, that requires virtually no experience with the game itself to develop, it's a perfect candidate for NWNX. In fact, we did discuss adding it, but turns out there was not much demand - roleplaying servers generally require advanced language skills in whatever the server language is, and automated translation just can't compete. In fact, RP-heavy PWs likely would explicitly disable the feature.

    However, if you or anyone else wants to take a shot at implementing it, I'll gladly walk you through all the steps needed.

    dunahan
  • bladeshriekbladeshriek Member Posts: 6
    edited October 24
    I'd be interested in hearing from you about where this feature would belong in NWNX. I'm more curious than anything.

    I think in the future- if Beamdog or similar offered unified hosting services for PWs- they could subsidize up to a usage cap and bill the rest to admins. I do think that this really doesn't just impact roleplay; that was only one of my points. Instead it would seem that text-based communication is, in general, more appropriate in a D&D-based game and most servers see users from various regions. If NWN (or this genre) scales to larger populations, hardcore roleplay servers will form but a minority of servers and many will probably settle on modest roleplay requirements where translation would be sufficient as a means to minimize barriers between players interacting. But I do agree as it stands it's hard to justify the development costs of this feature followed by the recurring costs for the services.

  • dunahandunahan Member Posts: 49
    Hmm, I did spend some thoughts about conversion of text to multiple languages. I thought it would be possible with nwnx_chat (on nwnx2) and an external script/AI that reads the text and translated it. But due grammar, fantasy languages that can't be easy translated (speaking about Tolkiens elven/dwarven language) or only that belong to Faerun and that not every dictionary is complete (needs a learning AI, for example). I didn't got over that "sketch-phase".

    I would think of, that it is a feature of the PW/Admins themselfes to provide such an addition for its users.

  • SherincallSherincall Member Posts: 287
    This would be a separate plugin to NWNX. NWNX_Chat exposes various chat events, and can then broadcast that data via the messaging bus. The new translate plugin would then send a message to suppress the chat event temporarily and spin off a secondary thread to query the google translate API. Upon receipt of the translated text, it would generate another message to the chat plugin to handle all the chat broadcast stuff.

    It's a bit of work to do, but it's mostly straightforward. The effect would be that when you send a message that needs translating, it would travel player->server->google->server->all_players, which would cause it to appear a bit later than it would normally.

    I believe Google Translate exposes some fantasy languages as well, like Elven and Klingon. You can also do stuff like translate English->Chinese->Arabic->Suomi->English to get English text with similar meaning, but a completely different form.

    dunahan
Sign In or Register to comment.