
AdvancedREPO API Stamina
Better stamina system for REPO with an API to modify its values.Details
AdvancedREPO.API.Stamina
Introduced a new stamina system and offers API methods to modify its values.
methods
AdvancedREPO.API.Stamina.SetNoStaminaDrainDuringJump(bool? status)
Changes if stamina can drain during jumps. The result is OR, so any mod setting this to true will result in true.AdvancedREPO.API.Stamina.SetNoSlowdownDuringJump(bool? status)
Changes if player should slow down during jump when stamina runs out. The result is OR, so any mod setting this to true will result in true.AdvancedREPO.API.Stamina.SetNoAccelerationDuringJump(bool? status)
Changes if player should be able to increase speed during jump when sprinting in jump. The result is OR, so any mod setting this to true will result in true.AdvancedREPO.API.Stamina.AddJumpStaminaCost(int? cost)
Changes the stamina cost for a jump. The resulting value is additive between all values of all mods and keys.
So if Mod A adds 10 stamina cost and Mod B adds 15 stamina cost, a jump will cost 25 stamina.
AdvancedREPO.API.Stamina.SetJumpStaminaPrevent(bool? status)
Changes if player should only be able to jump with sufficient stamina. The result is OR, so any mod setting this to true will result in true.AdvancedREPO.API.Stamina.SetStaminaSprintDrainRate(float? value)
Changes the rate at which stamina drains during sprinting. The result is multiplicative.
So if Mod A sets this to 1.5 and Mod B sets this to 0.5 the result is 0.75
AdvancedREPO.API.Stamina.SetStaminaRechargeRate(float? value)
Changes the rate at which stamina recharges. The result is multiplicative.
So if Mod A sets this to 1.5 and Mod B sets this to 0.5 the result is 0.75
AdvancedREPO.API.Stamina.SetStandingStaminaRechargeMultiplier(float? value)
Changes the multiplier at which stamina recharges while standing still. The result is multiplicative.
So if Mod A sets this to 1.5 and Mod B sets this to 0.5 the result is 0.75 This value is applied as a modifier to the base recharge rate.
AdvancedREPO.API.Stamina.SetCrouchingStaminaRechargeMultiplier(float? value)
Changes the multiplier at which stamina recharges while crouching. The result is multiplicative.
So if Mod A sets this to 1.5 and Mod B sets this to 0.5 the result is 0.75 This value is applied as a modifier to the base recharge rate.
AdvancedREPO.API.Stamina.AddStartStamina(int? value)
Changes the starting stamina. The result is additive.
So if Mod A sets this to 10 and Mod B sets this to 20 the result is 70 (including 40 vanilla stamina)
AdvancedREPO.API.Stamina.AddStaminaPerUpgrade(int? value)
Changes the stamina per upgrade. The result is additive.
So if Mod A sets this to 10 and Mod B sets this to 20 the result is 40 (including 10 vanilla stamina per upgrade)
AdvancedREPO.API.Stamina.AddSlideStaminaCost(int? value)
Changes the stamina needed for sliding. The result is additive.
So if Mod A sets this to 10 and Mod B sets this to 20 the result is 35 (including 5 vanilla cost for slide)
Second and third parameter are always
string modName = null
The name of the mod. If null will automatically be set to assembly name of calling assembly.
string key = null
A key for the value
Providing null as the first parameter will remove your value from the API.
Source
The source code is licensed under a MIT license and available here: https://github.com/FluffyFishGames/AdvancedREPO/tree/main