Some mods may be broken due to the recent Alloyed Collective update.
You are viewing a potentially older version of this package.
View all versions.
R2API Execute
API for manipulating Execute Threshold
| Date uploaded | 2 weeks ago |
| Version | 1.1.1 |
| Download link | RiskofThunder-R2API_Execute-1.1.1.zip |
| Downloads | 9110 |
| Dependency string | RiskofThunder-R2API_Execute-1.1.1 |
This mod requires the following mods to function
bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2121README
R2API.Execute
About
R2API.Execute is a submodule assembly for R2API that allows mod creators to add custom sources of Execute that are able to stack with each other.
Use Cases / Features
R2API.Execute can be used for mod creators to add custom sources of Execute to the game via the ExecuteAPI class.
Execute sources added via this module will not stack with Freeze and Guillotines, as the goal is to avoid changing Vanilla functionality.
To add a non-stacking execute source that behaves like Vanilla:
ExecuteAPI.CalculateExecuteThresholdkeeps track of the current execute fraction with a floathighestExecuteThreshold. To match Vanilla behavior, override the value of this when appropriate.ExecuteAPI.CalculateExecuteThresholdForVieweris similar, but factors in the Attacker/Person viewing the healthbar.
To add a stackable execute source:
ExecuteAPI.CalculateAdditiveExecuteThresholdallows mod creators to increment the execute fraction additively with diminishing returns with the following formula:1 - (1/(1 + executeFractionAdd))ExecuteAPI.CalculateAdditiveExecuteThresholdForVieweris similar, but factors in the Attacker/Person viewing the healthbar.
Changelog
'1.1.1'
- Internal refactoring to reduce code duplication.
'1.1.0'
ExecuteAPI.CalculateExecuteThresholdandExecuteAPI.CalculateExecuteThresholdForViewernow targets flat execute threshold modification to be in-line with Vanilla.- Additive Execute Threshold modification has been moved to
ExecuteAPI.CalculateAdditiveExecuteThresholdandExecuteAPI.CalculateAdditiveExecuteThresholdForViewer - Fixed
ExecuteAPI.CalculateExecuteThresholdForViewernot being invoked in TryExecuteServer. - Fixed execute healthbar visuals not updating due to the HealthBarValues struct not being passed properly.
'1.0.0'
- Release