The Witcher

File information

Last updated

Original upload

Created by

CloudGiant

Uploaded by

CloudGiant

Virus scan

Safe to use

Tags for this mod

44 comments

  1. elpre
    elpre
    • member
    • 4 kudos
    Locked
    Sticky
    I've just expanded the description significantly to share all I know with regard to making font-related changes in TW1. There's also a new optional file in the Downloads section, the Custom DIY Kit for anyone who wants to experiment with different font sizes and variants.

    Note that if you start playing with the settings, extra steps are required to generate the matching rasterized font files each time: it won't work otherwise, so please read and follow the instructions in the How to Customize It section of the description.
  2. 7lilgoose
    7lilgoose
    • member
    • 0 kudos
    doesnt work, disappear, try to uninstall the mod, font still disappear now my font completely gone :(.

    i follow the instruction and im pretty sure im doing it right
    pls help.
    1. elpre
      elpre
      • member
      • 4 kudos
      Make sure you're using UI-Font-TW3 (under Main Files), and not the version under Optional Files.

      If text isn't showing up, it means the font settings are changed but the font files are missing.

      So, it seems you installed the fonts.2da file correctly somewhere under Data but not the tw3pfdin*.fontcache files, which should go into System\__cache (not Data\System\...).

      To make the mod work, put the tw3pfdin*.fontcache files under System\__cache where they should be. If you want to go back to the original fonts, delete or rename the file fonts.2da.

      If you need help with this, please run the command I mentioned in the reply to a post right below yours, and paste the output it shows in your comment.

      This would shed more light as to what's going on but I'm guessing the issue is similar to that previous one. Most mod files only need to go into Data but this one has files that have to go both into Data and System, which might be confusing.
    2. 7lilgoose
      7lilgoose
      • member
      • 0 kudos
      thanks for the reply!
      but like i said i follow the instruction and all but text still doesnt show up, idk tho perhaps the problem is at my system.
    3. elpre
      elpre
      • member
      • 4 kudos
      It definitely works for me, and for other people.

      With the information you're giving me, I can only guess why for you it does not. My guess is that the .fontcache files are not where they should be.

      There's more than one way to make it work. Maybe the easiest at this point would be if you download UI-Font-TW3-Custom-DIY-Kit (under Optional Files), and put the the two .ttf files anywhere under Data. Then, run djinni!.exe (from %ProgramFiles%\The Witcher\System) and it will generate the missing .fontcache files on the fly. You can then close it and run the game.

      Alternatively, as I said before, run the following in your Command Prompt (Win-X, then C on English Windows), and tell me what the output is (copy and paste it into your reply):

      dir /b /s "%ProgramFiles%\The Witcher\tw3pfdin*.fontcache"

      Or, if your Command Prompt is replaced by PowerShell, the equivalent command is:

      Get-ChildItem -Filter 'tw3pfdin*.fontcache' -Name -Path "$Env:ProgramFiles\The Witcher" -Recurse

      Replace %ProgramFiles%\The Witcher (or $Env:ProgramFiles\The Witcher for PowerShell) with the path where you installed the game (e.g. %ProgramFiles(x86)%\Steam\SteamApps\common\The Witcher Enhanced Edition for the Steam version, etc.).

      It's definitely solvable but help me help you.
    4. 7lilgoose
      7lilgoose
      • member
      • 0 kudos
      There's more than one way to make it work. Maybe the easiest at this point would be if you download UI-Font-TW3-Custom-DIY-Kit (under Optional Files), and put the the two .ttf files anywhere under Data. Then, run djinni!.exe (from %ProgramFiles%\The Witcher\System) and it will generate the missing .fontcache files on the fly. You can then close it and run the game.
      it works, thank you so much!
      looks so good :D
    5. elpre
      elpre
      • member
      • 4 kudos
      Great news!
    6. Farzam047
      Farzam047
      • member
      • 0 kudos
      Thanks man! I was really sad that the mod didn't work for me then I found this thread and fixed it.
      Thanks for your mod and your support ❤️ Endorsed and Kudos given
    7. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Thank you!
  3. Grandliu66
    Grandliu66
    • member
    • 0 kudos
    This mod is super helpful. I'm trying to translate Traditional Chinese to Simplified Chinese, and I can change the font now. 
    Another question, if I want to create a new language named SC (for example) for the game, what should I do before I create a new 2da file named fonts_SC.2da to make sure that the system can read the true font? I have already known that I need to edit the value fonts which is in the file languages.2da.
    Please help me. Thank you. But if this question can't be solved, I can always continue this work by replacing the Traditional Chinese font.
    Please forgive my terrible English, my English is really bad, and unfortunately, Google Translate is not good to work with a lot of file's names.
    1. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Hi! Your English is great!

      It's an interesting question. I'm not sure I have the full answer.

      As you noticed, there already is an entry for ChineseSimp in Data\languages.2da (alongside ChineseTrad), and if you set the Font column to something else rather than **** (for example to fonts_sc) then it should just read the font mapping from that file (fonts_sc.2da). The remaining problem then is, if I understand it right, that ChineseSimp is not enabled as a language choice. In my Options - Game Options - Subtitles there's only one "Chinese." That's ChineseTrad. So, ChineseSimp would have to be enabled elsewhere to work.

      You'd then have to look for references to ChineseTrad in other game files (particularly inside 2da00.bif once unpacked) and add references to ChineseSimp as well where necessary. This could be easy enough but note there's one additional difficulty: languages are assigned numerical IDs too: ChineseTrad is id == 21 and ChineseSimp is id == 22. So in some places the languages might just be referred to by a number, which looks meaningless without context and/or is difficult to search for. In the end, there might be hard-coded references in binary files to something like 0x15, not easy to find and interpret. Although let's hope for the best.

      Meanwhile also note that in languages.2da for ChineseTrad the character set (Charset) is set to zh. So for ChineseSimp you'd want to do that as well. But who knows what they mean by that... This is pre-Unicode. Alphabetic languages here are using Windows codepages like 1250 (Central & Eastern European Latin), 1251 (Cyryllic), 1252 (Western European Latin). So you might similarly run into additional conversion issues between Big5 and GB2312. Or maybe you won't. But it's good to be aware this might surface.

      The Charset setting is somehow reflected in Data\Scripts\djinni_utils\mbin_{release,stable,unstable}.lua, a part of the build script. For Latin fonts it's:
      loadfonts("fonts")
      console "rebuildfontcache"
      But for Chinese, it's:
      loadfonts("fonts_zh", "zh")
      console "rebuildfontcache"
      So this zh here seems to refer to a range of glyphs to extract from the TTF file. If it includes the entirety of "CJK Unified Ideographs" (Wikipedia) then so far so good. But if not (i.e. only traditional, not simplified), you'd have to workaround that as well.

      For the record, there's another way to go about it, bypassing the above complications, but I don't think you'd be interested. You could just modify a TTF file to show simplified characters in traditional positions. But this way you can't translate individual strings, and it's not a 1:1 mapping between traditional and simplified anyway. So this approach would be too simplistic.

      So, the way I'd go about it would be like that:

      • Test 1: change one of the fonts in fonts_zh.2da to another traditional font to make sure djinni!.exe can generate it properly. The instructions are on the description page in the section "How to Customize It." If this doesn't work, you have to look into a way for generating Chinese fonts first of all.
      • Test 2: change some of the characters to simplified in one of the strings. See if they properly show. If not, you have to look into this Charset == zh setting and maybe tweak the range of glyphs extracted from the TTF file.
      • Assuming test 1 & 2 pass, clone ChineseSimp from ChineseTrad and find a way to enable it through the menu (the big part).
      I'm aware this is far from a complete solution but hopefully it helps to get started.
    2. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      One more thing I've noticed: there is more than one way the game references languages numerically. For example in:
      • Data\Scripts\imp_{a,b,c}_mod.lua
      • Data\Scripts\import_{a,b}_local.lua
      There is:
      WhatToImport = bit.bor(WhatToImport, ConversationEditor.Language_16 )And then there're files like:
      • Data\lang_{3,5,10-16}.key
      But in each case it's a different "16." Specifically:
      • Data\lang_3.key is the language with id == 3 (FinalEnglish_Short)
      • Data\lang_5.key is the language with id == 5 (Polish)
      • Data\lang_10.key is the language with id == 10 (German)
      While:
      • ConversationEditor.Language_3 is the language at row #3 (FinalEnglish_Short)
      • ConversationEditor.Language_4 is the language at row #4 (Polish)
      • ConversationEditor.Language_5 is the language at row #5 (German)
      So this is yet one more thing to be aware of. Funnily, FinalEnglish_Short happens to be assigned the same number in both cases but that's just a coincidence.

      And in these places where ChineseTrad is Language_16, ChineseSimp would be Language_17 (not 22).

      As for the translation itself, I'd start by extracting data from all the .bif files (with UnBIF), and taking a closer look what's there. Sorry I'm not really familar with the way data is organized in this game beyond what I had to research to make this mod and to set up others. Ideally you'd want to talk to someone who translated the game into another language (or modified an existing translation).
    3. Grandliu66
      Grandliu66
      • member
      • 0 kudos
      Thank you sooooo much for writing such a long reply!! I hope this didn't bother you. 
      I have this replied last night (Beijing time, UTC+8), but I accidently close this passage and the reply I have written was gone.

      Interestingly, the first question of the translate work I solved is the menu. I do not remember how I solved it, but it should not be very difficult. Maybe I just edit the file Data\languages.2da and create a new file Data\dialog22.tlk (the game use TLK file to save the subtitle of GUI and introductions of the items). Then, by edit the language's name in each TLK file, simplified Chinese can be shown normally in the menu.

      After that, I tried to create a new file Data\2da\fonts_sc.2da and edit Data\languages.2da, but then I found it didn't work. There were no subtitles anymore, and this also caused a problem that djinni couldn't be opened. I guess there is somewhere else used this file too, so I need to find it.

      But after some searching, I find another way to solve it. There are a few Chinese fonts that can both show simplified characters and traditional characters (do not use GB2312). Then I downloaded one and used your method to add it to the game, then I found it work, at least work on the traditional characters. I translate some strings in the TLK file I created, and I surprisedly find that simplified characters can also be shown normally (djinni.exe can generate it properly). Seems that Charset-zh isn't a big problem.
       To be frank, I am not sure how it works, but it does works.

      Now, I am able to translate the conversations which are in DLG files and GUI/introductions in the TLK files. I am searching for the tutorial text now, for it is not in TLK file and probably not in the DLG file (if it does, .qst file will show it, but I cannot find it in the QST file). So, it falls back to FinalEnglish_short now. I'm learning more about the organization of game data, and I believe finding these words should not be a big problem.

      The BIF file associated with Data\lang_ {3,5,10-16}.key is the voice over file of those languages (If my memory is not very confused, and it often is), so I don't think it is necessary to add simplified Chinese -- the game doesn't even have voice over of traditional Chinese.

      Thank you again for your great help.
    4. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Great to hear you've been making so much progress!

      I think you could reach out to @MerseyRockoff. He's likely the person that knows the most about how things work in The Witcher, and how and where to change them. His mod Project Mersey - The Witcher Fix Pack has hundreds of fixes to all parts of the game, including lots of dialogues. He could give you some suggestions.

      There's also this mod: The Rise of the White Wolf. It has (in particular) extensive changes to the user interface. I'm not sure if the authors are still hanging around here but their work can be studied to see how they did what they did.

      Also check this out if you haven't already: Ukrainian Translation for The Witcher. Should be similar to what you're trying to do. And another translation-related mod has just appeared last month: Lost English Translation Restored. Maybe looking at some of this stuff makes things easier.

      Data\lang_{3,5,10-16}.key is the voice over file
      As far as I know, you're right. They can be ignored if you're not changing the voiceover. I just used them as example for the 2 different ways of enumerating languages. Not sure if the row number-style references are actually used elsewhere: if not, then it's one less thing to worry about.
    5. Grandliu66
      Grandliu66
      • member
      • 0 kudos
      With your help, except for some optimization measures, there are no technical problems in the translation work.
      If I finished this work (it's a big project and it's very difficult, but I believe I can finish it), I will add CloudGiant to the credits for your great help. Thanks a million.
    6. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Glad I could help a little.

      Thank you, and good luck! I'll link to your mod here when it's up.
    7. uiaaoe
      uiaaoe
      • member
      • 0 kudos
      哇塞... 大佬现在还在做吗……!! 虽然我技术力很低但是如果需要人帮忙翻译/校对的话我可以帮忙 (悲)
  4. flixster
    flixster
    • premium
    • 46 kudos
    Thanks for this. I had to increase everything by 4-6 points to get it appropriately sized for 2k, but thanks to your instructions I got it figured out. Looks great!
    1. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Thank you!
      Please feel free to post your settings here, it might help others.
    2. flixster
      flixster
      • premium
      • 46 kudos
      This is how my fonts.2DA file looks:

      2DA V2.0

          Label                TrueType     Points    Outline    MinSize
      0    default              tw3pfdin     23        1          11     
      1    console              tw3pfdin     20        1          10     
      2    smallinfo            tw3pfdin     23        1          11     
      3    gui_infopanel        tw3pfdinb    32        1          11     
      4    gui_default          tw3pfdin     23        0          11     
      5    gui_label            tw3pfdin     26        1          11     
      6    gui_bigger           tw3pfdin     26        1          11     
      7    gui_huge             tw3pfdin     32        1          11     
      8    gui_icon             tw3pfdinb     23        0          11     
      9    gui_infopanel_big    tw3pfdin      32        1          10     
      10    fnt_galahad14        tw3pfdin     16        1          11     
      11    subtitle             tw3pfdin     26        1          11     
      12    choices              tw3pfdin     26        1          11     
      13    tutorial             tw3pfdin     20        0          11     
      14    credits              tw3pfdin     30        1          11

      After making those changes, I just had to place the 2 .ttf font files in the override directory and then run Djinni to get it to generate the new fonts.
  5. DontBlnkBadWolf
    DontBlnkBadWolf
    • premium
    • 38 kudos
    Thank you for the detailed information on how to DIY. Something for me to print up and fiddle around with later. Sorry for not endorsing it back in Jan. when I first downloaded it, it's endorsed now.
    1. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Thank you! Really appreciate it!
  6. akd556
    akd556
    • member
    • 0 kudos
    Amazing mod! I'm trying to make some of the text bigger modifying the points column in the fonts.2da file but when i do that for an specific row then it becomes invisible. How can i make it bigger?
    Thanks
    1. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      You need to run djinni!.exe after editing the file: just let it finish loading and exit immediately afterwards, only then run the game.

      Details on the description page in the How to Customize It section, if you need them.
  7. LordMazour
    LordMazour
    • supporter
    • 18 kudos
    Hi, thanks for the great mod! Is it also possible to make it compatible with 8K screen.
    1. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Thanks!

      What's not compatible with 8K? I guess you just have to adjust the font sizes. Which can be done already by downloading the "Custom DIY Kit" version of the mod, and following the instructions in the How to Customize It section of the description page (basically, just edit the sizes in fonts.2da and make sure to run Djinni!.exe once every time you change the values there before running the game).

      I don't have an 8K screen myself so I'd have to be guessing what the sizes should be. Once you know the numbers that work for you, please share them here. I'll pin the post.
    2. LordMazour
      LordMazour
      • supporter
      • 18 kudos
      Thanks I'll try it.
    3. LordMazour
      LordMazour
      • supporter
      • 18 kudos
      It's working! Thanks. For each value in fonts.2da file I recommend 60 Points.
  8. megafeuer
    megafeuer
    • member
    • 0 kudos
    does this work with "enhanced version" of the game? currently it doesn't do anything for me sadly
    copied both contents into the appropiate folders
    1. megafeuer
      megafeuer
      • member
      • 0 kudos
      nevermind all good :D
    2. CloudGiant
      CloudGiant
      • member
      • 4 kudos
      Great you got it sorted out!

      Just for the record: yes it does work with the Enhanced Edition. In fact, it's the only version I tested it with. Considering the EE has been around since 2008, I'm not even sure it's possible to get a hold of any of the earlier releases.
  9. Izilae
    Izilae
    • member
    • 0 kudos
    Thank you for making this mod! The interface of W1 is beautiful and modern thanks to you!
    1. elpre
      elpre
      • member
      • 4 kudos
      Thank you for the kind words! I really appreciate it.
  10. Benzino337
    Benzino337
    • member
    • 0 kudos
    Будет ли мод на русский шрифт W3?
  11. Cyropike
    Cyropike
    • premium
    • 0 kudos
    I tried to use this mod but when I reach the main menu, all the text is gone. I can still choose load game, new game, etc but I don't know which is which. Its all just blank
    1. elpre
      elpre
      • member
      • 4 kudos
      Are you using the main file, UI-Font-TW3? And not the optional version, UI-Font-TW3-Custom-DIY-Kit?

      Assuming the former, make sure the tw3pfdin*.fontcache files are in the game's System\__cache directory.

      You should have unpacked the mod into the game's base directory (for example: %ProgramFiles%\The Witcher), and not the Data subdirectory within (%ProgramFiles%\The Witcher\Data). I guess this is where the problem most likely is. This might be confusing since other mods only go into Data.

      To confirm, can you open the Command Prompt (Win-X, C) and run the following command:

      dir /b /s "%ProgramFiles%\The Witcher\tw3pfdin*.fontcache"

      Substitute %ProgramFiles%\The Witcher with the path where the game is installed on your system.

      The output should be:
      C:\Program Files\The Witcher\System\__cache\tw3pfdinb_21_n.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdinb_35_o.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_16_o.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_18_o.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_21_n.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_23_n.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_28_o.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_30_o.fontcache
      C:\Program Files\The Witcher\System\__cache\tw3pfdin_35_o.fontcache

      Which shows that the font files are present.

      Edit: on newer Windows versions, Command Prompt is replaced by PowerShell. The equivalent PowerShell command would be (replace $Env:ProgramFiles\The Witcher with the path to where the game is installed):

      Get-ChildItem -Filter 'tw3pfdin*.fontcache' -Name -Path "$Env:ProgramFiles\The Witcher" -Recurse

      Either way, just make sure the font cache files are where they should be.
    2. Cyropike
      Cyropike
      • premium
      • 0 kudos
      That worked! Much appreciated.
    3. elpre
      elpre
      • member
      • 4 kudos
      Great to hear it helped!