CharacterDrop Tutorial Modify - ASharpPen/Valheim.DropThat GitHub Wiki
Tutorial - Modifying drops for CharacterDrop
This tutorial will describe how to modify the trophy drop from a boar to instead be coins.
Identify what to modify
First of all, to modify a CharacterDrop drop entry we need to either find the CharacterDrop config file of what we are modifying, or extract a list of what is being loaded.
- Go to your
BepInEx/Configfolder. - Open the
drop_that.cfg.
If it doesn't exist yet, run the game to have it generate.
- Find the
WriteCharacterDropsToFilesetting under the[Debug]section, and enable it. This will tell Drop That to create a file showing the CharacterDrop loot tables that is available on world start.
WriteCharacterDropsToFile = true
- Run the game and enter a world.
- Check the
Bepin/Debugfolder, for a file calleddrop_that.character_drop.before_changes.cfg. If you can't find it, check your logs. There should be a line describing what files are being created and where. - Open it up, and find the drop entry that you want to change.
- Search for Boar, which should lead us to a part of the file that shows us all the drops a Boar will have, looking something like this:
[Boar.0]
PrefabName = RawMeat
Enable = true
EnableConfig = true
AmountMin = 1
AmountMax = 1
ChanceToDrop = 100
DropOnePerPlayer = false
ScaleByLevel = true
DisableResourceModifierScaling = false
ConditionNotDay = false
ConditionNotAfternoon = false
ConditionNotNight = false
[Boar.1]
PrefabName = LeatherScraps
Enable = true
EnableConfig = true
AmountMin = 1
AmountMax = 1
ChanceToDrop = 100
DropOnePerPlayer = false
ScaleByLevel = true
DisableResourceModifierScaling = false
ConditionNotDay = false
ConditionNotAfternoon = false
ConditionNotNight = false
[Boar.2]
PrefabName = TrophyBoar
Enable = true
EnableConfig = true
AmountMin = 1
AmountMax = 1
ChanceToDrop = 15
DropOnePerPlayer = false
ScaleByLevel = false
DisableResourceModifierScaling = false
ConditionNotDay = false
ConditionNotAfternoon = false
ConditionNotNight = false
What we are searching for is the Prefab name and the ID of the drop we want to modify.
We see that trophy is under [Boar.2], so that is the one we will be changing.
Modifying the drop
To make our changes, we must go back to the configs.
- Go to your
BepInEx/Configfolder. - Open the
drop_that.character_drop.cfg. - Add the following to the end of it.
[Boar.2]
PrefabName = Coins
AmountMin = 10
AmountMax = 30
- Save the file.
Done!
We have now told Drop That that it should modify the drop with ID 2 from the Boar CharacterDrop loot table. Instead of a 15% chance to drop a trophy, it now has a 15% chance to drop 10-30 coins. Note that all the settings we didn't change stays as they were.