SimpleShopSystemDocs


🛒 Simple Shop System - Complete Developer's Guide

What is Simple Shop System?

Simple Shop System is a complete, plug-and-play inventory, shop, and item management system for Unreal Engine. This system provides everything you need to create RPG-style merchant interactions, player inventories, and item pickup/drop mechanics with both 2D UI and 3D world-space visualization.

Core Features:

✅ Merchant/Shop System - Buy and sell items with customizable pricing and inflation
✅ Item Pickup & Drop - World-based items with physics and visual feedback
✅ Equipment System - Attach items to character sockets (head, hands, etc.)
✅ 3D & 2D UI Options - Switch between traditional UI widgets or 3D world-space inventory
✅ Money/Currency System - Integrated currency tracking and transaction handling
✅ Audio Feedback - Sound effects system for pickups, purchases, and interactions
✅ Modular Architecture - Component-based design for easy integration into existing projects
✅ Complimentary Simple Inventory System - Store, organize, and manage items with data-driven architecture


📦 What's Included

Core Blueprints:

  • AC_SimpleShop - Main actor component that manages all shop/inventory functionality
  • BP_Merchant - NPC merchant character with shop interaction
  • BP_ItemDrop - World-placed items that can be picked up
  • BP_ItemSocket - Attachment system for equipping items to character
  • BP_TPC_SS - Demo third-person character with system integrated

UI Widgets:

  • W_SimpleInventory - Main inventory display widget
  • W_MerchantWidget - Shop interface for buying items
  • W_ItemEntry - Individual item display in lists
  • W_UI - Master UI container

Data Assets:

  • PDA_ItemData - Primary data asset template for defining items
  • S_ItemData - Struct containing item properties (name, price, icon, attachment tag)
  • Sample items included (helmets, weapons)

Additional Content:

  • 3D Models (helmets, weapons, props)
  • Icon textures for UI
  • Audio (SFX and voice lines for interactions)
  • Materials and VFX
  • Demo level (LVL_ShowCase) showcasing all features

🚀 Quick Start Guide

Step 1: Add the Shop Component to Your Character

  1. Open your player character blueprint (or use the included BP_TPC_SS as reference)
  2. Click "+ Add" → Component → Search for "AC_SimpleShop"
  3. Add the component to your character

Key Component Settings:

  • DEBUG? - Set to True to see debug messages during development
  • Use3DWidget? - Set to True for 3D world-space inventory, False for screen-space UI
  • AutoEquip/AttachItems? - Automatically equip items when picked up

Step 2: Set Up Input Mapping

The system uses Enhanced Input System (UE5 standard). You'll need to bind these actions:

Required Input Actions:

  1. Open/Close Inventory - Toggle inventory display
  2. Interact - Pick up items, talk to merchants
  3. Drop Item - Remove item from inventory
  4. Equip Item - Attach item to character socket

How to Set Up:

  1. Navigate to: Content/SimpleSeries/Shared/Input/
  2. Open IAM_GeneralInputs (Input Mapping Context)
  3. Add your desired key bindings to the existing Input Actions:
    • IA_Jump (already configured)
    • IA_MovementAxis (already configured)
    • IA_Camera (already configured)

In Your Character Blueprint:

  1. In Event BeginPlay, call "Add Input Mapping Context"
  2. Set the Mapping Context to IAM_GeneralInputs
  3. Bind the following events to AC_SimpleShop functions:
    • Input Action → Inventory Open/Close → Call Inventory Open/Close event
    • Input Action → Interact → Call Interact event
    • Input Action → Drop → Call Drop Item event
    • Input Action → Equip → Call Equip Item event

Step 3: Create Attachment Sockets on Your Character

Items attach to specific socket names on your character's skeletal mesh. You need to create these sockets:

  1. Open your character's Skeletal Mesh (e.g., SK_Mannequin)
  2. Go to the Skeleton Tree panel
  3. Right-click on a bone → Add Socket
  4. Name the socket to match the AttachTag in your item data:
    • "head" - For helmets/hats (attach to head bone)
    • "righthand" - For weapons/held items (attach to hand_r bone)
    • "lefthand" - For shields/off-hand items (attach to hand_l bone)

Socket Positioning:

  • Adjust socket position/rotation so items appear correctly when equipped
  • Test by previewing the item mesh in the socket editor

Reference Component Setup (in BP_TPC_SS):

  • HeadReferenceMesh - Preview mesh for head slot (set ComponentTags to ["head"])
  • RightHandRefMesh - Preview mesh for right hand (set ComponentTags to ["righthand"])

Step 4: Place a Merchant in Your Level

  1. Drag BP_Merchant from Content/SimpleSeries/SimpleShop/Blueprints/ into your level
  2. Select the merchant actor
  3. Configure the merchant properties in the Details panel:

Merchant Settings:

  • MerchantItems - Array of PDA_ItemData assets this merchant sells
    • Click "+" to add item slots
    • Select item data assets (e.g., DA_Item1, DA_Item2)
  • MerchantInflation - Price multiplier percentage (default: 15%)
    • 0 = Sell at base price
    • 15 = Sell at 15% markup
    • 50 = Sell at 50% markup
  • AutoAddItem? - Whether to automatically add items to merchant's shop on Begin Play
  1. The merchant's Sphere component defines interaction range (default: 600 cm radius)

Step 5: Place Pickup Items in Your Level

  1. Drag BP_ItemDrop from Content/SimpleSeries/SimpleShop/Blueprints/ into your level
  2. Select the item drop actor
  3. Configure in Details panel:

Item Drop Settings:

  • ItemData - Select the PDA_ItemData asset for this item
  • CustomItemClass - (Optional) Override the displayed actor class
  • ItemPreviewScale - Size multiplier for the displayed item (default: 1.6)
  • DEBUG? - Enable to see pickup debug info

The item will automatically:

  • Display the 3D model defined in its ItemData
  • Show the item name above it
  • Show pickup prompt when player is in range
  • Spin slowly for visibility

🎨 Creating Your Own Items

Step-by-Step: Create a New Item

Part A: Create the Item Socket (3D Model Holder)

  1. Navigate to: Content/SimpleSeries/SimpleShop/Blueprints/Sockets/
  2. Right-click → Blueprint Class → Search for BP_ItemSocket → Select it
  3. Name it: BP_ItemSocket_YourItemName (e.g., BP_ItemSocket_MagicStaff)
  4. Open the new blueprint
  5. Select StaticMesh or SkeletalMesh component (depending on your item type)
  6. In Details panel:
    • Set Static Mesh or Skeletal Mesh to your item's 3D model
    • Adjust Transform (Location/Rotation/Scale) to position correctly
  7. Compile and save

Part B: Create the Item Data Asset

  1. Navigate to: Content/SimpleSeries/SimpleShop/Blueprints/Data/CustomItems/
  2. Right-click → Blueprint Class → Search for PDA_ItemData → Select it
  3. Name it: DA_YourItemName (e.g., DA_MagicStaff)
  4. Open the new data asset
  5. In the Details panel, expand ItemData struct:

Configure Item Properties:

  • ItemName - Map of Name → Class Reference

    • Click "+" to add an entry
    • Key: Enter display name (e.g., "MagicStaff")
    • Value: Select your BP_ItemSocket_MagicStaff blueprint class
  • ItemPrice - Base cost in currency (e.g., 250)

  • ItemValue - Optional stat value (e.g., damage, armor rating)

  • AttachTag - Socket name on character (choose from):

    • "head" - Helmets, hats, crowns
    • "righthand" - Weapons, tools, held items
    • "lefthand" - Shields, off-hand items
  • Icon/Image - UI icon texture

    • Import your icon image (recommended: 256x256 or 512x512)
    • Select the texture asset
  1. Compile and save

Part C: Add Item to Merchant or World

To add to Merchant's shop: