You are viewing a potentially older version of this package. View all versions.
REPO_JP-ExtractionAutoRevive-0.1.0 icon

ExtractionAutoRevive

By REPO_JP
Date uploaded 8 months ago
Version 0.1.0
Download link REPO_JP-ExtractionAutoRevive-0.1.0.zip
Downloads 156
Dependency string REPO_JP-ExtractionAutoRevive-0.1.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2304 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2304

README

ExtractionAutoRevive

  • Host-only automatic revive for all players when the extraction point completes

Overview

  • What this mod does

    • Automatically revives all players when ExtractionPoint.StateSet reaches Complete
    • Runs after a 1-frame delay to avoid timing issues during the state transition
  • Who it is for

    • Hosts who want dead players to be revived automatically at extraction completion without manual commands
  • What changes after installation

    • When the extraction point completes, the host triggers a revive for all detected PlayerAvatar instances

Features

  • Event-driven trigger

    • Hooks ExtractionPoint.StateSet via Harmony and reacts only on state changes
  • Host-only execution

    • Runs only when you are in a Photon room and you are the Master Client (host)
    • Does not run in singleplayer or when you are a non-host client
  • Stage filtering

    • Runs only while SemiFunc.RunIsLevel() is true
    • Excludes lobby and wildcard-style level names based on Unity log "Changed level to:"
  • Safe execution / cancellation

    • Uses an internal token to cancel pending revive actions when levels change or new events arrive
    • Schedules the revive after one frame and skips if the token changed
  • Revive implementation

    • Enumerates PlayerAvatar objects via Resources.FindObjectsOfTypeAll<PlayerAvatar>() and filters to loaded scenes
    • Calls PlayerActions.Revive(PlayerAvatar) via reflection
    • If PlayerActions.Revive(PlayerAvatar) cannot be resolved, the revive is skipped
  • Logging

    • Writes logs to both Unity console and BepInEx log with [ExtractionAutoRevive] prefix
    • Logs level changes, state transitions, target counts, and per-player revive results

Usage

  • Minimal steps

    • Install the mod on the host
    • Start a multiplayer session as the Master Client (host)
    • Complete the extraction point
    • All detected players are revived automatically
  • Notes

    • Works only for the host (Master Client)

Contact


ExtractionAutoRevive

  • 納品完了ごとに全員を自動蘇生するホスト専用MOD

概要

  • このMODが何をするか

    • ExtractionPoint.StateSet が Complete になったタイミングで全員を自動蘇生
    • 状態遷移中のタイミング問題を避けるため 1フレーム遅延で実行
  • どんな人向けか

    • 手動コマンドなしで 抽出完了時に死亡者を自動で蘇生したいホスト向け
  • 導入で何が変わるか

    • 抽出地点が完了すると ホストが検出された全 PlayerAvatar に対して蘇生を実行

特徴

  • イベント駆動トリガー

    • Harmonyで ExtractionPoint.StateSet をフックし 状態変化時のみ処理
  • ホスト専用動作

    • Photonルーム内 かつ マスタークライアント(ホスト)の場合のみ動作
    • シングルプレイ および 非ホスト参加者では動作しない
  • ステージフィルター

    • SemiFunc.RunIsLevel() が true の間のみ動作
    • Unityログの "Changed level to:" を基に ロビーやワイルドカード風のレベル名を除外
  • 安全実行 / キャンセル

    • レベル切替や新規イベント到着時に 保留中の蘇生を無効化するトークンを使用
    • 1フレーム遅延後に実行し トークンが変化していればスキップ
  • 蘇生処理の実装

    • Resources.FindObjectsOfTypeAll<PlayerAvatar>() で PlayerAvatar を列挙し ロード済みシーンのみ対象化
    • リフレクションで PlayerActions.Revive(PlayerAvatar) を呼び出し
    • PlayerActions.Revive(PlayerAvatar) を解決できない場合 蘇生をスキップ
  • ログ

    • UnityコンソールとBepInExログに [ExtractionAutoRevive] 付きで出力
    • レベル変更 状態遷移 対象数 各プレイヤーの蘇生結果を記録

使い方

  • 最短手順

    • ホストにMODを導入
    • マスタークライアント(ホスト)としてマルチプレイを開始
    • 抽出地点を完了
    • 検出された全員が自動で蘇生される
  • 注意点

    • 動作するのはホスト(マスタークライアント)のみ

連絡先

CHANGELOG

Changelog

[4.0.0] - Updated

Changed

  • Updated for REPO Cosmetics Update v0.4.0.
  • Reworked the revive condition so dead players are revived only after their death head has stayed grounded for the configured duration.
  • Changed delayed revive handling from pit-electricity-specific checks to general death-head ground contact checks.
  • Kept the host-only cleanup-flow approach by patching the extraction/shop cleanup revive context instead of running a constant full-player revive loop.
  • Preserved the existing PlayerAvatar.Revive(true) revive path and added Revive(false) as a fallback.

Added

  • Added RequiredGroundedSeconds config for the minimum grounded time before revive.
  • Added GroundCheckDistance config for death-head ground detection distance.
  • Added PendingCheckIntervalSeconds config for delayed revive queue polling.
  • Added queue cleanup on scene load, active scene change, level change, restart scene, and plugin destruction.
  • Added safer pending revive keys using PhotonView.ViewID when available, with instance ID fallback.
  • Added stronger dead-state checks using deadSet, isDisabled, player active state, and death-head triggered state.

Fixed

  • Fixed revives happening too early while death heads are still falling or being moved.
  • Fixed pending delayed revives continuing after level transitions.
  • Fixed behavior where death heads that are not inside the extraction point could be skipped by the vanilla cleanup revive condition.

[1.3.1] - Updated

Changed

  • Previous release package update.

[1.3.0] - Updated

Changed

  • Reworked the revive flow to piggyback on the game's extraction and shop cleanup revive loop instead of scanning players from a separate trigger.
  • Replaced the generic PlayerDeathHead.Revive() extraction-only condition during cleanup with custom host-only handling that can revive dead players regardless of where their death head is.
  • Changed the actual revive call to PlayerAvatar.Revive(true) so the truck-heal style revive path is used.

Added

  • Delayed revive handling for death heads that are still in the death pit electricity rescue state.
  • Pending revive queue keyed by PhotonView.ViewID when available, with fallback identity handling.
  • Queue cleanup on scene changes, run transitions, extraction completion, and truck return related transitions.
  • Log config options for normal logs and verbose logs.

[0.1.0] - Initial Release

Added

  • Host-only automatic revive triggered by extraction completion.
  • Event-driven design.
  • Host-only guard.
  • Detailed logging.