Enter the Gungeon Guide

Modding the Gungeon Basics for Enter the Gungeon

Modding the Gungeon Basics

Overview

Do you wish to make your own mod but don’t know how? Hate seeing your ideas go unnoticed and unmade? Worry not,for this guide will cover the basics of making a mod for Enter the Gungeon!The guide is for the latest version of EtG (Farewell to Arms) and tries to , as much as possible, be complete and fill the niche of a proper guide about modding in the EtG Steam community

What you will need

To start, you must gather the necessary components for the process of modding:
  • Microsoft Visual Studio (Link)[visualstudio.microsoft.com]
  • Mod the Gungeon (Link)[modthegungeon.eu]
  • dnSpy (Link)[github.com]
  • Any image editing program (An alternative to Photoshop)[www.gimp.org]
  • Game sprites:
    1. TK2D sprites[www.dropbox.com] (Includes character, enemy, environment, etc. sprites)
    2. DF sprites[www.dropbox.com]
      (Includes character icons and other UI sprites)

Note: If you’re just starting out, do not install Mod the Gungeon yet and if you already have Mod the Gungeon installed remove it ! Additionally, be sure to organize all this carefully

If you’re confused, here’s some images

Microsoft Visual Studio
dnSpy

Installing and Using ModtheGungeon

Video by Retromation

Setting up Visual Studio

Now that you have downloaded the necessary components, setting up Visual Studio is important as this will be the program you’ll use to code your item, gun, etc. into existence.

  1. Installing a development pack
    All you’ll need for this is the .NET Desktop Development pack, encircled here
  2. Gathering dependencies
    Once installation is finished, you will need to prepare your dependencies which will come in handy later from “SteamsteamappscommonEnter the GungeonEtG_DataManaged
    You will need:

    1. Assembly-CSharp
    2. UnityEngine.CoreModule
    3. Assembly-CSharp.Base.mm
    4. UnityEngine.CoreModule.Base.mm

    Note: Both Assembly-CSharp and UnityEngine.CoreModule should be from the version with MtG removed while Assembly-CSharp.Base.mm and UnityEngine.CoreModule.Base.mm are from the version with MtG installed
    Alternatively, you can download this .zip file[drive.google.com] lol

Creating a Project

Now that you’ve set up Visual Studio and obtained your dependencies, it’s time to finally create a project for your first mod!

  1. Selecting a Type of Project
    After launching VS, select “Create a New Project” and look for Class Library (.Net Framework)
  2. Blank Workspace
    You should be faced with this once you create a new project:

Applying Code in your Mod

Now comes the technical stuff

  1. Adding References
    To the right of your workspace you should see a “References” sub-heading, right-click then select “Add references…” and add the four files from the dependencies you obtained earlier
  2. Module Creation
    Once you’ve added references, extend it to the ETGModule as shown below
    *The red underline denotes errors and is normal in this specific step

    Next, for the sake of brevity, right-click “Class1” or whatever you renamed it to then click “Quick Actions and Refactorings…” then “Implement Abstract Class
    *Remove the throw new NotImplementedException(); lines as these are unecessary

    It should look like this afterwards:

    Finally, for the sake of this guide, we will only have the console display a message upon initialization by writing ETGModConsole.Log(“Your Message”); in the “Start();” portion of the code

Checking your Work

  1. Building your Solution
    After formulating the mod, click the “Build” tab near the top of the application then the “Build Solution” program or simply Ctrl+Shift+B

    Once the program finishes, a successful one should look like this

  2. Testing the Mod
    Simply look for the “Debug” folder in your project’s directory.
    Inside, it should look like this
    *The icons of the .dll files are different because mine open in default with dnSpy sorry

    Simply take the .dll file of your project which is most likely named after it, archive it into a .zip file and include a metadata.txt file

  3. Metadata file
    The metadata file should say this:

    Name: *Your mod’s name* Version: *Mod’s version* Depends: *Mod name*.dll Base: 0.2

    *I don’t know why it says Base: 0.2 but the mod seems to freak out if it’s not set to 0.2

    Finally, install it like you would any other mod

Afterword

Thanks for taking the time to select and read my guide! Feedback is much appreciated!

I know that MtG and it’s mods are still in their infancy thus this guide will probably be due for updates and revision in the future.
In addition, you can learn more about the modding process from https://www.youtube.com/channel/UCbVjP0cmm-w39Ronlaj12Pw and beyond what this guide provides, should you wish to do so.

I might make item, gungeon room and gun creation guides in the future but idk

SteamSolo.com