Soulslike Framework Docs
  • Welcome to Soulslike Framework!
  • Framework Overview
    • About the Framework
    • Features & Systems
    • Before Purchasing
    • Personal Assistance
  • Getting Started
    • Setting up Animations
      • Setup Locomotion Blendspaces
      • Setup Custom Montages
    • Using the Utility Tools
      • Easy Setup Tool
      • Asset Creators
      • Asset Browsers
    • Actor Tags
    • Finding References
  • Workflow
    • Using a Custom Character
    • Creating & Editing Actions
    • Creating & Editing Stats/Attributes
    • Creating & Editing Status Effects
    • Creating & Editing Buffs
    • Creating & Editing Items
      • Creating & Editing Weapons
    • Creating an Enemy
    • Creating Cinematics
  • Animation Notifies
    • Damaging & Combo's
      • Register Attack Notify
      • Weapon Trace Notify
        • AI Weapon Trace Notify
      • Fist Trace Notify
        • AI Fist Trace Notify
      • Area of Effect Damage Notify
      • Spawn Projectile Notify
        • AI Spawn Projectile Notify
    • Defensive
      • Try Guard Notify
      • Hyper Armor Notify
      • Invincibility Frame Notify
    • Feedback
      • Weapon Trail Notify
        • AI Weapon Trail Notify
      • Camera Shake Notify
        • World Camera Shake Notify
      • Launch Field Notify
      • Chaos Field Notify
      • Footstep Notify
    • Miscellaneous
      • Input Buffer Notify
      • Interrupt Montage Notify
      • Camera Sequence Notify
      • Set Movement Mode Notify
      • AI State Notify
      • AI Rotate Towards Target Notify
      • Adjust Stat Notify
  • Components / Managers
    • Player Specific Components
      • Input Buffer
      • Action Manager
      • Combat Manager
      • Interaction Manager
      • Inventory Manager
      • Equipment Manager
      • Ladder Manager
      • Progress Manager
      • Save/Load Manager
      • Radar & Radar Element Components
      • Central Debug Component
    • Shared Components
      • Stat/Attribute Manager
      • Status Effect Manager
      • Weapon Collision Manager
      • Buff Manager
      • Loot Drop Manager
    • AI-Only Components
      • AI Interaction Manager
      • AI Behavior Manager
      • AI Combat Manager
      • AI Boss Manager
  • Extending Functionality
    • Using Motion Warping
    • Custom Saving/Loading
    • Adding New Settings
    • Extending Weapon Animsets
    • Weapon Specific Impact Sounds
    • Resetting Enemies After Resting
Powered by GitBook
On this page
  • How It Works
  • Example Usages

Was this helpful?

  1. Components / Managers
  2. Player Specific Components

Inventory Manager

PreviousInteraction ManagerNextEquipment Manager

Last updated 3 months ago

Was this helpful?

The Inventory Manager (AC_InventoryManager) provides all the necessary functionality to handle player Inventory & Storage, including adding, removing, and using items, managing currency, and updating the UI in runtime.

It is added to the PlayerController class by default (PC_SoulslikeFramework).

How It Works

  1. Initialization:

    • Initializes all item slots and prepares the inventory UI for use.

    • InitializeLoadedInventory method tries to load inventory data from the relevant save slot.

  2. Item Handling:

    • Adding Items: Items can be added through the relevant item asset or a Gameplay Tag.

      • Automatically increments quantity if the item already exists, or creates a new slot if it doesn’t.

    • Removing Items: Removes a specific quantity or deletes the item from the inventory entirely.

    • Using Items: Triggers the item’s OnUse function, spawning the appropriate actor (e.g., potion, consumable) and applying effects.

    • Triggering Actions: Triggers the item's provided ActionTag, queueing it through the Input Buffer.

  3. Inventory Queries:

    • Supports multiple ways to query inventory data:

      • HasItem: Checks if a specific item is present.

      • GetAmountOfItemWithTag: Retrieves the quantity of items matching a specific tag.

      • GetEmptySlot: Finds the next available empty inventory slot.

  4. UI Updates:

    • Event dispatchers such as OnInventoryUpdated and OnCurrencyUpdated ensure the inventory UI is always in sync with changes.

    • The GetInventoryWidget function links the UI directly to the inventory component.

  5. Saving/Loading:

    • The SaveAllInventory function serializes the inventory state, including items, quantities, and configurations.

    • Inventory data is restored on load using the InitializeLoadedInventory function.

Example Usages

The provided Parent Door Class (B_Door) has a great example on utilizing the Inventory Manager for checking if multiple key items (e.g, KeyA x1 & KeyB x4) exist in inventory before unlocking a door:

Rest of the functionality is mainly handled by Inventory Widget.