Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Other First Person Shooter Hacks › 7 Days to Die Hacks & Cheats › A Better Way of Creating Mods

A Better Way of Creating Mods

Posts 1–6 of 6 · Page 1 of 1
Sqeegie
Sqeegie
A Better Way of Creating Mods
Greetings fellow MPGH stalkers,

When I first started modding 7DTD almost a decade ago, the tools and resources we had were very primitive compared to what is available now. The learning curve was high, and the guides were scarce. More importantly, the native support 7DTD gave to modders was non-existent. Modders had to build from scratch and often had to create "core mods" by directly patching game assemblies. This caused mods to break every update and often created conflicts when using more than one mod at a time. However, things have greatly changed since those times. 7DTD has dramatically changed the native support for mods, and the general modding community has matured. 7DTD now natively supports loading mod assemblies and supplies Harmony with the game, making it far easier to create advanced mods for 7DTD without having to patch the Assembly-CSharp.dll directly. On top of being easier to learn and implement than traditional patches, if done correctly, the mod does not have to be updated every time 7DTD does.

I was personally quite slow at adopting this new "orthodox" modding system, but the learning curve is well worth it. I highly recommend everyone on MPGH change to this method rather than continuing to patch the Assembly-CSharp.dll directly. I won’t be putting a full tutorial here. MPGH is very restricted for posting external resources, but I do want to go over the basics and point everyone in the right direction.

------------------------------------


7DTD now provides a ModAPI that can load custom C# assemblies into the game when launched. This allows us modders to write custom C# code to change how the game functions instead of patching existing assemblies.

The basics steps for creating a mod are:
  1. Install and set up Visual Studio with .NET Framework support.
  2. Create a new .NET Framework class library (.dll) project.
  3. Add assembly references to 7DTD’s Assembly-CSharp.dll and any other library you need.
  4. Create a new class extending 7DTD’s IModApi class and implement the core InitMod method.
  5. Add any custom code.

To get started with these steps, I recommend checking out SphereII’s "Creating A New Visual Studio Project for A20 and above" tutorial on YouTube:
 
YT



Here is an example C# class that implements everything needed. It (should) enable creative/debug menus, increase build distance/interval + item pickup range, as well as showing all players on the map:
 
MPGH.cs

Code:
/* .NET Framework 4.5 Class Library
 * 
 * References:
 *  - Assembly-CSharp.dll
 */

public class MPGH : IModApi
{
    public void InitMod(Mod _modInstance)
    {
        ModEvents.GameStartDone.RegisterHandler(GameStartDone);
    }

    private static void GameStartDone()
    {
        GamePrefs.Set(EnumGamePrefs.CreativeMenuEnabled, true);
        GamePrefs.Set(EnumGamePrefs.DebugMenuEnabled, true);
        GamePrefs.Instance.Save();

        Constants.cDigAndBuildDistance = 50f;
        Constants.cBuildIntervall = 0.2f;
        Constants.cCollectItemDistance = 50f;

        GameStats.Set(EnumGameStats.ShowAllPlayersOnMap, true);
    }
}

Once finished writing a mod, build it in release mode to create a custom .dll assembly.

Like shown in SphereII's video, to add mods to 7DTD, create a Mods folder under the main 7 Days to Die root directory (if it doesn't already exist), and create another subdirectory for your new mod. In this directory, copy any mod .dll assemblies to it, as well as create a new file named "ModInfo.xml" and add my example content below (adjusting it to your needs):
 
ModInfo.xml

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
	<Name value="mpgh" />
	<DisplayName value="MPGH" />
	<Version value="1.0" />
	<Description value="Custom MPGH mod that enables CM/DM menus and other custom edits." />
	<Author value="Sqeegie" />
	<Website value="" />
</xml>

Once done, the folder structure should look something like this:
Code:
7 Days to Die
\_ Mods
  \_ MPGH
    \_ ModInfo.xml
    \_ MPGH.dll
On the 7DTD's ModAPI, to quote one of my comments on the forum:
There is no documentation for ModAPI except for the stuff fellow modders have gathered and posted around. The official ModAPI is very barebones, and there isn't a huge list of premade methods and capabilities built-in. It only provides a few ModEvents and a way to initialize custom code. The rest is left up to the modder to implement. There are several primary methods we use to add our custom functionality using the ModAPI, all through the provided InitMod entrypoint:
1. Register a handler for one of the built-in ModEvents.
2. Patch/hook a game method via the Harmony library.
3. Run custom code directly and/or add a new Unity GameObject to capitalize on its events.

Using a tool like dnSpy, we can decompile and read the game's code to determine how it works, and based on that, we can figure out how we need to adjust it in order to add our desired functionality.
In my MPGH code example, I am using the #1 capability of the ModAPI and registering a handler for 7DTD's built-in ModEvent, GameStartDone, which executes after the initial world loading is done. As mentioned, there are other ways of using the ModAPI, but the core methodology lies in using a tool like dnSpy to figure out how the game works (and what needs to be modified) and create a mod to adjust the game's functionality accordingly. For other learning resources on 7DTD modding, I recommend checking out 7DTD's modding section on their official forums.

------------------------------------


I've attached an example Visual Studio project of my MPGH mod, as well as the compiled version that can be used directly in the game.

VirusScans:

MPGH
https://virusscan.jotti.org/en-US/fi...job/4ggvfmtoa3
https://www.virustotal.com/gui/file/...50616892a82b28

MPGH_Project
https://virusscan.jotti.org/en-US/fi...job/mdui2c7lee
https://www.virustotal.com/gui/file/...35e39017cb1eae

==== Please wait until the attachments are approved before trying to download ====

If you get the following error: "Invalid Attachment specified. If you followed a valid link, please notify the administrator." You need to wait longer.

MPGH_mpgh.net.zip MPGH_Project_mpgh.net.zip
#1 · 2y ago
QI
qinghuanb111
good
right ,MPGH can userd dll to inject 7DTD
#2 · 2y ago
JI
jim2029
So to use this method of making "Mods" will still require EAC to be set to off, correct?
#3 · 2y ago
JI
jim2029
FYI, for me at least, the build/collect/dig distance is not changed from stock and you can't see anyone else on the map. Only thing that is edited is the ability to have cm/dm.

Its been quite a few alpha's since I've even gotten the View Everyone on Map to work as well as the build/collect distance also.
#4 · 2y ago
H34db4nger
H34db4nger
First of all thanks for that very needed post of yours.
Secondly i always felt it strange to do it like this. But had not enough time and motivation to do so.
Apperently it seems that has changed now. In case this´ll lead to future "Mods" from my side i´ll tag
you as instructor and recommend your Topic.
Cheers for this quality information.

Quote Originally Posted by qinghuanb111 View Post
right ,MPGH can userd dll to inject 7DTD
There will be no injection required since it gets loaded as a mod.


Quote Originally Posted by jim2029 View Post
FYI, for me at least, the build/collect/dig distance is not changed from stock and you can't see anyone else on the map. Only thing that is edited is the ability to have cm/dm.
Apparently thats because constants are not accepted to be changed during the GameStarting phase.
They´d have rather being changed after that. Haven´t found out which Event should be best for it but im on it right now.
Changing them while being ingame works flawlessly.

Take a look yourself:
https://ibb.co/JyrDf9q


A small added hack menu which sets a collection of constants does the job well.
#5 · edited 2y ago · 2y ago
JI
jim2029
How do you change them in game? I don't have a menu on the left like you show unless I'm missing a hot key somewhere.
#6 · 2y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • How to use as many mods as wanted(better way)By Aborted in Combat Arms Mod Tutorials
    14Last post 15y ago
  • [Release]Better way to get allways HSBy Houston in Combat Arms Europe Hacks
    7Last post 17y ago
  • Better way then System()By That0n3Guy in C++/C Programming
    5Last post 16y ago
  • [tut] better way to make a kssnBy damanis1 in WarRock Korea Hacks
    6Last post 19y ago
  • easy way to create wr test accountsBy c_norris in WarRock - International Hacks
    16Last post 19y ago

Tags for this Thread

None