STS ModLoader
Patch version: [EARLY_ACCESS_011] (01-11-2018)
Source version: [EARLY_ACCESS_011] (01-11-2018)
Mod Loader Requirements
Java 8+
Install instructions:
Windows
Basic (General Use):
- Clone repo
- Make a copy of 'desktop-1.0.jar' from your Slay the Spire Steam folder in the root of the repo
- Apply the JDF patch to 'desktop-1.0.jar' with JojoDiff (http://jojodiff.sourceforge.net/)
- Run with _run.bat to get logger output
Advanced (Development):
- Clone repo
- Make a copy of
desktop-1.0.jar
from your Slay the Spire Steam folder in the root of the repo - Get
cfr_0_124.jar
and put it in the tools folder (http://www.benf.org/other/cfr/) - Run
./tools/windows/decompile.bat
. A folder nameddecompiled
should be created - Make a copy of the
decompiled
folder created in step 4, name itdecompiled_clean
- Run
modloader/_compile_modloader.bat
- Copy the entire
modloader
folder into the root ofdesktop-1.0.jar
- Run
./tools/windows/patch.bat
to automatically apply the diff files to the contents ofdecompiled
- Compile the following, plus whatever other files you modify:
- decompiled/com/megacrit/cardcrawl/actions/AbstractGameAction.java
- decompiled/com/megacrit/cardcrawl/core/CardCrawlGame.java
- decompiled/com/megacrit/cardcrawl/dungeons/Exordium.java
- decompiled/com/megacrit/cardcrawl/dungeons/TheBeyond.java
- decompiled/com/megacrit/cardcrawl/dungeons/TheCity.java
- decompiled/com/megacrit/cardcrawl/helpers/EventHelper.java
- decompiled/com/megacrit/cardcrawl/helpers/MonsterHelper.java
- decompiled/com/megacrit/cardcrawl/screens/charSelect/CharacterOption.java`
- Copy the compiled files from step 9 into the appropriate locations in
desktop-1.0.jar
- Run with _run.bat to get logger output
Toolchain Information
Toolchain Requirements
Java 8+
Compiler Instructions:
- (If needed) Build the modloader package by running modloader/_compile_modloader.bat
- Drag and drop a .java file onto ./tools/windows/compile.bat
Decompiler Instructions:
- Get cfr_0_124.jar and put it in the tools folder (http://www.benf.org/other/cfr/)
- Run
./tools/windows/decompile.bat
. A folder named 'decompiled' should be created - (OPTIONAL) Run
./tools/windows/patch.bat
to automatically apply diffs to the decompiled files
Unix
Basic (General Use):
- Clone repo
- Make a copy of
desktop-1.0.jar
from your Slay the Spire Steam folder in the root of the repo - Apply the JDF patch to 'desktop-1.0.jar' with JojoDiff (http://jojodiff.sourceforge.net/)
- Run with
java -jar desktop-1.0.jar
to get logger output
Advanced (Development):
- Clone repo
- Make a copy of
desktop-1.0.jar
from your Slay the Spire Steam folder in./compiled
(create the folder if, not there already) - Get
cfr_0_124.jar
and put it in the tools folder (http://www.benf.org/other/cfr/) - Run
./tools/unix/decompile.sh
. A folder named 'decompiled' should be created - Run
./tools/unix/patch.sh
to automatically apply the diff files to the contents of 'decompiled' - Compile and pack a playable jar with
./tools/unix/compile.sh
. the modded jar is in./compiled/desktop-1.0-modded.jar
- Run it in the main folder of this repro with
java -jar ./compiled/desktop-1.0.jar
Toolchain Information
Toolchain Requirements
Java 8+
Compiler Instructions:
- Every file you modify is automaticaly compiled and inserted into the new jar
Decompiler Instructions:
- Make a copy of
desktop-1.0.jar
from your Slay the Spire Steam folder in./compiled
(create the folder if, not there already) - Get
cfr_0_124.jar
and put it in the tools folder (http://www.benf.org/other/cfr/) - Run
./tools/unix/decompile.sh
. A folder named 'decompiled' should be created - (OPTIONAL) Run` to automatically apply the diff files to the contents of 'decompiled'
Create Diff Instruction
- Run
./tools/unix/prepare_diff.sh
NOTE: This has only to be done once for every game version - Run
./tools/unix/diff.sh
Mod Package Structure
mods
|
+-- modpackage
| |
| +-- cards
| | |
| | +-- CardId.class : Compiled card
| | +-- CardId.java : Card source
| | \-- CardId.png : Card image
| |
| +-- events
| | |
| | +-- EventId.class : Compiled event
| | +-- EventId.java : Event source
| | \-- EventId.png : Event image
| |
| +-- localization
| | |
| | +-- events.json : Event strings
| | +-- keywords.json : Keywords
| | \-- relics.json : Relic strings
| |
| +-- monsters
| | |
| | +-- MonsterId.class : Compiled monster
| | +-- MonsterId.java : Monster source
| | \-- MonsterId.png : Monster image
| |
| +-- relics
| | |
| | +-- RelicId.class : Compiled relic
| | +-- RelicId.java : Relic source
| | \-- RelicId.png : Relic image
| |
| +-- ironclad.json : Ironclad start modifications
| +-- mod.json : Mod information, custom IDs, event/encounter setup
| \-- silent.json : Silent start modifications
|
+-- modpackage2
| ...
\
JSON Structure
mod.json
Weight should be 0.0 on boss encounters, can be any float on other encounters
{
"modName": "",
"modPackage": "",
"modDescription": "",
"modAuthor": "",
"modVersion": "",
"customCardIds": [
"",
""
],
"customEventIds": [
"",
""
],
"customMonsterIds": [
"",
""
],
"customRelicIds": [
"",
""
],
"customEvents": [{
"id": "",
"eventType": "EVENT/SHRINE",
"floor": "EXORDIUM/CITY/BEYOND"
}],
"customEncounters": [{
"id": "",
"floor": "EXORDIUM/CITY/BEYOND",
"group": "WEAK/STRONG/ELITE/BOSS",
"weight": 1.0,
"monsters": [
"",
""
]
}]
}
ironclad.json & silent.json
{
"addCards": [
"",
""
],
"removeCards": [
"",
""
],
"addRelics": [
"",
""
],
"removeRelics": [
"",
""
]
}
localization/events.json
{
"EventID": {
"NAME": "",
"DESCRIPTIONS": [
"",
""
],
"OPTIONS": [
"",
""
]
}
}
localization/keywords.json
{
"": "",
"": ""
}
localization/relics.json
{
"RelicID": {
"NAME": "",
"FLAVOR": "",
"DESCRIPTIONS": [
"",
""
]
}
}