true-localisation | True Stalker
Ready-to-use language packs for True Stalker can be found in RELEASES |
Current repository has source code for True Stalker localisation.
To suggest your own changes you can do one of the following:
- add comments to lines where you suggest to make edits
- fork and create PRs in your own repo
- request to be added as contributor
- Make edits in text strings
- Test changes in game
- Submit your changes via pull request
About XML file encoding...
[!] The game engine is hardcoded to work with single-byte character sets (= does not support UTF-8 encoding)!
Although, basic latin letters are displayed identically for either one, accents and other non-ASCII characters are not.
Every XML file must start with declaration tag <?xml version="1.0" encoding="windows-125...
in this repo, however, every file is encoded UTF-8, because Github (as well as Gitlab) screws with non-unicode encodings and will ruin your day if you edit something in Web IDE. Exactly for that reason CI pipeline is created: it converts XMLs into appropriate encodings. Read about them below.
windows-1250
(font_prefix = _cent
):- Polish (WIP, contribution required)
windows-1251
(no prefix needed):windows-1252
(font_prefix = _west
):
[!] If you use ampersands, make sure to replace &
with &
-
If your language is already officially in the game, just switch to it from the menu.
-
If not — set language code in your
userdata/user.ltx
file:g_language rus
(replace "rus" with your language code as pergamedata/config/text/?
directory's name)
[ EXTRAS / for developers ]
Directrory | Content description |
---|---|
unpacked | all the archive files extracted; you likely do not need all of them, since that would load some resources twice |
gamedata | the actual overrides you need |
... |
- Make sure you have a suitable converter tool at hand (ex: CoC DB converter), place
converter.exe
1 in this directory next to README.md file - Find localisation DB file from content/resources directory
- Run the
./run.ts unpack
to automagically extract from db files
- Make sure you have a suitable converter tool at hand (ex: CoC DB converter), place
converter.exe
1 in this directory next to README.md file - Create the DB files via
./run.ts pack
Here are the default values that you can change to suit your needs:
{
"content_order": [ // 1
"resources",
"language",
"patches"
],
"converter": "./converter.exe", // 2
"converter_command_templates": { // 3
"unpack": [
"-unpack",
"-xdb",
"**PATH_INPUT**",
"-dir",
"**PATH_OUTPUT**"
],
"pack": [
"-pack",
"-xdb",
"**PATH_INPUT**",
"-out",
"**PATH_OUTPUT**"
]
},
"launcher": "./PlayGame.exe", // 4
"launcher_arguments": "", // 5
"xml_options": { // 6
"prettify_unpacked": true,
"minify_repacked": true
},
"i_verified_settings": false // 7
}
- Lower override higher, if files with same name are present in multiple archives (newer patches replace older files).
- Executable that is used for conversion. NOT provided here.
- When my script invokes the converter call, this is the command
- Executable that launcher the game.
- CLI arguments to start launcher with.
- Whether you want to process XML files or not (WIP)
- A safety measure for you to check the settings once at least :)
Where I got the language strings from
I own the copy of S.T.A.L.K.E.R.: Call of Pripyat on Steam and it has localization
directory in game files. In that directory you can find x{language}.db file (for language you chose for the game on Steam). So, in order to get all the official locales I switched between the languages and extracted the archives via converter.
I used the same converter to extract language strings from True Stalker's content/resources/xlocalization.db
file.
(i) Alternative approach to extracting game files is by replacing bin/xrAPI.dll
with modified library that dumps the game content while the game is running (Lua script injection).
Any suggestion is welcome, if you want to help me with the toolkit.