AdvancedREPO API Stamina
Better stamina system for REPO with an API to modify its values.
模組介紹 作者原文
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:
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: