NOTE: Please don't copy other people's code unless you have permission. Respect other people's wishes about distributing code. Copying code is plagiarism. This tutorial is only to teach you how to do it.
Please use tomat's fork of ILSpy, which allows you to decompile mods directly in the program: https://github.com/steviegt6/ILSpy. I do not actively make mods anymore, so if you require help you should ask in the tModLoader server.
This is a bite-sized tutorial on how to decompile Terraria mods. If you want to replicate a certain effect that you saw in a mod of your own, you can decompile that mod. Here's how you can do it:
To obtain the
.dll
file, we have to use a TML.Patcher, a 3rd party tool for decompiling mods. Here's how you can install and use it:* Open Command Prompt.