Jump to content

DMT Modding Tool


HAL9000

Recommended Posts

Is there any definite compatibility with newly released A18 versions? Last update for DMT was a few weeks ago, and A18.2 was released yesterday. I imagine it wouldn't be, since the dll code gets changed even if a particular class wasn't modified by the devs.

 

There's a pretty easy way to find out: try it.

 

The hooks for DMT are pretty small and low level. There's a chance that it will break but it's unlikely. And if after 24 hours of release no one else has posted it's likely to be ok. Mods are more likely to break from version to version but the framework is usually stable, at least during major builds (A16.x, A17.x etc).

 

Cheers,

 

Hal

Link to comment
Share on other sites

I keep getting the error on the image, and google could not help me.

 

Snippet.jpg.e9b307fb58e2856bba42a5822c4a2f99.jpg

 

I tried reinstalling .NET Framework, building with a single mod, building with no mods, running the debugger; nothing works.

 

Am I missing something? My settings are correct AFAIK.

Link to comment
Share on other sites

I keep getting the error on the image, and google could not help me.

 

[ATTACH=CONFIG]30842[/ATTACH]

 

I tried reinstalling .NET Framework, building with a single mod, building with no mods, running the debugger; nothing works.

 

Am I missing something? My settings are correct AFAIK.

 

That's a pretty old Alpha; I'm not sure if its been tested back that far. You may have better luck with the SDX Launcher.

Link to comment
Share on other sites

There's a pretty easy way to find out: try it.

 

The hooks for DMT are pretty small and low level. There's a chance that it will break but it's unlikely. And if after 24 hours of release no one else has posted it's likely to be ok. Mods are more likely to break from version to version but the framework is usually stable, at least during major builds (A16.x, A17.x etc).

 

Cheers,

 

Hal

 

Aye fair enough, was just asking as it's downloading the now, and I've got to update the hooks for my mods. I'll gi'es it a go in a day or so once I've updated everything, and can give it a whirl.

Link to comment
Share on other sites

Hi HAL, thank you so much for making this tool. I am getting a console error in-game on start-up which prevents me from interacting with the game (outside of the main menu). The error is:

 

Error registering commands

FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=[idk if this value is confidential but can post if needed] or one of its dependencies

 

I have tried verifying the game files, which fixes it, but it is broken once i rebuild with DMT. here's a pic of my mod menu + i have some modlets.

 

Thanks! DMTViewer_TVPXUvP7WZ.jpg.061fb780a674e6c2cb2161f58f673670.jpg

Link to comment
Share on other sites

Hi HAL, thank you so much for making this tool. I am getting a console error in-game on start-up which prevents me from interacting with the game (outside of the main menu). The error is:

 

Error registering commands

FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=[idk if this value is confidential but can post if needed] or one of its dependencies

 

I have tried verifying the game files, which fixes it, but it is broken once i rebuild with DMT. here's a pic of my mod menu + i have some modlets.

 

Thanks! [ATTACH=CONFIG]30865[/ATTACH]

 

Hi 7DaysToTry,

 

It's hard to tell from that screenshot (forum pics get their size reduced, it's usually better to put it on a image sharing site and post the link) but it sounds like one of your mods is referencing Cecil. Have a look in the Scripts folder for your mods and in each file at the top you'll see something like

 

using System.Collections.Generic;
using UnityEngine;

 

See if one has

using Mono.Cecil;

 

And remove it (mod scripts shouldn't need to reference Cecil)

 

Or you can put the Mono.Cecil.dll file into your games Managed folder (the same place Assembly-CSharp.dll lives). So the game can load it. You can find Mono.Cecil.dll in the DMT folder.

 

Cheers,

 

Hal

Link to comment
Share on other sites

In A18.2 it seems they merged Localization.txt and Localization - Quest.txt together. DMT will fail when applying the localization patch for the first time with 18.2 as it is now missing this file in the Config. I've just added a dummy file to fix this for now but wanted to let you guys know :)

Link to comment
Share on other sites

Hi,

 

Same problem as mdf25 (

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\N4TH\Downloads\DMTv1.0\DMT/Backups/SP/18.2b5/Config/Localization - Quest.txt'.)

 

I tried to create an empty Localization - Quest.txt and it now compiles. However, the game is "loading game data..." for ever !

 

 

I just installed the tool and would like to make sure it is working.

- is the dummy Localization - Quest.txt empty, or should it contain some header ?

- Do I need to put the mods I am compiling into the mod folder of the game ?

 

Thank you

Edited by Umbrella (see edit history)
Link to comment
Share on other sites

Hi,

 

Same problem as mdf25 (

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\N4TH\Downloads\DMTv1.0\DMT/Backups/SP/18.2b5/Config/Localization - Quest.txt'.)

 

I tried to create an empty Localization - Quest.txt and it now compiles. However, the game is "loading game data..." for ever !

 

 

I just installed the tool and would like to make sure it is working.

- is the dummy Localization - Quest.txt empty, or should it contain some header ?

- Do I need to put the mods I am compiling into the mod folder of the game ?

 

Thank you

 

Just remove all references to Localization - Quests.txt that you can find.

Link to comment
Share on other sites

Thank you Sphereii ! It is now working, but I have a few questions!

 

1) I just dowloaded the v1.4. Its assistant installed the lastest 1.5 and this created an error. However it is now working. Where can I find the lastest release directly ?

 

2) It worked without downloading your mods again. Were there no reference to Localization - Quest.txt in mods, but only in the tool ?

 

3) After my first compilation error, I did delete the Backup subfolder in the tool's folder to be able to compile again. Was it necessary ? What is the good practice after a compile error in the tools ?

 

4) How to you know the classes / methods to alter ? Are there some documentation on the base dll of the game ? Is the source code available, where ? Is there introspection in C# ? To start with, I will look for methods to create and remove blocks and entitites from the game.

 

5) What editor do you recommend for C# ? Do I need an editor for .NET framework ?

 

Thank you !

Edited by Umbrella (see edit history)
Link to comment
Share on other sites

Thank you Sphereii ! It is now working, but I have a few questions!

 

1) I just dowloaded the v1.4. Its assistant installed the lastest 1.5 and this created an error. However it is now working. Where can I find the lastest release directly ?

 

2) It worked without downloading your mods again. Were there no reference to Localization - Quest.txt in mods, but only in the tool ?

 

3) After my first compilation error, I did delete the Backup subfolder in the tool's folder to be able to compile again. Was it necessary ? What is the good practice after a compile error in the tools ?

 

4) How to you know the classes / methods to alter ? Are there some documentation on the base dll of the game ? Is the source code available, where ? Is there introspection in C# ? To start with, I will look for methods to create and remove blocks and entitites from the game.

 

5) What editor do you recommend for C# ? Do I need an editor for .NET framework ?

 

Thank you !

 

Hi Umbrella,

 

1) The source (and releases) can be found on the GitHub page linked in the OP

2) The versions of DMT built after A18 released should ignore localisation (you'll see a warning in the output along those lines)

3) No, don't delete the backup folder. If you do then verify the game files in steam. When DMT runs a build and it doesn't have a backup it copies the vanilla files into the backup so it always has them available. Once you do a build the Assembly-CSharp.dll is replaced and can't be used as a backup.

4) There's no documentation, it's just having a look at the code and figuring things out. dnSpy is a good one to dig through the DLL. Guppy's Discord is where a lot of the modders hang out and can answer questions.

5) Visual Studio or Visual Studio code as an IDE for when you're creating scripts.

 

Cheers,

 

Hal

Link to comment
Share on other sites

Hi Hal, thank you very much !

 

Also, when I uncheck all mods and press build, then launch game from steam, the game freezes at startup.

Is that normal ? How should I restore the initial game state ?

 

Yes that's normal. Once you build with DMT the DLL gets rewritten so EAC (the anticheat engine) sees it as changed and doesn't let you load the game. You can start the game through steam without EAC and play as normal, start the game through DMT which uses the non-eac version or verify your game files in steam and it will reset the game back to vanilla.

Link to comment
Share on other sites

DMT not recognizing all the mods in my mod folder

 

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.

 

I'm hoping someone can help me with my issue. DMT is not recognizing all the mods in my mod folder. I have 9 mods in there, it only recognizes and displays 4 of them. I can refresh mods and it makes no difference. I copied and renamed my mod folder, went into settings and selected the new folder, and still only the 4 mods are recognized. For some background: I had the game running earlier, perfectly I think, then I deleted a backpack mod that I didn't like, loaded a better one into the mod folder, started up DMT again and told it to build, but now it only displays the 4 mods. the new mod is not shown. I booted into the game, game was bugged, and now I can't open any lootboxes in game. I'm guessing because one of the mods I previously had installed had added extra content into the game, now that that mod is no longer recognized, it seems to have thrown a serious wrench into the works. I just downloaded harmony separately from DMT hoping that I could get some results, but have no idea how to actually get harmony functioning as there is no executable file.

Link to comment
Share on other sites

Hi, I have used SDX to install some mods in the past and had no problems so far. Now with A18.3 experimental, I tried the new DMT, but run into some serious issues. I always got the Error: „Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies“ after starting the game, but I fixed it by manually copying all 4 Mono.Cecil.dll and Newtonsoft.Json.dll to managed.

This happen even with a DMT compile alone without any mods selected.

 

Now the game starts without errors to the main menu, but on entering the game world all animals and zombies can not move anymore (but can still attack, if I get close). The console puts the following error constantly:

 

There are no graphs in the scene

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 48)

 

This occurs even with just DMT without additional mods installed and goes away if DMT is removed. I verified the game cache and installed DMT multiple times without success.

Maybe Alpha 18.3 broke the tool? I hope this can be resolved.

 

Thank you very much for your time and efforts to make modding in this game better!

Link to comment
Share on other sites

Hi, I have used SDX to install some mods in the past and had no problems so far. Now with A18.3 experimental, I tried the new DMT, but run into some serious issues. I always got the Error: „Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies“ after starting the game, but I fixed it by manually copying all 4 Mono.Cecil.dll and Newtonsoft.Json.dll to managed. This happen even with a DMT compile alone without any mods selected.

 

Now the game starts without errors to the main menu, but on entering the game world all animals and zombies can not move anymore (but can still attack, if I get close). The console puts the following error constantly:

 

There are no graphs in the scene

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 48)

 

This occurs even with just DMT without additional mods installed and goes away if DMT is removed. I verified the game cache and installed DMT multiple times without success.

Maybe Alpha 18.3 broke the tool? I hope this can be resolved.

Thank you very much for your time and efforts to make modding in this game better!

Link to comment
Share on other sites

Hi, I have used SDX to install some mods in the past and had no problems so far. Now with A18.3 experimental, I tried the new DMT, but run into some serious issues. I always got the Error: „Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies“ after starting the game, but I fixed it by manually copying all 4 Mono.Cecil.dll and Newtonsoft.Json.dll to managed. This happen even with a DMT compile alone without any mods selected.

 

Now the game starts without errors to the main menu, but on entering the game world all animals and zombies can not move anymore (but can still attack, if I get close). The console puts the following error constantly:

 

There are no graphs in the scene

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 48)

 

This occurs even with just DMT without additional mods installed and goes away if DMT is removed. I verified the game cache and installed DMT multiple times without success.

Maybe Alpha 18.3 broke the tool? I hope this can be resolved.

Thank you very much for your time and efforts to make modding in this game better!

 

Maybe you are missing some extra libraries? I've been using DMT on 18.3 and haven't experienced the issue. Maybe the install is confused?

Link to comment
Share on other sites

I've wiped everything from my hard drive and installed again from scratch. Now I tried DMT with this mod combination:

 

0-SphereIICore

SphereII Food Spoilage

SphereII Music Boxes

Xyth Bandits

 

This bring up 2 compile errors:

c:\Progs\Steam\steamapps\common\7 Days To Die\DMT_Mods\0-SphereIICore\Scripts\MusicBoxes\MusicBox.cs(121,40): error CS0117

 

and...

 

c:\Progs\Steam\steamapps\common\7 Days To Die\DMT_Mods\0-SphereIICore\Scripts\Blocks\BlockMortSpawner.cs(187,9): error CS0023

 

Failed to compile Mods.dll

Build failed

 

Compiling without mods worked without errors and I am not getting DLL errors anymore and my animals and zombies can move again and are no longer stuck.

Now it works I guess, only these 2 compile errors are left so solve. Since the core mod belong to you, maybe you can help me out fix the problem? I never fully learned C++ and have only some basic programming knowledge.

Thank you very much.

Link to comment
Share on other sites

I've wiped everything from my hard drive and installed again from scratch. Now I tried DMT with this mod combination:

 

0-SphereIICore

SphereII Food Spoilage

SphereII Music Boxes

Xyth Bandits

 

This bring up 2 compile errors:

c:\Progs\Steam\steamapps\common\7 Days To Die\DMT_Mods\0-SphereIICore\Scripts\MusicBoxes\MusicBox.cs(121,40): error CS0117

 

and...

 

c:\Progs\Steam\steamapps\common\7 Days To Die\DMT_Mods\0-SphereIICore\Scripts\Blocks\BlockMortSpawner.cs(187,9): error CS0023

 

Failed to compile Mods.dll

Build failed

 

Compiling without mods worked without errors and I am not getting DLL errors anymore and my animals and zombies can move again and are no longer stuck.

Now it works I guess, only these 2 compile errors are left so solve. Since the core mod belong to you, maybe you can help me out fix the problem? I never fully learned C++ and have only some basic programming knowledge.

Thank you very much.

 

Those two errors are from building the mod against 18.3. they will need a patch before they'll work with that experimental

Link to comment
Share on other sites

For anyone else with the above question,

 

1) Download the 7 Days To Die Dedicated version through Steam, under Tools

2) In DMT, click on Settings and Add Game Location, pointing to the Dedicated version

3) Build as normal

4) Using an FTP software, upload the following files and folders:

   7DaysToDieServer_Data/Managed/Assembly-CSharp.dll
   7DaysToDieServer_Data/Managed/DMT.dll
   7DaysToDieServer_Data/Managed/0-Harmony.dll
   7DaysToDieServer_Data/Managed/Mods.dll
   Mods/

 

If your server host does not allow you to replace Assembly-CSharp.dll, then that server host does not support DMT mods.

Link to comment
Share on other sites

  • Roland unpinned and locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...