This tool allows for easier modding of the Nucleares game.
It decompiles the Assembly-CSharp.dll of the game, adds the mod loader, then compiles it again. It also creates a backup of the original DLL and creates a mods directory.
-
Install Dependencies:
- Ensure you have Python installed. If not, download and install it from python.org.
- You will need the
dnSpydecompiler (dnSpy.Console.exe) andilasm.exefor the decompilation and recompilation process. DownloaddnSpyfrom dnSpy GitHub, and ensureilasm.exeis available atC:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe(this is typically included with the .NET Framework).
-
Set Up Directories:
- Obtain a copy of the
Assembly-CSharp.dllfile from your Nucleares game directory. This is the file the tool will modify. Make sure you have it accessible on your system. - Ensure the mod loader and decompiler-related files are available and configured properly.
- Obtain a copy of the
-
Run the Script:
- Save the script as a
.pyfile (e.g.,mod_loader_installer.py). - Open a command prompt or terminal and run the script with Python:
python mod_loader_installer.py
- Save the script as a
-
GUI Usage:
- Browse for DLL: Click the "Browse" button to locate the
Assembly-CSharp.dllfile from your game directory. - Install Mod Loader: Click the "Install Mod Loader" button to install the mod loader. The script will:
- Backup the original
Assembly-CSharp.dll. - Decompile the DLL using
dnSpy. - Inject a mod loader script into
GameManager.cs(or update it if a newer version is available). - Recompile the DLL using
ilasm.exe. - Create a
modsdirectory for custom mods.
- Backup the original
- Restore Original DLL: If needed, click the "Restore Original DLL" button to restore the backup of the
Assembly-CSharp.dll.
- Browse for DLL: Click the "Browse" button to locate the
-
Log Output:
- Throughout the process, the script will display progress in the log section of the GUI. This includes messages such as "Successfully Decompiled," "Mod Loader Injected," and "Recompiling DLL."
- os – Standard Python library for file and directory manipulation.
- shutil – Standard Python library for file copying and removal.
- subprocess – Standard Python library for running system commands.
- urllib.request – Standard Python library for making HTTP requests (used for checking updates and downloading files).
- tkinter – Standard Python library for building GUI applications.
- tkinter.filedialog – Part of the
tkinterlibrary for opening file dialogs. - tkinter.messagebox – Part of the
tkinterlibrary for displaying message boxes. - tkinter.scrolledtext – Part of the
tkinterlibrary for displaying a scrollable text area.
- dnSpy.Console.exe – External tool used for decompiling the
Assembly-CSharp.dll. Make sure this tool is available and properly configured. - ilasm.exe – External tool from the .NET framework for compiling the modified assembly back into a DLL.
- https://dl.atdevs.org/nucleares-modding-tool/csharp/latest.txt – URL to check for the latest version of the mod loader.
- https://dl.atdevs.org/nucleares-modding-tool/csharp/ – Base URL for downloading the mod loader script files.
- Windows OS – This script is designed for Windows and requires
ilasm.exeto be available atC:\Windows\Microsoft.NET\Framework\v4.0.30319\.
Make sure to install all necessary tools and configure paths before running the script.
This software is provided under the Apache License 2.0.
By using this software, you agree to both the Apache 2.0 License and the ATDevs Terms of Service:
➡ ATDevs Terms of Service