CharacterDrop Configuration - ASharpPen/Valheim.DropThat GitHub Wiki

CharacterDrop templates are managed through the drop_that.character_drop.cfg file.

Generally all creatures will use the CharacterDrop system for their loot tables. Only a few outliers such as birds will use a different system.

Templates are configured by creating sections as follows:

[<PrefabName>]
# General template settings here
# ...

[<PrefabName>.<ID>]
# Individual drop settings here
# ...

PrefabName is the name of the creature to modify, and the ID is a value from 0 and up, which indicates where to place the drop in the loot table. If an ID matches an existing one, it will override. This is how existing drops can be replaced on an individual level. Eg., if you only want to modify the meat drop of a boar, you just need a section [Boar.0].

Multiple drops for a mob can be modified by repeating the [<PrefabName>.<ID>], using the same name and a different ID.

Any settings not specified will automatically use the defaults listed in the tables below. This also means they do not need to be specified in the file unless they are different from the default.

Eg. the minimum required setup for adding an item drop to a boar is this:

[Boar.123]
PrefabName = Entrails

Example

[Draugr.0]
PrefabName = Entrails
SetAmountMin = 1
SetAmountMax = 1
SetChanceToDrop = 1
SetDropOnePerPlayer = false
SetScaleByLevel = true

[Draugr.1]
PrefabName = IronScrap
SetAmountMin = 1
SetAmountMax = 1
SetChanceToDrop = 1
SetDropOnePerPlayer = false
SetScaleByLevel = true

[Deer]
UseDropList = GenericDropsList123

[Deer.5]
PrefabName = Coins
SetAmountMin = 1
SetAmountMax = 100
SetChanceToDrop = 50
SetDropOnePerPlayer = false
SetScaleByLevel = false
ConditionMinLevel = 1
ConditionMaxLevel = 2
ConditionNotDay = true
ConditionNotNight = true
ConditionNotAfternoon = false
ConditionEnvironments = Misty
ConditionGlobalKeys = defeated_bonemass
ConditionBiomes = Blackforest, Meadows

Config Options

Setting Type Default Example Description
UseDropList string MyAmazingList Name of a default list of drops to apply to the template

Config Drop Options

Setting Type Default Example Description
PrefabName string RawMeat Name of prefab to drop. Does not need to be an item
Enable bool true false Enable/disable this drop
EnableConfig bool true false Enable/disable this specific drop configuration. Does NOT disable the drop itself
AmountMin int 1 5 Minimum amount dropped at a time. Must be 1 or greater
AmountMax int 1 8 Maximum amount dropped at a time. Must be 1 or greater
ChanceToDrop float 100 37.5 Chance to drop. Range 0 to 100
DropOnePerPlayer bool false true If set, will drop one of this prefab per player. Ignoring other factors such as SetAmountMin / SetAmountMax
ScaleByLevel bool true false Toggles dropped amount being scaled by level of mob. Be aware, this scales up very quickly and may cause issues when dropping many items.
QualityLevel int -1 5 Sets the quality level of the item. If 0 or less, uses default quality level of drop
Durability float -1 550 Sets the durability of the item. Does not change max durability. If less than 0, uses default
AmountLimit int -1 100 Sets an absolute limit to the number of drops. This will stop multipliers from generating more than the amount set in this condition. Ignored if 0 or less
AutoStack bool false true If true, will attempt to stack items before dropping them. This means the item generation will only be run once per stack
ConditionMinLevel int -1 1 Minimum level of mob for which prefab drops
ConditionMaxLevel int -1 3 Maximum level of mob for which item drops
ConditionNotDay bool false true If true, will not drop during daytime
ConditionNotAfternoon bool false true If true, will not drop during afternoon
ConditionNotNight bool false true If true, will not drop during night
ConditionEnvironments string Misty, Thunderstorm List of environment names that allow the item to drop while they are active. Leave empty to always allow
ConditionNotEnvironments string Misty, Thunderstorm List of environment names that disable the drop while they are active. Leave empty to always allow
ConditionGlobalKeys string defeated_eikthyr, defeated_gdking List of global keys names that allow the item to drop while they are active. Leave empty to always allow
ConditionNotGlobalKeys string defeated_eikthyr, defeated_gdking List of global key names that stop the item from dropping if any are detected
ConditionBiomes string Meadows, Swamp List of biome names that allow the item to drop while they are active. Leave empty to always allow
ConditionNotBiomes string Meadows, Swamp List of biome names that disables the drop. The biome is determined upon spawn. Leave empty to always allow
ConditionCreatureStates string Tamed, Event List of creature states for which the item drop. If empty, allows all
ConditionNotCreatureStates string Tamed, Event List of creature states for which the item will not drop. If empty, allows all
ConditionHasItem string skeleton_bow List of items (prefab names) that will enable this drop. If empty, allows all
ConditionFaction string Undead, Boss List of factions that will enable this drop. If empty, allows all
ConditionNotFaction string Undead, Boss List of factions that will disable this drop. If empty, this condition is ignored
ConditionLocation string Runestone_Boars, FireHole List of location names. When mob spawned in one of the listed locations, this drop is enabled
ConditionNotLocation string Runestone_Boars, FireHole List of location names. When mob is spawned in a location that is not listed, this drop is enabled
ConditionKilledByDamageType string Blunt, Fire List of damage types that will enable this drop, if they were part of the final killing blow. If empty, allows all
ConditionNotKilledByDamageType string Blunt, Fire List of damage types that will disable this drop, if they were part of the final killing blow. If empty, this condition is ignored
ConditionKilledWithStatus string Burning, Smoked List of statuses that mob had any of while dying, to enable this drop. If empty, allows all
ConditionNotKilledWithStatus string Burning, Smoked List of statuses that will enable this drop, if none were present at the mobs death. If empty, this condition is ignored
ConditionKilledWithStatuses string Burning, Smoked List of statuses that will enable this drop, if all were not present at the time of the mobs death. If empty, this condition is ignored
ConditionNotKilledWithStatuses string Burning, Smoked List of statuses that mob must have had all of while dying, to enable this drop. If empty, allows all
ConditionKilledBySkillType string Swords, Unarmed List of skill types that will enable this drop, if they were listed as the skill causing the damage of the final killing blow. If empty, allows all
ConditionNotKilledBySkillType string Swords, Unarmed List of skill types that will disable this drop if they were listed as the skill causing the damage of the final killing blow. If empty, this condition is ignored
ConditionKilledByEntityType string Player, Creature, Other List of entity types that if causing the last hit, will enable this drop. If empty, this condition is ignored
ConditionNotKilledByEntityType string Player, Creature, Other List of entity types that if causing the last hit will disable this drop. If empty, this condition is ignored
ConditionDistanceToCenterMin float 0 1000 Minimum distance to center of map, for drop to be enabled
ConditionDistanceToCenterMax float 0 3000 Maximum distance to center of map, within which drop is enabled. 0 means limitless
ConditionHitByEntityTypeRecently string Player, Creature, Other List of entity types. If any of the listed types have hit the creature recently (default 60 seconds), drop is enabled. If empty, this condition is ignored
DisableResourceModifierScaling bool false true Disables resource scaling from world-modifiers if true

Supplemental Files

By default, Drop That will load additional configurations from configs with names following the pattern drop_that.character_drop.*.cfg.

This allows for adding your own custom templates to Drop That. Eg. drop_that.character_drop.my_custom_configuration.cfg

The supplemental configuration expects the same structure as drop_that.character_drop.cfg.

Named Lists

When the same set of configurations are needed again and again, named lists can be assigned to entities for use as defaults, instead of having to copy-paste. As with the supplemental files, these can be placed in any sub-folder of bepinex/config.

You can have as many of these files as you want.

Named lists are loaded based on file name pattern drop_that.character_drop_list.*.cfg Eg. drop_that.character_drop_list.my_amazing_lists.cfg

The format used in the lists is [<YourListName>.<ID>], with the same drop settings as for drop_that.character_drop.cfg.

Eg.

[MyMeatsplosionList.0]
PrefabName = RawMeat
SetAmountMin = 100
SetAmountMax = 500

[MyMeatsplosionList.1]
PrefabName = RawMeat
⚠️ **GitHub.com Fallback** ⚠️