ShopMoneySetter
When the run enters the shop, the mod immediately sets the team's current money to a value chosen from a configured range.
This is designed for people who want quick shop testing, random economy runs, challenge rules, or casual custom sessions without changing other game systems.
Features
- Host-only usage
- Automatically applies when entering the shop
- Configurable minimum money
- Configurable maximum money
- Inclusive random selection between min and max
- If min and max are the same, that exact value is always used
- Minimum allowed config value is 0
- No explicit upper limit in config
- Simple implementation with no extra UI and no complicated runtime behavior
How it works
The mod patches the shop initialization timing and sets the run currency before the shop reads and uses the current money value.
Because run currency synchronization is host authoritative, only the host needs to install the mod for the value to propagate to the session.
Configuration
Configuration file section:
A General
Entries:
-
EnableMod
- Enables or disables the mod
-
MinMoneyK
- Minimum money value in k$
- Lowest possible value is 0
-
MaxMoneyK
- Maximum money value in k$
- Lowest possible value is 0
- No explicit maximum limit
Random selection rules
- A random integer is selected from
MinMoneyK to MaxMoneyK
- The range is inclusive on both ends
- If
MinMoneyK and MaxMoneyK are equal, that value is always selected
- If
MinMoneyK is larger than MaxMoneyK, the mod automatically swaps them internally
Example
If you set:
MinMoneyK = 10
MaxMoneyK = 30
Then each time you enter the shop, your money becomes a random value between 10k$ and 30k$.
If you set:
MinMoneyK = 50
MaxMoneyK = 50
Then each time you enter the shop, your money becomes exactly 50k$.
Notes
- This mod is intended for host-side use
- Clients do not need to install it
- The value is applied when the shop initializes
- This mod sets the current money directly and does not preserve the pre-shop amount
Compatibility
- Game: R.E.P.O.
- Framework: BepInEx 5.4.x
- Engine: Unity 2022.3
- Network model: Photon PUN host-authoritative run stat sync
Installation
- Install BepInEx 5.4.x for R.E.P.O.
- Place the mod DLL into the
BepInEx/plugins folder
- Start the game once to generate the config file
- Edit the config values as needed
- Host a session or play singleplayer
Source behavior summary
- Patch target:
ShopManager.ShopInitialize()
- Currency write path:
SemiFunc.StatSetRunCurrency(...)
- Activation timing: immediately when the shop is entered and initialized
ShopMoneySetter
ショップに入った瞬間、現在所持金を Config で設定した範囲から選ばれた値に即座に変更します。
ショップ検証、ランダム経済プレイ、縛りプレイ、気軽なカスタムセッションを、他のゲームシステムを大きく変えずに行いたい場合に向いています。
特徴
- ホストのみ導入で動作
- ショップ入場時に自動適用
- 所持金の最小値を設定可能
- 所持金の最大値を設定可能
- 最小値から最大値までの両端含みランダム抽選
- 最小値と最大値が同じ場合はその値を必ず使用
- Configの設定可能最小値は0
- Configに明示的な最大上限なし
- 余計なUIや複雑な常時処理なしのシンプル実装
動作概要
このMODはショップ初期化タイミングをパッチし、ショップ側が現在所持金を読み取る前にラン所持金を書き換えます。
所持金同期はホスト権限で行われるため、ホストだけが導入していればセッション全体へ反映されます。
Config
Configファイルのセクション:
A General
項目:
-
EnableMod
-
MinMoneyK
-
MaxMoneyK
- 所持金の最大値 k$
- 設定可能最小値は 0
- 明示的な最大上限なし
ランダム抽選ルール
MinMoneyK から MaxMoneyK の範囲で整数をランダム選択
- 範囲は両端を含みます
MinMoneyK と MaxMoneyK が同値ならその値を100%使用します
MinMoneyK が MaxMoneyK より大きい場合は内部で自動的に入れ替えます
例
以下の設定なら:
MinMoneyK = 10
MaxMoneyK = 30
ショップに入るたび、所持金は 10k$ から 30k$ の間でランダムになります。
以下の設定なら:
MinMoneyK = 50
MaxMoneyK = 50
ショップに入るたび、所持金は必ず 50k$ になります。
注意
- このMODはホスト側導入を想定しています
- 参加者側の導入は不要です
- 値はショップ初期化時に適用されます
- ショップ入場前の所持金を保持するのではなく、現在所持金を直接上書きします
対応環境
- ゲーム: R.E.P.O.
- フレームワーク: BepInEx 5.4.x
- エンジン: Unity 2022.3
- 通信モデル: Photon PUN のホスト権限 RunStat 同期
導入方法
- R.E.P.O. に BepInEx 5.4.x を導入
- MODのDLLを
BepInEx/plugins フォルダへ配置
- ゲームを一度起動してConfigを生成
- 必要な値にConfigを編集
- ホストで部屋を立てるかシングルプレイを開始
ソース上の動作要約
- パッチ対象:
ShopManager.ShopInitialize()
- 所持金設定経路:
SemiFunc.StatSetRunCurrency(...)
- 発動タイミング: ショップ入場直後の初期化時