Skip to content

Commit

Permalink
Add Linux patcher script
Browse files Browse the repository at this point in the history
  • Loading branch information
rakelley committed Oct 5, 2023
1 parent f2b1609 commit 9d09f6d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

### This mod does not need to be added to your mod_load_order.txt file.

## Installation:
## Installation (Windows):
1. Copy the Darktide Mod Loader files to your game directory and overwrite existing.
2. Run the "toggle_darktide_mods.bat" script in your game folder.
3. Copy the Darktide Mod Framework files to your "mods" directory (<game folder>/mods) and overwrite existing.
3. Install other mods by downloading them from the Nexus site (https://www.nexusmods.com/warhammer40kdarktide) then adding them to "<game folder>/mods/mod_load_order.txt" with a text editor.

## Installation (Linux):
1. All Windows instructions for installing/updating/removing apply to Linux, except:
- you need to use "toggle_darktide_mods.sh" instead of "toggle_darktide_mods.bat"
- you will need `cargo` and `git` installed on your system, please see the documentation for your distribution's package manager or the [Rust docs](https://doc.rust-lang.org/cargo/getting-started/installation.html)

## Disable mods:
* Disable individual mods by removing their name from your mods/mod_load_order.txt file.
* Run the "toggle_darktide_mods.bat" script at your game folder and choose to unpatch the bundle database to disable all mod loading.
Expand Down
40 changes: 40 additions & 0 deletions toggle_darktide_mods.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh
set -e

CLEANUP_PATCHER=0

if [ -e ./tools/dtkit-patch ]
then
read -p "Are you trying to update or remove the mod loader (y/n)? " RESPONSE
case "$RESPONSE" in
y|Y ) CLEANUP_PATCHER=1;;
esac
else
if ! command -v cargo >/dev/null 2>&1; then
echo >&2 "cargo not found, please install the cargo package, e.g. \"sudo apt install cargo\""
exit 1
fi
if ! command -v git >/dev/null 2>&1; then
echo >&2 "git not found, please install the git package, e.g. \"sudo apt install git\""
exit 1
fi
echo "Building database patcher"
rm -rf __dtkit 2>&1 || true
mkdir __dtkit
cd __dtkit
git clone https://github.com/ManShanko/dtkit-patch.git .
cargo build
cp ./target/debug/dtkit-patch ../tools/
cd ..
rm -rf __dtkit
echo "Database patcher built"
fi

echo "Starting Darktide patcher..."
./tools/dtkit-patch --toggle ./bundle || echo >&2 "Error patching the Darktide bundle database. See logs."

if [ "$CLEANUP_PATCHER" = 1 ] && [ -e ./tools/dtkit-patch ]
then
rm ./tools/dtkit-patch
fi

0 comments on commit 9d09f6d

Please sign in to comment.