LogoLogo
API Status
  • ๐Ÿ‘‹Welcome
  • ๐ŸŒWhat is Morpheus Platform?
    • Interoperability
  • โ„น๏ธHelp
    • ๐Ÿ“—Glossary
    • ๐Ÿ†˜Support
    • Firewall problems
    • EULA
  • CREATION
    • ๐ŸŽฎUnreal Development
      • โšกGet Started
        • โš’๏ธDownload the Editor
        • โซUpload Content
        • ๐ŸŒŽCreating your own map
        • ๐Ÿ“Morpheus Base Project
        • โ“Differences from Unreal
          • ๐ŸงCharacter Configuration
        • ๐Ÿ“กMorpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • ๐Ÿ“šFeatures & Guides
        • ๐Ÿ“’Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • ๐ŸŠActor Pooling
        • ๐Ÿ”ŠAudio
        • ๐ŸŽญAvatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • ๐Ÿค–Bots
        • ๐ŸŽ™๏ธChat
          • Unreal Text Chat
        • ๐ŸŽ›๏ธControl Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • ๐Ÿ”‰Crowd Audio
        • ๐ŸคผCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • ๐ŸฑHelpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • ๐Ÿ–ฅ๏ธLoading Screen
        • โšกLive Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • ๐ŸงŠMML
        • ๐Ÿ•บMotion Capture
        • ๐Ÿ“กNetworking
        • ๐Ÿ“ขNotifications
        • Raycastable Crowd
        • ๐ŸŒSingletons
        • ๐Ÿ“ฑStreaming & Multiplatform
          • GFN on mobile
        • ๐Ÿ–ฅ๏ธUI
          • "UI Mode"
        • ๐Ÿ—ƒ๏ธUser Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • ๐Ÿ“บVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • ๐ŸžVisual Debugging
          • Inspector
        • ๐ŸชŸWeb UI
        • Online Services
          • KV Store Service
        • ๐Ÿ’ Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • โœˆ๏ธWorld Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • ๐Ÿ”‘Workflows
        • โ†—๏ธUpgrade the Editor
          • ๐Ÿ–ฅ๏ธVersion History
        • โš™๏ธEditing Project Settings
        • ๐Ÿ“ˆProfiling
        • ๐ŸงบMarketplace Importing
        • ๐Ÿ› ๏ธExtra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • ๐Ÿ“šUseful Reading
        • โญBest Practices
    • ๐ŸŒŽWorlds
      • ๐Ÿ“ฉInvite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • ๐Ÿ“…Running events
      • โœ…Large scale events - Checklist
      • ๐Ÿ‘พAnti-Cheat (EAC)
      • ๐ŸŽฎPlayer Entry
        • ๐Ÿ“ฑReact Native
        • Steam
        • ๐Ÿ’ปHardware Reqs
      • ๐ŸŽฅBroadcast
        • ๐Ÿ“นOBS Integration
      • Failover
      • ๐ŸCapacity And Queue Management
  • ADMINS
    • ๐Ÿ‘ชAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • ๐Ÿ’ฒPricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • โš™๏ธSettings
      • ๐Ÿ—ƒ๏ธProjects
  • APIs and Tooling
    • ๐Ÿ–ฅ๏ธAPI Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • ๐Ÿ’ปTemplate Web App
      • ๐Ÿ’ขModeration
    • Pixel Streaming
    • ๐Ÿš€Launcher
  • Integrations
    • ๐Ÿ“ŠAnalytics
      • Sending events from web
      • ๐ŸŽฎSending Events from Unreal
    • ๐Ÿ’ฌChat
      • ๐ŸŽฎIntegrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page
  • How to use the Item Management UI
  • NOTE: Device Inputs
  • How to add items to your inventory/quickbar
  • Having items in your โ€œstarting inventoryโ€
  • Using the console (for testing purposes only)
  • Using the โ€œItem granterโ€ device
  • Doing it manually

Was this helpful?

  1. CREATION
  2. ๐ŸŽฎUnreal Development
  3. ๐Ÿ“šFeatures & Guides
  4. ๐ŸŽ’Inventory

How to Use Devices

Last updated 14 days ago

Was this helpful?

This page outlines some tips and tricks on how to add devices to your project, and how to use them.

Note: This requires your project to be configured so that it is able to use devices. Integration for details on how to set that up.

How to use the Item Management UI

  • When you first connect, you start with the โ€œdevice quickbarโ€ displayed.

    • You can enter the โ€œInventory viewโ€ screen by clicking the button on the left (or pressing TAB)

    • You can enter the โ€œPlace modeโ€ screen with the button on the right (or pressing 9)

    • Clicking any quickbar slot will โ€œselectโ€ that slot, opening its device-specific UI.

    • Pressing Q or the โ€œcrossโ€ button will deselect the item, and exit the device-specific UI.

    • Some devices may have additional controls, e.g. Device Modules.

    • Clicking on an empty slot (with the + icon) will also take you to the โ€œInventory viewโ€ screen, to manage adding items to the available slots.

  • The โ€œInventory viewโ€ screen can be used to click and drag items to/from your quickbar.

  • More details on the "place mode can be found in Place Mode.

  • NOTE: Some parts of this UI can be hidden/disabled. See Live config for details on this.

NOTE: Device Inputs

Depending on the project, you may default to the mouse being visible and able to click on things on the screen (Approachability), or the mouse being captured for camera movement, and the cursor being hidden (game ready). For more details, see Control Schemes.

To support both of these flows, there are a few helper methods that can be used.

  • BPC_M2_ApproachabilityCameraControl::AddClickToTurnOverrideStack/RemoveClickToTurnOverrideStack: Use these when initializing and tearing down an item respectively to force the item into "UI mode", so you can click on things on the screen.

  • BP_Approachability_PlayerController::DisableAndLockUIMode/RestoreAndUnlockUIMode: Use these when initializing and tearing down an item respectively to force the item's execution into "game ready" mode.

NOTE: Some legacy devices expect LMB/RMB to be bound automatically, to trigger the Primary/Secondary Input events, e.g. the force push ability (PDA_Item_ImpulseGlove). If you need to achieve this behaviour, it is controlled by a capability in the roles data table: Capabilities.Inventory.ItemControlledQuickbarInputs. By default this is off, since having LMB/RMB always bound to the item handler can block other inputs, like "click to move". If you need this sort of behaviour, the preferred approach would be to explicilty listen to the inputs you want using ListenToInputs.

How to add items to your inventory/quickbar

Having items in your โ€œstarting inventoryโ€

This is the currently desired use case - when you switch to a particular role, your Quickbar is automatically set up, with a defined list of items

  • In the appropriate roles data table, add the item assets you want to the Starting Inventory Assets list.

    • E.g. if you want an item to be automatically given to presenters, but not given to regular participants, you can add it to specifically the Presenter role.

    • The entries in the list are the โ€œItem Assetsโ€ (The PDA_Item_[X] asets).

    • Note: You can see which roles table you are using in your levelโ€™s WorldSettings

  • Once these have been updated, you can switch to the role (e.g. in the Esc menu) and your Quickbar should be automatically set up.

  • NOTE: The number of slots in your Quickbar is controlled by live config (Inventory.MaxEquipmentSlots).

  • NOTE: By default, if you donโ€™t have any items equipped, your Quickbar is hidden. If you donโ€™t want this behavior, you can turn off the Inventory.Quickbar.HideIfEmpty feature flag.

Using the console (for testing purposes only)

We also have some console commands for testing out the inventory system, for e.g. granting and equipping different items:

  • Juno.Inventory.AddItems [ItemName list, separated by spaces] - will add the item(s) to your inventory. e.g. Juno.Inventory.AddItems PDA_Item_Pointer PDA_Item_Ping_Approachability

    NOTE: Adding an item to your inventory will not automatically add it to your quickbar, since it doesnโ€™t default to being โ€œequippedโ€, unless the Inventory.AutoEquipItems live config is set to true.

  • Juno.Inventory.RemoveItem [ItemName] - will remove the item from your inventory (and your quickbar if it was added there)

  • Juno.Inventory.EquipItem [ItemName] - provided the item is in your inventory, equip it (which will add it to your quickbar)

  • Juno.Inventory.SelectItem [ItemName] - selects the item, provided it is equipped (functionally the same as pressing the button in the quickbar, or using the num-keys)

Using the โ€œItem granterโ€ device

Using either of the above approaches, you can grant a player the PDA_Item_ItemGranter item.

With this device equipped, you can grant an item to everyone currently present in the level, either by typing it in manually, or selecting it from the list.

NOTE: This device is ALPHA, so may be subject to change.

Doing it manually

We have a number of blueprint accessible methods for granting items:

  • JM_InventoryComponent::AddInventoryItem(s)

    • If you have access to the Morpheus Actorโ€™s JM_InventoryComponent, and know the Name of your item/device, you can manually add it to that player.

    • You can either type the name(s) in manually, or use AssetNameFromSoftObjectPtr to search for the correct asset.

    • When you add the item, the Item Key is returned - this is the unique identifier used to refer to this added item.

    • NOTE: These need to be done from the server.

  • GrantItemToAll

    • This is a helper function that grants the item to all players currently in the map.

    • NOTE: This hasnโ€™t been tested at scale, so please get in touch if youโ€™re wanting to use this for large scale events

    • NOTE: The item wonโ€™t automatically be added to late joiners.

For removing items, you use the RemoveItemByItemKey method.

  • This takes the ItemKey - to find the item key of an item there are number of ways:

    • FirstKeyOfItem - this can be used to get the item key of an item with a given name in your inventory. If you donโ€™t have any, it returns -1.

    • GetKeysWithItemName - if you can have multiple items with a given name (i.e. you are allowing duplicates of that item), you should instead use this, to get all the items.

    • If you keep track of the item key returned when you added the item, or get the key from the slot in your equipment component, you can refer to these to remove the item.

  • If you have stacking items at that key, you can remove multiple at once using a NumToRemove value greater than one.

To equip items:

  • If you have the Inventory.AutoEquipItems config flag set, items added to your inventory are automatically equipped.

  • If you go to the inventory view, you can manually equip items by dragging them into your quickbar.

  • Otherwise, you can manually equip the item using AddItemKeyToAssignmentSlots

    • If a SlotIndex >= 0 is provided, it will attempt to equip the item to that exact slot (replacing/swapping with the item already in that slot).

    • If a SlotIndex < 0 is provided, it will attempt to equip the item to the first empty slot. If there are no empty/available slots, the request will fail.

If you want to make your item have inputs that listen to keys as shortcuts, the two recommended approaches would be to add the shortcuts to your button data (see ), or listen to shortcuts in your item executor (see ).

Configure the โ€œbutton dataโ€
Adding input events to the executor