
WAIDW?

Code: Select all
FileSystem=./data/gui/fontsCode: Select all
FileSystem=./mods/yourmod/fonts
Yes, that's the idea.Sol Lignum wrote:I assume that i should also put these new fonts in a same directory mods\mymod\fonts ? And then in kenshi_fonts.xml just replace old fonts names with new fonts names?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceTrueTypeFont" name="Kenshi_StandardFont_Small">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="14"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_StandardFont_MediumSmall">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="16"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_StandardFont_Medium">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="20"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_StandardFont_Large">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="24"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_PaintedTextFont_Small">
<Property key="Source" value="Sentencia_1.ttf"/>
<Property key="Size" value="20"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_PaintedTextFont_Medium">
<Property key="Source" value="Sentencia_1.ttf"/>
<Property key="Size" value="25"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_PaintedTextFont_Large">
<Property key="Source" value="Sentencia_1.ttf"/>
<Property key="Size" value="28"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_BannerTextFont">
<Property key="Source" value="MailartRubberstamp-Regular.ttf"/>
<Property key="Size" value="150"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_FloaterFont_Small">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="20"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_FloaterFont_Medium">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="22"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_FloaterFont_Large">
<Property key="Source" value="Exo2-SemiBold.ttf"/>
<Property key="Size" value="24"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
</Codes>
</Resource>
<Resource type="ResourceTrueTypeFont" name="Kenshi_UI_Messages">
<Property key="Source" value="MailartRubberstamp-Regular.ttf"/>
<Property key="Size" value="110"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="50"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="4"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Property key="Distance" value="2"/>
<Codes>
<Code range="65 90"/>
<Code range="46 46"/>
</Codes>
</Resource>
</MyGUI>
ta-da. 
Code: Select all
2016-07-31 12:16:00.2153 | ERROR | FCS | Exception: De index ligt buiten de matrixgrenzen. (forgotten construction set). Stacktrace: bij forgotten_construction_set.TranslationManager.DialogueMessage..ctor(DialogueGroup group, Item d, UInt32 lineIdx, DialogueMessage parent)
bij forgotten_construction_set.TranslationManager.<>c__DisplayClass30_0.<DialogueTranslation>b__2(DialogueGroup group, DialogueMessage parent, Item data, UInt32 levelIdx)
bij forgotten_construction_set.TranslationManager.<>c__DisplayClass30_0.<DialogueTranslation>b__2(DialogueGroup group, DialogueMessage parent, Item data, UInt32 levelIdx)
bij forgotten_construction_set.TranslationManager.DialogueTranslation(GameData gameData, ConcurrentDictionary`2 wordSwaps)
bij forgotten_construction_set.TranslationManager.Translate(navigation nav)
bij forgotten_construction_set.TranslationDialog.<btnExport_Click>b__5_0()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()well thats really helpful to know, about the main.pot file i followed the instructions yet im unable to get it to edit them hope u can help with this thanks in advanceZodd wrote:Hi,
A couple of things.
First, the crash with the export in the FCS should be fixed by now; so there is no need a mod fix.
Second, about the fonts/assets issues: both the mods and translations (in locale folder) works as a "remapping" of the resource.cfg file where the assets are loaded. That's why they share the same internal folder structure.
The issue with the fonts and the missing characters is either because the font doesn't have the specific characters or that in the "kenshi_fonts.xml" the range of the fonts is wrong (or both).
That xml file contains info for each "resource font" used in game and it creates a texture file for each of those with the characters that are there.
If you open file, you'll see it has for each "resource font" a source that is the font file and a list of codes ranges. The codes are the character codes ranges to include in game. If a character is missing, the game will display it as a blank.
When selecting the ranges, try avoid adding all the characters in the font since some fonts files contain a lot of characters (and I mean a lot) that will not be used and make the loading slower and could affect the performance.
Also, missing characters in the font file won't add extra space so it's safe to put a large range if you know the font doesn't have those characters.
In your case, since you want the cyrillic alphabet, try using the range code: "32 64258" for the Exo font. For the other two fonts, sadly you'll need to get different fonts. You can check https://www.google.com/fonts for good fonts.
Regarding the confusion with the locale folder stuff, I know it's confusing but maybe I can help out a bit.
You could do the translation as a mod with the rename of the extension, however, to translate all the other texts that are in game (that come from the source code) you need to use this structure, at least for now. Note that the 'main.pot' file that contains the game texts will be probably uploaded in the next update.
If you need me to explain something in more detail or have any other question, feel free to ask.
Hello!Zodd wrote: (...) If you need me to explain something in more detail or have any other question, feel free to ask.
The 'main.pot' should've been today's release; I guess Chris forgot to add it.Sol Lignum wrote: As for now it's clear on how to extract the game data, and where the english main.pot will come from, thank you for confirming that. It's also clear on how to translate everything and build a .translation file, and where to put it.
For the moment, there is no direct workshop support for the translations; it's a thing we discussed but are still working on the best approach to do this.Sol Lignum wrote: What remains unclear is how to upload the finished translation into Workshop? Seems like it only accepts .mod files, and even French and German and Spanish translations has a .mod files to do the job, although i can understand that, maybe they can live without fancy characters, or fonts does support them.
So, my only question so far is: how to grab this locale folder with all its complex structure and stick it into workshop, if it's indeed possible?
Users browsing this forum: No registered users and 9 guests