Only being able to install one mod at a time sucks and having to ship the entirety of
Assembly-CSharp.dll
for a mod that changes a few lines of code isn't great, either.
Enter TLD Mod Loader
This mod loader allows users to easily install and run lots of mods at once!
It also makes the modder's job easier by making method patching a breeze.
Furthermore, the mod DLLs should only include the code that is being changed instead of the whole assembly.
Thus, mods are generally only a few kilobytes in size and usually don't contain any copyrighted material.
This project uses Harmony for its method patching. Many thanks to the developers of this amazing tool!
This tool has been tested for The Long Dark v1.12 on Windows x64 and Linux x64.
Mac OS and 32-bit operating systems have not been tested, but the tool should theoretically work there, too.
If you are able to test the the installer and mod loader on any of these platforms,
please report your findings - whether it be successful or not - to the
issues page. Thank you!
Installing the tool:
- Download the latest release from the downloads page
- This is a JavaFX 8 application. Make sure you have installed Java 8 or newer.
Linux users might have to install theopenjfx
package if they're using the OpenJDK distribution
- This is a JavaFX 8 application. Make sure you have installed Java 8 or newer.
- Run the Java application
Windows users can usually just double click the JAR file Linux users may need to usejava -jar ModLoaderInstaller.jar
- Select the file
<Steam>/SteamApps/common/TheLongDark/tld_Data/Managed/Rewired_Core.dll
- Press the "Patch" or "Update" button
- If the text in the lower left corner says "Done!", the mod loader has been installed correctly.
If it doesn't, please create an issue on the issues page!
Installing mods:
- Add the mod's DLL file(s) to the directory called
<Steam>/SteamApps/common/TheLongDark/mods
,
which the installer program should've already created.
Troubleshooting:
- If the installer doesn't let you patch
Rewired_Core.dll
because it says the file isInvalid
,
you'll need to restore the original DLL file:- If you've installed an earlier version of the mod loader, re-run the old installer to unpatch the file.
- Alternatively, if you're using Steam, you can use the Verify integrity of game files option.
- If you've pirated TLD, I can't help you. You'll need to buy the game or at least find a distribution that includes binary-identical versions of all files.
- Install the mod loader as usual.
- In Visual Studio, create a new .NET Framework Class Library project
- Open the project settings and set the compilation target to .NET Framework 3.5 or lower
- Add the following files from
<Steam>/SteamApps/common/TheLongDark/tld_data/Managed/
as dependencies:Assembly-CSharp.dll
Harmony.dll
UnityEngine.dll
- Follow the instructions in the Harmony wiki on how to patch existing methods
- The mod loader will also call any
public static void OnLoad()
methods in any types it can find.