PEAK

Details

Last Updated
3 days ago
First Uploaded
3 days ago
Downloads
1.2K
Likes
0
Size
137KB
Dependency string
LuciD_Mod-PeakClassModUPDATE-1.0.1
Dependants

Categories

PEAK Class Mod — Changelog

All notable changes to this project will be documented in this file.

1.0.1 — Optimized

Scope: same gameplay as previous release; lower GC pressure, safer lookups, more reliable startup and UI updates.

Highlights

  No balance changes

  Fewer allocations, centralized caches

  Safer hat/class detection and item distribution

  More robust multiplayer startup logic

  Additional guardrails against null refs and race conditions

Performance and memory

  Added ItemCache to cache Item prefabs by name, eliminating repeated Resources.FindObjectsOfTypeAll calls.

  Cached list of mushroom items with on-demand build and reuse.

  Centralized string comparisons with ordinal matching to reduce allocations and ambiguity.

  Reduced repeated UI refresh churn by deferring some updates to short coroutines and gating by IsLocal.

Stability and safety

  Centralized hat resolution via HatUtils.TryGetHatName and ClassCheckUtil (name-first, index fallback) with strict range checks and null-guards.

  Deactivated all classes cleanly when hat is unknown; forces a UI refresh to ensure consistent stamina bar state.

  Great Épée: tracked running coroutines per-character to avoid duplicate stamina routines.

  Networking guardrails:

  Starter items only given by the master client.

  Waits up to 30s at run start until all players have characters before distributing starting items.

  Deduplicates character processing via a processedCharacters set and falls back to Character.AllCharacters for safety.

  Added several no-op Harmony postfixes to stabilize patch order and avoid side-effects in certain edge cases (e.g., stamina methods).

  Defensive reflection usage in Action_GiveExtraStamina patch (null-guards).

  Safer action gating for “Crab” (Tech-Priest hat) to prevent conflicting stamina/hunger behaviors (blocks extra/infinite stamina and hunger-restoring items).

Gameplay/behavior (unchanged, but codified)

  Scout

  -20% stamina cost on actions.

  +70% hunger gain.

  -50% Weight penalty (both UI segment and status sum).

  Medic

  Curse is pinned to 15% and can’t be cleared (protected across SetStatus, SubtractStatus, ClearAllStatus, and Cleanse affliction).

  Self-heal on H: reduces Injury by up to 10%, 10 uses per run, with an RPC visual indicator.

  Tech-Priest (Crab hat)

  No hunger gain; Weight/Hunger are neutralized when applied.

  Prevents extra/infinite stamina from afflictions and items; blocks hunger-restoring item usage.

  Mushroomancer (Mushroom hat)

  Immune to poison (affliction and add-status both neutralized).

  Stamina-zero mechanic (with 2s cooldown): +2% Curse and try to spawn a useful mushroom if inventory space exists.

  Great Épée (Propeller hat)

  Permanent “FasterBoi” speed buff maintained.

  Periodic Drowsy bursts.

  Rogue (Ninja Headband)

  “Soft” infinite jump: maintains jumpsRemaining at 2 and overrides jump RPC for consistent networking.

  2x stamina cost on actions.

  Bill (Bandana)

  Curse pinned to 35%.

  2x Weight and Hunger gain; doubled Weight impact in UI and status sum.

UX and UI

  For Scout and general class switching, forces stamina bar repaint after clamping and post-change to keep the bar accurate and responsive.

  Clearer, structured log output with consistent [ClassMod] prefix.

  Delayed “Hat List” log dump to help map exact hat names for modding or config.

Developer quality-of-life

  Single point of truth for class activation/deactivation with ResetAllFlags and per-class activation methods.

  Clear “Add new class here” guidance with flags and activation helpers.

  Centralized utilities for hat checks and item resolution.

Bug fixes

  Prevented Medic curse from being removed by Cleanse, ClearAllStatus, SetStatus(0), or SubtractStatus.

  Fixed cases where starter items were missed due to race conditions at run start (added waiting loop + fallback sweep).

  Avoided duplicate/lingering Great Épée stamina coroutines.

  Eliminated potential null reference crashes on hat/index lookups and item/affliction access.

Upgrade notes

  No config or save migration required.

  Plugin ID remains com.peakmod.classmod; version is 1.0.1.

1.0.0 — Initial release

  Introduced core class system and Harmony patches.

  Implemented class kits, startup item distribution, and baseline UI updates/logging.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.