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

EnemyOrbMerge

【Host Only MOD】Merges touching enemy orbs into one orb with indestructible-priority selection and optimized contact processing.敵オーブ同士を不滅付き優先と軽量化された接触処理で1つにまとめるMOD

By REPO_JP
Date uploaded a week ago
Version 4.0.0
Download link REPO_JP-EnemyOrbMerge-4.0.0.zip
Downloads 9354
Dependency string REPO_JP-EnemyOrbMerge-4.0.0

This mod requires the following mods to function

TheRavenNest-UnlimitedOrbs-1.0.3 icon
TheRavenNest-UnlimitedOrbs

Removes the Monster Orb cap from 3 to the maximum int value, which removes the softlock the game has if you accidently destroy all the loot

Preferred version: 1.0.3
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

COMPATIBLE WITH COSMETICS UPDATE V0.4.0.

EnemyOrbMerge

This mod is a host-only mod that merges touching enemy drop orbs into one orb, transfers the combined value to the surviving orb, prioritizes indestructible-effect orbs, and reduces merge-check load with contact-queue processing.

Overview

Enemy drop orbs created from defeated enemies can combine with each other when they touch. The host decides the merge result, updates the surviving orb value, and removes the losing orb over the network. Participants do not need to install the mod to see the merged result.

The latest version changes the merge decision order and performance model. The surviving orb is now selected by indestructible effect first, then player-held state, then higher value. The merge scan is also optimized so normal operation uses queued contact pairs instead of repeatedly checking every tracked orb against every other tracked orb.

Main behavior

  • Targets enemy drop orbs only
  • Ignores normal valuables and unrelated objects
  • Merges touching enemy orbs into one surviving orb
  • Adds the losing orb value into the surviving orb
  • Deletes the losing orb over the network
  • Reapplies vanilla-style invincibility to the surviving orb after a successful merge
  • Suppresses orb-to-orb breakage during contact checks
  • Uses host-authoritative processing

Priority rules

The surviving orb is selected with the following order.

  1. An orb currently affected by an indestructible orb or indestructible drone survives
  2. If only one orb is being held by a player, the held orb survives
  3. If both have the same priority state, the higher value orb survives
  4. If the values are equal, the lower internal sort token survives

This means an indestructible-protected orb is kept even if the other orb is being held or has a higher value.

Performance improvements

The original merge scan checked tracked orbs as broad pair candidates. This version keeps the same merge behavior while reducing unnecessary work.

Contact queue processing

Orb-to-orb collision callbacks enqueue only the touching pair. The merge loop then processes queued pairs up to a configured limit per tick. This avoids expensive full-pair checks during normal contact-heavy situations.

Low-frequency fallback scan

A fallback all-pair scan is still available for rare cases where Unity collision callbacks do not enqueue a pair. This fallback is slower, but it runs at a lower configurable frequency.

Indestructible target cache

Indestructible orb and indestructible drone targets are cached for a short interval. This avoids repeated scene-wide searches during every priority comparison.

Limit rules

Two independent limit systems are included.

Value cap

If MaxOrbValue is set to 0, value is unlimited. If it is set to 1 or higher, that number becomes the maximum allowed value for a merged orb.

A merge is rejected when either condition is true.

  • One of the touching orbs is already at or above the configured cap
  • The merged result would exceed the configured cap

When this happens, the orbs do not merge. Both orbs only receive invincibility again so they do not immediately break from the attempted impact. No merge-success effect is played in this case.

Merge-count cap

If MaxOrbMergeCount is set to 0, merge count is unlimited. If it is set to 1 or higher, an orb lineage that has already reached that many successful merges can no longer merge again.

Merge count starts at 0 on a fresh orb. After a successful merge, the resulting orb stores max(left lineage, right lineage) + 1. This prevents bypassing the cap by forcing survival onto a lower-count orb.

When the merge-count cap blocks a merge, both orbs only receive invincibility again and no success effect is played.

Visual behavior

Merge success effect

A built-in network-visible impact effect can be played at the merge position. This is a success-only effect. If a merge is rejected by a cap, this effect is not played.

Invincibility electricity effect

A built-in electricity visual based on the game's death-pit save effect can be replayed while post-merge invincibility is active. This visual can be disabled independently.

Installation

  1. Install BepInEx 5 for REPO
  2. Place the DLL into the BepInEx/plugins folder
  3. Start the game once to generate the config file
  4. Edit the config file if needed
  5. Only the host needs to install this mod

Configuration

[General] MergeCheckInterval

  • Type: float
  • Default: 0.05
  • Minimum: 0.01
  • Maximum: 1.00
  • Description: Controls how often queued orb contact pairs are processed.

Lower values react faster. Higher values reduce merge processing frequency.

[General] MergeArmDelay

  • Type: float
  • Default: 0.20
  • Minimum: 0.00
  • Maximum: 10.00
  • Description: Controls how long a newly spawned enemy orb waits before it can merge.

Use a low value for aggressive instant merging. Use a higher value if fresh drops should settle before merging.

[General] ReMergeCooldown

  • Type: float
  • Default: 0.05
  • Minimum: 0.00
  • Maximum: 10.00
  • Description: Controls how long a surviving orb waits before it can merge again.

Low values allow faster chain merges. Higher values slow repeated merges.

[General] ContactSkin

  • Type: float
  • Default: 0.02
  • Minimum: 0.001
  • Maximum: 0.50
  • Description: Extra contact distance used by the fallback all-pair scan.

The normal queued contact path uses Unity collision callbacks. This value mainly affects fallback matching.

[General] MaxOrbValue

  • Type: int
  • Default: 0
  • Minimum: 0
  • Maximum: 1000000
  • Description: Sets the maximum allowed value for a merged orb.

0 means unlimited. If the cap would be exceeded, the merge is cancelled and both orbs only receive invincibility.

[General] MaxOrbMergeCount

  • Type: int
  • Default: 0
  • Minimum: 0
  • Maximum: 1000
  • Description: Sets the maximum number of successful merges allowed for each orb lineage.

0 means unlimited. If the cap would be exceeded, the merge is cancelled and both orbs only receive invincibility.

[Performance] MaxQueuedPairsPerTick

  • Type: int
  • Default: 8
  • Minimum: 1
  • Maximum: 64
  • Description: Maximum queued contact pairs processed per tick.

Raise this if many orb piles should merge faster. Lower this if you want to reduce per-frame processing spikes.

[Performance] EnableFallbackPairScan

  • Type: bool
  • Default: true
  • Minimum: false
  • Maximum: true
  • Description: Enables a low-frequency all-pair fallback scan.

Keep this enabled if some touching orbs rarely fail to enqueue contact pairs. Disable it for maximum performance if the contact queue is enough.

[Performance] FallbackPairScanInterval

  • Type: float
  • Default: 0.50
  • Minimum: 0.10
  • Maximum: 5.00
  • Description: Controls how often the fallback all-pair scan runs.

Lower values are more responsive but heavier. Higher values are lighter but fallback merges may be delayed.

[Performance] IndestructibleTargetCacheInterval

  • Type: float
  • Default: 0.15
  • Minimum: 0.05
  • Maximum: 2.00
  • Description: Controls how often indestructible orb/drone target caches are refreshed.

Lower values update priority detection faster. Higher values reduce scene lookup frequency.

[Debug] DebugLog

  • Type: bool
  • Default: false
  • Minimum: false
  • Maximum: true
  • Description: Enables extra debug logging.

Leave this disabled for normal play. Enable it only when verifying merge behavior.

[Effect] PlayNetworkMergeEffect

  • Type: bool
  • Default: true
  • Minimum: false
  • Maximum: true
  • Description: Controls whether a built-in network-visible impact effect plays when a merge succeeds.

This effect is not played when a merge is blocked by a cap.

[Effect] PlayInvincibilityElectricityEffect

  • Type: bool
  • Default: true
  • Minimum: false
  • Maximum: true
  • Description: Controls whether the built-in electricity visual is replayed while post-merge invincibility is active.

Disable it if you want cleaner visuals.

Notes

  • This mod targets enemy drop orbs only
  • Cap-blocked merge attempts do not count as successful merges
  • Cap-blocked merge attempts do not play success visuals
  • Successful merges reapply vanilla-style invincibility to the surviving orb
  • The host should configure the mod before serious multiplayer testing
  • This version is optimized for large orb piles compared with older all-pair scanning behavior

Compatibility

This mod is intended for REPO with BepInEx 5. Because the merge decision is host-authoritative, it is best used as a host-side gameplay mod.

※Mod created by AI


COSMETICS UPDATE V0.4.0対応済み.

EnemyOrbMerge

REPOが好きな日本人のための日本人のみのREPOのDiscordサーバーあります! 参加は以下のリンクから! https://discord.gg/h5ATY4m5bZ

このMODは、ホスト専用の、敵ドロップオーブ同士が接触した時に1つへ合体し、残ったオーブへ合計金額を引き継ぎ、不滅効果付きオーブを優先しつつ、接触キュー処理で負荷を軽減するMODです。

概要

敵を倒した時に出るオーブ同士が接触すると、1つのオーブにまとまります。 マージ結果、金額更新、敗者オーブ削除はホスト側で決定されます。 参加者はMOD未導入でもマージ結果を確認できます。

最新版では、残るオーブの優先順位と処理負荷が改善されています。 残るオーブは、不滅効果付き、プレイヤー保持中、高額の順で決定されます。 通常処理は全ペア走査ではなく、接触したペアだけをキュー処理する方式です。

主な挙動

  • 対象は敵ドロップオーブのみ
  • 通常の貴重品や無関係なオブジェクトは対象外
  • 敵オーブ同士が触れると1つへマージ可能
  • 残るオーブに合計金額を反映
  • 消えるオーブはネットワーク経由で削除
  • 成功マージ後、残るオーブへバニラ相当の無敵時間を再付与
  • オーブ同士の接触破損を抑制
  • ホスト主導で処理

優先ルール

残るオーブは次の順で決まります。

  1. 不滅オーブまたは不滅ドローンの効果対象になっているオーブが残る
  2. 片方だけプレイヤーが持っている場合は、持っている方が残る
  3. 同じ優先状態の場合は、金額が高い方が残る
  4. 金額が同じ場合は、内部ソート値が小さい方が残る

つまり、不滅効果付きオーブは、相手が保持中または高額でも優先して残ります。

軽量化内容

旧版は追跡中オーブ同士を広くペア判定していました。 今回の版では機能を維持したまま、不要な判定を減らしています。

接触キュー処理

オーブ同士の衝突イベントで、接触したペアだけをキューへ登録します。 マージ処理はキューに入ったペアだけを、1Tickの上限数まで処理します。 通常時の全ペア判定を避けるため、大量のオーブがある場面でも負荷が下がります。

低頻度フォールバック判定

Unity側の衝突イベントが入らない稀な状況向けに、全ペア補助判定も残しています。 ただし、通常より低頻度で動作します。

不滅効果対象キャッシュ

不滅オーブと不滅ドローンの対象判定は、短い間隔でキャッシュ更新します。 これにより、優先順位比較ごとのシーン全体検索を避けています。

上限ルール

このMODには2種類の上限があります。

金額上限

MaxOrbValue0 にすると無制限です。 1 以上にすると、その値がマージ後オーブの最大金額になります。

次のどちらかに当てはまるとマージは拒否されます。

  • 接触したどちらかのオーブが、すでに上限以上である
  • 今回マージした結果が上限を超える

この場合はマージされません。 代わりに両方のオーブへ無敵だけ再付与され、ぶつけた衝撃でそのまま壊れにくくなります。 この失敗時にはマージ成功演出は再生されません。

マージ回数上限

MaxOrbMergeCount0 にすると無制限です。 1 以上にすると、その回数に達したオーブ系統はそれ以上マージできなくなります。

マージ回数は新規オーブで 0 から始まります。 成功マージ後の結果オーブには max(左系統, 右系統) + 1 が保存されます。 これにより、低回数側へ逃がす抜け道を防いでいます。

マージ回数上限で拒否された場合も、両方に無敵だけ再付与され、成功演出は再生されません。

演出挙動

マージ成功エフェクト

マージ成功時だけ、マージ地点に既存のネットワーク可視エフェクトを再生できます。 これは成功時専用の演出です。 上限によってマージが拒否された場合は再生されません。

無敵ビリビリエフェクト

成功マージ後の無敵中に、ゲーム内の穴落下救済で使われる既存のビリビリ演出を再生できます。 この演出は個別にオフにできます。

導入方法

  1. REPO に BepInEx 5 を導入
  2. DLL を BepInEx/plugins に配置
  3. 1回ゲームを起動して Config を生成
  4. 必要に応じて Config を編集
  5. このMODはホストだけ導入すれば動作

設定項目

[General] MergeCheckInterval

  • 型: float
  • 初期値: 0.05
  • 最小値: 0.01
  • 最大値: 1.00
  • 内容: キュー登録された接触ペアを処理する間隔

小さい値ほど反応が早くなります。 大きい値ほどマージ処理頻度が下がります。

[General] MergeArmDelay

  • 型: float
  • 初期値: 0.20
  • 最小値: 0.00
  • 最大値: 10.00
  • 内容: 新しく生成された敵オーブがマージ可能になるまでの待機時間

生成直後からすぐ吸わせたいなら低めにします。 ドロップが少し落ち着いてからマージさせたいなら高めにします。

[General] ReMergeCooldown

  • 型: float
  • 初期値: 0.05
  • 最小値: 0.00
  • 最大値: 10.00
  • 内容: 一度マージに成功したオーブが次のマージを再開できるまでの待機時間

低い値ほど連鎖マージが早くなります。 高い値ほど連続マージが遅くなります。

[General] ContactSkin

  • 型: float
  • 初期値: 0.02
  • 最小値: 0.001
  • 最大値: 0.50
  • 内容: フォールバック全ペア判定で使う接触余裕距離

通常の接触キュー処理はUnityの衝突イベントを使います。 この値は主にフォールバック判定に影響します。

[General] MaxOrbValue

  • 型: int
  • 初期値: 0
  • 最小値: 0
  • 最大値: 1000000
  • 内容: マージ後オーブの金額上限

0 は無制限です。 上限を超える場合、マージは中止され、両方のオーブへ無敵だけ再付与されます。

[General] MaxOrbMergeCount

  • 型: int
  • 初期値: 0
  • 最小値: 0
  • 最大値: 1000
  • 内容: 各オーブ系統が成功できるマージ回数の上限

0 は無制限です。 上限を超える場合、マージは中止され、両方のオーブへ無敵だけ再付与されます。

[Performance] MaxQueuedPairsPerTick

  • 型: int
  • 初期値: 8
  • 最小値: 1
  • 最大値: 64
  • 内容: 1Tickで処理する接触ペア数上限

大量のオーブを早くマージさせたい場合は上げます。 1フレームの処理負荷を下げたい場合は下げます。

[Performance] EnableFallbackPairScan

  • 型: bool
  • 初期値: true
  • 最小値: false
  • 最大値: true
  • 内容: 低頻度の全ペア補助判定を有効化

稀に接触キューに入らないオーブがある場合は有効にします。 最大限軽量化したい場合は無効化できます。

[Performance] FallbackPairScanInterval

  • 型: float
  • 初期値: 0.50
  • 最小値: 0.10
  • 最大値: 5.00
  • 内容: フォールバック全ペア判定の間隔

小さい値ほど補助判定の反応が早くなりますが重くなります。 大きい値ほど軽くなりますが、補助判定によるマージが遅くなります。

[Performance] IndestructibleTargetCacheInterval

  • 型: float
  • 初期値: 0.15
  • 最小値: 0.05
  • 最大値: 2.00
  • 内容: 不滅オーブ/ドローン対象キャッシュの更新間隔

小さい値ほど優先順位判定の反映が早くなります。 大きい値ほどシーン検索頻度が下がります。

[Debug] DebugLog

  • 型: bool
  • 初期値: false
  • 最小値: false
  • 最大値: true
  • 内容: デバッグログ出力

通常プレイでは無効のままにしてください。 挙動確認時のみ有効化してください。

[Effect] PlayNetworkMergeEffect

  • 型: bool
  • 初期値: true
  • 最小値: false
  • 最大値: true
  • 内容: マージ成功時に既存のネットワーク可視衝突エフェクトを再生するかどうか

上限でマージが拒否された場合は再生されません。

[Effect] PlayInvincibilityElectricityEffect

  • 型: bool
  • 初期値: true
  • 最小値: false
  • 最大値: true
  • 内容: 成功マージ後の無敵中に既存のビリビリ演出を再生するかどうか

余計な演出を減らしたい場合は無効化できます。

注意点

  • 対象は敵ドロップオーブのみ
  • 上限で弾かれた試行は成功マージ回数に数えません
  • 上限で弾かれた時は成功演出を出しません
  • 成功マージ時のみ、残る側へバニラ相当の無敵を再付与します
  • マルチで使う前に、ホスト側で設定を固めておくのがおすすめです
  • 旧版の全ペア走査方式より、大量オーブ場面で軽量化されています

互換性

このMODは REPO + BepInEx 5 向けです。 マージ判定はホスト主導なので、ホスト側ゲームプレイ改造MODとして使う想定です。

※AI生成MOD

CHANGELOG

Changelog

[4.0.0] - Update

Added

  • REPO v0.4.0 compatibility
  • Indestructible-priority survivor selection
    • Indestructible orb targets are prioritized
    • Indestructible drone targets are prioritized
  • Contact-queue merge processing
  • Performance configuration entries
    • MaxQueuedPairsPerTick
    • EnableFallbackPairScan
    • FallbackPairScanInterval
    • IndestructibleTargetCacheInterval

Changed

  • Survivor priority is now indestructible-effect orb, held orb, then higher value
  • Normal merge checks now process queued contact pairs instead of relying on frequent all-pair scans
  • Fallback all-pair scans now run at a lower configurable frequency
  • Indestructible target lookup now uses a short cache interval instead of repeated lookup per comparison

Fixed

  • Reduced lag when many enemy orbs touch each other
  • Prevented unnecessary repeated scene searches during indestructible priority checks
  • Improved 0.4.0 value update compatibility with ValuableObject
  • Removed losing orbs from haul tracking before network destruction

[1.0.1] - Previous Release

  • Enemy death orbs merge when touching each other
  • Held orb is prioritized when only one orb is being held
  • Higher value orb is kept in normal merges
  • Value cap and merge-count cap added
  • Failed merges caused by caps grant invincibility only and do not play success effects
  • Merge success can play a network-visible effect
  • Merged orb can replay invincibility electricity visuals
  • Orb-to-orb breakage is prevented during contact checks