I'm trying to modify a DLL file for a game mod for Green Hell. I've successfully opened it using dnSpy and located the code I want to edit. The mod currently picks up regular and metal arrows but not tribal arrows, and I want to add the tribal arrow item ID (332) to the filter. However, I'm having trouble editing the code. Every time I attempt to modify it through dnSpy, I receive compilation errors that prevent me from saving. Even if I don't change anything, I still get errors upon trying to compile. The mod works perfectly in-game, so I'm unsure why dnSpy won't let me save my changes. Can anyone help me out with how to edit this DLL file? Is dnSpy the right tool to use?
3 Answers
You might want to check out dedicated modding forums or communities for game-specific help. Since this isn't really tech support, that's where you'll likely find more detailed guidance tailored to modifying DLLs for your game. The folks there can share insights that might not be covered elsewhere!
It sounds like you're running into issues because dnSpy is a decompiler, which can sometimes struggle with certain structures in a DLL. You have a couple of options: you could try to learn modding more deeply and use an IDE like Visual Studio to create your own version of the mod. Alternatively, you might explore hex-editing the DLL directly, but that's more complex and requires diving into machine code or IL, depending on how the game is built. Both paths will certainly give you valuable programming insights!
Editing DLLs isn’t exactly straightforward. While technically you can, the real challenge is that DLLs are compiled outputs from source code. You can't just swap code snippets like you might with scripting languages like Python. However, there are methods to decompile .NET DLLs; they retain a lot of metadata, and sometimes you can get back to a code structure that's close to what you started with.

Related Questions
Ray Trace Simulator – Interactive Optical Ray Tracing Tool
Wordsearch Generator
Random Maze Generator and Solver
Interactive Wheel Spinner Tool – Add Choices and Randomly Pick a Winner
Raffle Ticket Generator
Instant Online Dice Roller