Panel adaptation: full perk names are listed but creepypasta perks stay hidden; host and clients (including the official client display addon) now show identical content.
"No-No" emote reroll is back, limited to 3 uses per run.
【Random Item】no longer loops when a randomized item triggers another randomization (only the id it just produced is blocked).
【Chills】 is temporarily disabled (code kept for a future rework).
Removed the "press Z to reroll the base perk" test hotkey.
Urgently fixed some issues with the mod configuration file.
中文
紧急修复了模组配置文件的一些问题。
1.0.2
English
Add a class introduction document for this mod (ModClassIntroduction.md, bilingual in Chinese and English).
中文
为本模组补充职业介绍文档(ModClassIntroduction.md,中英双语)。
1.0.3
English
Attempted to optimize the mod to some extent:
This initial optimization attempt includes a total of 6 optimization changes (involving ClassLedger.cs / Config.cs / HostClassManager.cs):
O(1) class presence check: added a player-count index, replacing the original HasClassInRoom that traversed the ledger.
Added early returns to 16 per-frame functions: if a class is not present, the entire traversal block is skipped → the number of per-frame traversals is roughly halved (exclusive classes drop directly to zero).
Reduced the frequency of two unconsciousness state-transition checks: Fireline Rescue / Protocol Zero changed from per-frame to 0.15s sampling (about 1/9 of the cost, with imperceptible latency).
State-transition detection no longer writes to a string dictionary every frame: writes occur only when the state changes, so steady-state writes are ≈0.
Amortized temporary-item feeding across frames: 4 instantiation entry points were consolidated into one, and the queue processes at most 3 per frame → single-frame peak reduced from 10–30 to 3; a burst of 30 finishes within at most 0.17 seconds.
The default class draw weight of Qu changed from 10 to 5.
Also eliminated: the per-frame ParseList allocations in the Scout's luggage item pool / Cook's food item pool, as well as the per-frame service lookup + traversal in ApplyDaihaoAvatar.
Fixed Astronaut 【NASA】: the repeated, abnormal stacking of the extra bonus for cobweb / flytrap / curse. The detection logic has been improved:
Root cause: The host reads the state value synchronized back from the remote character, which is subject to delay. The original implementation appended +2.5 and then wrote the baseline as "current value + 2.5"; if the next round still read the old value that had not yet been synchronized, the baseline would be lowered, and when the synchronization arrived it would be recognized as "yet another new increase" → repeated appends every round.
Each of these three statuses now enters its own cooldown after the extra bonus triggers, during which it is neither detected nor increased again.
Accordingly, a new config entry [Astronaut] nasaExtraIncreaseCooldown has been added, default 1.0 (seconds).
Fixed Leader 【Morale】: the curse and petrify refund applied to affected players when the leader revives could fail to take full effect. The refund logic has been strengthened:
Root cause: The old implementation read the current value only once at "the moment the Leader revives" to calculate the difference. If the +10 issued when the Leader died had not yet been synchronized back to the host, the difference would be calculated as 0 (or only partially calculated), this rollback would be skipped, and the penalty would remain permanently on the player, accumulating over multiple times into abnormal curse values. This issue is unrelated to the frame-amortization optimization—[Morale] is issued directly via ApplyStatus and does not pass through the temporary-item feeding queue; the real cause is the timing of asynchronous state synchronization.
When the leader revives and triggers the negative-status removal, the amount to refund is now recorded and repeatedly corrected until confirmed complete.
NewEmote reclass mechanic (optional, disabled by default):
Performing the 【No No】 emote (A_Scout_Emote_Nono) immediately reclasses the player once (same effect as consuming the reclass item), and shares the reclass count with item-based reclass.
If this emote conflicts with an emote forcibly played by a class effect, the class effect takes priority and no reclass is triggered.
New config entries: [General] reclassEmoteEnabled (default false) and [General] reclassEmote (default No No).
Fixed Langwang 【Premium Berry】: the "purple kingberry" was mistakenly written as the "yellow kingberry", and the internal-test change had not been fully applied.
All occurrences have now been corrected to the purple kingberry (Kingberry Purple); the config entries have been changed to [Langwang] premiumBerryPurpleKingberryItem / premiumBerryPurpleKingberryWeight, and [Langwang] kingberryItems / [Cook] logisticsFoodPool no longer contain Kingberry Yellow.
Fixed MilesSoul 【Seal Power】: when a client MilesSoul player used Scout gem items repeatedly at high frequency, the petrify value could be deducted extra or even reduced to zero.
Root cause: lost updates caused by absolute write-back combined with asynchronous synchronization** — a client's petrifyAmount is asynchronously synced back to the host by the owner client. The original implementation accumulated each evaluated petrification reduction into a pending queue, then after a 0.35s delay wrote it back using HostApi.SetPetrify (RPC_SyncPetrify, an absolute assignment):
Under high-frequency use, the cur value read by the host lags behind the client's true value;
After the pending queue has accumulated multiple -5s, it writes back absolutely using the stale cur - pending;
This absolute assignment also overwrites the in-flight +7 increment that has already been used but not yet synced to the host → an extra deduction;
Repeating this cycle can drive petrification down to 0.
The absolute write-back for the petrify reduction now waits until the petrify value has been quiet for 0.75 seconds (deferred by at most 4 seconds during continuous use), so it no longer overwrites in-flight increases that have not yet been synced to the host; the detection threshold is now strictly greater than 2.5.
New The number of Scoutmasters spawned by MilesSoul 【Soul Hindrance】 present on the field at the same time is now capped at 4.
NewClass introduction panel: while the class-assignment panel is shown (default key: Tab), an extra panel now appears right below it showing your own class's keywords and a short introduction, so players can understand their class without opening the class document. The text follows the game language (Chinese / English). This is available on the host's screen, in the main mod's client mode, and in the optional client display addon. Only the local player's class is shown, not the whole class list.
NewClass intro compatibility: the host now also broadcasts the class keywords and intro tables (Photon custom event 197, kinds 4 / 5, throttled to "class set changed" or once per 30 s). A client addon or older local copy that does not know a class added by a newer main mod now falls back to the host-provided text — so updating the main mod no longer requires updating the client display addon to see the new class's introduction. Local text is still preferred, so each client keeps its own language for known classes.
Fixed Firefighter 【Fireline Rescue】: a player carried by the firefighter could stay "attached" to the carrier after waking up and could not climb; the same happened again after death and revive.
Root cause: in vanilla, CharacterCarrying.Update drops the carried player only on the carrier's owning client, while RPCA_Die / ReviveCharacter / RPCA_ReviveAtPosition never clear isCarried / carrier. If that single RPCA_Drop is missed, the victim keeps carrier forever; CharacterCarrying.FixedUpdate then applies a force of 500 toward the carrier every frame (looks like being stuck to the carrier, and climbing is impaired). Death and revive reuse the same Character object, so the state survives them. This mod makes that moment common: 【Fireline Rescue】 teleports the firefighter right onto the fainted player, and 【Warm Embrace】 heals the victim on the carrier's back, so the victim often wakes up exactly there — the very instants when vanilla would drop them.
The host now broadcasts the vanilla RPCA_Drop (RpcTarget.All) whenever a drop was due but did not happen, so players who installed nothing are fixed as well.
Also hardened in 1.0.6: the victim-side cleanup now runs for the host's own character too (previously local characters were skipped entirely, so a host carried by a client could stay glued forever); the watchdog now requires the inconsistent state to persist for 0.5 s before acting, so an in-flight RPCA_StartCarry / RPCA_PassOut (sent by different clients, with no cross-sender ordering guarantee) is never undone by mistake.
Fixed Firefighter 【Fireline Rescue】: the "cannot trigger while carrying a player" rule is now also enforced at execution time. Previously only the scheduling step checked it, so a firefighter who picked a player up during the 3 s delay was still teleported — dragging the carried player along through the per-frame carry force.
Fixed MilesSoul 【Cursed Soul】: a client MilesSoul could start with 15 curse instead of the intended 20 (15 from 【Cursed Soul】 plus 5 from 【Soul Hindrance】 on entering the level).
Root cause: the initial 15 and the per-level 5 were sent through different channels. The initial value used an absolute write with idempotent corrections; the +5 used a relative increment. A relative increment can be silently dropped by the vanilla AddStatus guards while a client is still initialising, and the correction loop only knew about the 15 — so it could also overwrite the +5 back to 15. In addition, the protection baseline was recorded from a stale host-side copy of a remote client (remote status changes made through the RPC path are not pushed back to the host by vanilla), producing baseline values like 17.5.
Fix: the initial curse and this level's +5 are now merged into one absolute, idempotent write (15 + 5 = 20), which the existing correction loop re-asserts. 【Soul Hindrance】 now records the intended baseline (baseline + 5) instead of reading back a possibly half-synced value, and the same-frame initial grant is skipped by the new-level handler so it can never become 25.
ImprovedPerformance / bandwidth (no gameplay change):
The class panel text is cached by a (ViewID, class, nickname) signature and the TMP panel update is version-gated — holding the panel key no longer rebuilds every line (and re-lays out TMP) every frame.
Class name / keyword / intro tables are no longer re-sent with every 2 s snapshot; they are sent only when the set of classes changes or every 30 s (late joiners still receive them). This removes roughly 4-5 kbit/s of redundant reliable traffic per client in a full room.
The carry-state watchdog reads the vanilla CharacterCarrying.character field directly instead of calling GetComponent<Character>() for every character every frame.
The overhead name prefix caches its per-name state component (previously GetComponent for every player every frame).
MilesSoul curse protection now throttles repeat restores (2.5 s fast retries, then every 20 s) and logs sparsely; a stale host-side copy previously caused two RPCs and one log line per second, indefinitely.
Observed in the tested session: a third-party mod (AlwaysDisplayPlayerName) emitted ~79,000 error lines, which is a major external stutter source; this mod emitted ~3,700 log lines in total.
New classATacv (31st class, ATacv = 31), built from rope and heartbreak:
【Bringing the Wife Along】a rope every level (empty slot first, otherwise spawned at your feet).
【Heartache】each rope you genuinely drop adds +10 injury — with a use-event shield: a loss only counts when it happens within 1 s of a vanilla drop channel (CharacterItems.DropItemRpc / DropItemFromSlotRPC / DoDropping) firing, so deploying a rope or burning a rope spool out of fuel costs nothing. Config entry 【Heartache - drop only】 (default on); if none of those drop methods can be found on the current game build, the mod falls back to the old behaviour and says so in the log.
【Taking In Concubines】each rope gained adds −10 injury (floors at 0).
【The Silent One】every 15 s a check runs; if you are not speaking at that moment you gain +15 extra stamina (vanilla AnimatedMouth.isSpeaking detection, same channel as Daihao 【Hello Hello】).
【Hanging From the Southeast Branch】staying on a rope continuously for more than 3 s costs +100 injury, once per hang (data.isRopeClimbing).
【Dressed Up As a Fool】implemented as a local (client-side) re-dress: straw hat + green skin + a 50/50 combo of (normal eyes + eating mouth) / (angry eyes + cat mouth) + cowboy outfit. It works by writing the player's cosmetic data through the game's own (private static) CharacterCustomization.GetCustomizationData / SetCustomizationData and refreshing that character's CharacterCustomization on this client, so it is only visible on clients that have this mod installed — vanilla clients still see the normal outfit. Configurable via 外观-启用 / 外观-套餐 / 外观-绿色皮肤 / 外观-禁止自动覆盖 / 外观-导出部位表 (the last one dumps every available part name+index to the log so the combo can be pinned exactly; a re-check every 5 s re-applies the look if vanilla reverts it).
All five implemented effects are configurable under the new ATacv section (bilingual descriptions: Chinese for a Chinese game language, English otherwise).
Class intro text (ClassIntroText.cs) added for the host-screen intro panel; ModClassIntroduction.md documents the class in both languages.
Fixed the class panel (hold Tab) printing its title over and over: DrawClassList inserted the title line into the list returned by the cached BuildClassListLines(), so the IMGUI fallback appended one [职业分配] 按 Tab 显示 line every frame — the panel grew without bound (tens of thousands of duplicate title lines, plus an O(n) insert per frame). The title is now drawn separately and the cached list is never mutated.
Changed转职-表情启用 (reclassEmoteEnabled) now defaults to on, so performing the 【不行不行】(No No) emote reclasses you (it still shares the per-run reclass count — set the option back to false if you do not want accidental reclasses).
Changed转职-次数 (reclassCount) now defaults to 1000 (effectively unlimited; was 1). The real limit is class capacity: each reclass re-rolls by weight among the classes that are not yet full, and when every class is full the attempt does nothing and consumes no count.
NewPerk system (batch 1): class effects are being split into independently combinable perks; every level each player draws 4~5 distinct perks (configurable range) instead of being assigned a fixed class. New Perks config section: 启用 / 模式 (Replace = no class assignment at all, the default; Overlay = keep classes and add perks) / 每关最少 / 每关最多 / 允许重复 / 提示 / 怪谈-启用 / 怪谈-权重 (default 1 = same weight as normal perks), plus one on/off switch per perk. In replace mode the class panel (hold the display key) lists each player's perks instead of classes.
Batch 1 ships 12 perks: 【周期物资】【冲刺体质】【无限体力】【高代谢】【沉默回体】【挂绳易伤】【净化体质】【困倦缠身】【饿鬼】【拾荒癖】 + creepypasta 【翻跟头的人】(forced backflip + 60 drowsiness every 60 s) and 【别做表情】(performing any emote kills you instantly through vanilla RPCA_Die).
The remaining ~110 effects of the 31 classes still live in the old class code and will be migrated in batches; until then replace mode draws from a 12-entry pool.