How to Store Weapon Data in Inventory (Static + Runtime) using Fragments & Gameplay Tags | EP - 59

Опубликовано: 11 Июнь 2026
на канале: Unreal Shinobi
613
10

In this episode, we take the Inventory System to the next stage — by storing weapon data the correct way using a Lyra-style architecture.

Instead of hardcoding values or using child classes for every weapon, we separate:
🟩Static Data using Item Definition (firepower, mag size, name, mesh)
🟩Mutable Runtime Data using Gameplay Tags (current ammo, upgrades, durability, price)

You’ll learn how to:
🟩Represent weapons in inventory without subclass hell
🟩Attach multiple fragments to a single weapon item
🟩Use gameplay tags to store runtime weapon state safely
🟩Make weapon data compatible with GAS & multiplayer
🟩Prepare the system for upgrades, attachments & durability

This is a crucial foundation if you are building RE4-style combat, RPG inventory, or a live-service weapon system.
Assets available for FREE on 🚀 Discord -   / discord  

If you want to support me
🌳Ko-Fi https://ko-fi.com/unrealshinobi
🌳Patreon   / unrealshinobi  

📌 Missed the Previous Episode? Watch the Full Playlist Here:

👉 Master Unreal Series -    • How to make your first game in Unreal engi...  

👉 Master Level Design Series -    • Master Level Design with Blender & Unreal  

🎬 Don’t forget to:
👍 Like the video if you found it helpful!
🔔 Subscribe for more UE5 tutorials
💬 Comment below with any questions or suggestions!


Chapters will be uploaded soon
0:00 — Introduction & Requirements for This Episode
0:45 — Recap: Static Method of Creating Item Instances
2:00 — Getting the Default Object from an Item Definition Class
5:48 — When Should a Function Be Marked as `const`?
6:30 — Quick Recap: Pure Functions (Resident Evil 4 Inventory Example)
7:32 — Making “Get Item Definition” a Const-Safe Function
8:00 — Scanning All Fragments Inside an Item Definition
10:00 — Retrieving Mutable Runtime Data from Fragments
12:18 — Understanding Virtual Methods & When to Use Them
13:35 — Creating a Gun Fragment to Store Weapon Metadata
22:00 — Creating a 9mm Handgun weapon in Blueprints
24:00 — Adding Gameplay Tags (Fire Speed, Magazine Size, etc.)
24:41 — Preview: Accessing Weapon Metadata from Inventory
25:00 — Applying the Single Responsibility Principle in Practice
31:10 — Outro & What’s Next