CharacterDrop Named Lists - ASharpPen/Valheim.DropThat GitHub Wiki
Character Drop
Named list of drops are intended as a way to set up defaults, without having to copy-paste the same configs again and again.
They work in exactly the same way as the usual drops otherwise.
Prepare file
Start by creating a new file anywhere in the bepinex config folder like this:
The example
part of the name can be anything you want, and the position of the file can be in any subfolder (as long as its in the BepInEx/config path).
All files named according to either drop_that.character_drop_list.cfg
or drop_that.character_drop_list.*.cfg
are loaded and scanned when a world is entered.
Creating list
Open the list cfg you want to write your named list in (the one you just created, if you came from "Prepare file").
Then create drops like you usually would for a Character Drop
config, but instead of using a prefab name as the first part of the section head (the [SomeText]
), we write what we want the list to be named as.
Lets create a few generic coin drops, that can be used for multiple creatures.
ID 100 is picked starting point, to ensure we don't override the vanilla drops, but any ID of 0 or greater can be used as usual.
[DefaultCoinDrops.100]
PrefabName = Coins
SetAmountMin = 1
SetAmountMax = 1
ConditionMinLevel=0
ConditionMaxLevel=2
[DefaultCoinDrops.101]
PrefabName = Coins
SetAmountMin = 10
SetAmountMax = 10
ConditionMinLevel=3
ConditionMaxLevel=5
[DefaultCoinDrops.102]
PrefabName = Coins
SetAmountMin = 100
SetAmountMax = 100
ConditionMinLevel=6
ConditionMaxLevel=10
Multiple lists can be created in the same file. Just use a different name for the next list.
Lets add some drops intended to override the vanilla drops when used, by using ID's from 0 and up.
[DefaultCoinDrops.100]
PrefabName = Coins
SetAmountMin = 1
SetAmountMax = 1
ConditionMinLevel=0
ConditionMaxLevel=2
[DefaultCoinDrops.101]
PrefabName = Coins
SetAmountMin = 10
SetAmountMax = 10
ConditionMinLevel=3
ConditionMaxLevel=5
[DefaultCoinDrops.102]
PrefabName = Coins
SetAmountMin = 100
SetAmountMax = 100
ConditionMinLevel=6
ConditionMaxLevel=10
[BoarDefaultList.0]
PrefabName = ArmorLeatherLegs
SetAmountMin = 1
SetAmountMax = 1
SetQualityLevel = 10
SetAmountLimit = 1
[BoarDefaultList.0.EpicLoot]
RarityWeightUnique = 1
UniqueIDs = HeimdallLegs
[BoarDefaultList.1]
PrefabName = Coins
[BoarDefaultList.2]
PrefabName = RawMeat
SetAmountMin = 1
SetAmountMax = 3
[BoarDefaultList.3]
PrefabName = IronScrap
Note how integrations can be added in the usual way.
Using list
Creating does nothing if nothing is using it. Using the list is done by adding a section and setting to the usual drops.
Open up a Character Drop
file to use. Eg., drop_that.character_drop.cfg
.
Lets start by using our default coin drop list, and add it to a few different creatures:
[Skeleton]
UseDropList=DefaultCoinDrops
[Deer]
UseDropList=DefaultCoinDrops
There we go! This is equivalent to having written:
[Skeleton.100]
PrefabName = Coins
SetAmountMin = 1
SetAmountMax = 1
ConditionMinLevel=0
ConditionMaxLevel=2
[Skeleton.101]
PrefabName = Coins
SetAmountMin = 10
SetAmountMax = 10
ConditionMinLevel=3
ConditionMaxLevel=5
[Skeleton.102]
PrefabName = Coins
SetAmountMin = 100
SetAmountMax = 100
ConditionMinLevel=6
ConditionMaxLevel=10
[Deer.100]
PrefabName = Coins
SetAmountMin = 1
SetAmountMax = 1
ConditionMinLevel=0
ConditionMaxLevel=2
[Deer.101]
PrefabName = Coins
SetAmountMin = 10
SetAmountMax = 10
ConditionMinLevel=3
ConditionMaxLevel=5
[Deer.102]
PrefabName = Coins
SetAmountMin = 100
SetAmountMax = 100
ConditionMinLevel=6
ConditionMaxLevel=10
Note that only named list can be used pr creature. It is not possible to do UseDropList=DefaultCoinDrops, BoarDefaultList
.
Overriding list entries
Named lists are just defaults, when used, each entry can be overriden by the creature using it.
Lets take a look at the named list we created for boar creatures, by adding this to drop_that.character_drop.cfg
:
[Skeleton]
UseDropList=DefaultCoinDrops
[Deer]
UseDropList=DefaultCoinDrops
[Boar]
UseDropList=BoarDefaultList
Dropping legendary items and iron may be a bit overpowered for the typical vanilla boar, so lets turn that down a notch.
Add entries using the same ID to that boar, disabling the Epic Loot drop, and changing the iron drop to some meat instead.
[Skeleton]
UseDropList=DefaultCoinDrops
[Deer]
UseDropList=DefaultCoinDrops
[Boar]
UseDropList=BoarDefaultList
[Boar.0]
# Reverts to vanilla. When no PrefabName is specified, the config gets ignored.
[Boar.3]
PrefabName = RawMeat
SetChanceToDrop = 50
Note that all settings get overridden if we use the same ID. If we just changed the drop rate of drop 0, the entire [BoarDefaultList.0]
and [BoarDefaultList.0.EpicLoot]
gets replaced with whatever is in [Boar.0]
.