PeakStaminaHost
自由调节体力上限,负重/饥饿/受伤等负面状态可独立到下方橙色条、各管各的。倍率文本框输百分数(2.5=一丝、100=原版、500=5倍),另含无限体力/免饥饿/免伤。独立条复制原生UI、左对齐、单状态超100%真实延长显数字,白框随倍率缩短。联机房主装了则房主设置全房统一,房主没装也能本地自调;单机生效,兼容PeakStatsEx。
By wanfeng
| Date uploaded | 2 weeks ago |
| Version | 1.10.3 |
| Download link | wanfeng-PeakStaminaHost-1.10.3.zip |
| Downloads | 33 |
| Dependency string | wanfeng-PeakStaminaHost-1.10.3 |
This mod requires the following mods to function
BepInEx-BepInExPack_PEAK
BepInEx pack for PEAK. Preconfigured and ready to use.
Preferred version: 5.4.2403README
PeakStaminaHost
English
Carry as much as you want and decide how long your stamina bar is. PeakStaminaHost is a BepInEx 5 plugin for PEAK (Steam) that lets you freely set the stamina cap, and move weight, hunger, damage and other negative effects onto a separate orange bar below, each on its own. Change everything from the pause menu in a few clicks; in multiplayer the host's settings apply to the whole room, and it also works in single-player.
Changelog
v1.10.3
- Rebuilt the multiplayer authority model around one central check. Single-player and the host always have local control. As a client, if the host does not have the mod you can still adjust everything for yourself; if the host has it, you follow the host. The mod's presence is detected with native Photon player custom properties (no chat or polling hacks).
- The host now re-broadcasts the current settings when a new player joins, so late joiners receive the existing configuration.
- Affliction bars now follow the shrinking frame (left-aligned) instead of staying pinned to the right edge.
- The original stamina bar no longer shows a duplicate overflow line in extra mode, and its white outline now shrinks with the multiplier.
- The stamina multiplier is applied only to your own local character, so teammates who do not have the mod no longer get wrongly shortened bars.
- A single status above 100% (e.g. weight at 120) now extends its bar for real and shows the true number, instead of being clamped at 100.
v1.10.2
- Re-upload of v1.10.1 with no code change; the previous upload was incorrectly flagged as NSFW and hidden from normal browsing.
v1.10.1
- The extra bar uses absolute mapping: length and number are fixed to the cap (at cap=50 the empty bar takes half the frame and shows 50). The white outline hugs the content and extends past the cap, with an overflow line at the full-value boundary.
- Fixed the PeakStatsEx compatibility patch: the real namespace is
PeakStatsEx.MonoBehaviours.
v1.10.0
- Multiplayer authority lock, petrify display fix, and PeakStatsEx compatibility for teammates' bars.
Earlier
- Harmony postfix on the stamina cap, string-based percentage text box (floats render as sliders, strings render as plain input fields), extra-bar clone of the native stamina bar, infinite stamina via
UseStaminainterception (fixes the runaway number), and native no-hunger through thecanGetHungryauthority property.
Features
- Adjustable stamina cap (free percentage text box) — type a percentage directly:
2.5= 2.5% of vanilla (a sliver),100= vanilla,200= 2×,500= 5×. No slider or dropdown; every value works. - Separate affliction bar (weight included, on by default) — clones the vanilla stamina-bar layout, recolored orange, sitting directly under the stamina bar. Every vanilla status (weight, hunger, damage, etc.) appears on it instead of pressing on your stamina. It gives a default of 50 extra capacity (adjustable 10–100). The white outline hugs the content and extends right when over capacity; each affliction shows its own value.
- A single status above 100% extends for real — a status can reach 200% (the vanilla cap is 2); the bar and number show the true value (e.g. 120), they are not clamped at 100.
- The original stamina bar stays clean — with the extra bar on, the colored afflictions on the original bar are hidden while the white outline is kept and shrinks with the multiplier; turn it off to restore vanilla.
- No more pass-out loop — you pass out only when the total affliction reaches the extra capacity, and stand up normally once it drops below it.
- Infinite stamina —
Character.UseStaminais intercepted so every consumption action succeeds without draining; the number no longer grows forever. Switching at runtime applies immediately. - No-hunger / god mode — hunger no longer accumulates (reuses the native
canGetHungryproperty); god mode makes you immune to damaging statuses and unable to die.
Installation
Mod manager (recommended)
- Online: click Install on the Thunderstore page; dependencies are added automatically.
- Local zip: profile → Import local mod → select
PeakStaminaHost.zip→ Start modded.
Manual
- Requires BepInEx 5. Extract the
BepInExfolder from the zip into the game root (Steam\steamapps\common\PEAK) and merge; the dll lands inBepInEx/plugins/PeakStaminaHost.dll.
Dependencies (BepInEx-BepInExPack_PEAK-5.4.2403, PEAKModding-ModConfig-1.8.2) are installed automatically by managers; manual users must have them present.
Usage
Pause menu → MOD SETTINGS → PeakStaminaHost (auto-collected by PEAKLib.ModConfig):
| Setting | Control | Explanation |
|---|---|---|
| Stamina cap (%) | Text | percentage, e.g. 2.5 / 100 / 200 / 500 |
| Extra bar | On/Off | on (default): orange bar, no stamina press, pass out at cap; off: vanilla |
| Extra bar cap (%) | Text | pass-out threshold, 10–100, default 50 |
| No-hunger | On/Off | hunger no longer accumulates |
| God mode | On/Off | immune to damaging statuses, cannot die |
| Infinite stamina | On/Off | actions cost no stamina |
Multiplayer
- In single-player you always have full control.
- In a room, the host (MasterClient) always has control and broadcasts settings over Photon RPC to unify the room.
- As a client: if the host has this mod, your menu follows the host values and local edits are pulled back; if the host does not have it, you can adjust everything freely for your own character.
- When a new player joins, the host re-broadcasts the current settings automatically.
How it works
Everything is verified against an Assembly-CSharp.dll decompile; no invented APIs.
Character.GetMaxStamina()is vanilla1 − statusSum. The postfix takes aCharacter __instanceand only changes the result when__instance.IsLocal, so remote characters (including teammates without the mod) keep their vanilla cap.- The extra bar
Object.Instantiates the whole nativeStaminaBarobject, removes the clonedStaminaBarandBarAfflictionscripts, and drives it with absolute mapping: the orange master width isClamp01(cap−sum) × frame, each affliction width is the realval × frame(no clamp, no proportional scaling), and the outline is14 + max(cap,sum) × frame. The cloned layout group is set toMiddleLeftso bars follow the shrinking frame. - The original bar's outline and overflow are taken over in extra mode: the duplicate overflow line is hidden and the outline is
14 + Clamp01(multiplier) × frame. - Infinite stamina intercepts the internal
Character.UseStaminainstead of writinginfiniteStam(which makes the number grow forever). - No-hunger hijacks the native
get_canGetHungryand forces false when on; on the enable edge it callsSetStatus(Hunger,0)to clear existing hunger. - Mod presence is detected with a Photon player custom property (
PSH_Mod_v); aMonoBehaviourPunCallbackshook re-broadcasts onOnPlayerEnteredRoom.
Known limitations
- God mode covers status accumulation and the death entry; special instant-damage paths may not be covered (the source is included so you can extend it).
- Above 1× the visual bar is clamped to the frame; use the number text for the absolute value.
- If a game update changes these hooks, recompile with the included source.
License
MIT — free to use and modify.
中文
想带多少带多少,体力长短你说了算。这是一个面向 PEAK(Steam)的 BepInEx 5 插件:你可以随意设定体力长短,还能把负重、饥饿、受伤等负面效果挪到下方独立的橙色条,各管各的。暂停菜单里点几下就能改,联机时房主设置、全房统一,单机同样生效。
更新日志
v1.10.3
- 围绕一个集中判定重构联机权限模型。单机和房主始终拥有本地控制权;作为客户端,房主没装本 mod 时你仍可对自己随意调节,房主装了则服从房主。mod 是否存在用 Photon 原生玩家自定义属性检测,不靠聊天或轮询取巧。
- 有新玩家加入时,房主会自动重新广播当前设置,后加入的人也能拿到已有配置。
- 状态条改为左对齐,跟随缩短的框,不再停在最右侧。
- 原体力条不再重复显示溢出竖线,白色外框改为随倍率缩短。
- 体力倍率只对本地角色生效,没装 mod 的队友头顶条不再被错误缩短。
- 单一状态超过 100%(如负重 120)时状态条真实延长、数字显示真实值,不再被钳在 100。
v1.10.2
- 重新发布 v1.10.1,代码无改动;上一版上传时被误标为成人内容、正常浏览搜不到。
v1.10.1
- 独立条改为绝对映射:长度/数字随设置固定(cap=50 空状态占半框、显 50),白框贴合内容、超 cap 后延伸,满值边界显示溢出竖线。
- 修复 PeakStatsEx 兼容补丁:真实命名空间为
PeakStatsEx.MonoBehaviours。
v1.10.0
- 联机权限锁定、石化显示修复、PeakStatsEx 队友头顶条兼容。
更早版本
- 体力上限 Harmony 后置补丁、基于字符串的百分数文本框(float 渲染成滑块、string 渲染成纯文本框)、复制原生体力条的独立条、拦截
UseStamina实现无限体力(修复数字无限增长)、通过原生canGetHungry属性实现免饥饿。
功能
- 可调节体力上限(文本框输入百分数) — 直接输入:
2.5= 原版 2.5%(一丝)、100= 原版、200= 2 倍、500= 5 倍。无滑块、无下拉,任意值都能调。 - 独立负面条(含负重,默认开启) — 复制原生体力条结构、改橙色、对齐显示在体力条正下方。负重/饥饿/伤害等全部原生状态都显示在这条上,不再压体力。默认提供 50 额外容量(可在 10–100 调节)。白框贴合内容、超容量时向右延伸,每个状态条各带数值。
- 单一状态超 100% 真实延长 — 状态最高可达 200%(原版上限为 2),条和数字都显示真实值(如 120),不被钳在 100。
- 原体力条保持干净 — 独立条开启时,原条彩色负面条隐藏,白色外框保留并随倍率缩短;关闭后恢复原版。
- 不再反复倒地起身 — 负面总量达到额外容量才倒地,降到容量以下正常起身。
- 无限体力 — 拦截
Character.UseStamina,所有消耗动作不扣体力、数字不再无限增长,运行时切换即时生效。 - 免饥饿 / 免伤无敌 — 饥饿不再累加(复用原生
canGetHungry属性);免伤让你免疫伤害性状态、不会死亡。
安装
模组管理器(推荐)
- 在线安装:在雷霆商店页面点击 Install,依赖自动配齐。
- 本地 zip:profile → Import local mod → 选择
PeakStaminaHost.zip→ Start modded。
手动安装
- 需先装 BepInEx 5。把 zip 内
BepInEx文件夹解压到游戏根目录(Steam\steamapps\common\PEAK)并合并,dll 落入BepInEx/plugins/PeakStaminaHost.dll。
依赖(BepInEx-BepInExPack_PEAK-5.4.2403、PEAKModding-ModConfig-1.8.2)管理器会自动安装,手动安装需自行确认。
使用
暂停菜单 → MOD SETTINGS → PeakStaminaHost(由 PEAKLib.ModConfig 自动收集):
| 配置项 | 控件 | 说明 |
|---|---|---|
| 上限倍率 (%) | 文本框 | 百分数,如 2.5 / 100 / 200 / 500 |
| 独立负面条 | On/Off | 开(默认):独立橙色条、不压体力、到容量才倒地;关:原版 |
| 独立负面条上限 (%) | 文本框 | 倒地阈值,10–100,默认 50 |
| 免饥饿 | On/Off | 饥饿不再累加 |
| 免伤无敌 | On/Off | 免疫伤害性状态、不会死亡 |
| 无限体力 | On/Off | 动作不消耗体力 |
联机
- 单机时你始终拥有完全控制权。
- 房间内,房主(MasterClient)始终有控制权,并通过 Photon RPC 广播设置、统一全房。
- 作为客户端:房主装了本 mod 时,你的菜单跟随房主值、本地改动会被回拉;房主没装时,你可以对自己的角色自由调节。
- 有新玩家加入时,房主会自动重新广播当前设置。
原理
全部依据 Assembly-CSharp.dll 反编译核实,无编造接口。
Character.GetMaxStamina()原版为1 − statusSum。后置补丁带Character __instance,仅在__instance.IsLocal时改结果,因此远端角色(含没装 mod 的队友)保持原版上限。- 独立条运行时
Object.Instantiate复制整个原生StaminaBar,删除副本上的StaminaBar与BarAffliction脚本后用绝对映射驱动:橙色总条宽Clamp01(cap−sum) × 框宽,各状态条宽为真实val × 框宽(不钳、不等比缩小),外框14 + max(cap,sum) × 框宽。副本布局组设为MiddleLeft,让状态条跟随缩短的框。 - 原条外框与溢出在独立模式下被接管:隐藏重复的溢出竖线,外框为
14 + Clamp01(倍率) × 框宽。 - 无限体力拦截 internal
Character.UseStamina,不写infiniteStam(后者会让数字无限增长)。 - 免饥饿劫持原生
get_canGetHungry在开启时强制 false,开启边沿调用SetStatus(Hunger,0)清除存量。 - mod 存在性用 Photon 玩家自定义属性(
PSH_Mod_v)检测;MonoBehaviourPunCallbacks钩子在OnPlayerEnteredRoom时重新广播。
已知限制
- 免伤覆盖状态累加与死亡入口;特殊即时伤害路径可能未覆盖(附源码可自行扩展)。
- 1 倍以上视觉条钳在框内,绝对值看数字文本。
- 若游戏更新改动这些 hook,需用附带源码重新编译。
许可
MIT — 可自由使用与修改。