Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
TreasureChestTweaks
Adds Configurations to modify Container prefabs and allows for respawnability of contained items.
| Date uploaded | 3 years ago |
| Version | 1.0.2 |
| Download link | RustyMods-TreasureChestTweaks-1.0.2.zip |
| Downloads | 491 |
| Dependency string | RustyMods-TreasureChestTweaks-1.0.2 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2105README
Treasure Chest Tweaks
Adds the ability to easily configure treasure chests.
Features
- Configurable loot tables for treasure chests
- Configurable timer to respawn items in treasure chests
- Configurable prefab names affected by patch
Changelog
1.0.0 - official release
1.0.1 - added fallbacks and fixes thanks to Azumatt
1.0.2 - added message log toggle and cleaned up solution
Affected Prefab Names
Targetted prefab names can be configured by a string list seperated by commas:
Example: "TreasureChest_blackforest,TreasureChest_meadows,TreasureChest_dvergrtower"
or simply use "TreasureChest" to target all prefabs that contains treasure chest
Treasure Chest Configurations
Input value can be configured by a string list seperated by colons for each item and commas seperating item data: "prefabName,minStack,maxStack,weight"
Example: "Feathers,1,3,1:Coins,5,15,1:Amber,1,1,1:ArrowFlint,10,20,1"
On Empty vs On Repeat
If you toggle OnEmpty, the treasure chests will set a timer as soon as container is empty
if (__instance.m_inventory.m_inventory.Count == 0)
{
DateTime currentTime = DateTime.Now;
view.GetZDO().Set(Hash.chestRespawn, currentTime.Ticks);
}
If you toggle OnRepeat, the treasure chests will set a timer as soon as container has been changed.
else
{
DateTime currentTime = DateTime.Now;
view.GetZDO().Set(Hash.chestRespawn, currentTime.Ticks);
}
Debug Messaging
Currently I have it set to log a message on the console whenever a treasure chest respawns any items. Let me know if it becomes a nuasance then I will add a toggle.
Contact information
For Questions or Comments, find Rusty in the Odin Plus Team Discord
If you enjoy this mod and want to support me: Donate via Buy Me a Coffee
