Sheepy Posted November 3, 2016 Share Posted November 3, 2016 (edited) Bug: Mod cannot override fonts, launcher images, and splashscreen image. Steps to reproduce: Run launcher, add attached mod and put it at top. Launch game. Note that splashscreen is not overridden by the mod. In the game, note that all text is missing, because the font is not overridden by the mod. Exit and run launcher. Note that the launcher button is not overridden by the mod. Exit launcher Manually replace the "fonts", "launcher", and "splashscreen" folders in xenonauts with those in the mod. (Keep a backup!) Repeat step 2-5 and note that the replaced resources are functional (screenshots below). In plain words, I got a Chinese translation mod for X:CE, very comprehensive and intended to be a nice citizen of X:CE. But it won't work as a mod (which is forward-compatible) unless at least the font can be overwritten. What the launcher and game should look like after mod: mod_xce_zh.20161103.zip Edited November 3, 2016 by Sheepy Inline link to attachment Quote Link to comment Share on other sites More sharing options...
Solver Posted November 3, 2016 Share Posted November 3, 2016 Nothing I can do about this, I think - the modding system isn't yet active when those things get loaded. The super-early stuff like splash screen and font have to be replaced in the game's main folder. Quote Link to comment Share on other sites More sharing options...
Sheepy Posted November 4, 2016 Author Share Posted November 4, 2016 (edited) 20 hours ago, Solver said: Nothing I can do about this, I think - the modding system isn't yet active when those things get loaded. The super-early stuff like splash screen and font have to be replaced in the game's main folder. Thanks for the reply. I assume that approach won't work with for example Steam Workshop, limiting mod deployment. I guess Unicode support in the launcher is also a hopeless clause? Edited November 4, 2016 by Sheepy Quote Link to comment Share on other sites More sharing options...
Solver Posted November 4, 2016 Share Posted November 4, 2016 Not sure about the launcher. It should support Unicode by itself. If it does not, the fault is likely with the font as well. What does the launcher look like if you try to output Chinese text there? Quote Link to comment Share on other sites More sharing options...
Sheepy Posted November 5, 2016 Author Share Posted November 5, 2016 (edited) 6 hours ago, Solver said: Not sure about the launcher. It should support Unicode by itself. If it does not, the fault is likely with the font as well. What does the launcher look like if you try to output Chinese text there? May be both? If it reads the text as utf-8 I expect to see tofu boxes instead of ascii. Font seems to be Tahoma. Win 10 Pro 64bit. modinfo.xml Edited November 5, 2016 by Sheepy Attach xml file used in the test Quote Link to comment Share on other sites More sharing options...
Sheepy Posted November 10, 2016 Author Share Posted November 10, 2016 (edited) @Solver Just discovered another indication that the xce modding tool does not handle Unicode. Attached are two empty mod packs, modinfo is same English, only different is the name of the zip. The zip with English name can be installed. The zip with non-English name cannot; the launcher reads the filename as "????". mod_zh.zip 漢化模組.zip Edited November 10, 2016 by Sheepy Quote Link to comment Share on other sites More sharing options...
Sheepy Posted March 7, 2017 Author Share Posted March 7, 2017 (edited) @Solver I may be wrong, but the launcher seems to be using wxWidget 2.8 in ansi mode. Some wild guess: The widget library need to be configured and build in unicode mode. Text data may need to switch to unicode form. UTF-8 text need to be converted to wx's wide string, which is UTF-16 on Windows. On the other hand, after some experiment, I discovered that the control can actually display unicode, but the mapping is lost in translation: I know a little bit about unicode, but I can't see any relationship between entities and result. For example: ¡ => 癒 U+7652 ¿ => 聶 U+8076 ɢ => 汃 U+6C43 ɣ => 氿 U+6C3F ɤ => 氻 U+6C3B ɥ => 犮 U+72AE 鱀 => 敼 U+657C It may be easier to find out why all entities beyond  got mapped into incorrect codepoints, and fix the unicode issue there, perhaps without touching the widgets. Alternatively, if the formula is known, it may be possible to create a reverse formula that turns utf-8 into something the mod launcher can display. Any idea? Unicode Test.zip Edited March 7, 2017 by Sheepy Attach test mod Quote Link to comment Share on other sites More sharing options...
Solver Posted March 7, 2017 Share Posted March 7, 2017 Impressive work. Why is the modinfo with those codepoints specified in the entity format? Would it not make sense to have an actual UTF-8 encoded text file? Quote Link to comment Share on other sites More sharing options...
Sheepy Posted March 8, 2017 Author Share Posted March 8, 2017 (edited) 2 hours ago, Solver said: Why is the modinfo with those codepoints specified in the entity format? Would it not make sense to have an actual UTF-8 encoded text file? UTF-8 does not work, as reported above previously. This is the weird part, which means some conversion is going on somewhere. For example the line feed character is ineffective in the launcher (regarded as a space), but would be effective when coded as - as seen above in the beginning of each line. The entities are also incorrectly converted. I discovered this by testing © which should be the copyright symbol "©" but turns out to be "穢", way high up in 穢 | 穢 (UTF-8 E7 A9 A2). It smell like the launcher is not using a real XML parser and multiple conversions happen at different time and output/expect different things when it comes to non-ascii. Edited March 8, 2017 by Sheepy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.