

PerfectExtractionBonus is a host-only mod for R.E.P.O.
This mod grants a money bonus when every valuable that existed at the start of the level is successfully extracted before the level is cleared.
It also supports an extra no-loss bonus when every tracked starting valuable is extracted without any value loss at any point during the level.
In v1.2.0, the mod can now also send a public forced chat announcement to all players after the final extraction result is confirmed. A regular perfect extraction and a no-loss perfect extraction can each use their own separate configurable chat message.
This mod has three main reward layers.
Regular perfect extraction bonus
If every valuable that existed at level start is extracted, a bonus is granted based on current run currency
Extra no-loss bonus
If every tracked starting valuable is extracted and none of them ever dropped below its original value, an extra bonus is granted on top of the regular one
Public bonus chat announcement
After the final reward result is confirmed, the mod can send a forced public chat message to all players showing the rewarded bonus amount
The regular perfect extraction bonus does not require valuables to remain undamaged. A valuable still counts for the regular bonus even if its value dropped due to damage, as long as that same original object is eventually extracted.
Only valuables that existed at the beginning of the level are tracked. Valuables created later during the level are ignored for both bonus conditions.
〇〇k$ placeholder replacement with the actual bonus amount in chat messagesThe mod waits until level generation is complete, then takes a snapshot of all valuables that currently exist in the level.
Each of those valuables is tracked by object identity. When a valuable is successfully destroyed by extraction processing, that original object is marked as delivered.
At the same time, the mod also records each tracked valuable's original value. During the level, if any tracked starting valuable ever drops below that original value, the extra no-loss bonus condition is permanently disabled for that level.
At level completion, the mod checks whether every valuable from the initial snapshot was delivered.
If yes:
If no:
The v1.2.0 public chat feature is designed for visibility to the whole lobby.
When a regular perfect extraction succeeds, the mod sends the configured regular perfect bonus message to public chat.
When a no-loss perfect extraction succeeds, the mod sends the configured no-loss perfect bonus message to public chat instead.
Both chat message templates support the text token:
〇〇k$
That token is automatically replaced with the actual granted total bonus amount before the chat message is sent.
Example:
Config text:
Perfect Extraction Bonus 〇〇k$
Possible actual chat output:
Perfect Extraction Bonus 2500k$
Config text:
Wow!!! Super No-loss Perfect Extraction Bonus 〇〇k$
Possible actual chat output:
Wow!!! Super No-loss Perfect Extraction Bonus 2500k$
The replacement is automatic.
You only need to include 〇〇k$ anywhere in the message template where you want the dynamic amount to appear.
This mod checks the valuables that existed at the start of the level, not every valuable that may ever exist later.
For the regular perfect extraction bonus, a valuable is still considered valid even if:
It only needs to be successfully extracted as the same tracked object.
For the extra no-loss bonus, every tracked starting valuable must stay at or above its original value for the entire level. If even one tracked starting valuable drops below its original value once, the extra no-loss bonus is lost for that level.
A valuable does not count if:
Only the host needs to install this mod.
The host performs all tracking, eligibility checks, streak handling, currency bonus logic, and public chat sending. Clients do not need the mod for the effect to work.
Base regular formula:
regular bonus = current currency × regular bonus percent
Extra no-loss formula:
no-loss extra bonus = current currency × no-loss extra bonus percent
Total granted bonus:
total bonus = regular bonus + no-loss extra bonus
The default regular behavior is:
This happens because streak bonus is enabled by default.
With the default extra no-loss bonus setting:
Example with defaults:
Detailed bonus logs are enabled by default.
When logging is enabled, the mod outputs:
Perfect Extraction Bonus 〇〇k$Wow!!! Super No-loss Perfect Extraction Bonus 〇〇k$This mod tracks the initial valuables by object identity, using PhotonView IDs when available and falling back to Unity instance IDs otherwise.
Extraction completion is tracked by patching extraction destruction methods and recording which tracked valuables were actually consumed by extraction.
The extra no-loss bonus tracks each starting valuable's original value and continuously checks whether any tracked starting valuable falls below that value during the level.
Level completion is processed only once per level to avoid duplicate streak resets or duplicate bonus grants.
Bonus percentage configs are integer values only. All percentage configs are limited to a range of 0 to 100.
Public bonus chat is sent after the reward result is finalized and uses the configured chat template with automatic 〇〇k$ replacement.
If you used an older config file from a previous version that stored percentage values as floats, you may need to delete and regenerate the config file after updating.
This mod should work well with mods that:
Potential incompatibility can happen with mods that:
PerfectExtractionBonus は R.E.P.O. 向けのホストオンリーMODです
このMODは、レベル開始時点で存在していた全ての貴重品を納品してからクリアした場合に、現在の所持金に応じたボーナスを付与します
さらに、追跡対象の初期貴重品すべてをレベル中に一度も減額させずに納品した場合は、通常ボーナスに加えて無減額追加ボーナスも付与します
そして v1.2.0 では、最終的な納品結果確定後に、全プレイヤーへ公開強制チャットを送る機能も追加されています
通常のパーフェクト納品と、無減額パーフェクト納品で、それぞれ別のチャット文言を Config から設定できます
このMODの報酬要素は大きく3段階です
通常の完全納品ボーナス
レベル開始時点の全貴重品を納品すると、現在所持金に応じたボーナスを付与します
無減額追加ボーナス
追跡対象の初期貴重品すべてを納品し、かつレベル中に一度も初期価値を下回らなかった場合、通常ボーナスに加えて追加ボーナスを付与します
公開ボーナスチャット
最終的な報酬結果が確定した後、そのボーナス額を含む公開強制チャットを全プレイヤーへ送信します
通常の完全納品ボーナスについては、貴重品が無傷である必要はありません
傷が付いて価値が下がっていても、その同じ元の個体が最終的に納品されれば達成扱いです
追跡対象はレベル開始時点で存在していた貴重品だけです
レベル途中で新たに出現した貴重品は、どちらのボーナス条件にも含みません
〇〇k$ を実際のボーナス額へ自動置換レベル生成完了後、少し待ってから、その時点で存在する全ての貴重品を初期スナップショットとして確定します
その後は、その初期個体だけをオブジェクト単位で追跡します
納品処理で実際に消費されたとき、その元の個体を納品済みとして記録します
同時に、各初期貴重品の初期価値も記録します
そしてレベル中に、追跡対象の初期貴重品のどれか1つでもその初期価値を下回った場合、そのレベルでは無減額追加ボーナス条件を永久に失います
レベルクリア時に、初期スナップショット内の全貴重品が納品済みかどうかを判定します
達成時
未達成時
v1.2.0 で追加された公開チャット機能は、ロビー全体にボーナス結果を見せるための機能です
通常のパーフェクト納品成功時は、通常用の公開チャット文言を送信します
無減額パーフェクト納品成功時は、無減額用の公開チャット文言を送信します
どちらの文言テンプレートでも、以下の文字列を使えます
〇〇k$
この部分は、実際に付与された最終ボーナス額へ自動置換されたうえでチャット送信されます
例
Config 文言
Perfect Extraction Bonus 〇〇k$
実際のチャット例
Perfect Extraction Bonus 2500k$
Config 文言
Wow!!! Super No-loss Perfect Extraction Bonus 〇〇k$
実際のチャット例
Wow!!! Super No-loss Perfect Extraction Bonus 2500k$
置換は自動です
金額を表示したい位置に 〇〇k$ を書いておくだけで使えます
このMODが見ているのは、レベル開始時点に存在していた貴重品です
その後に追加で出現した貴重品は対象外です
通常の完全納品ボーナスについては、以下でも達成扱いです
必要なのは、最初に存在していた同じ個体が最終的に納品されることです
追加の無減額ボーナスについては、追跡対象の初期貴重品すべてがレベル中ずっと初期価値以上を維持している必要があります
どれか1つでも一度でも初期価値を下回った時点で、そのレベルの追加ボーナスは失われます
以下は未達成扱いです
このMODはホストだけ導入すれば動作します
追跡処理、条件判定、連続回数処理、所持金ボーナス処理、公開チャット送信はすべてホスト側で行われます
参加者側は未導入でも効果自体は動作します
通常ボーナス基本式
通常ボーナス = 現在所持金 × 通常ボーナス率
無減額追加ボーナス式
無減額追加ボーナス = 現在所持金 × 無減額追加ボーナス率
最終付与ボーナス
最終付与ボーナス = 通常ボーナス + 無減額追加ボーナス
デフォルト設定の通常ボーナスでは
となります
これは連続ボーナスがデフォルトで有効だからです
さらにデフォルト設定の無減額追加ボーナスは
です
デフォルト値での例
詳細ボーナスログはデフォルトで有効です
ログ有効時は以下を出力します
Perfect Extraction Bonus 〇〇k$Wow!!! Super No-loss Perfect Extraction Bonus 〇〇k$このMODは、初期貴重品をオブジェクト単位で追跡します
PhotonView ID が使える場合はそれを優先し、使えない場合は Unity の Instance ID を使います
納品達成は、納品処理で実際に消費された貴重品だけを extraction patch から記録して判定しています
無減額追加ボーナスは、各初期貴重品の初期価値を記録し、レベル中にその値を下回ったかどうかを継続監視して判定しています
レベル結果処理は1レベル1回だけ通すようにしており、二重ボーナスや二重リセットを防いでいます
ボーナス率系Configはすべて整数値です
すべてのパーセンテージConfigは 0 から 100 の範囲に制限されています
公開ボーナスチャットは報酬結果確定後に送信され、設定された文言テンプレート内の 〇〇k$ は自動で実際のボーナス額へ置換されます
旧バージョンの cfg に小数型のパーセンテージ設定が残っている場合は、更新後に cfg を削除して再生成が必要になることがあります
以下のようなMODとは相性が良いです
以下のようなMODとは競合可能性があります