You are viewing a potentially older version of this package. View all versions.
Brynzananas-Revive_API-1.1.0 icon

Revive API

Adds a feature to add custom revives

Date uploaded 9 months ago
Version 1.1.0
Download link Brynzananas-Revive_API-1.1.0.zip
Downloads 601
Dependency string Brynzananas-Revive_API-1.1.0

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, OnReviveDelegate onReviveDelegate)

AddCustomRevive(CanReviveDelegate canReviveDelegate, PendingOnRevive[] pendingOnRevives)

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

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[] 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

CHANGELOG

1.3.4

  • Deleted tests class. Please fix

1.3.3

  • Rebuild to hopefully fix a niche issue

1.3.2

  • Fix for 1.4.1 patch

1.3.1

  • Remove unused internal fields.

1.3.0

  • Add a feature to pass information between CanRevive and OnRevive delegates

  • Fix one il hook always logging that it errored

1.2.2

  • Fix for DLC3

  • Remove leftover debug logspam

1.2.1

  • Fix CharacterMaster_IsDeadAndOutOfLivesServer always returning false

  • Rename old CanRevive method to CanReviveAndOrRevive

1.2.0

  • Add priority feature (thanks for @viliger2 for implementing it)

  • Add revive function for IsExtraLifePendingServer (thanks for @viliger2 for implementing it)

1.1.0

  • Add PendingOnRevive feature and its default value

1.0.0

  • Release