Config Raids - ASharpPen/Valheim.CustomRaids GitHub Wiki

Raids consist of two sets of sections. One, the main raid description. Containing rules for the raid name and general conditions for triggering it. Secondly, every single mob to spawn in while raid is active, needs to be added and configured on its own.

Creating a raid therefore involves:

  1. Add a raid section with general raid configuration
[YourRaidName]
Enabled=true
Name=MyRaid
... additional configuration
  1. Add spawns to the raid event.
[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.

Supplemental raid file "custom_raids.supplemental.my_raid_name.cfg"

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.

Example

[Example_Raid]
Enabled = true
Name = Example1
Random = true
NearBaseOnly = false
RaidFrequency = 0.1
RaidChance = 100

[Example_Raid.0]
PrefabName = Skeleton
HuntPlayer = true
MaxSpawned = 10
SpawnInterval = 2
SpawnChancePerInterval = 100

Example - Disable Trolls

[foresttrolls]
Name=foresttrolls
Enabled=false

Raid Options

All settings are optional. Default values will be used for any setting missing. Though do be aware that it is not possible to override individual settings for existing raids, defaults will also be used in overrides, for any missing settings.

Setting Type Default Example Description Version
Name String Deer Army DoubleTroll Name of event. Will override existing raid with same name 1.0
Enabled bool true false Enable/disable raid 1.0
Duration float 90 3600 Duration of raid in seconds 1.0
StartMessage String Raid start Incoming massacre! Message shown on raid start 1.0
EndMessage String Raid done This party is over! Message shown on raid end 1.0
NearBaseOnly bool true false Spawn raid near base only 1.3
RequiredGlobalKeys string defeated_bonemass, defeated_dragon List of required global keys. Leave empty for no requirement 1.0
NotRequiredGlobalKeys string defeated_bonemass, defeated_dragon List of global keys disabling raid 1.0
RequireOneOfGlobalKeys string defeated_bonemass, defeated_gdking List of global keys of which one is required. Leave empty for no requirement. 1.3
PauseIfNoPlayerInArea bool true false Raid timer freezes when no players are nearby 1.0
ForceEnvironment string Misty Name of weather/environment to set during raid 1.0
ForceMusic string CombatEventL1 CombatEventL2 Name of music to play during raid 1.0
Random bool true false Sets whether raid is random or not. Eg. boss fights are raids, but not random 1.0
Biomes string Meadows, BlackForest List of biomes enabling raid. Leave empty for all allowed. 1.1
CanStartDuringDay bool true false Raid can start during daytime 1.3
CanStartDuringNight bool true false Raid can start during nighttime 1.3
Faction string Boss ForestMonsters Assign a single faction to all entities in raid. 1.3
RaidFrequency float 46 120 Minutes between checks for this raid to run. 0 uses game default (46 minutes). This is only used if UseIndividualRaidChecks is set in general config. 1.3
RaidChance float 0 75 Chance at each check for this raid to run. 0 uses game default (20%). This is only used if UseIndividualRaidChecks is set in general config 1.3
ConditionWorldAgeDaysMin float 0 10 Minimum number of in-game days of the world, for this raid to be possible. 1.3
ConditionWorldAgeDaysMax float 0 100 Maximum number of in-game days of the world, for this raid to be possible. 0 means no limit 1.3
ConditionDistanceToCenterMin float 0 1000 Minimum distance to center for this raid to activate. 1.3
ConditionDistanceToCenterMax float 0 2000 Maximum distance to center for this raid to activate. 0 means limitless. 1.3
ConditionMinPlayersNearby int 0 5 Minimum players in area for raid to activate 1.5
ConditionMaxPlayersNearby int 0 3 Maximum players in area for raid to activate. 0 means no limit 1.5
ConditionMinPlayersOnline int 0 10 Minimum players online for raid to activate (Multiplayer only, ignored in singleplayer) 1.5
ConditionMaxPlayersOnline int 0 2 Maximum players online for raid to activate. 0 means no limit (Multiplayer only, ignored in singleplayer) 1.5
ConditionAltitudeMin float -1000 5 Minimum altitude (distance to water surface) for raid to activate. Altitude is calculated when on dedicated server, so it might be a bit off 1.5
ConditionAltitudeMax float 1000 50 Maximum altitude (distance to water surface) for raid to activate. Altitude is calculated when on dedicated server, so it might be a bit off 1.5
ConditionEnvironment string Clear, Thunderstorm List of environments enabling raid. Environment to compare to when on dedicated server is calculated, so it might be a bit off. Leave empty for no requirement 1.5
ConditionMustBeNearPrefab string FineWood, Blueberries List of prefab names enabling raid when nearby. A single prefab in the list must be near. Leave empty for no requirements 1.6
ConditionMustBeNearPrefabDistance int 100 50 Radius from raid center used for ConditionMustBeNearPrefab 1.6
ConditionMustBeNearAllPrefabs string FineWood, Blueberries List of prefab names enabling raid when all are nearby. If any prefab in the list is not nearby, raid will not be started. Leave empty for no requirements 1.6
ConditionMustBeNearAllPrefabsDistance int 100 25 Radius from raid center used for ConditionMustBeNearAllPrefabs 1.6
ConditionMustNotBeNearPrefab string piece_workbench, FineWood List of prefab names disabling raid when nearby. None of the listed prefab can be near. Leave empty for no requirements 1.6
ConditionMustNotBeNearPrefabDistance int 100 37 Radius from raid center used for ConditionMustNotBeNearPrefab 1.6
OnStopStartRaid string foresttrolls When this event stops, start a new raid at the same position, with the specified name. Note, this will ignore all conditions otherwise required for that raid. This is intended for chaining raids 1.6
ConditionLocation string Runestone_Boars, StartTemple List of locations in which this raid is enabled
ConditionPlayerMustHaveAnyOfPlayerKeys string defeated_bonemass, defeated_gdking (Enabled by world-modifier) List player-specific keys used for player-based raids, of which player must have at least one. Ignored if empty or if a required known item was found from ConditionPlayerMustKnowAnyOfItems 1.7.9
ConditionPlayerMustNotHaveAnyOfPlayerKeys string defeated_bonemass, defeated_gdking (Enabled by world-modifier) List player-specific keys used for player-based raids, of which player must not have any of the listed. Ignored if empty 1.7.9
ConditionPlayerMustKnowAnyOfItems string DragonTear, PickaxeIron (Enabled by world-modifier) List of player-known items used for player-based raids, of which player must know at least one. Ignored if empty 1.7.9
ConditionPlayerMustNotKnowAnyOfItems string DragonTear, PickaxeIron (Enabled by world-modifier) List of player-known items used for player-based raids, of which player must not know any of the listed. Ignored if empty 1.7.9
ConditionPlayerMustHaveAllOfPlayerKeys string defeated_bonemass, defeated_gdking (Enabled by world-modifier) List player-specific keys used for player-based raids, of which player must have all. Ignored if empty 1.7.13

Raid Spawn Options

Options for what should be spawning during the raid. As with Raid Options, all settings are optional.

Setting Type Default Example Description
Name string DeerALot Draugr Party Time Spawn configuration name
Enabled bool true false Enable/disable this entry
PrefabName string Deer Draugr Prefab name of entity to spawn. This can be any prefab
MaxSpawned int 1 5 Maximum number of prefab spawned in local surroundings
SpawnInterval float 1 20 Seconds between new spawn checks
SpawnChancePerInterval 100 25 Chance (0 to 100) to spawn new wave per interval
SpawnDistance float 0 10 Must not have another spawn of same prefab within this distance for this template to spawn
SpawnRadiusMin float 40 120 Minimum spawn distance from player. 0 defaults to 40
SpawnRadiusMax float 80 200 Maximum spawn distance from player. 0 defaults to 80
GroupSizeMin int 1 5 Minimum count to spawn at a time. Group spawning
GroupSizeMax int 1 5 Maximum count to spawn at a time. Group spawning
SpawnAtNight bool true false Can spawn at night
SpawnAtDay bool true false Toggles spawning at day. Will also cause despawning for creatures at day if false
HuntPlayer bool true Does what it says. Will not work for all mobs, Deer will ignore it
GroundOffset float 0.5 20 Offset to ground to spawn at. Negative means below ground, the higher the further into the sky
MinLevel int 1 3 Min level of spawn (2 is one star)
MaxLevel int 1 15 Max level of spawn (2 is one star)
RequiredGlobalKey string defeated_bonemass Global key required for spawning. Leave empty for no requirement.
RequiredNotGlobalKey string defeated_bonemass, KilledTroll Global keys which disable spawning
RequiredEnvironments string Misty, Thunderstorm List of environments enabling spawn. Leave empty for no requirement.
GroupRadius float 3 15 Size of circle to spawn group inside. A spot within SpawnRadiusMin and SpawnRadiusMax will be picked as center of this circle
AltitudeMin float -1000 5 Minimum required altitude (distance to water surface) to spawn in
AltitudeMax float 1000 100 Maximum required altitude (distance to water surface) to spawn in
TerrainTiltMin float 0 120 Minimum required tilt of terrain to spawn in
TerrainTiltMax float 35 45 Maximum required tilt of terrain to spawn in
InForest bool true false Toggles spawning in forest
OutsideForest bool true false Toggles spawning outside of forest
OceanDepthMin float 0 Minimum required ocean depth to spawn in. Ignored if min == max
OceanDepthMax float 0 Maximum required ocean depth to spawn in. Ignored if min == max
Faction string ForestMonsters Set a single custom faction for mob. This overrules the raids faction setting if set.
ConditionDistanceToCenterMin float 0 1000 Minimum distance to center of map for entity to spawn
ConditionDistanceToCenterMax float 0 5000 Maximum distance to center of map for entity to spawn. 0 means limitless
ConditionWorldAgeDaysMin float 0 10 Minimum world age in in-game days for this entity to spawn
ConditionWorldAgeDaysMax float 0 50 Maximum world age in in-game days for this entity to spawn. 0 means no max
DistanceToTriggerPlayerConditions int 100 200 Distance of player to spawner, for player to be included in player based checks such as ConditionNearbyPlayersCarryValue
ConditionNearbyPlayersCarryValue int 0 25 Checks if nearby players have a combined value in inventory above this condition. Eg. If set to 100, entry will only activate if nearby players have more than 100 worth of values combined
ConditionNearbyPlayerCarriesItem string IronScrap, DragonEgg Checks if nearby players have any of the listed item prefab names in inventory
ConditionNearbyPlayersNoiseThreshold float 0 80 Checks if any nearby players are emitting noise at or above the threshold