Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
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.
By Shokuba
| Last updated | 14 hours ago |
| Total downloads | 83 |
| Total rating | 0 |
| Categories | Mods Monsters AI Generated |
| Dependency string | Shokuba-Limited_Spawns_Mod-1.0.0 |
| 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
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.