Inventory Window

this readme will be updated in the package vice the forum.


Inventory Window README

  1. Features:
  • dynamically resizes
  • reads on User Inventory Script for database
  • inventory size could break if too large on save, NOT TESTED
  • right side placement - allows for future shop to be on left side
  • widget has setting // out for center and left placement
  1. Dependices
  • Crayta Inventory Package
  • Crayta Prompts Package
  • Crayta AutoSave Package
  1. Install
  • place template “Player Inventory Window” on player template
  • adjust setting under player template on added script folder
  • details on settings below…
  1. Navigation
  • Item Selection
    • Controller
      • L-stick moves left, right, up, and down
      • R-stick moves cursor for pointer
    • WASD moves up, left, down, and right
    • Mouseover support using real mouse
  • Sort (todo)
    • (default)
      • hold R3 controller
      • hold C keyboard
    • shows progress bar before sorting
    • hold for x seconds
    • prevents accidentaly sorting
  • Drop (todo)
    • (default)
      • Y controller
      • R keyboard
    • drop
      • placement where (todo)
      • hold progress bar …
  • Add (ver 1.1 addition)
    • (default)
      • A controller
      • [spacebar] keyboard
    • Hotbar
      • add hotkey to inventoryItem
      • Hotbar should update with item
    • Appears only if hotbar script on player
  • Move (todo)
    • Action
      • pickup fm index
      • drop to index
  • Use (todo) - Hotbar
    • (default)
      • X controller
      • E keyboard
    • event (todo) submenu ?
    • Hotbar

      • just add hotkey to inventory array?
  • Close
    • button on widget, lower right corner
    • (default)
      • B on controller
      • Q on keyboard
  1. Button Pressed
  • when window is visible
  • sends to lua client for action
  1. Show Currency
  • blank = show no currency
  • container list (of templates)
    • sort based on index of container
    • show one or many or none (blank)
    • leave blank in array for spacer
    • DOES NOT autosort
  1. Open Prompt
  • text and icon to display on screen
  • uses prompts package
  1. Open Button
  • LocalOnButtonPressed function
  • when window open, not called
  • uses prompts package
  1. Window Name
  • text that appears over inventory
  • needs other language support
  1. Close Prompt
  • text and icon
  • displayed on lower right button
  1. Close Action
  • action sent from widget to lua
  • no lua LocalOnButtonPressed used

– Changelog

2021-11-17 README updated - localization added - some script comments
2021-11-25 README updated - maxSize is changed to dynamic - client side selected item tracking added
2021-12-11 README update - added optional hotbar and command to add and remove from hotbar

2 Likes

Hi sinjin, really like the look of this package. I’m trying to use it to clear my inventory bar at the bottom of my screen behind a button prompt. That’s what this can do right? Does it currently also do this for currency because it looks from the screenshot it does. I couldn’t find the hotbarSaveScript that it said it should include?


  1. remove InventoryView (it’s the hotbar that’s part of crayta inventory)
  2. add the template InventoryWindow to the player
  3. add the template Hotbar View to the player
  4. add the template Horbar to the user
  5. add hotbar save script to auto save under user

note: i forgot to add the last two items to package (package is now updated)
ping me on discord if you need help. i’m around, usually.

1 Like