|
Storm Game Framework 2.0.0
User guide
|
Create a supply kit and give one to the player when the starter game mode spawns their character. Then add a small Blueprint inspection so you can see the inventory during play.
Complete Change your character. Keep the starter's hand loadout empty for this chapter. The item will be owned before it is equipped or displayed.
Leave classification, icon and world representation unset for now. This item represents ownership; a later chapter will add a simple character prop for its equipped state.
Open BP_PlayerCharacter_GameMode > Class Defaults > Starter Item. Expand Definition Id and select type StormItemArchetype, name DA_SupplyKit. Compile and save.
This primary asset ID names the item asset. Starter Item is the game mode's instruction to grant one instance when it spawns an inventory owner. It is separate from the equipment loadout.
The item's folder is inside the existing StormItemArchetype scan directory. Check Project Settings > Game > Asset Manager if the ID does not resolve. Keep Has Blueprint Classes and Is Editor Only off for this type.
Open BP_PlayerCharacter in the full Blueprint editor. This is a development inspection graph; it does not change the inventory.
The nodes may appear as interface calls when dragged from an inventory reference. Use the inventory component as the target. If Context Sensitive hides a node, drag from the relevant typed output pin first.
Play L_SetupTest, wait until the character moves, then press 3. You should see StormItemArchetype:DA_SupplyKit, a quantity of one and an instance ID. Record that ID for this play session.
The archetype ID identifies the item kind. The instance ID identifies the copy you own. Restarting Play creates a new pawn and grants a new instance, so its instance ID can change.
To check the grant is explicit, stop Play, clear Starter Item on the game mode, compile and play again. Press 3: the inventory should be empty. The DA_SupplyKit asset still exists. Restore its Starter Item ID before continuing.
For clearer empty-inventory feedback, branch on the entries array's Length before the loop and print Inventory is empty when it is zero. Print String is a development diagnostic; a player-facing inventory screen is a separate UI task.
| Symptom | Check |
|---|---|
| The old starter item is granted. | Check Starter Item on the game mode selected by this map. |
| The ID is invalid or no item is granted. | Check the type/name, asset scan and Output Log for the starter grant warning. |
| Nothing prints. | Click the play viewport, wait for character readiness, then press 3. Check the function's execution wires. |
| The item is not visible in the hand. | Inventory ownership is this chapter's result. Equipment and display come next. |
Checkpoint: a fresh Play session grants the supply kit and you can inspect its kind, quantity and instance identity from Blueprint.
Next: Equip and show the item.