

This mod allows for customizing raids to your liking.
Want to have armies besieging your fortress? A bit of extra environmental effects along your way? Or just disable trolls?
This mod can help you do all of that!
Comes preconfigured with two additional end-game raids (disabled by default), to show how and what can be done:
Enable those raids at own risk!
Custom Raids needs to be installed on all clients (and server) to work.
From v1.2.0 clients will request the configurations currently loaded by the server, and use those without affecting the clients config files. This means you should be able to have server-specific configurations, and the client can have its own setup for singleplayer. For this to work, the mod needs to be installed on the server, and have configs set up properly there. When players join with Custom Raids v1.2.0, their mod will use the servers configs.
All configurations are placed in the default BepInEx configuration folder, and generated upon starting the game.
General configuration includes general mod controls, overall event system changes, and debugging options.
[General]
## Loads raid configurations from supplemental files.
## Eg. custom_raid.supplemental.my_raid.cfg will be included on load.
# Setting type: Boolean
# Default value: true
LoadSupplementalRaids = true
## Generates pre-defined supplemental raids. The generated raids are disabled by default.
# Setting type: Boolean
# Default value: true
GeneratePresetRaids = true
## Disables automatic updating and saving of raid configurations.
## This means no helpers will be added, but.. allows you to keep things compact.
# Setting type: Boolean
# Default value: false
StopTouchingMyConfigs = false
[EventSystem]
## If enabled, removes all existing raids and only allows configured.
# Setting type: Boolean
# Default value: false
RemoveAllExistingRaids = false
## Enable/disable override of existing events when event names match.
# Setting type: Boolean
# Default value: true
OverrideExisting = true
## Frequency between checks for new raids. Value is in mintues.
# Setting type: Single
# Default value: 46
EventCheckInterval = 46
## Chance of raid, per check interval. 100 is 100%.
# Setting type: Single
# Default value: 20
EventTriggerChance = 20
[Debug]
## Enables debug logging.
# Setting type: Boolean
# Default value: false
DebugOn = false
## Enables trace logging. Note, this will generate a LOT of log entries.
# Setting type: Boolean
# Default value: false
TraceLogging = false
## If enabled, scans existing raid event data, and dumps to a file on disk.
# Setting type: Boolean
# Default value: false
WriteDefaultEventDataToDisk = false
## If enabled, dumps raid event data after applying configuration to a file on disk.
# Setting type: Boolean
# Default value: false
WritePostChangeEventDataToDisk = false
## If enabled, scans existing environment data, and dumps to a file on disk.
# Setting type: Boolean
# Default value: false
WriteEnvironmentDataToDisk = false
## If enabled, scans existing global keys, and dumps to a file on disk.
# Setting type: Boolean
# Default value: false
WriteGlobalKeyDataToDisk = false
Main file for adding raid configuration.
To add a raid you must:
[YourRaidName]
Enabled=true
Name=MyRaid
... additional configuration
[YourRaidName.Index]
Enabled=true
Name=Draugr Party Time
PrefabName=Draugr
MaxSpawned=500
... additional configuration
Repeat step 2, for additional spawns in the same raid event. Just make sure to increase the index every time.
For multiple raids, repeat from step 1.
Exactly as for the main raid file (custom_raids.raids.cfg). This is simply to allow for easy splitting into multiple files, and for others to easily add new raids to Custom Raids.
Just add the below to "custom_raids.raids.cfg". OverrideExisting is on by default.
[foresttrolls]
Name=foresttrolls
Enabled=false
Raid events are generally a bit "janky" to configure, so I suggest making use of the "RemoveAllExistingRaids" and console while testing. Enable only your own change, and use console commands "randomevent" and "stopevent" to test things out.
Spawning during also seems to be very inconsistent, meaning with the same interval setting, you will sometimes have a bunch of wave triggers inside a short span, and sometimes it takes ages.
You wil only see possible event count in logs, if the RandEventSystem made a check that passed the random chance. Ie. If you have the chance set to 20, you will only see 1 out of 5 checks in logs.
ForcedEnvironment also seems to be taken more as a hint, than something forced. It should trigger most of the time though.
It is also important to understand how raids are started and run.
A pretty comprehensive guide for prefabs can be found here
See the Valheim Wiki - Event System for further details on raid configuration and how they work.
Basically, the host/server will make a check every once in a while. When the check happens, it then rolls a die to check if it should start an event. A list of what it believes are "possible" raids is calculated, and a random one is picked. These raids are based off the host/server instances configurations, meaning it needs to know about a raid to even to any checks. Any clients are then notified that the raid should be started.
When a client receives a start event message, and is in charge of the area, its world spawners (see Spawning) will then start attempting to spawn in mobs. It does this by finding the raid event it has loaded itself, based on the name received from the host. If the event is found, the world spawners will try to spawn in the mobs in the event. For each mob they will check if spawn conditions are right. THIS is what usually makes most raids stumble. If the raid starts, but nothing spawns in, it is usually because the spawners can't get the conditions right.
| Setting | Type | Example Value | Description |
|---|---|---|---|
| Name | String | DeerArmy | Name of event. Can be used to override existing configurations with same name (I am looking at you, foresttrolls...) |
| Enabled | bool | true | |
| Duration | float | 90 | |
| StartMessage | String | Raid started | Message shown on raid start |
| EndMessage | String | Raid ended | Message shown on raid end |
| NearBaseOnly | bool | true | Spawn raid near base only. Looks like this one might need to always be true due to the games valid spawn logic. |
| RequiredGlobalKeys | string | defeated_bonemass, defeated_dragon | Array (separate by ",") of required global keys. Leave empty for no requirement. |
| NotRequiredGlobalKeys | string | defeated_bonemass, defeated_dragon | Array (separate by ",") of required global keys. Leave empty for no requirement. Not sure what it is used for. |
| PauseIfNoPlayerInArea | bool | true | |
| ForceEnvironment | string | Misty | Name of environment to set for raid |
| ForceMusic | string | CombatEventL1 | Name of music to set for raid |
| Random | bool | true | Include raid in random raid spawning. |
| Biomes | string | Array (separate by ",") of biomes. Leave empty for all allowed. |
| Setting | Type | Example | Description |
|---|---|---|---|
| Name | string | Draugr Party Time | Name of spawn group. Seemingly not used for anything. |
| Enabled | bool | true | |
| PrefabName | string | Draugr | Name of prefab to spawn. |
| MaxSpawned | int | 5 | Maximum alive at a time. |
| SpawnInterval | float | 1 | Interval (seconds) between wave checks. |
| SpawnChancePerInterval | 100 | Chance (0 to 100) to spawn new wave per interval. | |
| SpawnDistance | float | 0 | |
| SpawnRadiusMin | float | 0 | |
| SpawnRadiusMax | float | 1 | |
| GroupSizeMin | int | 5 | Minimum number of spawns per wave |
| GroupSizeMax | int | 5 | Maxium number of spawns per wave |
| SpawnAtNight | bool | true | |
| SpawnAtDay | bool | true | |
| HuntPlayer | bool | true | Does what it says. Will not work for all mobs, Deer will ignore it. |
| GroundOffset | float | 0.5 | Distance to ground on spawn |
| MinLevel | int | 1 | Min level to spawn. Level 3 is two star mobs. |
| MaxLevel | int | 3 | Max level to spawn. Level 3 is two star mobs. |
| RequiredGlobalKey | string | defeated_bonemass | Global key required for spawning. Leave empty for no requirement. |
| RequiredEnvironments | string | Array (separate by "," of required environments. Leave empty for no requirement. | |
| GroupRadius | float | 1 | |
| AltitudeMin | float | -1000 | |
| AltitudeMax | float | 1000 | |
| TerrainTiltMin | float | 0 | |
| TerrainTiltMax | float | 35 | |
| InForest | bool | true | |
| OutsideForest | bool | true | |
| OceanDepthMin | float | 0 | |
| OceanDepthMax | float | 0 |