Creating Mods

If you want to create mods for DYSMANTLE then you’ve come to the right place! Creating a mod is as simple as unpacking the game files, making your changes, and packing your mod into a PAK file.

The process of unpacking and packing is handled by two command-line programs that we’ve created: unpack.exe and pack.exe. Follow these steps to get started:

  1. Download tools.tar.gz (unpack.exe and pack.exe).
  2. Unzip the tar.gz file.
  3. Complete the steps below depending on your needs.

Step 1: Unpack Game Files

The unpack.exe program unpacks the game files from the game to a directory of your choice. This program takes two arguments:

Input Directory

The directory where DYSMANTLE.exe is located. Typically this is C:/SteamLibrary/steamapps/common/DYSMANTLE.

Output Directory

The directory where the game files should be unpacked to. This can be any directory on your computer.

Example:

./unpack.exe C:/DYSMANTLE/ ./unpacked/


Step 2: Create Mod

Create a directory for your mod files that matches the structure of the unpacked game files. Here is the structure of the Teleporter mod, for reference:

  • /teleporter
    • /dysmantle
      • inventions.xml
      • recipes.xml
    • /items
      • /specials
        • teleporter.nut
        • teleporter.png
    • /ui
      • Invent.xml

If you look at both the structure of the Teleporter mod and the structure of the unpacked game files, you’ll notice that files need to be named specifically and placed in specific directories for everything to work correctly.

In the example above the teleporter invention is added to inventions.xml, the teleporter recipe is added to recipes.xml, and the button to invent the teleporter is added to Invent.xml. The file teleporter.png is referenced by Invent.xml and teleporter.nut contains the custom code that is used to teleport the player when the item is used.

Important: When editing existing XML files only add the <node> elements that are new to your mod. Do not copy the nodes from the base game unless you are changing those nodes. More information on this will be added to a future how-to video.

If you would like more information or need help or direction with creating a mod, please feel free to join the DYSMANTLE Modding Discord.


Step 3: Package Mod

The pack.exe program packs your mod files into a single PAK file that can be uploaded to Mods Nexus, downloaded by players, and loaded into the game with other mods by the patcher. This program takes two arguments.

Input Directory

The directory where your mod files are located.

Output Filepath

The filepath of your packaged PAK file.

Example:

./pack.exe C:/MyMods/src/teleporter/ C:/MyMods/teleporter.pak


Step 4: Publish Mod

Now that your mod is packaged into a PAK file it’s time to publish your mod. We recommend hosting your mod on Nexus Mods. While there isn’t an integrated browse/download/install tool hosting your mod on Nexus Mods allows other players to easily find and download your mod.

  1. Zip your mod’s PAK file into a .zip archive.
  2. Upload the .zip file to Nexus Mods, add a description, etc.
  3. Profit!