Few years ago, I asked about this and I was told it is already handled in EE and I should update to newest version.
I did that recently, but I don’t see this support anywhere. Maybe I am just blind?
I need to distribute custom tlk with different texts to some of my players. I don’t see any possibility to do that in nwsync manifest writer. Or does the game now handle TLK file with multiple language entries in it? That was my suggestion of how to make this work. Truthfully I didn’t try it yet. Anyone knows?
Well, I see in my Steam install a folder named /lang which has multiple TLK files in it. I THINK that the support only extends as far as the language selection by the player.
I haven’t seen any mention of multiple language support in custom TLK files. @niv would be the one to ask.
I think this is a weakness in the system. You could file the issue, but I believe BD is aware, based on foggy memory of old Discord commentary. I do not know if plans exist to address this or not.
And another thing. I also complained at that time that there is no way to sync custom music. Beamdog claimed it is now supported, but I see no mentions of it anywhere in nwsync documentation. Anyone knows or is it another false promise?
Just wanted to give an info, just in case there is any other server that wants to support more than one language that I was able to make my server multilaguaged again with an nwnx modification. It is not pretty, but it can be done now…
Sure, although my solution is PW-specific hack that won’t work globally and needs to be rewritten. But the proof of concept works.
First I hooked:
NWSMessage::SendServerToPlayerCharList and made it to call function before its own execution CNWSMessage::SendServerToPlayerSetTlkOverrideList
Second I hooked:
CNWSMessage::SendServerToPlayerSetTlkOverrideList
and made it not to do anything unless fired from above function (so it doesn’t send the TLK override twice - this is good thing to do as I am sending a large ammount of data to players at login) and then only to call original function if the player language is 3 italian (which is a language ID of players using unofficial czech translation I did).
So, if player with different language than 3 logins, no TLK override is sent to him, if player with language 3 logins, game will send all tlk overrides to him.
This will not work on tlk overrides sent during game, such tlk overrides needs to be used OnModuleLoad (as if there are players in game, SetTlkOverride will also call a per-player engine function to update their TLK to this value which I didn’t modified in nwnx)
EDIT: Either way, this is quite ugly solution and I don’t think this function was ever meant to be used on very large amount of tlk entries. So far I am sending perhaps 500 overriden custom tlk lines and it doesn’t seem to cause lags, but I won’t be suprised when I hit a point where it starts to be a problem…
EDIT2: to make it work for more than two languages (well one other than english) I recommend to store the text entries for each language into local variable on module and then either rewrite the function to send the tlk override list from scratch if you have debug symbols, or retrieve last language id that was sent by this function, check if it match, if yes, send current tlk override list, if not clear the list, re-.populate it from local strings on module for required ĺanguage and then send the override list and set last language for another use of this function