EnemySpawnRange
【Host Only MOD】Adjust enemy spawn distance range from players.プレイヤーからの敵スポーン距離範囲を調整
模組介紹 作者原文
EnemySpawnRange
COMPATIBLE WITH COSMETICS UPDATE V0.4.0.
This mod is a host-only mod that changes the enemy spawn distance range from players.
By default, enemies try to spawn at valid level points between 5 and 15 units away from players instead of the vanilla 18 to 35 range.
It does not force enemies to spawn directly on top of players, inside players, or always in line of sight.
The game still uses valid internal level points and collision checks.
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
- Use vanilla fallback when the custom range fails
- Respect the game's debug close-spawn behavior when enabled
- Skip custom spawn control in arena levels by default
- Skip custom spawn control in shop levels by default
- Run only after level generation is complete by default
- Host-only operation
How it works
The mod patches the shared enemy spawn function:
- SemiFunc.EnemySpawn
When an enemy is spawned, the mod reads the configured minimum and maximum distance, searches for a valid level point in that range, checks whether the point is blocked, and teleports the enemy there if the point is valid.
If no valid custom point is found, the mod can retry with the vanilla distance range of 18 to 35.
For REPO v0.4.0, the mod also avoids running before level generation has completed.
This prevents the mod from affecting menu, lobby, region selection, shop, or arena timing.
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 at player coordinates
- Very small ranges can reduce valid spawn points and may increase fallback usage
- If fallback is disabled and the range is too narrow, some enemy spawns may fail more often
Vanilla and default settings
Vanilla REPO:
- MinSpawnDistance = 18
- MaxSpawnDistance = 35
EnemySpawnRange default:
- ModEnabled = true
- MinSpawnDistance = 5
- MaxSpawnDistance = 15
- RespectDebugSpawnClose = true
- FallbackToVanillaOnFailure = true
- ExcludeArena = true
- ExcludeShop = true
- RequireLevelGenerated = true
- LogEnabled = false
Configuration
ModEnabled
Enables or disables the mod.
- Default: true
- Minimum: false
- Maximum: true
MinSpawnDistance
Minimum allowed distance from players for enemy spawn points.
- Default: 5
- Minimum: 0
- Maximum: 999
MaxSpawnDistance
Maximum allowed distance from players for enemy spawn points.
- Default: 15
- Minimum: 0
- Maximum: 999
RespectDebugSpawnClose
If enabled, the mod respects the game's debug close-spawn mode and temporarily uses the debug spawn range instead of the configured range.
- Default: true
- Minimum: false
- Maximum: true
FallbackToVanillaOnFailure
If enabled, the mod retries with the vanilla 18 to 35 range when the custom range fails.
- Default: true
- Minimum: false
- Maximum: true
ExcludeArena
If enabled, the mod does not override enemy spawn distance in arena levels.
- Default: true
- Minimum: false
- Maximum: true
ExcludeShop
If enabled, the mod does not override enemy spawn distance in shop levels.
- Default: true
- Minimum: false
- Maximum: true
RequireLevelGenerated
If enabled, the mod only runs after level generation is complete.
- Default: true
- Minimum: false
- Maximum: true
LogEnabled
Enables detailed debug log output.
- Default: false
- Minimum: false
- Maximum: true
Installation
- Install BepInEx 5 for REPO
- Place the mod DLL into the BepInEx plugins folder
- Start the game once to generate the config file
- Edit the config file if needed
- Host a game
Host-only behavior
Only the host needs to install this mod.
Clients do not need to install it for the enemy spawn distance changes to take effect.
Recommended values
- 0 to 8: very aggressive close spawning
- 5 to 15: close-range pressure
- 18 to 35: va
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: