/df-steam-hook

A hook which intercepts text in the DF game and replaces it with it's transalation from a csv dictionary file. A successor of the discontinued df-translate-hook project

Primary LanguageC++MIT LicenseMIT

df-steam-hook

XMake clang-format Check Total downloads of all releases Downloads of the latest release

Basic feature:

  • Intercept text in Dwarf Fortress game and replace according to dfint_dictionary.csv

Additional features:

  • Creates crash reports (cr_*.txt files) when the game crashes
  • Supports several version of DF; it is possible to add support of new versions with adding a config file to dfint_data/offset directory;
  • Useful hotkeys:
    • Ctrl+F2 - reload csv dictionary file;
    • Ctrl+F3 - switch the translation off;
    • Ctrl+F4 - switch the translation on.

How to install:

Unpack dfint-steam-hook-*.zip to the game's directory and run dfint_launcher.exe file. It will run the game with translation applied.

For your language you'll need to prepare csv file from the hardcoded_steam resource on transifex. The package contains an empty csv file as a placeholder, so you'll not see any translation before you generate actual csv file for your language.

To do this, you need to use tools from df-gettext-toolkit repository, see the first example in "Usage examples". The last parameter must be an encoding which is relevant for your language. E.g. for Esperanto can be used latin3.

Also you'll probably need to modify curses_640x300.png font in the data/art directory of the game according to the encoding you've chosen on the to encode csv file. You don't need to redraw the entire font just add characters which is necessary to display text in your language correctly.

Later we'll add posibility to create csv file using df-translation-client.

Here you can get a csv file for the most languages from transifex automatically updated: https://github.com/dfint/autobuild/tree/main/translation_build