Skip to content

Latest commit

 

History

History
77 lines (49 loc) · 2.57 KB

README.md

File metadata and controls

77 lines (49 loc) · 2.57 KB

df-steam-hook-rs

Build

Re-implementation of df-steam-hook in Rust.

Supports Windows and Linux versions of Dwarf Fortress, including classic, steam and itch.io versions.

Implemented:

  • using of config/offsets files (more or less the same config format which is/was used in df-steam-hook)
  • using dictionary from csv
  • translation hooks
  • text entry hooks (e.g. search)

Installation

The recommended way of installation is using of the installer. It will install the hook, all needed configs, font, translation csv file etc.

Manual build

Install rustc, toolchain by using rustup

For installation of rust and cargo see the link.

Note

The use of system rustc and cargo often leads to build errors.

On Linux, after the installation use the following command:

source "$HOME/.cargo/env"

There's no source command on Windows, just install rustup, it will add cargo to the environment variables (follow the instructions at the link at the beginning of this section).

Then install latest nightly toolchain using rustup:

rustup install nightly

Build

cargo build --release

Prepare the game

Copy:

  • target/release/libdfint_hook.so to libdfhooks.so in the game's directory on Linux
  • or target/release/dfint_hook.dll to dfhooks.dll on Windows
  • font to data/art/curses_640x300.png
  • encoding to dfint-data/encoding.toml
  • offsets to dfint-data/offsets.toml
  • dictionary to dfint-data/dictionary.csv
  • config to dfint-data/config.toml

Launch

Run (on Linux)

./dwarfort

or (on Windows)

Dwarf Fortress.exe

or just double click the executable file of the game (or run it from the steam client, for example).

By default, the log is written to the file: dfint-data/dfint-log.log