User Stash - Multiple Stash Update!

The User Stash package is a way to allow users to save and load items outside of their inventory. Think of it as a storage chest that players use to clear up their hotbar.

Installing

  1. Go to the community tab and search “User Stash”
  2. Install the package
  3. Drag the UserStash script folder onto the user template
  4. Drag the StashChest into the world

Properties
There are a few properties that can be used here to customise the way the stash works.

  • maxSize = This sets the overall size of the stash
  • stashFullMsg = The message to appear when attempting to deposit an item and the stash is full
  • inventoryFullMsg = The message to appear when attempting to withdraw an item and the inventory is full
  • errorMsgShowTime = How long the error message stays on screen for
  • saveVersion = Used to track the save version, changing this will wipe any data with a different version next time a player loads into the game

Multiple Stashes
If you want multiple containers/chests to act as different stashes then simply give them a unique stashID on the stashScript
image

Example
The inventory is on the left and the stash is on the right

Any suggestions, issues, questions always welcome either here or on Discord (https://discord.gg.crayta)

5 Likes

Hey @RussD , there’s a bug with this package that breaks it, something is invalidating the itemTemplate property:

[Server] [Error] userStashScript:74: attempt to index local 'itemTemplate' (a nil value)
stack traceback:
	userStashScript:74: in function 'GetIcon'
	userStashScript:106: in function 'OpenStash'
	userStashScript:159: in function <userStashScript:123>
[Server] UserStashScript:DepositItem -home-stash-1
[Server] [Error] inventoryScript:121: attempt to index local 'template' (a nil value)
stack traceback:
	inventoryScript:121: in function 'IsCurrency'
	inventoryScript:193: in function <inventoryScript:191>
	[C]: in function 'SendToScripts'
	userStashScript:157: in function <userStashScript:123>
[Server] UserStashScript:OpenStash -home-stash-1
[Server] [Error] userStashScript:74: attempt to index local 'itemTemplate' (a nil value)
stack traceback:
	userStashScript:74: in function 'GetIcon'
	userStashScript:106: in function 'OpenStash'
	userStashScript:159: in function <userStashScript:123>```