> For the complete documentation index, see [llms.txt](https://visualonecompany.gitbook.io/storyframeworkdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visualonecompany.gitbook.io/storyframeworkdocs/core-components/editor/storage-containers.md).

# Storage Containers

SF Includes simple and effective Storage Containers that can be used to scatter loot around your levels, or alternatively allow the player to use a specific storage container actor as their "persistent" storage.

***

The Storage Container actor can be placed into the scene. It can be found in the StoryFramework > Core > Gameplay > Interaction directory.

<div align="left"><figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FhV9AEoWOJjZlaHsUptmw%2FStorageContainer.png?alt=media&amp;token=488a26ee-0f27-4764-a60f-ab8ea6f8c3c9" alt=""><figcaption></figcaption></figure></div>

Once placed in the scene, it will appear as an "empty" interactable. From here, you can add your own mesh / components to the storage container by clicking on the ![](https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FliDKY0MI37ZAhmtV8uhc%2Fimage.png?alt=media\&token=5b4aa9b0-95c2-44ce-a0bf-0acacb80c853) button in the details panel with your storage container selected (near the component hierarchy).

***

Managing how this storage container will behave is done so through the details panel under the "Loot" section.

<div align="left"><figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FK4BBWZM7CIeKfSAwKxow%2Fimage.png?alt=media&amp;token=00853751-9f54-43a5-af52-9b07cbe81059" alt=""><figcaption></figcaption></figure></div>

**Use Persistent Storage**\ <sup><mark style="color:$info;">Determines whether loot displayed in the container is sourced from the "Loot Profile" defined, or if this storage container is "persistent storage" – meaning the contents shown within the storage container is items the player has put into it from any other storage container marked as "persistent storage".<mark style="color:$info;"></sup>\
**Loot Profile**\ <sup><mark style="color:$info;">Loot Profiles determine what set of random items can appear in your storage container IF your storage container is not marked as "persistent storage".<mark style="color:$info;"></sup>\
**Inventory Size**\ <sup><mark style="color:$info;">The number of slots that appear within this storage container. Applies to both storage containers that use Loot Profiles as well as "persistent storage".<mark style="color:$info;"></sup>

***

Loot Profiles are data assets containing information about randomly generated items. In the context of storage containers, its used to determine what items should be inside of your storage container. Below will explain how Loot Profiles are setup.\
\
Upon creating a new Loot Profile data asset, you'll be greeted with the `Loot Groups` array. This is a simple list for internally identifying different groups of loot for loot generation to sample from (I.e. names set here aren't used elsewhere).

<figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FXw66bbMSR1AasvRwAFku%2Fimage.png?alt=media&amp;token=4115ff56-552f-47a8-a242-d214d20edb4e" alt=""><figcaption></figcaption></figure>

Within each `Loot Groups` entry, you'll be prompted to define the randomization rules for the bottom `Entries` array (the array containing the data for each of your items). `Roll Chance` (scale between "0,0" - "1,0") determines what chance this specific `Loot Groups` entry has to be picked during random generation. `Random Iteration Range Min/Max` determines how many times to loop through this same `Loot Groups` entry, picking a random item from the `Entries` array. `Allow Duplicates` simply determines whether the same item in the `Entries` array can be picked multiple times.

<figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2FmDOBNilS69PpI3R6ybhO%2Fimage.png?alt=media&amp;token=6c3bf8a3-e3bc-43a0-b136-85aa942a13e6" alt=""><figcaption></figcaption></figure>

Let's touch on an item entry in the `Entries` array. Upon adding a new entry, you'll find two values to define. `Loot Data` is the interaction data for your item. You have 2 options to pick from here; `InteractData_S` (The full interaction data of an item), or `SimpleInventoryItem_S` (a simplified version of the base `InteractionData_S` structure that only contains inventory relevant data). `Weight` determines the probability of this item being picked during random generation.

<figure><img src="https://2310584459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuiMQl6UzBr8OnuaoaiWO%2Fuploads%2F2jfprDYoycP3wod8HRfR%2Fimage.png?alt=media&amp;token=cfd86b70-2773-4888-a970-26267fd507f4" alt=""><figcaption></figcaption></figure>

***
