Jump to content
HAL9000

DMT Modding Tool

Recommended Posts

Hey guys,

 

Here's the new community made tool for modding 7 Days to Die. It is going to be the replacement for SDX going forwards.

 

The tool is open-source and can be found on github: https://github.com/HAL-NINE-THOUSAND/DMT.

 

Downloads

 

v2.2

 

--v2
DMT v2 is now released. The major change is it now uses Harmony v2 instead of v1. This is a breaking change so I've bumped the DMT release to v2 as well. There are some upgrade processes you'll need to do for your mod. A lot of them can be done by DMT by using the "Attempt Hamony Auto Update" checkbox when building 

 

image.thumb.png.cdf20332a0835fc9daf0bfa89cc7f6f2.png

 

Further details of the updates required can be found here: https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0 

 

We've also removed the requirement for the mod.xml. Now both vanilla and DMT uses the ModInfo.xml file. Again, there is an auto-update function built in that should server most cases. Once the update is done you should delete the mod.xml file to remove any warnings that are generated in DMT. 

--

 

 

All previous SDX mods should be compatible with DMT but also comes with some new features and workflow improvements. The main new benefit is support for the Harmony modding library

 

 

Tutorials

 

Harmony hooks for DMT by sphereii (note: DMT now uses Harmony v2 so these may not work without using the upgrade feature in DMT v2)

 

 

Decompiler / Code viewer

dnSpy

 

 

Many thanks to sphereii and the other testers of DMT. If anyone is interested in keeping the source updated feel free to submit a pull request or PM me.

 

Cheers,

 

Hal

Edited by HAL9000
link updates (see edit history)
  • Like 5

Share this post


Link to post
Share on other sites

Thanks for doing this for the community Hal!!

Share this post


Link to post
Share on other sites

Thank you:tickled_pink: I had a mod that I couldn't patch using SDX in 17.3 experimental, but was able to patch it using DMT.:cheerful:

Share this post


Link to post
Share on other sites

In more layman's terms, could you explain in a few sentences what this offers over the other? Like is the Harmony library really big? just a summary of what stuff it has in it? (like is it specific to 7days or does it have other things useful to more general coders?)

Share this post


Link to post
Share on other sites

ok i just noticed more info was in the guide

 

question: applying them at run-time means slower loads? is that the only down-side? are there any upsides besides making it easier to see what changes are being applied?

Share this post


Link to post
Share on other sites

I have not noticed any kind of slower responses to the game, even when using Harmony on a really aggressive call.

 

To clear up your questions...

 

DMT is only for 7 Days To Die

 

Harmony applies patches to the DLL in-memory, vs in the DLL itself. You can add and remove patches in between reboots, just like you do for the XML snippets now.

 

DMT does support SDX Patches, but the way forward will be recommended to use Harmony instead. Harmony is a lot easier to work with; we can place our changes before the vanilla method starts, or after it ends, change its values, etc, without having to touch IL or CECIL.

Share this post


Link to post
Share on other sites

Updated release v1.1

 

Fixed some Harmony integration bugs and added an auto-updater so future releases you should get a popup in the app when starting.

 

v1.1

 

Cheers,

 

Hal

Share this post


Link to post
Share on other sites

Pls anybody can shortly elaborate some advantages with DMT and using Harmony. Still reading thru the guide right now.Thanks

Edited by PeterB (see edit history)

Share this post


Link to post
Share on other sites
Pls anybody can shortly elaborate some advantages with DMT and using Harmony. Still reading thru the guide right now.Thanks

 

A big benefit of using Harmony is that it allows run-time patches. The Harmony DLLs we make are under the Mods folder, and are loaded every time the game is started. If players found they like a lot of different modlets, then can add and remove them at their leisure, without having to go through the DMT build process.

 

They are also easier and cleaner to write.

Share this post


Link to post
Share on other sites

I don't suppose there is a simple tutorial somewhere to show a noob how to import a basic cube into the game using DMT is there? I just want to add a basic cube with my own texture. I followed a sdx tutorial but that does not work either dispite saying that the build completed and no errors. Thanks.

Share this post


Link to post
Share on other sites
I don't suppose there is a simple tutorial somewhere to show a noob how to import a basic cube into the game using DMT is there? I just want to add a basic cube with my own texture. I followed a sdx tutorial but that does not work either dispite saying that the build completed and no errors. Thanks.

 

Take a look here.

Share this post


Link to post
Share on other sites

Hey Guppy I guess I Am confused then. I have been out of the modding loop for a bit. So we still use sdk for blocks? or we use DMt now ? Another question is. Why use the DMT anyways.. I see that most mods like audio or block files is just a drop in mods folder and thats it.

 

So if I made a simple block in unity.. export it with the script, create my mod info and all the scripts.. I dont need to use anything to patch it? right? very confused on this process.

 

Its my understanding that sdk changed the assembly file and added it to the game ...

Share this post


Link to post
Share on other sites

7days now supports import of .unity3d files without sdx. Check the tutorial section.

 

Sdx/dmt changes the assembly to allow scripts to be included, it's no longer necessary for anything else.

Share this post


Link to post
Share on other sites

With a fresh install of the 7 Days To Die client, and dedicated server for Windows, DMT causes the client to endlessly throw a single error when connecting to the dedicated server, preventing the player from spawning in. This does not happen in single player.

 

This is with the latest 7 Days To Die, version 17.4.

 

Client log: https://pastebin.com/0GMguLRg

 

Server log: https://pastebin.com/NJzMja1C

 

 

When starting a game through the client (I.E, not connecting to a dedicated server to play), everything proceeds as expected with no errors thrown: https://pastebin.com/PsBaqquu

 

This is with no mods, just an absolutely plain install after running the DMT tool, pointing it to the client and server folders.

 

Edit: Disregard. The issue was that I increased the view distance in the registry, beyond the default maximum of 7.

Edited by FiftyTifty (see edit history)

Share this post


Link to post
Share on other sites

Hello, is there any info about how to get all game classes/objects within description?

 

Does any idea how to hook recipe searching mechanics?

Share this post


Link to post
Share on other sites

hey, just tried to use this on a freash install of 16.4 and noticed you added like a 16 version one in your video, does this actually work with 16?

 

as i just keep getting

 

Running BackupFiles

 

Unhandled Exception: System.NotImplementedException: Instruction is not an i4 opcode

at DMT.Extensions.GetValueAsInt(Instruction i)

at DMT.Tasks.BackupFiles.GetVersionInfo()

at DMT.Tasks.BackupFiles.Patch(PatchData data)

at DMT.PatchData.Patch()

at DMTViewer.Program.Main(String[] args)

 

process exited with error code -532462766

Share this post


Link to post
Share on other sites

Have a look on the Github page and under Releases grab v1.2. That should be compatible with A16. I'll have a look at backwards compatibility for the next release

Share this post


Link to post
Share on other sites
Have a look on the Github page and under Releases grab v1.2. That should be compatible with A16. I'll have a look at backwards compatibility for the next release

 

Hey Hal tried right back to 1.0 same error, hopefully backwards compatible is actually a viable option cause this'll be awesome, I'll be looking forward to next release xD

Share this post


Link to post
Share on other sites

How do you get started with modding the C# assembly? I'm a programmer, but what tool is best to use to view the assembly source? Do you just use ILSpy?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...