Skip to content

Crossplatform reimplementation of df-steam-hook in Rust

License

Notifications You must be signed in to change notification settings

dfint/df-steam-hook-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Crossplatform reimplementation of df-steam-hook in Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages