Inscryption
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install with App

Details

Latest version
1.1.0
Last Updated
First Uploaded
Downloads
704
Likes
1
Size
123KB
Dependants

Categories

Tags

Deprecated

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.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.