This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Limited Spawns Mod
Limits the maximum number of times each type of enemy can spawn per round, setting a customizable despawn timer when the limit is reached.Limited Spawns Mod
A lightweight and highly customizable mod that allows you to put a hard cap on how many times specific enemy types can spawn during a round. Perfect for fine-tuning game difficulty and preventing infinite enemy spam.
🚀 Features
- Spawn Capping: Automatically tracks every type of enemy individually and blocks further spawns once they hit your configured limit.
- Despawn Timer Override: Applies a customizable cooldown/timer to blocked spawns so the game logic knows exactly how long to suppress them.
- Round-Based Reset: Enemy counters automatically and cleanly reset at the start of every new round.
- Safe Fallbacks: Includes internal checks to handle unnamed or unique entities gracefully without throwing exceptions.
⚙️ Configuration (.cfg)
Upon running the game for the first time with the mod installed, a configuration file will be generated at BepInEx/config/com.MoyaGz.repo.limitedspawns.cfg.
[General]
- Enable Mod (
true/false): Fully enables or disables the spawn limit functionality.
[Enemy Settings]
- Spawn Limit (Default:
3): The maximum number of times a specific enemy type is allowed to spawn per round. - Despawn Timer (Default:
36000.0): The timer (in seconds) applied to the enemy instance when a spawn attempt is blocked because the limit was reached.
🛠️ Installation
- Ensure you have BepInEx properly installed.
- Download this mod and place the
.dllfile inside yourBepInEx/plugins/directory. - Launch the game to generate the configuration file, tweak your limits, and enjoy!
📝 Developer Notes
- The mod intercepts
EnemyParent.Spawnvia a Harmony Prefix patch. If the specific enemy's counter has reached the maximum allowed value, it manually sets itsDespawnedTimerand cancels the original spawn process cleanly, ensuring zero performance impact.
