- Decompile Dll File
- C++ Dll Decompile
- Decompile Dll To Source Code
- Decompile Vb6 Dll To Source Codes
- Decompile Visual Basic Exe
< Modding Tutorials
The base game provides a bunch of code snippets in ../Source/, relative to your Rimworld installation. Since this isn't a lot, one might want to take a look at the game's full source code. RimWorld's EULA allows you to decompile the game for personal use. It's recommended to read it.
Possible Duplicate: Is there a vb6 decompiler? Is there any way that i can retrieve the source code from a dll written through VB6. There are no other files except the dll itself. Decompile, Disassemble, and convert Visual Basic 6 EXE or DLL into the fully functional and optimized source code compatible with all VB6 SP6. Decompile Visual Basic 6 EXE/DLL into Source code. Visual Studio currently provides the option to debug code outside your project source code, such as.NET or third-party code your project calls by specifying the location of the.pdb (and optionally, the source files of the external code). However, in many cases finding the correct symbol files or source code may not be feasible.
Decompile Dll File
The following programs are used and recommended by modders:
- 1Decompiling source code
dnSpy
dnSpy is a great application for decompiling or debugging and has a Visual Studio editor feel to it. It's currently only for Windows.
- Download dnSpy and extract it somewhere.
- Open dnSpy.exe. Once it's open, click 'open' on the top ribbon (or press Ctrl+O).
- Navigate to ../Rimworld***_Data/Managed/, relative to your Rimworld installation and with *** being a version number.
- Ctrl+Shift+K to open the search bar.
- Explore the assembly and look through the source code to your heart's desire.
ILSpy
One method is to use ILSpy. This software is recommended because its settings are correct on a clean install. It is for Windows only, but you can compile it yourself as a CLI application for Mono framework on OS X and Linux, see (This issue) or (This issue) on GitHub for more info.
- Download ILSpy (Download latest release) and extract it to a directory of your choosing. Optionally create a desktop shortcut;
- Either: associate the .dll extension with ILSpy:
- Navigate to Assembly-CSharp.dll in ../Rimworld***_Data/Managed/, relative to your Rimworld installation and with *** being a version number (See Note on MacOS below);
- Right-click 'Open with' and select a standard program. Navigate to your ILSpy installation and double-click ILSpy.exe, tick the checkbox and accept;
- Double-click Assembly-CSharp.dll,
- Or: open ILSpy and open a .dll:
- Open ILSpy;
- Go to File -> Open or press Ctrl+O, navigate to ../Rimworld***_Data/Managed/, relative to your Rimworld installation and with *** being a version number (See Note on MacOS below);
- Select Assembly-CSharp.dll and confirm,
- Click the '+' next to Assembly-CSharp (***), you will now see a list including the items Rimworld and Verse;
- Take your time to look through the source code, to make yourself familiar. If you ever need the source code, open ILSpy again:
- Ctrl+Shift+F or Ctrl+E opens the search bar which can be used to search through all loaded assemblies;
- Ctrl+F opens a search bar for the currently opened decompiled class.
MonoDevelop
MonoDevelop is capable of decompiling DLLs, albeit using clumsy initial settings. It is Linux only, otherwise you have to download Xamarin Studio which doesn't have a decompiler.
- Download MonoDevelop and install it;
- Either: associate the .dll extension with MonoDevelop:
- Navigate to Assembly-CSharp.dll in ../Rimworld***_Data/Managed/, relative to your Rimworld installation and with *** being a version number (See Note on MacOS below);
- Right-click 'Open with' and select MonoDevelop as standard program;
- Double-click Assembly-CSharp.dll,
- Or: open MonoDevelop and open a .dll:
- Open MonoDevelop;
- Go to File -> Open, navigate to ../Rimworld***_Data/Managed/, relative to your Rimworld installation and with *** being a version number (See Note on MacOS below);
- Select Assembly-CSharp.dll and confirm,
- Very important: search for a dropdown called 'Visibility' and change it from 'Only public members' to 'All members';
- Very important: search for a dropdown called 'Language' and change it from 'Summary' to 'C#';
- Click the '+' next to Assembly-CSharp (***), you will now see a list including the items Rimworld and Verse;
- Take your time to look through the source code, to make yourself familiar. If you ever need the source code, open Assembly-CSharp.dll again.
Rider
Rider is a cross-platform IDE with a built-in decompiler. If you're using Rider as your IDE (Setup Instructions), you can view the source of any RimWorld class or method by right-clicking its name and clicking Go To > Definition.
C++ Dll Decompile
MacOS Directories
For Macs, directories are similar but in: ../RimWorldMac.app/Contents/Resources/Data/Managed.
For Steam installed RimWorld, find your app here: ~/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app.
Decompile Dll To Source Code
Main article: Modding_Tutorials/ThingDef
- Right-click any Type or Method and hit 'analyse' to obtain more context on that item. 'Used by' and 'Uses' provide a lot of contextual clues which is required to know how things work.
- RimWorld often uses reflection to instantiate Workers and MakeThings. This means no decompiler will cleanly find what/where an instance of a class is created. Hint: if you find yourself using 'new Pawn()', you're doing it wrong.
- If you're going in circles trying to find things like 'where is X assigned', odds are you'll need to look at the XML for it. The XML contains the data, C# does things with it.
Decompile Vb6 Dll To Source Codes
- Writing custom code shows a broad overview of C# coding.
Decompile Visual Basic Exe
Retrieved from 'https://rimworldwiki.com/index.php?title=Modding_Tutorials/Decompiling_source_code&oldid=72065'