Skip to content

true-community/true-localisation

Repository files navigation

true-localisation | True Stalker

alt text

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

Translation flow

  1. Make edits in text strings
  2. Test changes in game
  3. 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.

[!] If you use ampersands, make sure to replace & with &amp;

Changing language

  • 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 per gamedata/config/text/? directory's name)




[ EXTRAS / for developers ]

Requirements:

Structure of the project

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
...

Extract DB archives yourself

  1. Make sure you have a suitable converter tool at hand (ex: CoC DB converter), place converter.exe1 in this directory next to README.md file
  2. Find localisation DB file from content/resources directory
  3. Run the ./run.ts unpack to automagically extract from db files

Create DB archives yourself (WIP)

  1. Make sure you have a suitable converter tool at hand (ex: CoC DB converter), place converter.exe1 in this directory next to README.md file
  2. Create the DB files via ./run.ts pack

Settings

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
}
  1. Lower override higher, if files with same name are present in multiple archives (newer patches replace older files).
  2. Executable that is used for conversion. NOT provided here.
  3. When my script invokes the converter call, this is the command
  4. Executable that launcher the game.
  5. CLI arguments to start launcher with.
  6. Whether you want to process XML files or not (WIP)
  7. 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).

Help me improve the CLI extractor tool

Any suggestion is welcome, if you want to help me with the toolkit.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published