The UiName
and UiDesc
attributes are responsible for displaying the name and description of an item in the UI of the game:
There are two ways to set them.
Simple way
If you want to keep it simple, you can just specify your text as a value of the appropriate XML attribute.
WARNING: The following special symbols are prohibited in this text: square brackets ("[","]") and a vertical bar ("|").
The usage of these symbols in the localization strings can lead to various issues (missing images in the same UI element, and so on).
For example, you can specify the name and description of your truck in the UiName
and UiDesc
attributes of the <UiDesc>
tag, in double quotes:
(For details on XML structure and tags used, please refer to parts #2 and #3 of the main guide).
However, if you specify the UiName
and UiDesc
attributes this way, you will not be able to localize them. In all languages, they will appear just as you specified them.
“Localizable” way
If you want your text fields to support different languages, you need a little bit more effort.
In general, the process is the following:
- Instead of specifying text in your
UiName
andUiDesc
attributes, you specify UI placeholders there.
These UI placeholders will be the identifiers of your localization strings.
For example, if you can specifyUI_MY_TRUCK_NAME
andUI_MY_TRUCK_DESC
as these identifiers:
<UiDesc UiDesc="UI_MY_TRUCK_DESC" UiIcon30x30="scoutVehicleImg30" UiIcon328x458="" UiIcon40x40="scoutVehicleImg" UiIconLogo="" UiName="UI_MY_TRUCK_NAME" />
- You create the folder named "texts" inside the folder of your mod (named "spider" in the screenshot below):
- In the texts folder, you need to create .str files corresponding to languages that you want to support. You can create them simply as empty .txt files, and then change their filename extension to .str. These files should match the list of languages supported by the game and should be named as specified below:
- strings_brazilian_portuguese.str
- strings_chinese_simplified.str
- strings_chinese_traditional.str
- strings_czech.str
- strings_english.str
- strings_french.str
- strings_german.str
- strings_italian.str
- strings_japanese.str
- strings_korean.str
- strings_polish.str
- strings_russian.str
- strings_spanish.str
- In these .str files, you need to specify localization strings corresponding to your identifiers from step #1 above. You should do it in the same format, as in the original game: with the value next to the identifier, the value in quotation marks, and a new line as a delimiter. We recommend you to use "tab" symbols as a delimiter between the identifier and its value.
For example:
Or:
UI_MY_TRUCK_DESC "The best vehicle ever made!" UI_MY_TRUCK_NAME "Tin Lizzie"
WARNING #1: The following special symbols are prohibited in the localization strings: square brackets ("[","]") and a vertical bar ("|").
The usage of these symbols can lead to various issues (missing images in the same UI element, and so on).WARNING #2: If you have not created a .str file for some language, the localization identifier will be displayed for this language (e.g. you will see "
UI_MY_TRUCK_NAME
" in the UI).WARNING #3: If you have not specified a value for your identifier (e.g. you specified "" as the value) for some language, the name of the localization identifier itself will be displayed for this language (e.g. you will see "
UI_MY_TRUCK_NAME
" in the UI).
NOTE: You can use one of the .str files from the Mod Templates for trucks as a sample. They can be found in the folder where your game is installed, at the following path: ...\SnowRunner\en_us\Media\Mod Templates\mod_scout\texts. (Typically, the full path to this folder is similar to C:\Program Files\Epic Games\SnowRunner\en_us\Media\Mod Templates\mod_scout\texts.) - Save your localization .str files in the "Little-endian UTF-16 Unicode" encoding.
WARNING: If the encoding of your files is different, the localization may not work!
In the game, values from .str files will be used instead of UI_identifiers.
13 comments
класс
1
Ok.,but Icons?
1
No icons - no problems... xD
1
да будут, подождити.
Soon. In progress now
1
хочу все и сейчас
1
иконки подъехали. Хелп скоро, в одном из ближайших обновлений в дефолтном скауте будут иконки, лока и кастомизация. А пока на пауке можно глянуть. Картинки пнг в папке \ui\textures
1
класс
1
Not worked!!!
1
look spider mod for example
1
I looked, and the result is 0
1
Clear guide thank you. My question is - where are the .str files for the base game? I can't find the folder "texts" in any of the .paks
4
Молодцы, с иконками как быть для редактора карт ? Пока что решение не нашел, поставить свои!
1
А что не так с иконками?
1
No comment were found matching the criteria specified. We suggest you try the comment list with no filter applied, to browse all available. Join now to participate.