Jump to content

[X:CE 0.34.2] Mod can't override font, splashscreen, and launcher


Recommended Posts


  • Mod cannot override fonts, launcher images, and splashscreen image.

Steps to reproduce:

  1. Run launcher, add attached mod and put it at top.
  2. Launch game. Note that splashscreen is not overridden by the mod.
  3. In the game, note that all text is missing, because the font is not overridden by the mod.
  4. Exit and run launcher. Note that the launcher button is not overridden by the mod. Exit launcher
  5. Manually replace the "fonts", "launcher", and "splashscreen" folders in xenonauts with those in the mod. (Keep a backup!)
  6. 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:




Edited by Sheepy
Inline link to attachment
Link to comment
Share on other sites

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 by Sheepy
Link to comment
Share on other sites

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.




Edited by Sheepy
Attach xml file used in the test
Link to comment
Share on other sites

@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 "????".




Edited by Sheepy
Link to comment
Share on other sites

  • 3 months later...

@Solver I may be wrong, but the launcher seems to be using wxWidget 2.8 in ansi mode.  Some wild guess:

  1. The widget library need to be configured and build in unicode mode.
  2. Text data may need to switch to unicode form.
  3. 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 by Sheepy
Attach test mod
Link to comment
Share on other sites

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 by Sheepy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...