Valheim
Install with App

Details

Latest version
3.4.1
Last Updated
First Uploaded
Downloads
1.9K
Likes
2
Size
362KB
Dependants
ADDatHost Valheim hosting
€1

OttoStash - Everything In Its Place

OttoStash

Updated for Valheim 1.0

Version 3.4.1, built and Harmony-checked against Valheim 1.0.16.

Maintainer: Paul Otto


Coming from AzuAutoStore? Your settings carry over. On first run OttoStash looks for Azumatt.AzuAutoStore.cfg and Azumatt.AzuAutoStore.yml and copies them into its own potto007.OttoStash.cfg and potto007.OttoStash.yml. It never touches an OttoStash file that already exists.

Two names changed with the rename:

  • The console command is now ottostashsearch, not azuautostoresearch.
  • The config files are now potto007.OttoStash.cfg and potto007.OttoStash.yml.

Description

This mod pulls nearby items from the ground into containers. Optionally, use a hotkey to store items in your inventory into containers. WardIsLove compatible, HotBar items can be ignored (on by default), Quickslots can be ignored (if turned on in the configuration!).

1. Need to know

ServerSync checks the version. A client running a different OttoStash version cannot join the server. A client without OttoStash can still join.

This mod uses ServerSync, if installed on the server and all clients, it will sync all configs to client

This mod uses a file watcher. If the configuration file is not changed with BepInEx Configuration manager, but changed in the file directly on the server, upon file save, it will sync the changes to all clients.

TL;DR

  1. Drop this mod in, start a world.
  2. Nearby dropped items are pulled into containers according to the YAML rules.
  3. Press . to dump your inventory into nearby containers (respecting favorites and YAML rules).
  4. Middle-click an item to store just that one.
  5. Hold Y and click an item (or use ottostashsearch) to find where you put something.
  6. Edit potto007.OttoStash.yml to define per-container ranges and allowed/excluded items.
  7. All configuration files are found in the BepInEx/config folder. Examples are found in the yml file.

Compatibility

  • WardIsLove – fully compatible; wards can protect containers as usual.
  • Quick Stack / sorting mods (e.g. QuickStackStore) – UI integration is ordered to avoid grabbing each other’s elements and double buttons.
  • Backpack mods (Smoothbrain’s Backpacks, AdventureBackpack, etc.) – supports storing into backpacks and has options to globally disable storing to any backpack containers.
  • ItemDrawers – supports both KG’s fork and the original Makail version for storing and searching.

Features

  • Automatically store dropped resources into nearby containers within a configurable range
  • Restrict specific items from being stored into containers by defining rules in the configuration file in the BepInEx/config folder called potto007.OttoStash.yml
  • Toggle the storing of items via a keyboard shortcut for a configurable amount of seconds
  • Store a single hovered item into nearby containers with a dedicated hotkey (Default: Mouse2 / Middle Click)
  • Find where your items ended up: hold the Search key (Default: Y) and click an item, or use the ottostashsearch command to ping the nearest container holding it and see how many exist. You can use /ottostashsearch in the chat window. Auto complete for the command is possible so you can type /azuauto and press tab to complete if you don't want to type it all out :D
  • Favoriting from GoldenRevolver By holding the Favoriting Key (default: Alt) or by using a new button, you can left click on an item to favorite it, or right click to favorite the slot it is in. This prevents the quick storing from player inventory from having the mod affect that item. No accidental storing something you didn't want. The favoriting state is shown with a custom colored border around the slot. If GoldenRevolver's mod is present, it will read his favoriting file and use that instead.

Designed to be server-friendly: runs on configurable intervals, chunks bulk transfers, and throttles ownership requests to avoid lag and race conditions.

Includes multiple protections against item loss and duplication, especially when teleporting, dying, or interacting with many containers.

FAQ

  • Frequently asked questions will be added to the wiki tab of this mod as they are asked. Wiki tab is located at the top of this page.

2. Configuration (Collapsed due to length. Click to expand)

Available Configuration Options

1 - General

Lock Configuration [Synced with Server]

  • If on, the configuration is locked and can be changed by server admins only.
    • Default Value: On

Dont Store to Backpacks [Synced with Server]

  • If on, items will not be stored in backpacks.
    • Default Value: Off

Chests Pickup From Ground [Synced with Server]

  • If on, chests will pick up items from the ground if they are in range. If off, chests will not begin their periodic checks for items nearby. Reloading zone or logging out might be required.
    • Default Value: On

Must Have Existing Item To Pull [Synced with Server]

  • If on, the chest must already have the item in its inventory to pull it from the world or player into the chest.
    • Default Value: On

Player Range [Synced with Server]

  • The maximum distance from the player to store items in chests when the Store Shortcut is pressed. Follows storage rules for allowed items.
    • Default Value: 5

Fallback Range [Synced with Server]

  • The range to use if the container has no range set in the yml file. This will be the fallback range for all containers.
    • Default Value: 10

Player Ignore Hotbar [Not Synced with Server]

  • If on, the player's hotbar will not be stored when the Store Shortcut is pressed.
    • Default Value: On

Player Ignore Quick Slots [Not Synced with Server]

  • If on, the player's quick slots will not be stored when the Store Shortcut is pressed. (Requires Quick Slots mod, turn on only if you need it!)
    • Default Value: Off

Ping VFX [Synced with Server]

Highlight Containers [Not Synced with Server]

  • If on, the containers will be highlighted when something is stored in them. If off, the containers will not be highlighted if something is stored in them.
    • Default Value: On

Ping Containers [Not Synced with Server]

  • If on, the containers will be pinged with the Ping VFX when something is stored in them. If off, the containers will not be pinged if something is stored in them.
    • Default Value: On

Seconds To Wait Before Storing [Synced with Server]

  • The number of seconds to wait before storing items into chests nearby automatically after you have pressed your hotkey to pause.
    • Default Value: 10

IntervalSeconds [Synced with Server]

  • The number of seconds that must pass before the chest will do an automatic check for items nearby, WARNING: Reducing this will decrease performance!
    • Default Value: 10

1.5 - Fish

Fish Suction [Synced with Server]

  • Allow auto-storing fish that are still in water, as in boat netting. Off requires fish to be out of the water. On skips that check.
    • Default Value: Off

2 - Shortcuts

Store Single Item Shortcut [Not Synced with Server]

  • Keyboard shortcut/Hotkey to store a single item that you click from your inventory into nearby containers.
    • Default Value: Mouse2

Store Shortcut [Not Synced with Server]

  • Keyboard shortcut/Hotkey to store your inventory into nearby containers.
    • Default Value: Period

Pause Shortcut [Not Synced with Server]

  • Keyboard shortcut/Hotkey to temporarily stop storing items into chests nearby automatically. Does not override the player hotkey store.
    • Default Value: Period + LeftShift

SearchModifierKeybind [Not Synced with Server]

  • While holding this, you can search nearby chests for the prefab you clicked in your inventory.
    • Default Value: Y

3 - Favoriting

BorderColorFavoritedItem [Not Synced with Server]

  • Color of the border for slots containing favorited items.
    • Default Value: FFD800FF

BorderColorFavoritedItemOnFavoritedSlot [Not Synced with Server]

  • Color of the border of a favorited slot that also contains a favorited item.
    • Default Value: 80AC80FF

BorderColorFavoritedSlot [Not Synced with Server]

  • Color of the border for favorited slots.
    • Default Value: 0080FFFF

DisplayTooltipHint [Not Synced with Server]

  • Whether to add additional info the item tooltip of a favorited or trash flagged item.
    • Default Value: true

FavoritingModifierKeybind1 [Not Synced with Server]

  • While holding this, left clicking on items or right clicking on slots favorites them, disallowing storing Identical to FavoritingModifierKeybind2.
    • Default Value: Z

FavoritingModifierKeybind2 [Not Synced with Server]

  • While holding this, left clicking on items or right clicking on slots favorites them, disallowing storing Identical to FavoritingModifierKeybind1.
    • Default Value: Z

FavoritedItemTooltip [Not Synced with Server]

    • Default Value: Item is favorited and will not be stored

FavoritedSlotTooltip [Not Synced with Server]

    • Default Value: Slot is favorited and will not be stored

ItemOnFavoritedSlotTooltip [Not Synced with Server]

    • Default Value: Item & Slot are favorited and will not be stored
Installation Instructions

Manual Installation

Note: (Manual installation is likely how you have to do this on a server, make sure BepInEx is installed on the server correctly)

  1. Download the latest release of BepInEx.
  2. Extract the contents of the zip file to your game's root folder.
  3. Download the latest release of OttoStash from Thunderstore.io.
  4. Extract the contents of the zip file to the BepInEx/plugins folder.
  5. Launch the game.

Installation through r2modman or Thunderstore Mod Manager

  1. Install r2modman or Thunderstore Mod Manager.

    For r2modman, you can also install it through the Thunderstore site.

    For Thunderstore Mod Manager, you can also install it through the Overwolf app store

  2. Open the Mod Manager and search for "OttoStash" under the Online tab. The image below shows VikingShip as an example, but it was easier to reuse the image. Type OttoStash.

  1. Click the Download button to install the mod.
  2. Launch the game.

Example: make a chest that only ever pulls Food & Potions:

piece_chest:
  range: 10
  exclude:
    - All
  includeOverride:
    - Food
    - Potion
Example YAML
# Below you can find example groups. Groups are used to exclude or includeOverride quickly. They are reusable lists! 
# Please note that some of these groups/container limitations are kinda pointless but are here for example.
# Make sure to follow the format of the example below. If you have any questions, please ask in my discord.

# Full vanilla prefab name list: https://valheim-modding.github.io/Jotunn/data/prefabs/prefab-list.html
# Item prefab name list: https://valheim-modding.github.io/Jotunn/data/objects/item-list.html

# There are several predefined groups set up for you that are not listed. You can use these just like you would any group you create yourself.
# These are the "All", "Food", "Potion", "Fish", "Swords", "Bows", "Crossbows", "Axes", "Clubs", "Knives", "Pickaxes", "Polearms", "Spears", "Equipment", "Boss Trophy", "Trophy", "Crops", "Seeds", "Ores", "Metals", and "Woods" groups.
# The criteria for these groups are as follows:
# groups:
#   Food:
#     - Criteria: Both of the following properties must have a value greater than 0.0 on the sharedData property of the ItemDrop script:
#         - food
#         - foodStamina
#   Potion:
#     - Criteria: The following properties must meet the specified conditions on the sharedData property of the ItemDrop script:
#         - 'food' > 0.0
#         - 'foodStamina' == 0.0
#         - Any status effect names/categories contain "potion"
#   Fish:
#     - itemType: Fish
#   Swords, Bows, Crossbows, Axes, Clubs, Knives, Pickaxes, Polearms, Spears:
#     - itemType: OneHandedWeapon, TwoHandedWeapon, TwoHandedWeaponLeft, Bow
#     - Criteria: Items in these groups have a specific skillType on the sharedData property of the ItemDrop script. Each group corresponds to the skillType as follows:
#         - Swords: skillType == Skills.SkillType.Swords
#         - Bows: skillType == Skills.SkillType.Bows
#         - Crossbows: skillType == Skills.SkillType.Crossbows
#         - Axes: skillType == Skills.SkillType.Axes
#         - Clubs: skillType == Skills.SkillType.Clubs
#         - Knives: skillType == Skills.SkillType.Knives
#         - Pickaxes: skillType == Skills.SkillType.Pickaxes
#         - Polearms: skillType == Skills.SkillType.Polearms
#         - Spears: skillType == Skills.SkillType.Spears
#            Example:   An item with itemType set to OneHandedWeapon and skillType set to Skills.SkillType.Swords would belong to the Swords group.
#   Armor:
#     - itemType: Chest, Legs, Shoulder, Helmet
#   Equipment:
#     - itemType: Torch, Bow, OneHandedWeapon, TwoHandedWeapon, TwoHandedWeaponLeft, Helmet, Chest, Legs, Shoulder, Utility, Shield
#   Weapons:
#     - itemType: OneHandedWeapon, TwoHandedWeapon, TwoHandedWeaponLeft, Bows, Swords, Crossbows, Axes, Clubs, Knives, Pickaxes, Polearms, Spears
#   Shield:
#     - itemType: Shield
#   Round Shield:
#     - itemType: Shield
#     - Criteria: sharedData.m_timedBlockBonus > 0.0 "round"
#   Tower Shield:
#     - itemType: Shield
#     - Criteria: sharedData.m_timedBlockBonus <= 0.0 "tower"
#   Chest:
#     - itemType: Chest
#   Legs:
#     - itemType: Legs
#   Shoulder:
#     - itemType: Shoulder
#   Helmet:
#     - itemType: Helmet
#   Utility:
#     - itemType: Utility
#   Trinket:
#     - itemType: Trinket
#   Ammo:
#     - itemType: Ammo
#   Arrows:
#     - itemType: Ammo
#     - Criteria: sharedData.m_ammoType == "$ammo_arrows"
#   Bolts:
#     - itemType: Ammo
#     - Criteria: sharedData.m_ammoType == "$ammo_bolts"
#   ElementalMagic:
#     - itemType: ElementalMagic
#   BloodMagic:
#     - itemType: BloodMagic
#   Boss Trophy:
#     - itemType: Trophy
#     - Criteria: sharedData.m_name ends with any of the following boss names:
#         - eikthyr, elder, bonemass, dragonqueen, goblinking, SeekerQueen
#   Trophy:
#     - itemType: Trophy
#     - Criteria: sharedData.m_name does not end with any boss names
#   Crops:
#     - itemType: Material
#     - Criteria: Can be cultivated and grown into a pickable object with an amount greater than 1
#   Seeds:
#     - itemType: Material
#     - Criteria: Can be cultivated and grown into a pickable object with an amount equal to 1
#   Ores:
#     - itemType: Material
#     - Criteria: Can be processed by any of the following smelters:
#         - smelter
#         - blastfurnace
#   Metals:
#     - itemType: Material
#     - Criteria: Is the result of processing an ore in any of the following smelters:
#         - smelter
#         - blastfurnace
#   Woods:
#     - itemType: Material
#     - Criteria: Can be processed by the charcoal_kiln smelter
#   All:
#     - Criteria: Item has an ItemDrop script and all needed fields are populated. (all items)




groups:
  BronzeGear: # Group name
    - ArmorBronzeChest # Item prefab name, note that this is case sensitive and must be the prefab name
    - ArmorBronzeLegs
    - ArmorBronzeHelmet
  Tier 2 Items:
    - Bronze
    - PickaxeBronze
    - ArmorBronzeChest
    - ArmorBronzeLegs


# By default, if you don't specify a container below, it will be considered as you want to allow storing all objects into it.
# If you are having issues with a container, please make sure you have the full prefab name of the container. Additionally, make sure you have range and exclude or includeOverride set up correctly.
# Worst case you can define a container like this. This will allow everything to be pulled from the container within a range of 30.
# rk_barrel:  
#   range: 30
#  includeOverride: []

## Please note that the below containers are just examples. You can add as many containers as you want.
## If you want to add a new container, just copy and paste the below example and change the name of the container to the prefab name of the container you want to add.
## The values are set up to include everything by using the includeOverride (aside from things that aren't really a part of vanilla recipes, like Swords or Bows). 
## This is to give you examples on how it's done, but still allow everything to be stored into the container.

Player_tombstone: # This is to exclude the tombstone from randomly picking up items that fall near it.
  range: 10
  exclude:
    - All

Player: # This is to exclude backpacks from randomly storing items into them.
  range: 10
  exclude:
    - All

piece_chest:
  range: 10 # This is the range that the container will store items. This overrides the global range set in the config.
  exclude: # Exclude these items from being able to be stored into the container
    #- Food # Exclude all in group
    - PickaxeBronze # Allow prefab names as well, in this case we will use something that isn't a food
  includeOverride:
    # - Food # This would not work, you cannot includeOverride a group that is excluded. You can only override prefabs from that group.
    - PickaxeBronze # You can however, be weird, and override a prefab name you have excluded.

# It's highly unlikely that you will need the armor, swords, bows, etc. groups below. These are just in case you want to use them. 
# They were also easy ways for me to show you how to use the groups without actually excluding something you might want to always pull by default.

piece_chest_wood:
  range: 10
  exclude:
    - Swords # Exclude all in group
    - Tier 2 Items # Exclude all in group
    - Bows # Exclude all in group
  includeOverride: # If the item is in the groups above, say, you were using a predefined group but want to override just one item to be ignored and allow pulling it
    - BowFineWood
    - Wood
    - Bronze
    - PickaxeBronze
    - ArmorBronzeChest
    - ArmorBronzeLegs

piece_chest_private:
  range: 10
  exclude:
    - All # Exclude everything

piece_chest_blackmetal:
  range: 10
  exclude:
    - Swords # Exclude all in group
    - Tier 2 Items # Exclude all in group
    - Bows # Exclude all in group
  includeOverride: # If the item is in the groups above, say, you were using a predefined group but want to override just one item to be ignored and allow storing it
    - BowFineWood
    - Wood
    - Bronze

rk_cabinet: # rk_ is typically the prefix for containers coming from RockerKitten's mods
  range: 10
  exclude:
    - Food
  includeOverride:
    - Food

rk_cabinet2:
  range: 10
  exclude:
    - Food
  includeOverride:
    - Food

rk_barrel:
  range: 10
  exclude:
    - Armor
    - Swords

rk_barrel2:
  range: 10
  exclude:
    - Armor
    - Swords

rk_crate:
  range: 10
  exclude:
    - Armor
    - Swords

rk_crate2:
  range: 10
  exclude:
    - Armor
    - Swords

Version Information

The full release history lives in CHANGELOG.md, and it renders on the Changelog tab of the Thunderstore package page.

Credits

OttoStash is maintained by Paul Otto.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro