Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BetterTakeAll
Changes TakeAll behavior for containers to always prefer stacking over position. This should fix Tombstone bugs where it fails to properly take all inventory.
| Last updated | 2 weeks ago |
| Total downloads | 242 |
| Total rating | 1 |
| Categories | Tweaks Misc Client-side |
| Dependency string | CodeWarriors-BetterTakeAll-0.1.3 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2333README
Better Take All
Ever recover a Tombstone and wonder why you have two partial stacks of wood and a key item was left in the tombstone?
This mod addresses that, by changing TakeAll behavior for both tombstones and other containers to
- prefer stacking if possible
- then prefer position of item in source container
- then try to put it anywhere
This should address most failures to retrieve all items from tombstone, and also fixes the rare edge case of failure to stack when selecting "Take All" on a chest or other container.
Details
Default take all behavior: prefers keeping the item's x/y position over stacking. Notice it could have stacked the arrows and taken the blueberries, but it puts the arrows in the empty slot. This is rare for containers Because the item's position in the contianer has to line up with an empty slot in your inventory.
When you interact with a tombstone,
- The system checks if it thinks the tomstone inventory will fit into the player's inventory
- If yes, it performs
TakeAll, which callsMoveAll, which moves items from source container (tomsbtone) to destination container (player's inventory) - If no, it opens up the tombstone like a regular container for the player to manually move stuff
This mod changes Inventory.MoveAll behavior which affects all containers including tombstones. Normally, MoveAll prefers to put an item in its exact slot from the source container, and failing that, it looks for a stackable item in the destination container. This is why with tombstones, if you pick up some stackable junk along the way, it often fails to stack things properly.
What it doesn't do
This mod doesn't address the Tombstone.EasyFitInventory method, which checks if it should even automatically attempt to TakeAll in the first place. If your inventory is especially convoluted when you die, e.g. with several partial stacks of the same item, the tombstone will usually not attempt TakeAll.
Other mods that improve tombstone behavior
These two mods and my own all compete over Inventory.MoveAll, so they're not compatible. If installed together, these mods take precedence over my own.
- Simple Smarter Corpse Run And Tombstone - intelligently predicts your carrying capacity instead of giving you a flat 150 extra, to avoid being overburdened after Corpse Run buff ends
- TombstoneDriveBy - Never open up tombstone like a regular container, just auto-take stuff in a hardcoded priority order