forked from SkyeStarfall/BaseMod
-
Notifications
You must be signed in to change notification settings - Fork 118
Decompiling Your Game
Alex Driedger edited this page Jun 26, 2018
·
5 revisions
Decompiling the game will allow you to (essentially) look at the game's source code. This isn't necessary for modding if you only use BaseMod's subscription system. However, it is a very useful tool for
- Figuring out how different classes in the game work
- Figuring out where BaseMod's hooks are and when they are called
- Doing any modding beyond what BaseMod currently provides
Follow these steps to decompile the game:
- Download the JD-GUI Java Decompiler. Click the download tab and then grab the
.jar
version which will look something likejd-gui-1.4.0.jar
- Launch JD-GUI with
jd-gui.exe
and then when it prompts you to find a jar to decompile go ahead and navigate to your Slay The Spire folder and selectdesktop-1.0.jar
. If it does not automatically prompt you go to File -> Open File... - This will open a view in which you can look at the decompiled source code.
- Click File -> Save All Sources and save everything as
desktop-1.0.jar.src.zip
wherever you are going to be doing your modding. The output will be azip
file which you will then have to unzip to access all of the source code (note that it is not actual source code - just reconstructed source code by the decompiler).