HDeDeDe-HealthComponentAPI icon

HealthComponentAPI

is api for healthcomponent. designed to be like RecalculateStatsAPI.

Last updated 2 hours ago
Total downloads 3
Total rating 0 
Categories Libraries Server-side
Dependency string HDeDeDe-HealthComponentAPI-0.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2108 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2108
RiskofThunder-HookGenPatcher-1.2.3 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.3

README

HealthComponentAPI

icon

is api for healthcomponent. designed to be like RecalculateStatsAPI.

How it works

There are 2 Events you can subscribe to, HDeMods.HealthComponentAPI.GetHealthStats and HDeMods.HealthComponentAPI.GetHealStats.

GetHealthStats fires every fixed update on the server and provides the following values to change:

  • TOTAL Regen: Regen value after all regen related calculations but before it's applied as healing.
  • Barrier Decay Rate: The amount of time it takes for barrier to decay. This is exposed in CharacterBody.RecalculateStats but RecalculateStatsAPI doesn't provide any bindings for it.
  • Shield Recharge Rate: The amount of time it takes for shields to recharge once you are out of danger.
  • Adaptive Armor Decay Rate: The amount of time it takes for adaptive armor stacks to decay.

GetHealStats runs every time HealthComponent.Heal and HealthComponent.TakeDamageProcess are ran and provides the following values to change:

  • Enable Eclipse Heal Reduction: Cuts healing in half as if you were on Eclipse 5 or higher. Does not count the run as Eclipse 5 or higher on its own. Does not apply if the character is not on the player team.
  • Damage Coyote Timer: The grace period in between damage frames. This is the only value HealthComponent.TakeDamageProcess reads.
  • Crit Heal: Unused in the base game, the multiplier for critical heals.
  • TOTAL Heal Amount: The final healing value after all healing calculations but before it's applied.

That's it.

Plans for the future

  • Might add an actual OnHeal event that lets you modify the value before any other values apply to it, who knows.
  • Make Eclipse Heal Reduction apply regardless of team.

Feedback

Any and all feedback is appreciated, if you want to let me know anything please feel free to open an issue on the GitHub Page or @ me on the modding discord (hdedede).