-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the wiki for the Archetype-API mod for Slay the Spire. This mod is used for adding your own custom archetypes to both existing and modded StS classes. This guide also expects you to have read the BaseMod mod/card creation documentation, as well as basic java knowledge.
-
Allow the player to select any character's archetype that they wish to see in the current run. For example, if you wanted to only see "Non-archetype cards, poison cards and shiv cards" this Silent run and nothing else, you can do that. This also works for custom characters that implement this API.
-
If the player doesn't wish to manually select card Archetypes, (which is also disabled by default in the mod options), they can just let the game grab every archetype that the class has. If they have any modded ones, it only goes up to the amount of archetypes the class originally has. What this means is, if a player has mods installed that add any archetypes, every run will have a different handful selection of them, preventing the card reward pool from being diluted.
All in all this means a couple of main things:
-
Modders can add brand new archetypes to existing classes without worrying about the rates of their cards showing up i.e. it being hard to draft due to being lost in a sea of other cards.
-
This API allows people to expand on existing archetypes in nice, organized way when adding additional poison cards to the poison archetype pool or extra shiv cards, etc.
-
You can add custom archetypes to your custom classes with ease, allowing for bigger but still tight card pools, and providing all the normal custom-selection functionality that the API provides if any players wishes to use it.
Make your cards first! Then come back here and read through this.
Also, the cards you made will still also appear while playing normally, without ArchetypeAPI, if your mod's loaded. The API is an extension, not a necessity.
-
Download the latest release of this mod via the Steam Workshop.
-
Add it as a Maven dependency via your pom.xml
<dependency>
<groupId>archetypeapi</groupId>
<artifactId>ArchetypeAPI</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>path/to/ArchetypeAPI.jar</systemPath>
</dependency>- In your resources folder, make a new directory called APIJsons. In there create an archetype Json file with the ID's of your cards. It should look something like this:
{
"yourID:CoolSilent": { // While you can separate different Json objects in 1 file with ID's,
// the mod loads the *whole* file. So use different files for different archetypes.
"NAME": "Cool", //The name of the archetype. This, like the ID, isn't actually used/displayed anywhere,
//but is useful for keeping track of archetypes.
"CARD_IDS": [
"Blade Dance", //These are the IDs of the cards that appear in your archetype
"Cloak And Dagger", //Don't worry about adding the same card in 2 different archetypes.
"Infinite Blades", //Duplicates are cleared before adding cards to the pool,
"Accuracy", //So if you have a card that fits in 2 places - add it in both.
"Storm of Steel"
]
}
}
}IF YOU ARE ADDING MULTIPLE ARCHETYPES, MAKE A UNIQUE JSON FILE FOR EACH ONE! When your archetype is loaded, Every single card ID in the json is loaded, even if they are separated with different objects/ID's!
Don't add starter/special rarity cards to the json. Any card added to this pool will be added to the reward pool, regardless of type/color/rarity.
Check the pages on the side to get started.