You are viewing a potentially older version of this package. View all versions.
Index154-SpawnConfig-1.2.9 icon

SpawnConfig

Configure enemy spawning with custom groups, weights and more

Date uploaded 7 months ago
Version 1.2.9
Download link Index154-SpawnConfig-1.2.9.zip
Downloads 31018
Dependency string Index154-SpawnConfig-1.2.9

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Zehs-REPOLib-3.0.1 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 3.0.1

README

SpawnConfig

This mod allows you to change several things about the enemy spawning behavior in the game. It is intended to be used for modpack balance fine-tuning. Only the host needs to have it installed. Small warning: Taking advantage of this mod requires you to have a basic understanding of json file syntax. In return it offers a very high degree of configurability!

Here's a list of what's made possible by the mod:

  • You can modify or remove the vanilla enemy groups and add your own custom groups
  • Support for custom enemies added by other mods!
  • You can change how many enemy groups spawn based on the level number and based on the amount of players in the lobby. You can also add multiple possible group count configurations for the same level for some randomness / variety
  • You can assign weights to fine-tune how likely each enemy group is to appear
  • You can control whether a group should only be able to appear before or after a certain level number
  • You can give enemy groups different spawn weights for each type of level (for example you could have the Headman only spawnable in the Manor)
  • An enemy 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 extra variety to a group by configuring a chance for it to sometimes be bigger or smaller by a configurable range
  • You can also disable enemy spawning entirely

Getting started

  1. These important files and folders will be generated in your BepInEx config folder after launching the game:

    • Index154.SpawnConfig.cfg => The global config of the mod which is comparatively simple. Contains descriptions for each available setting. Please take a look at it!
    • Subfolder SpawnConfig:
      • SpawnGroups.json => Edit this file to modify, add and remove enemy groups
      • GroupsPerLevel.json => Edit this file to change how many enemy groups spawn per level
      • Subfolder Defaults:
        • SpawnGroups-Readonly.json => This file just exists as a reference and is not meant to be edited! It contains the configs for all groups the game has loaded before your custom config was applied. Enemy groups added by other mods will be found in here as well. The file is overwritten on every game launch
        • GroupsPerLevel-Readonly.json => This file just exists as a reference and is not meant to be edited! It contains the vanilla groups per level configs. The file is overwritten on every game launch
  2. PLEASE READ THROUGH THE MOD'S WIKI HERE

  3. Make your edits in the files SpawnConfig\SpawnGroups.json and SpawnConfig\GroupsPerLevel.json. As long as you read the wiki and follow the example of the vanilla entries you'll be fine. Changes will take effect only after restarting the game

  4. Have fun!

Known incompatibilities

  • SpawnConfigPlus by onecoolsnowmanMods
  • TierSpawnConfig by Dev1A3
  • MoneyBag Valuable by Oooppp (No clue why this one is problematic. I tried to contact the creator but have not received a reply)
  • Most likely any other mod that makes major changes to how enemy spawning works in the game

For mod developers

  • As long as you register your custom enemies properly with REPOLib they will be supported by SpawnConfig
  • SpawnConfig FULLY replaces the functions AmountSetup() and PickEnemies() in EnemyDirector.cs!

What else?

  • If something doesn't work as expected then take a look at the BepInEx log output. Most issues will come with a corresponding error message in the log to help with troubleshooting
  • Report issues, request features, check known issues and check planned features on GitHub: https://github.com/Index154/REPO_SpawnConfig

CHANGELOG

1.2.9

  • Renamed 'thisGroupOnly' setting in SpawnGroups.json to 'soloGroup' to reduce confusion a bit
  • Added a new set of options to Index154.SpawnConfig.cfg under the category "Variety+". The settings in this category are used to make enemy groups less likely to spawn on multiple levels in a row, increasing gameplay variety. Because the vanilla game also has a system like this in place I have decided to enable these settings by default so that the mod more closely resembles the base game for players who don't change any of the settings
  • Due to the default values of these new settings, enemy groups spawned on the previous level now have their difficulty weights reduced by 40% and groups spawned two levels ago have their weights reduced by 20%
  • Cleared up the wording of some logs

1.2.8

  • Re-enabled REPOLib dependency for complete modded enemy support
  • Fixed the levelWeightMultiplier values in SpawnGroups.json being formatted incorrectly depending on the user's system language
  • Made sure that the mod will always add an entry for every loaded level (including modded levels) to the levelWeightMultiplier list of all groups in SpawnGroups.json if it's missing. If you uninstall or disable a modded level then your weight configs for that level will not be removed from the file
  • Added a new option "Remove unused level weight multipliers" to Index154.SpawnConfig.cfg - When enabled, the mod will automatically remove all entries from the levelweightmultipliers that do not match an installed / loaded level. You should only use this if you want to clean up leftover entries from previously installed maps / levels. It's recommended to leave this setting disabled in all other situations to avoid losing parts of your config unexpectedly

1.2.7

  • When set to 0, the options "maxLevel" in SpawnGroups.json and "maxPlayerCount" in GroupsPerLevel.json are now considered as "no maximum" (no more need to set them to arbitrary large numbers)

1.2.6

  • Added minimum and maximum player count settings to the possible group counts in GroupsPerLevel.json. With this you can make different configs for different player counts. If there are less players than the minimum or more than the maximum of an entry then that entry can not be selected by the game when loading a level
  • Updated Thunderstore description with info about the new features from 1.2.5 and this version

1.2.5

  • Added new spawn group weight multipliers for each level type (museum, manor, arctic and wizard). The property looks like this: "levelWeightMultipliers": {"Arctic": 1.0, "Manor": 1.0, "Museum": 1.0, "Wizard": 1.0}. All three weights of a spawn group will be multiplied by the number corresponding to the current level type. Example use cases: If you set "Manor" to 0 for a group then the group will not be able to spawn in the headman manor. If you set it to 0.5 for museum then the group will be half as likely to spawn on museum compared to the other levels. I decided to do it this way instead of a simple black- or whitelist to allow for more fine-tuning
  • New / modded levels will hopefully be added to this list automatically but we'll see once they work again
  • Made the logs a bit prettier
  • Made the GroupsPerLevel.json formatting a bit better

1.2.4

  • Updated for 0.3
  • Reminder: The new vanilla enemy groups can be found in the file "BepInEx\config\SpawnConfig\Defaults\SpawnGroups-Readonly.json" after launching the game once. You can also enable the setting "Re-add missing groups" to make the game automatically add the new groups to your custom config on startup
  • Removed REPOLib dependency temporarily until it gets updated. This only affects modded enemy compatibility
  • The log now shows how many total enemies were spawned
  • Updated the Github wiki page with the new enemy names

1.2.3

  • The mod no longer generates "Explained.json" files. All the necessary information will now be found on the wiki including changes and new additions! Also moved some stuff from the Thunderstore page to the wiki
  • Added a new option allowDuplicates to all groups in SpawnGroups.json. You can prevent specific groups from spawning more than once per level by setting this value to false
  • Added a fallback for cases when the mod fails to execute its setup for unknown reasons
  • Fixed the mod not determining group weights for groups added by other mods correctly. Previously they were all set to a weight of 100 by default. From now on the weights will closely reflect the rarities configured by the developer of the corresponding mod
  • I've realized that the vanilla rarity logic in the game makes even less sense than I first thought! The rare groups which I previously gave a weight of 1.5 are actually more common in vanilla than expected (at least across multiple runs) so I increased their default weights to 5 with this update
  • Keep in mind that none of the enemy group weights in your config will be changed automatically so you'll have to take a look at the SpawnGroups-Readonly.json file generated by the mod after the update if you wish to adjust your custom settings accordingly
  • Thunderstore readme, changelog and mod manifest are now also tracked on the GitHub page

1.2.1 / 1.2.2

  • Fixed small mistake in the Thunderstore description where I copied some text and forgot to change it

1.2.0

  • You can now configure how many enemy groups of each tier will spawn on each level! Finally! The relevant files for this are GroupsPerLevel.json and GroupsPerLevel-Explained.json which will be generated after launching the game once
  • Also added a new global config setting Group count multiplier
  • Updated the Thunderstore description to mention the new functionality and info about the new config files for it (also added a list of incompatible mods and changed a few minor things)
  • alterAmount logic will no longer make sure that there is at least one enemy left in a group
  • The option Re-add missing groups is now disabled by default
  • "Director" enemy objects will no longer show up in any of the logs
  • Changed the names of the files in the defaults folder

1.1.4

  • Fixed the mod for REPO v0.2.0
  • Added REPOLib as a dependency and implemented a possible fix for custom enemies sometimes not being detected due to load order. Thanks to onecoolsnowman for the original implementation in his fork

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!