Dig or Die

Dig or Die

Not enough ratings
Installing Mods
By nuclear_bomb
Guide for installing BepInEx, running Dig or Die with mods and where to find them
   
Award
Favorite
Favorited
Unfavorite
Automatic BepInEx Installation
Firstly, you need to install BepInEx, which is a patcher and plugin framework necessary for mods to work. There exists two methods to do it: automatic (much easier) and manual. For automatic, you need to open PowerShell and execute a script which would install a BepInEx for Dig or Die.

To open PowerShell use one of the following methods:
  1. Start menu method:
    • Right-click on the start menu.
    • Choose "Windows PowerShell" (for Windows 10) or "Terminal" (for Windows 11).
  2. Search and launch method:
    • Press the Windows key or left-click on the start menu.
    • Type "PowerShell" or "Terminal" (for Windows 11).
    • Left-click "Windows PowerShell" match to launch PowerShell.

Copy the following command, paste it into PowerShell console and press Enter.
It will show text menu for selecting custom installation options. Note: you don't need actually to enable anything, you can simply press Enter to start installation.

Use up/down key to move cursor, press Enter to toggle selected option. Select "Continue..." and press Enter to start installation.

If you encountered an error, please follow provided instructions in error message, or, manually install BepInEx.
Manual BepInEx Installation
Download BepInEx
Get the 32-bit (x86) BepInEx version 5.4.23 or newer (NOT 6.x.y version) for Windows from BepInEx Github Releases[github.com]

The .zip archive will be downloaded.

Install BepInEx
Right-click the game, hover over Manage >, and left-click Browse local files.


This will open the directory where game files are located.


Extract the downloaded .zip archive into the folder where DigOrDie.exe is located.
The folder should look like this after extraction:


Initial Setup
Launch the game through Steam. Directly running executable DigOrDie.exe won't work.
After launch, the game should always show a black screen.

Wait until the BepInEx/config folder and other ones appear, then close the game (ALT-F4 or through taskbar).

Folder BepInEx should now have the following contents:


Critical Configuration
Open BepInEx/config/BepInEx.cfg file in text editor and find near the end the following lines:
[Preloader.Entrypoint] ## The local filename of the assembly to target. # Setting type: String # Default value: UnityEngine.dll Assembly = UnityEngine.dll ## The name of the type in the entrypoint assembly to search for the entrypoint method. # Setting type: String # Default value: Application Type = Application ## The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from. # Setting type: String # Default value: .cctor Method = .cctor
Change line Type = Application to Type = MonoBehaviour.

Enabling console (optional)
It is recommended to enable the console by locating and changing the following settings accordingly ("Enabled = false" -> "Enabled = true"):
[Logging.Console] ## Enables showing a console for log output. # Setting type: Boolean # Default value: false Enabled = true
After enabling, when the game starts a console window with logging information should appear.
Install Plugins
After you installed BepInEx, a "Dig or Die/BepInEx/plugins" folder should appear.

Download plugins .dll files from dig-or-die-mods Releases[github.com] page (or compile them yourself, see Building Plugins[github.com]). If you find other plugins for Dig or Die you can use them too.



Place plugin .dll (e.g. precise_clock.dll) into "Dig or Die/BepInEx/plugins" folder.

To learn more about these plugins you can checkout the dig-or-die-mods/plugins[github.com]and read their README.md files. They contain basic description of the plugin, its configuration and more.
Final Launch
Launch Dig or Die through Steam again. Plugins should now be active.

For troubleshooting:
  • Check Dig or Die/DigOrDie_Data/output_log.txt file for any errors
  • Visit BepInEx Troubleshooting[docs.bepinex.dev] page
Plugin Configuration
Almost every plugin has its configuration files under BepInEx/config/{plugin id}.cfg.


The configuration file appears after the game is started the first time with the plugin.

To reset configuration to default delete the config for plugin and next time the game is started the plugin will recreate it.

Usually, the plugin reads settings inside config file at startup. You need to modify them before the game is started, or restart the game to apply them.

However, some plugins also can dynamically read them without need for restarting the game. It's usually said in plugin's documentation when it does that.
Notes
Thanks for reading this guide.

Alternatively, you can use the guide described in README.md here[github.com] or the official BepInEx installation guide[docs.bepinex.dev] (more general).

Also, my Github project[github.com] additionally includes:
  • Source code for plugins
  • Documentation for game internals
  • Incomplete reverse engineering of world simulation algorithms (DigOrDie.dll, an internal library used to simulate water, forces, lights, and electricity)
  • Tools for working with save files (reading and modifying them)