Interaction and Items System
This document covers the core interaction pipeline and item actors in
RPG Engine v6.
Doors, world puzzles, and vendor trading are documented separately.
Core Interaction Flow
BP_InteractComponent
BP_InteractComponent on BP_RPG_Character
controls all world interaction:
- Maintains a reference to the current interact target:
FoundActor_temp(Actor)FoundComponent_temp(component)
- Runs camera-based traces on a timer to detect interactable actors.
- Uses the
IA_Interactinput action to trigger interaction on the current target. - Blocks interaction traces if the character has any tag from
Forbidden Tags For Interacting(e.g. ladder/climb states).
InteractArea and camera traces
InteractArea is a capsule collision on the
character:
- Overlaps:
WorldStatic,WorldDynamic,Pawn,Vehicle. - When an overlap begins:
- A timer starts calling
FindAnyInteractItemTraceat a rate defined byInteractTraceTimerRate.
- A timer starts calling
- When an overlap ends:
Check Overlapping Actorsruns aSphereTraceMultiForObjectson the same channels.- If no objects are found, the timer is paused.
- If objects remain, camera traces continue.
FindAnyInteractItemTrace:
- Performs a
LineTracefrom the camera forward. - Uses
InteractDistance(default500) as length. - If the hit actor implements
BPI_InteractablesorBPI_MulticlassData, it becomes the current target.
Interaction widget
The interaction prompt uses WB_InteractInfo:
- Stored as
WB_InteractInfoon the component/character. - Initialized via
BPI Initialize With Item Data Asseton the widget. - Shows the current item name/action text and input hint based on item
data and
BP_II_Master.InputActions.
Interaction Interfaces
Interactable actors are discovered by interfaces rather than by explicit class checks.
BPI_Interactables
Key points:
- Implemented by most world item actors and special interaction actors.
- Used for:
- Custom prompt text (
GetItemCustomInteractText). - Wardrobe point logic.
- Telekinesis start/stop/can-throw and impulse data.
- Damage widget locations and root meshes.
- Destroying actors on the server after interaction.
- Custom prompt text (
Example method names:
ButtonReleasedInteractMessageGetItemCustomInteractTextWardrobePointDestroyActor(Server)TelekinesisStartMessage/TelekinesisStop/TelekinesisCanThrowGetRootSkeletalMeshComponentGetDamageWidgetLocation- and others.
BPI_MulticlassData
Key points:
- Provides higher-level contextual data:
- Actor type and indicator widget (
GetActorType,GetObjectWidget). - Whether interaction is allowed (
CanInteract). - Item data (
GetItemData).
- Actor type and indicator widget (
- Drives previews and skins:
- Mannequin equipment/skins and bags.
- Weapon preview and modification preview.
- Weapon skin preview updates on the mannequin.
- Misc gameplay data:
- Minimap display (
DisplayedOnMinimap). - Temperature zone data.
- Damage indicators and health.
- Links back to mediator and main body component.
- Minimap display (
Any actor that implements BPI_Interactables or
BPI_MulticlassData can become an interaction target.
BP_Inter_* Item Actor Hierarchy
World item actors are organized around BP_Inter_Master
and its children.
BP_Inter_Master
Base world interactable item actor:
- Implements
BPI_InteractablesandBPI_MulticlassData. - Main parameters:
Data Asset—BP_ItemData(master item DataAsset).Custom Interact Text— overrides default prompt text; if empty, default text comes fromBP_II_Master.InputActions.
Meshes:
- For pure
BP_Inter_Masterchildren, the StaticMesh is assigned manually in the Blueprint. - For
BP_Inter_AutoInitchildren, mesh is taken from the Clarification-type DataAsset.
On pickup, BP_Inter_Master-derived actors are either
destroyed or have their quantity reduced (see partial pickup below).
BP_Inter_AutoInit
Automatic initialization from item data:
- Inherits from
BP_Inter_Master. - Reads StaticMesh from the Clarification-type DataAsset (via
BP_ItemData). - Has:
Quantity(int) — number of units contained.Level Design Mode(bool):- Must be set to
trueafter placing the actor in the level so initialization runs correctly.
- Must be set to
Main children:
BP_Inter_AmmoBP_Inter_Master_QuestBP_Inter_GrenadeBP_Inter_Items_With_SkinBP_Inter_WeapModifBP_Inter_BuildableBP_Inter_Ammo_CounterBP_Int_Buff_Master
BP_Inter_Items_With_Skin and clothing/weapons
BP_Inter_Items_With_Skin:
- Extends
BP_Inter_AutoInit. - Adds:
Skin—BP_DA_SkinsDataAsset for visual customization.
Children:
BP_Inter_Master_Cloth:Health(float).UseCustomHealth(bool) — iftrue, uses this custom health value.
BP_Inter_Master_Weapon:- No extra parameters; uses weapon item data.
Firearms: BP_Inter_Master_FireWeapon
Child of BP_Inter_Master_Weapon with extra world-firearm
parameters:
AMMO Data—BP_ItemDataof ammo type preloaded in the weapon.AMMO Quantity— number of rounds in the world weapon.UseInstancedModifications(bool) — initialize modifications from Clarification-type DataAsset.Modifications User Setup— array ofS_Modif_Static; designer-defined mods for this instance.Modifications Final Engine— array ofS_Modif_Static; final mod list, auto-populated.
Ammo and buff actors
BP_Inter_Ammo— standard ammo pickups, withQuantitydetermining how many units they contain.BP_Inter_Ammo_Counter— child ofBP_Inter_Ammowith extraPercentStaticMesh to visually show fill amount.BP_Int_Buff_Master— world buff pickup; on pickup, applies to the buff/inventory system as the corresponding item.
BP_ItemData and registration
BP_ItemData is the master item DataAsset:
- Holds references to:
- General Info DataAsset.
- Inventory-type DataAsset (grid size, stacking,
InteractActorClass, etc.). - Clarification-type DataAsset (gameplay parameters, mesh, skins, effects).
- All world item actors reference a
BP_ItemDatavia theirData Assetvariable.
All items are registered in DTItemData:
- Each row corresponds to one item and points to its
BP_ItemData. - Global top-level item categories include:
Ammo,Bag,Buff,Building,Cloth,CustomInteraction,Door,Grenade,Modification,Quest,Resource,Skin,Usable,Vehicle,Weapon,Other.
Loot and Inventory Integration
Normal pickup flow
For regular loot, classes such as:
BP_Inter_AmmoBP_Inter_Master_QuestBP_Inter_GrenadeBP_Inter_Items_With_SkinBP_Inter_WeapModifBP_Inter_BuildableBP_Inter_Ammo_CounterBP_Int_Buff_MasterBP_Inter_Master_ClothBP_Inter_Master_WeaponBP_Inter_Master_FireWeapon
are used as interactable world actors.
Pickup logic:
- Triggered via
IA_InteractandBP_InteractComponent. - If the inventory can accept the item:
- The request is forwarded to
BP_EquipmentComponent, which calculates how many units can be added.
- The request is forwarded to
- Three possible outcomes:
- Full pickup:
- There is enough inventory space for the entire
Quantity. BP_EquipmentComponentadds the full amount.- The world actor is destroyed.
- There is enough inventory space for the entire
- Partial pickup:
- Inventory has space for only part of the stack (e.g. 25 free slots, actor has 50 rounds).
BP_EquipmentComponentadds as many units as can fit (25).- The actor’s
Quantityis decreased by that amount (from 50 to 25). - The world actor remains with reduced quantity.
- No space:
- Nothing is added.
- The actor remains in the world.
- A “not enough inventory space” message is shown.
- Full pickup:
Inventory layout, stacking, and item categories are handled by
BP_EquipmentComponent and DataAssets such as
DAGSEquipment / DAGSInventory.
Usable Items
Usable items are items that can be applied to the character (e.g. eaten, drunk, used as a consumable).
Usage paths:
- From the world:
- Approach a usable world actor (derived from
BP_Inter_Master/BP_Inter_AutoInit). - Press
IA_Interact/ Use. - The world actor triggers its
Usebehavior.
- Approach a usable world actor (derived from
- From inventory:
- Right-click the item and choose
Use. - One unit is removed from inventory.
- The configured gameplay effect is applied (health, energy, hunger, thirst, buffs, etc.).
- Right-click the item and choose
World usage is integrated into the state system:
- Activates
CharacterStates.UnusualSkills.Use. - In
ActivateStateSolver, the system callsClient_UseFunctionalto execute the item’s effect on the local character.
Effect details (stat changes, buff triggers, etc.) are configured in item DataAssets and described in inventory/stats documentation.
TelekFind (Fast Loot Gathering)
TelekFind is an UnusualSkill for quickly grabbing loot around the character.
Behavior:
- Activated by holding the interaction key (
IA_Interact) for a short time (~0.25 seconds). - Uses the same
InteractAreacollision as normal interaction to find nearby actors. - Processes only actors implementing
BPI_Interactables.
For each found actor:
- Attempts to add its item content via
BP_EquipmentComponent(using the same partial/full logic as normal pickup). - If at least some amount fits:
- That amount is added to inventory.
- The actor’s
Quantityis reduced by the added amount. - If quantity reaches zero, the actor is destroyed.
- Items for which zero units can be accepted remain unchanged in the world.
TelekFind does not introduce its own weight or count limits; the only limiting factor is available inventory space.
NPC-Independent World Stations (brief)
Some world stations are built on the same interaction pipeline but are documented in their own system files. Here they are only referenced.
Wardrobe point
- Actor:
BP_EquipmentPoint. - Interaction:
BP_InteractComponentcalls wardrobe-related interface functions.- PlayerController opens
WBP_Wardrobe_Placeholder_InGame.
- Affects:
- Appearance (
BPCharacterSkinComponent). - Equipment (
BP_EquipmentComponent).
- Appearance (
Wash (hygiene)
- Actor:
BP_Inter_WashM(child ofBP_Inter_Master). - Interaction:
- Adjusts the player’s
Hygienestat. - Plays wash AnimMontage on the shower’s SkeletalMesh.
- Adjusts the player’s
Detailed behavior is described in customization and stats docs;
interaction-wise these stations are just specialized
BP_Inter_* actors.
Save System Integration (high level)
Interactable actors that must persist across sessions implement
BPI_SaveSystem.
- On load, all
BPI_SaveSystemactors are removed. - The save subsystem then spawns only the actors recorded in save data
(
S_SaveContainer). - For generic interactable actors:
- Class and transform are stored in
FSaveCommonData. - Additional runtime data goes into
FInteractActorSaveData.DynamicWorldData.
- Class and transform are stored in
- Doors, AI, vehicles, buildings and cameras have their own save structs, but their detailed behavior is covered in dedicated system docs.
This ensures that world items, interactables, and special actors (doors, NPCs, vehicles, etc.) can be restored consistently along with inventory and stats.
Related Docs
Interaction and items connect to:
docs/systems/interaction/interaction-and-items.mddocs/systems/interaction/doors-and-interactables.mddocs/systems/interaction/trading-and-vendors.md