PEAK
Install with App

Details

Latest version
1.11.1
Last Updated
First Uploaded
Downloads
508
Likes
1
Size
25KB
Dependants

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.

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. The cap is hard-limited to 500 (5×); entering anything higher automatically reverts to 500.
  • 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.UseStamina is 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 canGetHungry property); 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 BepInEx folder from the zip into the game root (Steam\steamapps\common\PEAK) and merge; the dll lands in BepInEx/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

There are two ways to open the settings, both apply instantly:

  • Hotkey (fastest): press F8 in-game to open this plugin's standalone panel. Press F8 again or ESC to close.
  • Pause menu: ESC → MOD SETTINGS → PeakStaminaHost (auto-collected by PEAKLib.ModConfig).
Setting Control Explanation
Stamina cap (%) Text percentage, e.g. 2.5 / 100 / 200 / 500; hard cap 500 (5×), higher reverts to 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
Menu hotkey Key key that opens the standalone panel, default F8, rebindable

Hotkeys

Key / action Effect
F8 open / close the standalone settings panel (default, rebindable)
ESC close the panel when it is open
Mouse click toggle switches and type percentages; the character is locked and the cursor is shown while the panel is open

The standalone panel and the pause-menu MOD SETTINGS edit the same config, so changes stay in sync either way.

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 vanilla 1 − statusSum. The postfix takes a Character __instance and 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 native StaminaBar object, removes the cloned StaminaBar and BarAffliction scripts, and drives it with absolute mapping: the orange master width is Clamp01(cap−sum) × frame, each affliction width is the real val × frame (no clamp, no proportional scaling), and the outline is 14 + max(cap,sum) × frame. The cloned HorizontalLayoutGroup and the content size fitters are disabled (they never repositioned dynamically activated bars), and an x-cursor places the orange bar at 0 and each affliction flush against the previous one, matching vanilla left-to-right layout.
  • 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.UseStamina instead of writing infiniteStam (which makes the number grow forever).
  • No-hunger hijacks the native get_canGetHungry and forces false when on; on the enable edge it calls SetStatus(Hunger,0) to clear existing hunger.
  • Mod presence is detected with a Photon player custom property (PSH_Mod_v); a MonoBehaviourPunCallbacks hook re-broadcasts on OnPlayerEnteredRoom.

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.

Changelog

v1.11.1

  • Hard-capped the stamina multiplier at 500 (5×); entering a higher value automatically reverts to 500.
  • Fixed the stamina number jitter and rightward drift at high multipliers (above 100): the number box is re-constrained to the actual bar width after each frame, resolving the conflict with PeakStatsEx regardless of patch order.

v1.11.0

  • Added a standalone hotkey panel: press F8 (rebindable) in-game to open a dedicated panel with the four toggles and two percentage fields, without navigating the pause menu. The panel locks the character and shows the cursor while open, and closes on F8 or ESC. It edits the same config as ModConfig, so everything stays in sync.
  • Fixed the extra-bar affliction alignment: the cloned layout group never repositioned dynamically activated affliction bars (they all sat at the left edge and overlapped the orange bar). The layout group and content size fitters are now disabled, and an x-cursor places each bar flush against the previous one, matching the vanilla left-to-right layout.

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 UseStamina interception (fixes the runaway number), and native no-hunger through the canGetHungry authority property.

中文

想带多少带多少,体力长短你说了算。这是一个面向 PEAK(Steam)的 BepInEx 5 插件:你可以随意设定体力长短,还能把负重、饥饿、受伤等负面效果挪到下方独立的橙色条,各管各的。暂停菜单里点几下就能改,联机时房主设置、全房统一,单机同样生效。

功能

  • 可调节体力上限(文本框输入百分数) — 直接输入:2.5 = 原版 2.5%(一丝)、100 = 原版、200 = 2 倍、500 = 5 倍。无滑块、无下拉。最高 500(5 倍),填超过 500 会自动变成 500。
  • 独立负面条(含负重,默认开启) — 复制原生体力条结构、改橙色、对齐显示在体力条正下方。负重/饥饿/伤害等全部原生状态都显示在这条上,不再压体力。默认提供 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)管理器会自动安装,手动安装需自行确认。

使用

有两种方式打开设置,改完即时生效:

  • 快捷键(最方便):游戏中按 F8 呼出本插件独立面板,再按 F8 或按 ESC 关闭。
  • 暂停菜单:ESC → MOD SETTINGS → PeakStaminaHost(由 PEAKLib.ModConfig 自动收集)。
配置项 控件 说明
上限倍率 (%) 文本框 百分数,如 2.5 / 100 / 200 / 500;最高 500(5 倍),超出自动变 500
独立负面条 On/Off 开(默认):独立橙色条、不压体力、到容量才倒地;关:原版
独立负面条上限 (%) 文本框 倒地阈值,10–100,默认 50
免饥饿 On/Off 饥饿不再累加
免伤无敌 On/Off 免疫伤害性状态、不会死亡
无限体力 On/Off 动作不消耗体力
菜单呼出键 按键 呼出独立面板的按键,默认 F8,可改

快捷键

按键/操作 作用
F8 呼出 / 关闭独立设置面板(默认键,可改)
ESC 面板打开时关闭它
鼠标点击 切换开关、在文本框输入百分数;面板打开时人物自动锁定、显示鼠标,不会误动

独立面板和暂停菜单的 MOD SETTINGS 改的是同一套设置,哪边改都同步生效。

联机

  • 单机时你始终拥有完全控制权。
  • 房间内,房主(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) × 框宽。副本的 HorizontalLayoutGroup 与各 ContentSizeFitter 被禁用(它们不会重排动态激活的条),改用 x 游标把橙色条放在 0、各状态条依次紧挨,复刻原版从左到右布局。
  • 原条外框与溢出在独立模式下被接管:隐藏重复的溢出竖线,外框为 14 + Clamp01(倍率) × 框宽。
  • 无限体力拦截 internal Character.UseStamina,不写 infiniteStam(后者会让数字无限增长)。
  • 免饥饿劫持原生 get_canGetHungry 在开启时强制 false,开启边沿调用 SetStatus(Hunger,0) 清除存量。
  • mod 存在性用 Photon 玩家自定义属性(PSH_Mod_v)检测;MonoBehaviourPunCallbacks 钩子在 OnPlayerEnteredRoom 时重新广播。

已知限制

  • 免伤覆盖状态累加与死亡入口;特殊即时伤害路径可能未覆盖(附源码可自行扩展)。
  • 1 倍以上视觉条钳在框内,绝对值看数字文本。
  • 若游戏更新改动这些 hook,需用附带源码重新编译。

许可

MIT — 可自由使用与修改。

更新日志

v1.11.1

  • 体力上限倍率硬限制为 500(5 倍),填超过 500 会自动变成 500。
  • 修复高倍率(100 以上)体力数字抖动和向右偏移:每帧把数字文本框重新约束到实际条宽,不依赖补丁顺序,同时解决与 PeakStatsEx 的冲突。

v1.11.0

  • 新增快捷键独立面板:游戏中按 F8(可改键)即可呼出专属面板,直接操作 4 个开关和两个百分数输入框,无需进暂停菜单。面板打开时锁定人物、显示鼠标,按 F8 或 ESC 关闭。它与 ModConfig 改的是同一套配置,始终同步。
  • 修复独立条负面状态对齐:副本布局组不会重新定位动态激活的负面条(它们都停在左边界、与橙色条重叠)。现禁用布局组和各 ContentSizeFitter,改用 x 游标让每条紧挨上一条,复刻原版从左到右布局。

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 属性实现免饥饿。
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.