LogoLogo
What's new?StatusMSquared
  • Morpheus Platform Documentation
  • What is Morpheus Platform?
    • Glossary
    • Interoperability
    • Support
    • EULA
  • Firewall Problems
  • 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
      • Editor Versions
      • Performance Guarantees
      • 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
          • CrowdAudioComponent advanced configuration
        • 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
        • 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
      • 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 Requirements
      • Broadcast
        • OBS Integration
      • Failover
      • Capacity and Queue Management
  • ADMINS
    • Access Control
      • Add Metaverse Contributors
      • Create 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
  • Dashboard
    • Assets
      • Assets Versions
      • Engine Plugins
      • Project Plugins
      • Templates
    • Releases
  • Integrations
    • Analytics
      • Send Events from Web
      • Send Events from Unreal
    • Chat
      • Integrate Pubnub with your Unreal Project
      • Add Moderation to Chat
Powered by GitBook
On this page
  • Overview
  • Integration
  • Live config
  • Making new quickbar views
  • Adding your new view
  • How to use Quickbar Views
  • How to get the relevant quickbar views
  • Setting tab-specific starting items
  • Auto-equipping to tabs

Was this helpful?

  1. CREATION
  2. Unreal Development
  3. Features & Guides
  4. Inventory
  5. Quickbar & Inventory Tabs

Quickbar Views

Last updated 1 year ago

Was this helpful?

NOTE: Quickbar views are an alpha feature. Implementation and recommended usage may change as it moves into beta.

Overview

A follow-up addition to the inventory system was the introduction of the "fractional view" of an underlying "quickbar", allowing us to have different tabs of the same underlying equipment. Consider e.g. where we want two different equipment quickbars we can switch between, each containing 8 slots, or having 3 different types of equipment quickbars, for different types of use item (e.g. emotes, potions, or admin tools). For each of these, we can achieve them by making "views" of the underlying JM_EquipmentComponent's slots, assigning each tab to be a certain number of them (slots 1-8 being for tab 1, 9-16 being for tab 2 and so on). This gives us flexibility to customize how the equipment component is used, without modifying the underlying equipment logic.

The views all extend the M2_InventoryViewComponent, and have a QuickbarClass of the quickbar they are a sub-view of (e.g. JM_EquipmentComponent). They are created via the M2_InventoryViewManagerComponent, present on your morpheus character.

Integration

Live config

The following flags are important for controlling usage of this new system, vs the old approach of using e.g. your quickbar directly:

  • Inventory.Quickbar.UsingEquipmentTabs: If true, the fractional views will be created and used to subdivide the underlying equipment. (The name of this flag is controlled by the ViewsEnabledConfig variable in your InventoryViewManagerComponent)

  • Each tab has a MaxSlotsOverrideConfigName which is used to modify how many slots each tab can have. E.g.

    • Inventory.Quickbar.GadgetTabSlots: The number of slots for the "Equip" tab (BPC_EquipmentQuickbarTab)

    • Inventory.Quickbar.EmoteTabSlots: The number of slots for the "React" tab (BPC_EquipmentQuickbarTab_Emotes)

    • Inventory.Quickbar.DirectTabSlots: The number of slots for the "Direct" tab (BPC_EquipmentQuickbarTab_Director)

NOTE: If the underlying quickbar does not have enough slots to contain all your views, it will be expanded to fit them.

E.g. If Inventory.MaxEquipmentSlots is set to 8, but the combined total of e.g. GadgetTabSlots, DirectTabSlots and EmoteTabSlots is 16, the equipment component will end up having 16 slots, not 8.

Making new quickbar views

If you want to make a new view, you can do the following:

  • Create a new class extending at least M2_InventoryViewComponent

    • If the view is of your equipment (i.e. you are using "use items"/"gadgets"), you can use BPC_EquipmentQuickbarTab as a base with some sensible defaults as a starting point.

  • Configure its important methods and properties:

    • QuickbarClass - the class of the quickbar we're wanting to view, e.g. JM_EquipmentComponent.

    • DesiredMaxSlots - how many slots you want your tab to have.

    • MaxSlotsOverrideConfigName - if you want to override the above using live config.

    • CanAutoAssignToView - if the Inventory.AutoEquipItems live config flag is true, then items can be automatically added to this view/tab once added to your inventory.

      • If the same item can be added to multiple tabs/views, it will add them in the order of the views in the M2_InventoryViewManagerComponent)

    • IsItemValidForQuickbar - a method to override if you want your quickbar to use a specific type of item.

NOTE: Currently you can only obtain information about the item that can be obtained before loading the item, e.g. its name and what custom details it has. (The actual values of the custom details would require loading, so aren't accessible).

E.g. we have the BPC_EquipmentQuickbarTab_Emotes, which is a sub-view of our equipment (JM_EquipmentComponent), but modifies the IsValidForQuickbar method to only support item gadgets

Adding your new view

  • Add your view to the InventoryViewClasses list, in your M2_InventoryViewManagerComponent

    • (The order they are added will be the order that the slots take on the underlying quickbar component, and will affect e.g. which slots are being auto-equipped to.

NOTE: If you have more slots than are available in the underlying quickbar component, the quickbar will fail to be added.

  • Make a tab that uses your view, and add it to your tab manager

    • Set the QuickbarViewClass to be the new view you added

How to use Quickbar Views

How to get the relevant quickbar views

  • To get a quickbar view, the best approach is to go through the quickbar manager.

    • You can listen to when the views have all been set up using the WaitForViewManager

      • (This takes the Actor we expect the view manager to be on)

      • This handles any race conditions with respect to the views being created.

  • Then you can search for the relevant views using the following helpers:

    • GetViewByClass - takes the exact view class (e.g. BPC_EquipmentQuickbarTab_Emotes), and finds the relevant view component that matches exactly

    • GetViewsByParentClass - takes a view class, and finds all classes that extend from that. (e.g. you can provide M2_EquipmentViewComponent to return all the equipment views)

    • GetViewsOfQuickbar - takes an underlying quickbar class (e.g. JM_EquipmentComponent) and returns all views of that quickbar

Setting tab-specific starting items

  • When adding entries to the map, the key is the class, e.g. BPC_EquipmentQuickbarTab_Director

  • Each entry has an ItemList, of items that we want to be added to that view.

    • (If the item isn't valid for that specific view, it will fail to be added)

  • The entry also has a AddIfViewsDisabled flag. If true, then if views are disabled (via the Inventory.Quickbar.UsingEquipmentTabs flag), the item will still be added, and will be equipped to the underlying quickbar (e.g. JM_EquipmentComponent). Otherwise, the items will be ignored if not using views.

Auto-equipping to tabs

Outside of the role starting items, if you want items to be automatically equipped to tabs once added to your inventory or not, you can use the CanAutoAssignToView property.

This requires the Inventory.AutoEquipItems live config flag to be true.

If the same item can be added to multiple tabs/views, it will add them in the order of the views in the M2_InventoryViewManagerComponent)

For more details, see

Quickbar views can be used in the same way as regular equipment/quickbar components - both use an interface + helper function library that provide implementations for methods. For more details on some of the relevant functions, see . The following screengrab shows some examples of different helpers that you can use to interact with a quickbar view:

Similar to the starting items controlled by your roles table (see ), we have a new field called StartingViewSpecificInventoryAssets. In this, you can specify item lists that are meant to be added directly to a given inventory view class.

Having items in your “starting inventory”
The Quickbar Component(s)
Creating a new tab type
The "Direct" tab is another quickbar view of our gadgets/equipment, similar to "Equip". "React" is a quickbar view of our use items, but exclusive to "emote" items.
The fields and IsValidForQuickbar implementation for BPC_EquipmentQuickbarTab_Emotes
In DT_Origin_Roles, the Presenter role has some emote items added to the "React" tab only if using views, and some presenter-specific items added to the "Direct" tab, which we want to be present regardless of whether we're using the tabs quickbar views system.
The BPC_EquipmentQuickbarTab_Director is an example of a tab we don't want to use auto-equipping for - it has regular gadgets like the "Equip" tab, but we only want the intentionally assigned items to be present there (items will only be auto-equipped to the "Equip" tab).