
SpawnConfig
Configure enemy spawning with custom groups, weights and more
Date uploaded | 2 weeks ago |
Version | 1.1.0 |
Download link | Index154-SpawnConfig-1.1.0.zip |
Downloads | 7474 |
Dependency string | Index154-SpawnConfig-1.1.0 |
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
SpawnConfig
This host-only mod allows you to change several things about the enemy spawning behavior in the game. Small warning: Editing the enemy spawning config requires you to have a basic understanding of json file syntax.
Here's a list of what's made possible by the mod:
- You can modify the vanilla enemy groups
- You can modify enemy groups added by other mods
- You can add your own custom enemy groups
- Custom enemies added by other mods can be used in your own groups
- You can configure weights to fine-tune how likely each group is to appear. You can assign different weights to a group for each of the three difficulty tiers that the game selects from, allowing the group to appear in all three tiers if you want
- You can control whether a group should only be able to appear before a certain level or after a certain level
- You can make a group only spawnable if the host player has played more than a certain number of runs
- A group can be set to not allow any other groups to spawn if it happens to be selected. Use this if you crafted something truly devious and grand
- You can add a touch of extra randomness to a group by configuring a chance for it to sometimes be bigger or smaller by a configurable range
- There is a global setting in the mod that lets you disable enemy spawning entirely
Getting started
-
These important files and folders will be generated in your BepInEx config folder after launching the game:
Index154.SpawnConfig.cfg
=> For simple global configs of the mod. Contains descriptions for each available setting. Please take a look at it!- Subfolder
SpawnConfig
:SpawnGroups.json
=> Edit this file to modify the game's enemy groups and add new ones (internally called EnemySetups)SpawnGroups-Explained.json
=> This file has more details about the properties of the json config and how they work. Please check it out to learn more!- There is also a subfolder called
Defaults
which will always have a version ofSpawnGroups.json
with the "default" values inside of it. Default values in this case refers to any groups the game has loaded before this mod is loaded so those from other mods will be found here as well. This file just exists as a reference. It is not meant to be edited
-
Make your edits in the
SpawnConfig\SpawnGroups.json
file. Just follow the example of the existing entries and you'll be fine. Or replace the file with one made by somebody else! After restarting the game the changes should take effect -
Have fun!
Note: By default whenever you launch the game any enemy groups missing from your custom SpawnGroups config will be added back into it. This includes not only vanilla enemy setups but also those from other mods! You can disable this behavior in the global config if you want to. For heavily modified configs it's probably best to turn it off.
Enemy names
You need to know the internal name of an enemy in order to be able to add it to the spawnObjects list of a group in your SpawnGroups config. The names in your config need to be exact matches, otherwise it will not work!
The names of all enemies, including modded ones, should be logged to the console when you start the game. Here's a list of the vanilla enemy names with short descriptions.
Enemy - Head
= Floating Head / HeadmanEnemy - Robe
= Grim reaper guy with white maskEnemy - Hunter
= Huntsman / Blind guy with gunEnemy - Runner
= Reaper / Scarecrow with blade armsEnemy - Beamer
= Clown thing with laserEnemy - Slow Walker
= Trudge / Slow armored guy with maceEnemy - Animal
= Weird flat thing with many legsEnemy - Bowtie
= Fat white beast that blows windEnemy - Floater
= Floating alien guy / MentalistEnemy - Hidden
= Invisible manEnemy - Tumbler
= Frog chefEnemy - Upscream
= Small crawling headEnemy - Valuable Thrower
= Baby / RugratEnemy - Ceiling Eye
= Ceiling Eye / PeeperEnemy - Duck
= DuckEnemy - Slow Mouth
= Spewer / Puking fishEnemy - Thin Man
= Shadow childEnemy - Bang
= Exploding skullEnemy - Gnome
= Gnome
If a group contains an invalid enemy name then you will see a corresponding error in the log when you launch the game. A group containing an invalid enemy name will be ignored entirely by default. You can change a setting in the global config file to make it so all invalid enemies will simply be removed from the group if you prefer. In that case the group will still be able to spawn as long as it contains at least one valid enemy.
If you're well versed with the the game then you may notice that the Gnome Director and Bang Director objects aren't included in the json configs at all. That's because I decided to filter these out automatically. The mod adds them to the groups again at runtime. This is just to make the configuration a little easier for the user.
What else?
- If something doesn't work as expected then take a look at the BepInEx log output. The mod generates a bunch of logs to help with troubleshooting!
- Report issues and request features on GitHub: https://github.com/Index154/REPO_SpawnConfig
- Talk about the mod, find configs made by others or share your own configs and ideas on Discord: https://discord.com/channels/1344557689979670578/1352686279065600093 (in the REPO Modding Server)
Also check out this video for a quick and simplified overview of how enemy spawning works in REPO: https://www.youtube.com/watch?v=Yx-PW4qYEHY What isn't mentioned in this video is that everything works through groups of enemies (EnemySetups). Many of the vanilla groups just happen to be made up of only one singular enemy.
Thank you to chiseledcactus who provided a script that allows you to import, edit and export SpawnGroups.json files through a simple UI! If you're an advanced user who has Python installed then this can make editing the config a bit easier. Just paste this code into a py file and run it to open the UI: https://pastebin.com/22Gpz3Yj
CHANGELOG
1.1.3
- Hotfix for minLevel and maxLevel values getting reset on every game launch after the first one
- Expanded some explanations in the SpawnGroups-Explained.json file that is generated when you launch the game
1.1.2
- Tiny hotfix for random range max being inclusive now
- Removed link to python script from the description due to being outdated
1.1.1
- Fixed inaccurate / confusing levelsCompletedCondition logic. The values in the config now have new names and actually behave as you would expect them to behave (they were previously off-by-one). Your old values should be migrated automatically upon launching the game. They will not be changed. Still, I recommend making a backup of your config to be on the safe side. If some of your groups are intended to behave the same as in vanilla then I also suggest you compare the new min and max level conditions from your config to the ones in the SpawnGroups.json in the "Defaults" folder
- Fixed several incorrect default group weights: The vanilla tier 3 groups with multiple enemies in them (for example "Enemy Group - 4 Ceiling Eyes") are actually much rarer than the "regular" tier 3 single-monster groups in vanilla. I've adjusted the default weights for these groups to 1.5 (previously 100) to reflect the actual vanilla spawn chances. Yes, you read that right, they're about 67 times rarer. If you have an old config file containing these groups with their previous default weights of 100 then these will NOT automatically be adjusted! You have to change the weights manually if you want them to have their vanilla spawn chances! Launch the game once and then check the SpawnGroups.json in the "Defaults" folder for reference
- As a side-effect of the above change the difficulty weights for the groups are now floating point numbers so you can make your weights a bit more precise if you want
1.1.0
- Added new config "Repeat spawn weight multiplier" which reduces the chance of getting the same enemy group multiple times on one level. Default value is 0.5, meaning a group will become half as likely to be selected after having already been selected once
- Added new config "Ignore groups with invalid spawnObjects" - If true, groups containing any invalid enemy objects will be ignored completely and cannot spawn. If false, only the invalid objects will be ignored and the group can still spawn with its remaining enemies. Default value is true (same behavior as before)
- Updated the ThunderStore mod description with some new info
1.0.3
- Fixed alterAmountChance fields not being included in the config file
1.0.2
- Fixed alterAmountMax not being selectable by the randomization, whoops (off-by-one error)
- Prevented NullPointerExceptions for when there is no enemy group available for a difficulty tier at all
- Added Discord links to README
1.0.1
- Fixed description formatting
1.0.0
- First release!