SpecialAPI-BoonAPI icon

BoonAPI

BoonAPI is a BepInEx plugin that allows for easy creation of custom boons.

Last updated 4 years ago
Total downloads 706
Total rating 1 
Categories Act I
Dependency string SpecialAPI-BoonAPI-1.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_Inscryption-5.4.1701 icon
BepInEx-BepInExPack_Inscryption

BepInEx pack for Inscryption. Preconfigured and ready to use.

Preferred version: 5.4.1701

README

BoonAPI

BoonAPI is a BepInEx plugin that allows for easy creation of custom boons. To use BoonAPI in your mod, just add it as a reference in your project. Custom boon creation example:

NewBoon exampleBoon = new NewBoon("Boon's Rulebook Name Here", typeof(ExampleBoonHandler), "Boon's Description Here", boonRulebookIcon, boonCardArt, trueIfStacks, trueIfAppearsAsLeshyTrialReward, trueIfAppearsInRulebook);
ExampleBoonHandler.boo = exampleBoon.boon.type;

ExampleBoonHandler here would be a class that inherits from BoonBehaviour that handles how the boon affects card battles. You can override any method that would normally be overridable in any TriggerReceivers like AbilityBehaviours or SpecialCardBehaviours (but in BoonBehaviour the RespondsToSomething methods are named RespondToSomething instead). To add your boon you can do RunState.Run.playerDeck.AddBoon(savedBoonType) (this is why the last line (ExampleBoonHandler.boo = exampleBoon.boon.type) is there, to save the boon's type). To remove the boon do the same but RemoveBoon or RemoveAllBoonsOfType instead of AddBoon.

Installation

To use BoonAPI, put BoonAPI.dll inside of your BepInEx plugins folder. It also probably works for Thunderstore Mod Manager or r2modman but I don't know for sure (I don't use them)

Patch Notes

  • 1.1.0 - Fixed a bug where BoonBehaviours would be created when they shouldn't be. Renamed BoonBehavior to BoonBehaviour. Renamed OnBattleStart to OnPostBoonActivation and RespondToBattleStart to RespondToPostBoonActivation. Added new triggers: OnPreBoonActivation (respond method: RespondToPreBoonActivation): activates before all other boons, OnPreBattleCleanup (respond method: RespondToPreBattleCleanup): activates before the battle ends and OnPostBattleCleanup (respond method: RespondToPostBattleCleanup): activates after the battle ends, right before the BoonBehaviour is destroyed. Added a new property and field to BoonBehaviour: instanceNumber (shows which instance of the same boon type this BoonBehaviour represents, starts with 1) and InstanceIndex (same as instanceNumber, but starts with 0).
  • 1.0.0 - Released

NOTE: This mod was developed for Kaycee's Mod beta but it should work for the normal game.