Giter Club home page Giter Club logo

sts-modloader's Introduction

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):

  1. Clone repo
  2. Make a copy of 'desktop-1.0.jar' from your Slay the Spire Steam folder in the root of the repo
  3. Apply the JDF patch to 'desktop-1.0.jar' with JojoDiff (http://jojodiff.sourceforge.net/)
  4. Run with _run.bat to get logger output

Advanced (Development):

  1. Clone repo
  2. Make a copy of desktop-1.0.jar from your Slay the Spire Steam folder in the root of the repo
  3. Get cfr_0_124.jar and put it in the tools folder (http://www.benf.org/other/cfr/)
  4. Run ./tools/windows/decompile.bat. A folder named decompiled should be created
  5. Make a copy of the decompiled folder created in step 4, name it decompiled_clean
  6. Run modloader/_compile_modloader.bat
  7. Copy the entire modloader folder into the root of desktop-1.0.jar
  8. Run ./tools/windows/patch.bat to automatically apply the diff files to the contents of decompiled
  9. 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`
  10. Copy the compiled files from step 9 into the appropriate locations in desktop-1.0.jar
  11. Run with _run.bat to get logger output

Toolchain Information

Toolchain Requirements

Java 8+

Compiler Instructions:

  1. (If needed) Build the modloader package by running modloader/_compile_modloader.bat
  2. Drag and drop a .java file onto ./tools/windows/compile.bat

Decompiler Instructions:

  1. Get cfr_0_124.jar and put it in the tools folder (http://www.benf.org/other/cfr/)
  2. Run ./tools/windows/decompile.bat. A folder named 'decompiled' should be created
  3. (OPTIONAL) Run ./tools/windows/patch.bat to automatically apply diffs to the decompiled files

Unix

Basic (General Use):

  1. Clone repo
  2. Make a copy of desktop-1.0.jar from your Slay the Spire Steam folder in the root of the repo
  3. Apply the JDF patch to 'desktop-1.0.jar' with JojoDiff (http://jojodiff.sourceforge.net/)
  4. Run with java -jar desktop-1.0.jar to get logger output

Advanced (Development):

  1. Clone repo
  2. Make a copy of desktop-1.0.jar from your Slay the Spire Steam folder in ./compiled (create the folder if, not there already)
  3. Get cfr_0_124.jar and put it in the tools folder (http://www.benf.org/other/cfr/)
  4. Run ./tools/unix/decompile.sh. A folder named 'decompiled' should be created
  5. Run ./tools/unix/patch.sh to automatically apply the diff files to the contents of 'decompiled'
  6. Compile and pack a playable jar with ./tools/unix/compile.sh. the modded jar is in ./compiled/desktop-1.0-modded.jar
  7. 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:

  1. Make a copy of desktop-1.0.jar from your Slay the Spire Steam folder in ./compiled (create the folder if, not there already)
  2. Get cfr_0_124.jar and put it in the tools folder (http://www.benf.org/other/cfr/)
  3. Run ./tools/unix/decompile.sh. A folder named 'decompiled' should be created
  4. (OPTIONAL) Run` to automatically apply the diff files to the contents of 'decompiled'

Create Diff Instruction

  1. Run ./tools/unix/prepare_diff.sh NOTE: This has only to be done once for every game version
  2. 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": [
            "",
            ""
        ]
    }
}

sts-modloader's People

Contributors

reckter avatar t-larson avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ubastic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.