Valheim
0 of 0

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

aedenthorn

Virus scan

Safe to use

Tags for this mod

About this mod

Lets you add a storage component to any vanilla or custom inventory item.

Permissions and credits
Changelogs
Donations
Description

This mod lets you use any single-stack inventory item as a container.

As a modding resource, this allows modders to create custom items that can use this mod to act as a bag, pouch, backpack, pocketed-clothing, etc.

There are two parts to the storage system: templates and items.


Templates

Templates are stored as JSON in BepInEx\plugins\ItemStorageComponent\templates. Here is an example template, BepInEx\plugins\ItemStorageComponent\templates\ArmorLeatherLegs.json:


{
"itemId": "ArmorLeatherLegs",
"itemName": "Leather pants",
"allowedItems" :[
],
"disallowedItems ":[
],
"width": 4,
"height": 2,
"weightMult": 1.0
}

allowedItems and disallowedItems can contain lists of spawn names of items to allow only or disallow those items. E.g.:

"disallowedItems ":[
"Wood",
"Stone"
],

The allow list overrules the disallow list.

You can either create a template yourself or turn off RequireExistingTemplate in the config file and the mod will create a template when you first try to open an item type that doesn't have a template as container.

Template files are named after the item spawn name, which is also the itemId field. itemName can be whatever you want.


Items

Item storage is saved per-instance of an item type in BepInEx\plugins\ItemStorageComponent\items. So if you have several of the same item type, each one will have its own inventory.

To open an item as a container, hold down the modifier key (default left shift) and select the item in your inventory.

Items must be single-stack (i.e. cannot be stacked together in your inventory) in order to be used as containers.

By default, items to be used as containers must also be equipped and there must be an existing template file for that item type. Both of these options can be disabled.


Config

A config file BepInEx/config/aedenthorn.ItemStoraageComponent.cfg is created after running the game once with this mod).

You can adjust the config values by editing this file using a text editor or in-game using the Config Manager.

To reload the config from the config file, type itemstoraagecomponent reset into the game's console (F5).


Technical

To install this mod, place the zip file contents in the BepInEx/plugins folder. You will need BepInEx.

Code is at https://github.com/aedenthorn/ValheimMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.

Click here for a list of all my mods for Valheim.