Giter Club home page Giter Club logo

modloaderinstaller's Introduction

Mod Loader for The Long Dark

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!

Compatibility

This mod loader has been tested for The Long Dark v1.56 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!

Installation instructions

Note that only TLD versions up to 1.56 are supported!

Windows (64-bit):

  • Download ModLoaderInstaller-Windows-x64.zip from the downloads page
  • Extract the entire ZIP archive
  • Run ModLoaderInstaller.exe by double-clicking the file.
  • Select TLD's executable file (e.g. at C:\Program Files (x86)\Steam\SteamApps\common\TheLongDark\tld.exe)
  • Check that the "file status" label now says Valid, unpatched or Valid, outdated
  • 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!

MacOS:

  • Download ModLoaderInstaller-Mac.zip from the downloads page
  • Extract the entire ZIP archive
  • Run ModLoaderInstaller-Mac by double-clicking the file.
  • Select TLD's executable file (usually at ~/Library/Application Support/Steam/steamapps/common/TheLongDark/tld.app)
  • Check that the "file status" label now says Valid, unpatched or Valid, outdated
  • 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!

Linux (64-bit):

  • Download ModLoaderInstaller-Linux-x64.tar.gz from the downloads page
  • Open a terminal in your downloads folder and run the following command:
tar xf ModLoaderInstaller-Linux-x64.tar.gz && ./ModLoaderInstaller/ModLoaderInstaller
  • Select TLD's executable file (usually at ~/.steam/steam/steamapps/common/TheLongDark/tld.x86)
  • Check that the "file status" label now says Valid, unpatched or Valid, outdated
  • 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!

32-bit operating systems / other

  • Download ModLoaderInstaller.jar from the downloads page
  • Make sure a Java 8 runtime that includes JavaFX is installed (e.g. Amazon Corretto 8)
  • Run java -jar ModLoaderInstaller.jar
  • Select TLD's executable file
  • Check that the "file status" label now says Valid, unpatched or Valid, outdated
  • 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:

Manual installation: (Not recommended)

  • 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 is Invalid,
    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.

For developers:

  • 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
    • 0Harmony.dll
    • UnityEngine.CoreModule.dll
    • You may also need other UnityEngine DLLs in some occasions
  • 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.

Mod List

Moved to this wiki page

modloaderinstaller's People

Contributors

zeobviouslyfakeacc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modloaderinstaller's Issues

Cannot patch - File status: Invalid

I just downloaded The Long Dark through steam, i have launched it once, and then i downloaded the TLD Mod Loader Installer. When i select the "tld.exe" i cannot click "patch" because the file status says "Invalid".

Im guessing the patch of TLD is so knew that the TLD mod loader doesnt support it yet. Am i right?

rewired_core.dll

Running on MacOs & going through the folder, I do not have the file rewire_core.dll built into the game. I have already verifed my steam folder & it says everything is checked out. Wondering how and where I can get the file?

Mod loader no longer works on Hotfix 1.56 for Windows

Every time mod loader patches the directory the game will refuse to get past the disclaimer screen because it gets hard stuck frozen. The only way to fix it is to verify the integrity of the game folders which pretty much reverses what the mod loader did.

Expected the file "Rewired_Core.dll" at path

Mac os
when l selected the tld.app.the application said they can't find "Rewired_Core.dll" .then l opened steam to check my game files .but all the files are right.so l opened the tld tld.app/Contents/Resources/Data/Managed/Rewired_Core.dll .but l can't find Managed folder in Data folder.

TLD Redux

I noticed that I can't patch it / access any of the mods now--would this be because of the redux? What are plans for updating to the redux? Thanks!

Modding The Long Dark on Mac

As suggested, I am posting my attempt to use mods on The Long Dark, on my Mac. I downloaded both the mod itself and the ModLauncher, however that is where I began to run into problems. I am not technologically illiterate, however I am not a whiz either, so my issues could very well be my own lack of knowledge. When I opened the mod launcher, it asked for the path to the DLL, which to my understanding is a Windows specific type of file. So when I clicked on the ellipses button to the right of the "Path to the DLL:" text box, I selected "TLD Executable" instead of "Rewired_Core.dll". However, despite following all instructions I could find that explained how to open mod launcher properly, I could not find or figure out which file the mod loader wanted, as the only example online is on Windows, which showed the "Rewired_Core.dll" file plain as day ready to be uploaded. I do not have this file, and even if I did I could not figure out how to supply the path to the Mod Loader. Because of this I am unable to load mods onto my game. Any help/feedback on this issue would be gratefully appreciated.

Thank You,
Kevin

Jar file won't open

So, I've spent the last hour trying to figure this out. I downloaded the file, but didn't have java. So I downloaded Java 8, which should work, but when I try to open Jar files, like this one, it does nothing. I click, nothing happens. I've uninstalled and reinstalled Java, still no. I got winrar, which can open the jar file, but nothing in there is something I can execute to get the dialogue box I need. So what do I do?

Modding for 1.6 (Elegy)

First of all, I'd like to truly thank you and all of the modding community for the time and effort you've put into making some incredible mods to make tld more enjoyable. It's sad to see that it has become so difficult now with Elegy. I will continue to push Hinterland to support modding in the future. In the meantime, is there any chance that some mods may be modified to work with 1.6?
Thanks again!

no main class

Java Virtual Machine Launcher:
could not find main class:
me.zeobviouslyfakeacc.modloaderinstaller.Main. Program will exit

The instructions don't make sense

Maybe I'm missing something here. Your installation instructions point to files that don't exist.

https://github.com/zeobviouslyfakeacc/ModLoaderInstaller#installation-instructions

Download ModLoaderInstaller-Windows-x64.zip from the downloads page

Link to download: https://github.com/zeobviouslyfakeacc/ModLoaderInstaller/releases/latest/

ModLoaderInstaller-Windows-x64.zip does not exist

Extract the entire ZIP archive
Run ModLoaderInstaller.exe by double-clicking the file.

ModLoaderInstaller.exe doesn't exist

Crashes

I am having frequent crashes.
I installed this months ago, it was great. But did not need it any more, I removed it. Since the last TLD update I have been having crashes. I sent my files to Hinterland and they say the mod is still present and that could be causing the crashes.
I recently renamed the original file location and install a fresh game. Worked great for a while but crashing again. I dont know how to tell if the mod is installed or not.
Any help you can offer to stop the crashing is appreciated.

Error

I had this error while trying to patch the tld exe

java.nio.file.NoSuchFileException: X:\Users\User\Desktop\Saves\THE LONG DARK\UMOD\zipfstmp5157016044353645477.tmp
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.Files.newByteChannel(Unknown Source)
at java.nio.file.Files.createFile(Unknown Source)
at java.nio.file.TempFileHelper.create(Unknown Source)
at java.nio.file.TempFileHelper.createTempFile(Unknown Source)
at java.nio.file.Files.createTempFile(Unknown Source)
at com.sun.nio.zipfs.ZipFileSystem.createTempFileInSameDirectoryAs(ZipFileSystem.java:1094)
at com.sun.nio.zipfs.ZipFileSystem.getTempPathForEntry(ZipFileSystem.java:839)
at com.sun.nio.zipfs.ZipFileSystem.newFileChannel(ZipFileSystem.java:723)
at com.sun.nio.zipfs.ZipPath.newFileChannel(ZipPath.java:747)
at com.sun.nio.zipfs.ZipFileSystemProvider.newFileChannel(ZipFileSystemProvider.java:271)
at java.nio.channels.FileChannel.open(Unknown Source)
at java.nio.channels.FileChannel.open(Unknown Source)
at me.zeobviouslyfakeacc.modloaderinstaller.FileUtils.applyXOR(FileUtils.java:53)
at me.zeobviouslyfakeacc.modloaderinstaller.Patcher.call(Patcher.java:46)
at me.zeobviouslyfakeacc.modloaderinstaller.Patcher.call(Patcher.java:14)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

JAR Files won't open/Jarfix didn't help

So, I have tried every solution that I could find to remedy this but JAR files still will not open for me on Windows 10. Not sure what else I can do. Pretty frustrated as I am not a programmer and have no idea why it isn't working. I ran Jarfix which seemed to work. It told me that .jar files were registered successfully but it doesn't seem to have done anything.

Tutorial

You and FINDarkside could create a complete tutorial for creating new mods, with shortcut keys?

Im a dotNet Programmer, but i've never done mod before

Starting to mod

Not really sure any other way to contact you.

I am starting to play around with mods on TLD. I made a very simple first mod that doubles the speed in which you learn skills.

can you add it to your modlist?

also not really sure any better way to contact you.

Doesn't work on mac

The jar file cannot be guided to the correct path on macOS, because of the different path on mac.
It may be able to be solved if its possible to copy in the path instead of guiding the installer to it.

I think this problem was also posted in the post about the installer on /r/TheLongDark
Kudos, for making a modLoader :=)

Stable release for mods

Do you have any idea where i can find a version of tld that could run mods?

Sorry if this is an incorrect forum for this, however i didnt see a message option.

Thanks,
Ryan

rewired_core.dll

My the long dark is run on window, version is 1.48 but i don't have "managed" folder and "rewired_core.dll" file
So where can i get those file?

Please help

I tried locating the path to tld.app but it says i need locate it to 'TheLongDark' thing but i dont have it

1.56 - mods exception

Hey,
Better fuel management and Better water management do throw exceptions on latest stable (well, excluding todays update).
Would be possible to remove them from compatible mod list (if you look on source codes of those mod you will see opened issues there).

Also sorry to hear that modding from now on will not be continued (as it seems) but devs of TLD always where anti-mod scene.

Thanks for all good You (and other modders) did.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.