EnemySpawnRange
【Host Only MOD】Adjust enemy spawn distance range from players. プレイヤーからの敵スポーン距離範囲を調整
By REPO_JP
| Last updated | 33 minutes ago |
| Total downloads | 210 |
| Total rating | 3 |
| Categories | Mods Monsters Server-side |
| Dependency string | REPO_JP-EnemySpawnRange-1.0.1 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
EnemySpawnRange
EnemySpawnRange is a host-only mod that changes how close or far enemies are allowed to spawn from players.
By default, this mod changes the enemy spawn distance band to:
- Minimum: 5
- Maximum: 15
Vanilla REPO uses:
- Minimum: 18
- Maximum: 35
This means enemies will try to spawn from valid level points that are between 5 and 15 units away from players, instead of the vanilla range of 18 to 35.
This mod does not force enemies to appear directly inside players or always directly in front of them. The game still uses valid internal level points for enemy placement.
Features
- Change the minimum enemy spawn distance from players
- Change the maximum enemy spawn distance from players
- Apply one shared distance range to all enemies
- Optional fallback to vanilla spawn behavior if the custom range fails
- Optional compatibility with the game's debug close-spawn behavior
- Host-only logic so only the host needs to install the mod
How it works
The game normally uses a shared enemy spawn function to select valid spawn points within a hardcoded distance range from players.
Vanilla values:
- Minimum: 18
- Maximum: 35
This mod patches that shared spawn function and replaces the distance range with your configured values.
The mod then:
- Reads the configured minimum and maximum distance
- Searches for a valid level point within that range
- Checks whether the spawn point is blocked
- Spawns the enemy there if valid
- Optionally retries with the vanilla range if the custom range fails
Important behavior
- This mod changes the allowed distance range for enemy spawn candidate points
- This mod does not guarantee line-of-sight spawns
- This mod does not guarantee face-to-face spawns
- This mod does not place enemies directly on top of player positions
- Very small ranges can reduce the number of valid spawn points and may cause more spawn failures
Vanilla and default mod settings
Vanilla REPO:
- MinSpawnDistance = 18
- MaxSpawnDistance = 35
EnemySpawnRange default:
- ModEnabled = true
- MinSpawnDistance = 5
- MaxSpawnDistance = 15
- RespectDebugSpawnClose = true
- FallbackToVanillaOnFailure = true
- LogEnabled = false
Configuration
ModEnabled
Enables or disables the mod.
Default:
- true
MinSpawnDistance
Minimum allowed distance from players for enemy spawn points.
Vanilla:
- 18
Default:
- 5
Minimum:
- 0
Maximum:
- 999
MaxSpawnDistance
Maximum allowed distance from players for enemy spawn points.
Vanilla:
- 35
Default:
- 15
Minimum:
- 0
Maximum:
- 999
RespectDebugSpawnClose
If enabled, the mod respects the game's debug close-spawn mode and temporarily uses the game's debug spawn range instead of the configured range.
Default:
- true
FallbackToVanillaOnFailure
If enabled, the mod retries with the vanilla distance range if the custom range fails to find a valid spawn.
Vanilla fallback range:
- Min = 18
- Max = 35
Default:
- true
LogEnabled
Enables extra debug log output.
Default:
- false
Installation
- Install BepInEx 5 for REPO
- Place the mod DLL into your BepInEx plugins folder
- Start the game once to generate the config file
- Edit the config file if needed
- Launch the game as host
Host-only behavior
This is a host-only mod.
Only the host needs to install it. Clients do not need this mod for the enemy spawn distance changes to take effect.
Notes for players
Lower values make enemies much more likely to appear near players. Higher values make enemies appear farther away on average.
Example:
- 0 to 8 = very aggressive close spawning
- 5 to 15 = close-range pressure
- 18 to 35 = vanilla
- 30 to 60 = farther and less immediate pressure
Notes for modders
This mod patches:
- SemiFunc.EnemySpawn
The mod uses the game's existing level point search and collision validation flow instead of creating a completely custom spawn system.
This keeps the behavior closer to the original game while still allowing distance-range customization.
The implementation also includes:
- Reflection-based access for internal state compatibility
- Optional fallback to vanilla distance behavior
- Safety handling for failed spawn attempts
Compatibility
This mod is most compatible with mods that do not replace the enemy spawn pipeline.
Mods that also patch SemiFunc.EnemySpawn may conflict depending on patch order and implementation.
Recommended use cases
- Horror-focused runs
- More aggressive close-pressure gameplay
- Custom challenge runs
- Testing how different enemy distances affect pacing
- Host-controlled difficulty tuning
EnemySpawnRange
EnemySpawnRange は、敵がプレイヤーからどのくらい近い距離または遠い距離にスポーンできるかを変更するホストオンリーMODです。
このMODの初期設定では、敵スポーン距離帯を以下に変更します。
- 最小距離: 5
- 最大距離: 15
REPO バニラ値は以下です。
- 最小距離: 18
- 最大距離: 35
つまり、このMODではバニラの 18 から 35 の範囲ではなく、5 から 15 の範囲にある有効なレベルポイントを優先して敵がスポーンするようになります。
ただし、このMODは敵を必ずプレイヤーの目の前や体の中に出現させるものではありません。 ゲーム内部の有効なレベルポイントを使ってスポーン位置が決まる仕様はそのままです。
機能
- プレイヤーからの敵スポーン最小距離を変更
- プレイヤーからの敵スポーン最大距離を変更
- 全敵共通でひとつの距離帯を適用
- カスタム距離で失敗した場合にバニラ距離で再試行可能
- ゲーム本体の debug close spawn と互換設定あり
- ホストのみ導入で動作
動作概要
ゲーム本体では、敵スポーン時に共通の敵スポーン処理が使用されており、プレイヤーから一定距離内の有効なスポーン候補点が選ばれます。
バニラ値:
- 最小距離: 18
- 最大距離: 35
このMODはその共通処理をパッチし、固定の距離設定を Config の値に置き換えます。
処理の流れは以下です。
- Config の最小距離と最大距離を取得
- その距離帯にある有効なレベルポイントを検索
- その地点が衝突していないか確認
- 有効ならその地点にスポーン
- 必要に応じてバニラ距離で再試行
重要な仕様
- このMODは敵スポーン候補点の距離範囲を変更するMODです
- 視線内スポーンを保証するものではありません
- 真正面スポーンを保証するものではありません
- プレイヤー座標そのものに敵を配置するものではありません
- 距離帯を狭くしすぎると有効候補点が減り、スポーン失敗が増える可能性があります
バニラ値と初期設定
REPO バニラ:
- MinSpawnDistance = 18
- MaxSpawnDistance = 35
EnemySpawnRange 初期設定:
- ModEnabled = true
- MinSpawnDistance = 5
- MaxSpawnDistance = 15
- RespectDebugSpawnClose = true
- FallbackToVanillaOnFailure = true
- LogEnabled = false
設定項目
ModEnabled
MOD の有効無効
初期値:
- true
MinSpawnDistance
敵スポーン候補点として許可するプレイヤーからの最小距離
バニラ値:
- 18
初期値:
- 5
設定可能最小値:
- 0
設定可能最大値:
- 999
MaxSpawnDistance
敵スポーン候補点として許可するプレイヤーからの最大距離
バニラ値:
- 35
初期値:
- 15
設定可能最小値:
- 0
設定可能最大値:
- 999
RespectDebugSpawnClose
有効時、ゲーム本体の debug close spawn が有効なら Config の距離よりそちらを優先
初期値:
- true
FallbackToVanillaOnFailure
有効時、カスタム距離でスポーン候補が見つからないか失敗した場合に、バニラ距離で再試行
バニラ再試行距離:
- Min = 18
- Max = 35
初期値:
- true
LogEnabled
詳細ログ出力の有効無効
初期値:
- false
導入方法
- REPO 用の BepInEx 5 を導入
- MOD の DLL を BepInEx の plugins フォルダへ配置
- 一度ゲームを起動して Config を生成
- 必要に応じて Config を編集
- ホストとしてゲームを起動
ホストオンリー仕様
このMODはホストオンリーです。
ホストのみ導入すれば動作します。 参加者側は導入不要です。
プレイヤー向け補足
距離を小さくすると、敵がプレイヤーの近くに出やすくなります。 距離を大きくすると、敵は平均的に遠めに出やすくなります。
例:
- 0 から 8 = かなり近距離寄りで圧が強い
- 5 から 15 = 近距離寄りで緊張感が高い
- 18 から 35 = バニラ
- 30 から 60 = 遠距離寄りで即圧が弱い
MOD制作者向け補足
このMODの主なパッチ対象:
- SemiFunc.EnemySpawn
このMODは完全独自のスポーンシステムを作るのではなく、ゲーム本体のレベルポイント探索と衝突確認の流れを利用しています。
そのため、元のゲーム挙動に近いまま距離帯だけを変更できます。
内部的には以下も含みます。
- internal 状態に対する Reflection アクセス
- バニラ距離フォールバック
- スポーン失敗時の安全処理
互換性
敵スポーン処理を置き換える他MODとは競合する可能性があります。
特に SemiFunc.EnemySpawn を同時にパッチするMODとは、パッチ順や実装次第で競合します。
おすすめ用途
- ホラー寄りのラン
- 近距離圧を強めるチャレンジ
- カスタム難易度調整
- 敵スポーン距離によるゲームテンポ検証
- ホスト主導の難易度調整