Basic Assembly Editing Using dnSpy (Video Edition)

Posts 115 of 30 · Page 1 of 2
Basic Assembly Editing Using dnSpy (Video Edition)
Greetings fellow MPGH stalkers,

For many, English is not their first language. Due to this language barrier, many find learning how to edit the Assembly-CSharp.dll difficult from the English-only tutorials on this forum. With this issue in mind, as well as the goal of creating better visual-based learning, I've created a few different videos of myself editing the Assembly-CSharp.dll. While the language used the the videos is English (and you cannot copy text from videos into a translator), I hope by giving a visual example, it will be easier for people to follow along by using simple pattern recognition.

I will be using dnSpy as the assembly editor in the videos. While in the past, I've primarily used ILSpy or .NET Reflector, dnSpy can be more beginner friendly in my opinion.


The Beginning
Setting up dnSpy and opening an assembly.

1. Download dnSpy
 
dnSpy

2. Open the Assembly-CSharp.dll
 
OPEN!

3. Setting dnSpy options (IMPORTANT)
 
SHOWME



The Meat (and Potatoes)
Making all of the desired edits to the assembly.

Beyond the several examples shown here, most (if not all) modifications listed in past information sheets still apply. Just pick and choose what you want.

Some of the videos will have "IL" alternatives. These are where the assembly instructions are edited directly like in the past with ILSpy. Editing the assembly using dnSpy's C# method editor is often much easier. However, it does not work all of the time. If errors are generated after editing using the C# editor, you will probably have to edit whatever modification you're doing using the old IL.


4a. Creative and debug menus IL
 
CM&DM

4b. Console Commands
 
Console

4b-2. Console Commands with IL
 
Console IL

4c. Displaying all players on the map
 
Map Features

4c-2. Displaying all players on the map IL
 
Map Features IL

4d. Build Distance, Build Interval, Pickup Distance
 
createWorld Consts



The End
Saving all of the changes.

After make all of the desired modifications to the Assembly-CSharp.dll, you must save the changes. This is very IMPORTANT. Obviously, if you don't save the changes, none of the edits will work.

5. Saving the Assembly
 
PLZSAVE

Summary: File -> Save Module -> Ok


Best,
Sqeegie
Sqeegie Thank you very much, you really helped out and helped me. I did it and I finally can enjoy a normal game.
Solid post man! Managed to get this working, really appreciate it! I had a bit of experience with editing Assemblies but couldn't for the life of me find the CM and DM line. Appreciate it man!
7DTD Modified Assembly A18.4-b4
can you make me one please ...dll
thank you for the work.

The instructions are excellent and easy to understand and implement, with success in this regard.

everyone started as a beginner and starts skills. thx Sqeegie
How can I give myself an admin panel on the server in the same way? And give out ban, kick, mute to players and all the rest of it? How do I do this in dnSPY, or can you just provide a ready-made file with it?
Quote Originally Posted by DJOK View Post
How can I give myself an admin panel on the server in the same way? And give out ban, kick, mute to players and all the rest of it? How do I do this in dnSPY, or can you just provide a ready-made file with it?
The Admin panel is server-side only files.
You can edit only client-side files in that way.
Hi there.
Can we make all entities, including ZombieEntity displayed on map, using IsOnMapIcon class from EntityPlayer?
For some reason i change the CM to true like in the video save it like the video shows but when i launch the game, i dont have CM, then when i check the assembly again it shows the changes i made are not there anymore even tho i saved like the video showed? anyone have any idea what i might be doing wrong?
Players
Dont work see players.
why?
Hi, thanks for sharing this! The only thing im having trouble with is the show all players on map. I've checked both the IL way and the non IL way. Everything seems the same as yours. Any ides?
Thank you very much
Thank you very much
Can someone post the one for 19.1 please?
Quote Originally Posted by Kubrows View Post
Can someone post the one for 19.1 please?
Did you even try this method on 19.1? If you did, you'll see it works still..... (SMDH)
Doesnt work for newest version. Only changing it to CM / DM and at Game startup i get blackscreen.
Posts 115 of 30 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?