Sid Meier's Civilization VI

Sid Meier's Civilization VI

Sukritact's Simple UI Adjustments
bichetbenoit 2020년 5월 2일 오전 3시 27분
Tooltip not showing text
Hi, awsome work ! There seems to be a problem with text in the city tooltips: icons and numbers show up but text is either missing or only some of it. Maybe localisation issue ? how to show it even in english?
Thanks!

https://imgur.com/a/of41kJZ
< >
전체 댓글 6개 중 1~6개 표시 중
nyturtle 2021년 7월 27일 오후 12시 40분 
same issue like this. does anybody know how to force just this mod to be in English? Everything seems fine when the game run in English
nyturtle 2021년 7월 29일 오후 2시 43분 
After couple days of researching, found out what the cause is.

It's basically due to the fact that each languages describes yields in different order.

For example of English and Italian, it goes like "+1 from Blah Blah". On the other hand, languages like Korean and Japanese goes like "Due to Blah Blah +1". The way how this mod is written works completely fine for those languages which puts numeric values first, but not the other way around.

If you want to fix this issue, you need to change few coding lines.

What you want to modify is:
\Steam\steamapps\workshop\content\289070\939149009\UI\Common\Additions\Suk_YieldTT.lua

Open the file with something like notepad.

And replace below "original" codes in the file with "modified" ones as indicated.

Original1: local sPattern = "(%+*%-*%d*%.?%d+)%s*(.*)"
Modified1: local sPattern = "(.*)%s+(%+*%-*%d*%.?%d+)"

Original2: iNum, sString = string.match(sLine, sPattern)
Modified2: sString, iNum = string.match(sLine, sPattern)

Save the file and then start Civ6.

Thanks to the mod, awesome features and makes the game very convenient overall
nyturtle 님이 마지막으로 수정; 2021년 7월 29일 오후 2시 48분
.tv/Titool 2022년 1월 25일 오전 7시 22분 
Thx it's worked for me : https://ibb.co/bH81vDJ

Any way to text fill correctly in the UI?

At least it is better than blank one :p
rackam77 2022년 11월 3일 오후 5시 51분 
For localization using a colon separator in the sentence (example: blaba : +1)

Do as previously said by nyturtle :

Original2: iNum, sString = string.match(sLine, sPattern)
Modified2: sString, iNum = string.match(sLine, sPattern

But change sPattern by:

Original1: local sPattern = "(%+*%-*%d*%.?%d+)%s*(.*)"
Modified1: local sPattern = "(.*)%s*:%s*(%+*%-*%d*%.?%d+)"

Result (in french localization): https://ibb.co/QKsSJqj
rackam77 님이 마지막으로 수정; 2022년 11월 3일 오후 5시 51분
Pholith 2023년 5월 7일 오후 2시 45분 
It worked for french localization thanks !!
nasu41 2024년 5월 21일 오전 7시 00분 
Thank you for the great information!

I have modifid the code for Japanese localization.
I log it here, for any other Japanese people.



▼▼▼日本人向け▼▼▼

■解決できる不具合
画面右下、都市の「食料」や「生産力」にマウスオーバーした際に出てくるツールチップ。
項目の内訳が表示されるが、日本語利用時にMODを使うと説明文が正常に表示されない。

■解決方法
本スレッドの上流で、フランス語での対応方法の記載があったため、参考にして日本語用のコードを作成しました。
反映に当たってはMODが入っているフォルダー内の.luaファイルを、手動で編集する必要があります。

なお、以下の修正は、私の環境でしか動作を確認していません。
そのため、作業を行う前に、該当ファイルのバックアップを取っておいた方がよいかもしれません。

・対象ファイル
\Steam\steamapps\workshop\content\289070\939149009\UI\Common\Additions\Suk_YieldTT.lua
※\Staamがインストールされているフォルダーは各自見つけてください。
 たいていは、C:\Program Files (x86)\ のはず。

・変更内容①
local sPattern = "(%+*%-*%d*%.?%d+)%s*(.*)"
の下に1行追加し、
local sPattern = "(%+*%-*%d*%.?%d+)%s*(.*)" local sPatternJp = "(.*)%s*%に%よ%り%s*(%+*%-*%d*%.?%d+)" -- added for japanese
となるようにする。(追加するのは2行目の部分)


・変更内容②
iNum, sString = string.match(sLine, sPattern)
となっている1行を修正し、
sString, iNum = string.match(sLine, sPatternJp) -- modified for japanese if iNUm == nil and sString == nil then iNum, sString = string.match(sLine, sPattern) end -- if for FOOD "from Population"
の2行に変更する。(もともとあった1行を、2行分に置換する)


・変更後
変更後にゲームを起動してMODを有効化すると、該当箇所の表示が見えるようになると思います。
nasu41 님이 마지막으로 수정; 2024년 5월 21일 오전 7시 02분
< >
전체 댓글 6개 중 1~6개 표시 중
페이지당 표시 개수: 1530 50