Minor formatting tweaks.
Better deployment tooling. added a project README.md (it's not very good). Added some markdowns to work with Obsidian.md so I can remember how all of this stuff works in future. Modified CArenaPatch to simply store whether or not the user selected the game mode. Modified ConstructDraftPatch to set CArenaPatch.enabled to false (we're done with our part, we don't need to run until game start)
This commit is contained in:
parent
982e1e2ee2
commit
3f03dddab3
55
README.md
55
README.md
@ -1,52 +1,9 @@
|
||||
# StS-Default Mod Base
|
||||
# Construct the Spire (formerly Arena)
|
||||
|
||||
Welcome to this extremely over-commented Slay the Spire modding base.
|
||||
### Custom game Mod for Constructed mode in Slay the Spire
|
||||
|
||||
This is a minimal "default clean slate" for creating Slay the spire mods.
|
||||
This patches the addNonDailyMods method in CustomModeScreen to set a static boolean that signals to the rest of the
|
||||
patches that the mod has been enabled.
|
||||
|
||||
Use it to make your own mod of any type - If you want to add any standard in-game content (character, cards, relics, events, etc.), this is a good starting point.
|
||||
|
||||
It features 1 character (the Default) with a minimal set of things: 1 card of each type, 1 debuff, 1 relic, etc.
|
||||
|
||||
If you're new to modding, you basically *need* the BaseMod wiki for whatever you wish to add, and you can work your way thought it with this base. Another very important thing is to look at other mods (get them from their github!), as well as the base-game code, and see how they do things.
|
||||
|
||||
https://github.com/daviscook477/BaseMod/wiki
|
||||
|
||||
This base itself isn't going to help you code or anything!! Nor does it provide basic Java learning - if you need that go through the codeacademy free java course! While I have been putting comments about what does what, this is just a nice starting point if you need a place to start learning from that's not an absolute empty canvas, or an overly-complicated, difficult to understand mod. But you still need to learn how the in-game code works and how to piece things together on your own. (i.e. this base will show you where to put the code for double-tap, but not what it is/how to write it. Look up the actual cards and backward-engineer them for that.)
|
||||
|
||||
Feel free to use this in any way you like, of course.
|
||||
|
||||
If you have any issues or you want to recommend and/or add something to the mod that you feel would be helpful, feel free to submit an issue or a PR!
|
||||
|
||||
Happy modding!
|
||||
|
||||
---
|
||||
|
||||
## Check the wiki to get started:
|
||||
|
||||
https://github.com/Gremious/StS-DefaultModBase/wiki
|
||||
|
||||
---
|
||||
|
||||
## Know what you're doing?
|
||||
|
||||
Hop on over to the Quick Start branch. It's a fully cloneable, uncommented version of the Default ready for jump-starting a brand new mod!
|
||||
|
||||
---
|
||||
|
||||
## Some HD Slay the Spire art assets:
|
||||
|
||||
Includes:
|
||||
- Empty Relic Template feat. empty bottle
|
||||
- Empty Card Template
|
||||
- Color-Changable cardback
|
||||
- A couple of HD Monster vectors (Louse, Nob, Sentry, Sneaky Gremlin)
|
||||
- A coupe of HD items (J.A.X., A Coin)
|
||||
- 2 people silhouettes
|
||||
- A curse Background
|
||||
|
||||
https://mega.nz/#F!gfpgTCyK!2oFOjVFKyOreKv7zdY1fEQ
|
||||
|
||||
(If you want to contribute to this collection feel free to send me a message through [#modding](https://www.megacrit.com/) or a github issue.)
|
||||
|
||||
---
|
||||
This behavior is because I couldn't quite figure out how to detect loaded game mods during runtime from methods called
|
||||
after AbstractDungeon has been initalized.
|
||||
@ -6,7 +6,7 @@
|
||||
<groupId>xyz.geniuscartel</groupId>
|
||||
<artifactId>ConstructTheArena</artifactId>
|
||||
<name>Construct The Arena</name>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
<description>A default base to start your own mod from.</description>
|
||||
|
||||
<properties>
|
||||
|
||||
@ -2,8 +2,6 @@ package constructTheArena.patches;
|
||||
|
||||
import com.evacipated.cardcrawl.modthespire.lib.SpireInsertPatch;
|
||||
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
|
||||
import com.megacrit.cardcrawl.characters.AbstractPlayer;
|
||||
import com.megacrit.cardcrawl.helpers.ModHelper;
|
||||
import com.megacrit.cardcrawl.screens.custom.CustomModeScreen;
|
||||
import com.megacrit.cardcrawl.trials.CustomTrial;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -27,17 +25,17 @@ public class CArenaPatch {
|
||||
public static void Insert(CustomModeScreen __instance, CustomTrial trial, ArrayList<String> modIds, String modId) {
|
||||
if (modId.equals("constructTheArena:constructTheArena")) {
|
||||
//do nothing for now
|
||||
if (ModHelper.isModEnabled("constructTheArena:constructTheArena")) {
|
||||
enabled = true;
|
||||
} else {
|
||||
enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean b) {
|
||||
enabled = b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
#CArenaPatch
|
||||
|
||||
This method simply detects if the game mod was selected by the user and stores the decision in a boolean.
|
||||
@ -0,0 +1,9 @@
|
||||
#CArenaSkipMasterDeckPatch
|
||||
|
||||
This patch inserts a call inside initializeStarterDeck in AbstractPlayer
|
||||
|
||||
This encapsulates and provides a reference to addBaseCards inside the method. There was a bug where subsequent games
|
||||
would not load the starting deck because the logic for detecting enabled game mods was not what I was expecting.
|
||||
|
||||
That being said, this checks the [[CArenaPatch]] class to see if the mod was enabled and bases its decision off of that.
|
||||
It's a bit of a hack, yes, but it works.
|
||||
@ -75,6 +75,7 @@ public class ConstructDraftPatch {
|
||||
|
||||
AbstractDungeon.gridSelectScreen.open(constructGroup, 40, true, uiStrings.TEXT[0]+CardLimit+uiStrings.TEXT[1]);
|
||||
AbstractDungeon.getCurrRoom().spawnRelicAndObtain(Settings.WIDTH / 2.0F, Settings.HEIGHT / 2.0F, new ConstructorsBurden());
|
||||
CArenaPatch.setEnabled(false); //turne off deck skipping and whatnot
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
#ConstructDraftPatch
|
||||
|
||||
This prefixes the dailyBlessing method of the NeowEvent. This checks the [[CArenaPatch]] class to see if the game mod was
|
||||
enabled. At the end of the patched method call, this will set CArenaPatch.enabled to false in order to make sure
|
||||
subsequent (potentially non-cosntructed) games will have the master deck and normal card rewards.
|
||||
|
||||
The current ruleset is thus:
|
||||
|
||||
4 copies of every card available to the player's card pool
|
||||
4 copies of each of the cards in the character's master deck
|
||||
Maximum of 40 selections
|
||||
|
||||
After the card selection dialgue is complete, the [[ConstructorsBurden]] relic will be added to the player
|
||||
@ -0,0 +1,4 @@
|
||||
#ConstructorsBurden
|
||||
|
||||
Simple abstract relic that reduces card rewards by 10 in order to negate all potential card rewards. There may be a case
|
||||
where card rewards can exceed 10, but I can't think of one.
|
||||
@ -12,7 +12,6 @@ public class ResUtil {
|
||||
sb.append("/");
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
7
deploy.sh
Normal file
7
deploy.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#! /bin/bash
|
||||
rm ~/.steam/debian-installation/steamapps/common/SlayTheSpire/ConstructTheArena/content/ConstructTheArena.jar
|
||||
cp constructTheArena/target/ConstructTheArena.jar ~/.steam/debian-installation/steamapps/common/SlayTheSpire/ConstructTheArena/content/ConstructTheArena.jar
|
||||
|
||||
cd ~/.steam/debian-installation/steamapps/common/SlayTheSpire || exit
|
||||
|
||||
java -jar mod-uploader.jar upload -w ConstructTheArena
|
||||
Loading…
Reference in New Issue
Block a user