Diplomacy relationship reasons never shown for Chinese language

mnf

King
Joined
Jan 31, 2006
Messages
659
Game version: 1.0.0.26
Savegame attached. Requires the Aztec DLC.

The following screenshots are of the exact same game at the exact same stage, shown while using different language settings:

The proper English version, note the list of relationship reasons.
JkI7U32.png


The Traditional Chinese version, note the missing list of relationship reasons.
v25qTJK.png


I'm not sure if it happens with other languages. This doesn't just occur, it is always like this. I have never seen any relationship reasons strings while the game is running in Traditional Chinese language. I have tried it playing as America, Aztec, Egypt, Greece, and Japan.
 

Attachments

The same thing happens in Japanese, and all languages except English has some problem in showing reasons.
SOydnOf.jpg

This is the result of my test. All of these are from the same save file, same turn. The only difference is language.
It seems that the reason line with non-ASCII character is not shown in game.
 

Attachments

  • Like
Reactions: mnf
I digged into the LUA files and it seems that right there, when it shows the lines of reasons with the positive/negative scores, they did some string processing hack (even commented in the code like, hey I'm gonna do a little hack here now) to color code the scores and move the number from the end of each reason to the beginning. Looks like they simply made a decision to deliver a defective product to the rest of the world just so the English version could see pretty colors. :(
 
Here's a workaround:
8w2ILT8.jpg

I only tested these four languages though. Hopefully it'll work for all languages.

Basically, the game engine stores these relationship reasons in the form of "Declared Friend 5" where the score is tagged onto the end of the string. The coder hacked it by using LUA's built-in string routines to filter out all the alphanumeric characters from the string, so that the score can be cut off and added back in the front with color coding. The problem is, those string manipulation routines are not utf-8 capable, so any string that contained non-ASCII 1-128 code returns an empty string, which the code that follows considers to mean that there are no relationship modifiers yet.

My workaround basically ignores the reason string, instead of filtering out what isn't a number, I try to find the number itself. Since the 1-128 alphanumerical ASCII characters should behave the same in UTF-8, it should work.

Extract the attached file into the game's install directory in:
Steam\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\​
and overwrite the old DiplomacyActionView.lua

Disclaimer:
  • I'm not a programmer, I cannot guarantee my workaround is not bugged as well
  • If you see "scoreAmount is nill" listed instead of the reason, it means there are cases I did not account for, you're probably better off restoring the old LUA file and just wait for an official fix.
 

Attachments

Last edited:
Back
Top Bottom