-
Notifications
You must be signed in to change notification settings - Fork 61
Step 1: Setting Up Your Integrated Development Environment and the Default Mod Base
It is recommended to use IntelliJ over Eclipse, as Eclipse is considered an outdated IDE, with intelliJ having both more and better features. It will likely be a lot easier to learn and use IntelliJ, even if you used a bit of Eclipse in High School. If you're going to be asking questions in #modding (in the official Slay the Spire Discord, a link to which you can find here), while most people use, and therefore can help with IntelliJ issues, the same can't be said for Eclipse.
Finally, as with all sections of the guide, it is recommended that you also look at the BaseMod wiki in case you need more information. Keep in mind that it will show you how to start and use a brand new modding environemnt, rather than using the Default Base. In this case, the appropriate page is this.
- Download the free, community edition here.
- Run the installer and follow the wizard steps.
Download this repository as a zip.
Do not clone or fork unless you really want to go through the hassle of changing git things later. That is, unless you're using the quick-start uncommented branch.
Unzip where you want to set up your dev environment. I would
recommend getting a dedicated modding/coding folder rather than using your desktop or so. If you want to make a mod, you will end up needing to have dedicated folders for art files, your own code, other mods' source code, etc.
Once you start IntelliJ press Import Project
And select the Default folder you downloaded in the previous step.
Select Maven -> press next until your project is built. If it cannot find any projects, tick this box and try pressing next again.
Click on the Maven tab (not "Project!") on the right of the editor. If you do not have a Maven tab, double-tap Shift to open the intelliJ search (your best friend!) and type "Maven" - you'll find it there. Alternatively, it's in View -> Tool Windows -> Maven Projects
.
Right click on the DefaultMod project and press Jump to Sources. Alternativelly, click it and press F4.
This should open your pom.xml (Look at the top and double-check that that's the file opened).
You will need a 3 other mods in order to be able to build this/your mod: BaseMod, ModTheSpire, and (for this mod specifically but it's a great utility for everyone:) StSlib These are known as dependencies.
Subscribe to all there of these mods on the Steam Workshop. The locations to their .jar
files are as follows:
- Mod the Spire:
Steam\steamapps\workshop\content\646570\1605060445
- BaseMod:
Steam\steamapps\workshop\content\646570\1605833019
- StSlib:
Steam\steamapps\workshop\content\646570\1609158507
The final dependency you will need is the actual game. There is a file called desktop-1.0.jar
located where your game is installed.
ModTheSpire and BaseMod only support the main branch of the game (i.e. not the beta branch).
Name your mod a nice name change the steam path to correctly reflect your steamapps location. Scroll down and check all the locations of the dependencies to make sure they point to existing files.
Click the refresh icon to load your dependencies from the pom.xml into your project.
(If it asks you, just enable auto-import).
You are now ready to read the Default's code! Proceed to Step 2: Setting up the Default Mod for Packaging!