|
Storm Game Framework 2.0.0
User guide
|
Put the owned supply kit into Main hand, prove which instance is equipped, then show a simple prop on the character. The prop display in this chapter is project Blueprint presentation driven by SGF equipment state. It is intended for the third-person tutorial view.
Complete Give the player an item. Keep Starter Item set to DA_SupplyKit. You will continue using the same pawn and game mode.
Duplicate these assets into Tutorial/Characters:
| Original | Copy |
|---|---|
| DA_PlayerCharacter_Equipment | DA_TutorialEquipment |
| DA_PlayerCharacter_ItemEquipment | DA_TutorialItemEquipment |
| DA_PlayerCharacter_Loadouts | DA_TutorialLoadouts |
Open DA_TutorialEquipment. Keep Slot Config at DA_PlayerCharacter_EquipmentSlots, set Descriptor Provider to DA_TutorialItemEquipment, and set Loadout Catalog to DA_TutorialLoadouts. Keep the selected Loadout tag, Loadout.SGFSetup.Starter. Save.
In DA_TutorialCharacter, change the profile for Storm.Capability.Equipment to DA_TutorialEquipment. Save. These copies let you change item rules while retaining the original starter configuration.
The slot tag comes from the generated slot configuration. Use that exact tag in each asset. The loadout selects an instance the pawn already owns; it does not replace the game mode's grant.
In BP_PlayerCharacter, create a function DescribeEquipment. Get the Equipment component and call Get Equipped In Slot with the Main hand tag. Branch on its Boolean return value.
On true, break Out Equipped, print its Instance Id GUID and label it Main hand. On false, print Main hand is empty. Add keyboard 4, connecting Pressed to this function. Compile, play, then press 3 and 4. The equipped instance ID should match the inventory instance ID from this same play session.
For a refusal check, stop Play and temporarily remove Main hand from the item's Compatible Slots. On the next Play, character assembly can refuse the invalid starting loadout and leave the character unready. Check the definition's validation and Output Log. Restore compatibility before continuing; a matching loadout entry alone does not grant permission.
Set Parent Socket to the mannequin's hand_r bone. Start with relative location and rotation zero and scale 0.15, 0.10, 0.10. You can adjust the offset while inspecting the right hand in the Blueprint viewport.
Give the cube a bright material if it is hard to distinguish from the character. This is ordinary project presentation; its visibility still comes from the equipment check below.
Keep one BeginPlay event: add a Sequence if the graph already uses it. Readiness can happen after BeginPlay, so the readiness event performs the final refresh once assembly finishes. Slot changes refresh from the current complete state; the event's payload need not become a second source of truth.
Use third person. The cube should follow the right hand when the kit starts equipped. In a fresh session with an empty starting loadout, the inventory still contains the kit but the prop should stay hidden. Restore the loadout afterwards.
For a local standalone teardown check, temporarily add keyboard 6 to Equipment > Try Unequip Slot, using Main hand. Pressing it should hide the prop while inventory inspection still finds the kit. That mutation is server-only; a networked inventory UI should use SGF's owner request/coordinator workflow instead.
Check this prop in third person. The exercise does not provide a separate first-person viewmodel or camera-mode visibility rules. First-person item presentation, multiple presentation actors and semantic attachment rules belong to the native held-item path described in Native held-item integration.
| Symptom | Check |
|---|---|
| The character does not become ready. | Check the grant, compatible slot, profile links and selected loadout. |
| Slot and inventory IDs differ. | Compare the same pawn in the same play session. Use the owned instance, not an archetype ID. |
| The prop is always visible. | Check Hidden in Game and the state refresh graph. |
| The prop is at the character's feet. | Attach it beneath Mesh and set Parent Socket > hand_r. |
| The prop appears differently in first person. | Use third person for this check; first-person visibility and viewmodel presentation need their own setup. |
Checkpoint: Main hand names the owned kit instance and the prop reflects that slot's current state.
Next: Add your first game rule.