Configuration

Geoffrey Horsington edited this page Dec 12, 2017 · 16 revisions

YAT is configured using INI configuration file provided by UnityInjector.

Configuration file location

The configuration file is located in UnityInjector\Config\YATranslator.ini. If the file does not exist, run the game once. This will create a default configuration file.

Most options allow to combine multiple values using | operator. For instance, Strings | Assets specifies both Strings and Assets values.

Available configuration options

Config section

Load

(Default: All)

Specifies, which assets are loaded. Combine multiple values with |.

Possible values:

Value Description
Assets Loads assets from UnityInjector\Config\Assets.
Strings Loads strings and voices from UnityInjector\Config\Strings.
Textures Loads textures from UnityInjector\Config\Textures.
All Loads all assets. Same as Assets | Strings | Textures

Verbosity

(Default: None)

Specifies, which messages are logged to the debug console. Combine multiple values with |.

Value Description
None Don't log anything. Will only output errors and important messages.
Assets Logs messages related to asset textures.
Strings Logs messages related to translatable strings.
Textures Logs messages related to textures.
Voices Logs messages related to voices that are played.
All Logs everything. Same as Assets | Strings | Textures | Voices.

Dump

(Default: None)

Specifies, which assets are dumped. Combine multiple values with |.

Option Description
None Dump nothing
Strings Dumps strings that YAT fails to translate. Also dumps a level where the string was encountered.
Assets Dumps asset texture as a PNG file. The name of the file is the same that YAT uses to find the translated asset.
Textures Dumps textures as a PNG file. The name of the file is the same that YAT uses to find the translated texture.
TexSprites Dumps a texture that is used in some UIs. This just a special type of texture. The name of the file is the same that YAT uses to find the translated asset.
Voices Dumps voice files as WAV files that are played. Voices are dumped into UnityInjector\Config\TranslationDumps\Audio.

NOTE: Using Voices will dump voice files as lossless WAV files.


MemoryOptimizations

(Default: None)

Tells YAT to optimize string translation loading in certain ways. By default, YAT loads all possible string translations into memory when CM3D2 starts. You can use this option to restrict YAT to load only those strings that are necessary.

Possible values (cannot be combined):

Option Description
None No optimizations. YAT will load all translations into memory when CM3D2 starts.
LoadOnLevelChange YAT will load level-specific translations only when the level changes.
LoadOnTranslate YAT will load level-specific translations the first time it tries to translate a string.
Simple YAT will load level-specific translations only when the level changes. In addition, YAT will unload unused translations from memory.
Aggresive YAT will load level-specific translations the first time it tries to translate a string. In addition, YAT will unload unused translations from memory.

NOTE: Optimizations do not affect global translations (the ones not given level restriction) because YAT assumes that those strings may be present on any level. Thus, to achieve the best effect out of the optimizations, it is important to tag translation files appropriately.


EnableStringReload

(Default: False)

An optimization flag to prevent re-translating translated text.

If set to True, every time YAT will encounter a string that has been previously translated, the plug-in will reverse the translation before translating the same string again. This is useful if the translation files are reloaded in-game, as this will update all visible string translations right away.

If set to False, YAT will not re-translate strings, but reloading translation files will not update visible string translations until the in-game scene is reloaded manually.


DumpLevels

(Default: -1)

If Dump is set to any other value than None, this option specifies which levels to dump strings from. If set to -1, YAT will dump assets from all levels. Any other positive integer specifies the level index.

Multiple levels can be combined with |. For instance, 15|9|10 will make YAT dump assets from only levels 15, 9 and 10.


TextureNameTemplate

(Default: {NAME})

If Dump includes Assets, Textures or TexSprites, this option specifies the template for the assets' file names.

The value must be a valid file name (i.e. it must not contain any invalid characters). The template supports some variables by surrounding them with {}. Valid variables are:

Variable Description
NAME Name of the texture as reported by the game.
HASH A special ID value computed from the name and the metadata.
METADATA Texture-specific information which varies from resource to another. Usually the name of the GameObject that owns the texture.
LEVEL Level index the texture was captured on.

For instance, setting this option to {NAME}_{HASH}@{LEVEL} will save dumped assets with names like AtlasCommon_32CDB08E1B9E7490@8.png, AtlasSceneEdit_4209AC888C3D23D8@9.png etc.

Subtitles section

Enable

(Default: True)

Enables or disables subtitles. Disabled subtitles will not be shown even if there is a translation available.


Outline

(Default: True)

Enables or disables outline on subtitle text.


OutlineThickness

(Default: 1.0)

Thickness of the outline.


OutlineColor

(Default: RGBA(0.000, 0.000, 0.000, 1.000))

Color of the outline. Must be specified in format RGBA(r, g, b, a), where r, g, b and a are respectively color's red, green, blue and alpha channels' values from 0.000 to 1.000.


FontSize

(Default: 20)

Font size of the subtitles.


FontColor

(Default: RGBA(1.000, 1.000, 1.000, 1.000))

Color of the font. Must be specified in format RGBA(r, g, b, a), where r, g, b and a are respectively color's red, green, blue and alpha channels' values from 0.000 to 1.000.


FontStyle

(Default: Bold)

Font style. All available font styles are found from Unity's API.


TextAlignment

(Default: UpperCenter)

Subtitle's main placement. All available alignment options are found from Unity's API.


TextOffset

(Default: (0.0, 0.0))

Subtitle's placement offset from the specified TextAlignment. Must be of form (x, y), where x and y are respectively offsets in x and y axes.


HideWhenClipStops

(Default: True)

If set to True, subtitle text will be hidden when the voice ends.

If set to False, subtitle text will be shown until the next voice is played. Use this alongside ShowUntranslatedText to capture untranslated voices' names.


ShowUntranslatedText

(Default: False)

If set to True, subtitles will be shown even if there is no matching translation for it. In that case, the subtitles show the voice's file name which is used to find the translation string.

If set to False, subtitles will be shown only for translated strings. In that case subtitles will be the translations themselves.


FontSizeVR

(Default: 40)

Font size of the subtitles when the game is in VR mode (ran with /vr switch).


TextOffsetVR

(Default: (0.0, 0.0))

Subtitle's placement offset from the specified TextAlignment when the game is in VR mode (ran with /vr switch). Must be of form (x, y), where x and y are respectively offsets in x and y axes.

Clipboard section

Enable

(Default: False)

Enables or disables text-to-clipboard feature. If enabled, YAT will send untranslated strings to clipboard if there is no translation available. This can be used with 3rd party tools to translate the game.


WaitTime

(Default: 0.5)

How many seconds YAT should wait for more untranslated strings before sending them to clipboard.


Levels

(Default: -1)

Which levels YAT should collect untranslated strings from. Levels are non-negative integers. Separate levels with |. If any of the levels is -1, strings are collected from all levels.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.