Brynzananas-Revive_API icon

Revive API

Adds a feature to add custom revives

Last updated 2 weeks ago
Total downloads 23284
Total rating 0 
Categories Libraries
Dependency string Brynzananas-Revive_API-1.2.1
Dependants 10 other packages depend on this package

This mod requires the following mods to function

RiskofThunder-HookGenPatcher-1.2.9 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.9

README

How to use

Use these methods:

AddCustomRevive(CanReviveDelegate canReviveDelegate)

AddCustomRevive(CanReviveDelegate canReviveDelegate, int priority)

AddCustomRevive(CanReviveDelegate canReviveDelegate, OnReviveDelegate onReviveDelegate)

AddCustomRevive(CanReviveDelegate canReviveDelegate, OnReviveDelegate onReviveDelegate, int priority)

AddCustomRevive(CanReviveDelegate canReviveDelegate, PendingOnRevive[] pendingOnRevives)

AddCustomRevive(CanReviveDelegate canReviveDelegate, PendingOnRevive[] pendingOnRevives, int priority)

AddCustomRevive(CanReviveDelegate canReviveDelegate, OnReviveDelegate onReviveDelegate, PendingOnRevive[] pendingOnRevives)

AddCustomRevive(CanReviveDelegate canReviveDelegate, OnReviveDelegate onReviveDelegate, PendingOnRevive[] pendingOnRevives, int priority)

In CanReviveDelegate canReviveDelegate parameter put boolean method/delegate with CharacetrMaster parameter that will determine if CharacterMaster is able to respawn on death with your custom condition. A necessary value.

In OnReviveDelegate onReviveDelegate parameter put void method/delegate with CharacetrMaster parameter that will run after death and if CharacterMaster is able to respawn with your custom condition instantly. For example Dio's Best friends takes an item on the begininng of respawn. Put a similar method in this value. DO NOT RUN Respawn HERE. Null value will run nothing. . In PendingOnRevive[] pendingOnRevives parameter put an array of PendingOnRevive classes that will run them after reviving after a specified amount of time. For example Dio's Best friends makes a sound after 1 second and revives you after 2 seconds. By default there is a simple revive method and a simple sfx sound maker method in this array.

PendingOnRevive has two fields, float timer and OnReviveDelegate onReviveDelegate. float timer will determine after how much time OnReviveDelegate onReviveDelegate will invoke.

In int priority parameter put value to determine your revive priority among base and custom revives. Values above zero run before vanilla, values below and equal to zero run after vanilla.