|
Storm Game Framework 2.0.0
User guide
|
Item authoring, equipment, weapons and deployables.
StormItems defines what an item is and how it looks in the world or when held.
Connect it. Keep the archetype ID as the item type and the instance ID as the owned item’s identity. World and held presentation can use separate profiles. Use the instance ID when joining inventory, equipment and weapon state. Trace one item across these modules.
Try it. In Item Designer, set up one item with a name and any world or held representation it needs. Use the saved item definition whenever you give instances of it to players or place it in the world.
C++ entry point. Add StormItems to your consuming module and include Assets/StormItemArchetype.h. See StormItemArchetype.h.
With the starter archetype loaded as Archetype, use its ID when referring to the item type.
StormItemsEditor provides the Item Designer and Item Browser.
Try it. Open SGF > Item Designer, create or select an item, then edit and preview its world and held representations. Save the item and reopen it to check that your changes persisted.
C++ entry point. In an editor module, add StormItemsEditor and include IStormItemsEditorModule.h. See IStormItemsEditorModule.h.
StormInventory stores individual items or stacks in containers.
Connect it. Use the backing inventory to resolve the owned item. For a grid, read which cell holds which stack through GetPlacements or FindPlacementIndex. This placement view is kept separately from the item entries, so entry array order does not identify a cell. An equipped item can remain owned with no loose placement. Trace inventory and placement.
Try it. Use an inventory on a character or storage actor and decide what it can hold. Test adding an item, moving it between containers and trying to add it when space runs out.
C++ entry point. Add StormInventory to your consuming module and include Inventory/StormInventoryBaseComponent.h. See StormInventoryBaseComponent.h.
After the starter game mode grants the item, query the backing inventory.
StormEquipment tracks what a character has equipped and enforces slot rules.
Connect it. Apply the slot config, compatibility provider and optional starting loadout through an equipment profile. Start with the owned item and read back the exact slot occupant. For networked UI, configure the server's owner-managed slot policy and observe the completion result. The server has authority over equipment, so a client's request takes effect only when the server accepts it. See Multiplayer and networking. Trace slot state and weapon binding.
Try it. Define slots such as Main hand and Head, then try a valid item and one that should be refused. Check that the equipment state matches what the player sees.
C++ entry point. Add StormEquipment to your consuming module and include Equipment/StormEquipmentComponent.h. See StormEquipmentComponent.h.
After the loadout runs, pass the configured slot tag and an FStormEquippedItem output.
This tells equipment which item types fit which slots and what capabilities they grant.
Connect it. The item equipment catalogue maps an archetype ID to compatible slot tags and capability facts. Point the equipment profile at that provider, then test one allowed slot and one refused slot for the same item. See where compatibility is checked.
Try it. Add the item to a Storm Item Equipment Catalog, list its allowed slots and use that catalogue on the character. Test the same item in an allowed slot and a different slot.
C++ entry point. Add StormItemsEquipmentAdapter to your consuming module and include Equipment/StormItemEquipmentCatalog.h. See StormItemEquipmentCatalog.h.
Run this on the authored catalogue after adding a compatible slot.
This adds equipment compatibility checks to the Item Browser and warnings to Item Designer.
Try it. Use the equipment catalogue for your character and check which items fit the requested slot. If an item is missing or incompatible, open the catalogue asset and review its entry.
This keeps an item's place in inventory in step with its equipment slot.
Connect it. Initialise the coordinator with the backing inventory and equipment. For an equip request, pass the exact instance, its observed source cell and the observed destination occupant. After the server has accepted or refused the request, refresh the display from the replicated inventory placements and equipment slots. Follow an item through the equip chain.
Try it. Use the inventory and equipment coordinator when equipping items from a container. Check that equipping frees its storage space and that unequipping puts it back only when it can fit.
C++ entry point. Add StormInventoryEquipmentAdapter to your consuming module and include Placement/StormInventoryEquipmentCoordinator.h. See StormInventoryEquipmentCoordinator.h.
On the initialised coordinator, inspect the configured loose storage capacity.
StormWeapons handles weapon mechanics such as firing, spread, fire modes, loaded ammunition and reloading.
Connect it. A weapon definition supplies mechanics. Bind the runtime component before sending requests. Inspect its bound source and ammo state. Use the inventory ammo provider when the reserve supply lives in inventory. Follow the binding and reload chain.
Try it. Create one weapon definition with a simple fire mode and a small magazine. Connect it to your game and test firing, an empty magazine and a reload.
C++ entry point. Add StormWeapons to your consuming module and include Weapons/Components/StormWeaponComponent.h. See StormWeaponComponent.h.
After equipment and weapon binding are ready, check the runtime component.
This supplies the weapon definition editor and its mechanics inspector.
Try it. Open the definition to review the fire modes, shot settings and reload configuration. Use the inspector to check the authored mechanics, then confirm actual shots and reloads in Play.
C++ entry point. In an editor module, add StormWeaponsEditor and include IStormWeaponsEditorModule.h. See IStormWeaponsEditorModule.h.
This connects a particular owned item to its weapon state.
Connect it. StormWeaponItemIdentity::MakeSourceId derives a weapon source ID from the existing item instance. On the server, a lease ensures that one item drives at most one live weapon at a time. The lease and the item's extension record keep weapon state between binds. Equip two instances of one archetype and verify that each keeps its own loaded ammo. Follow the item identity.
Try it. Use the item-backed weapon setup when each weapon should retain its own loaded ammo. Equip two instances of the same item type in turn and check that each remembers its own magazine.
C++ entry point. Add StormItemsWeaponsAdapter to your consuming module and include Weapons/Types/StormWeaponItemIdentity.h. See StormWeaponItemIdentity.h.
This makes the selected equipped item available as a working weapon.
Connect it. Map the item archetype to a weapon definition, configure the watched equipment slot, and inspect GetBoundItemInstance after equipping. Use the read-only weapon view for HUD state. Follow the equipment-to-weapon binding.
Try it. Map the item type to a weapon definition, connect the equipped-weapon setup on the character and select which slot your game treats as active. Check that swapping items changes the weapon the player can fire.
C++ entry point. Add StormEquippedWeaponsAdapter to your consuming module and include Weapons/StormEquippedWeaponCoordinator.h. See StormEquippedWeaponCoordinator.h.
After equipping the weapon, compare this ID with the inventory instance.
This adds the Weapon page in Item Designer.
Try it. Choose an item-to-weapon catalogue, link the current item to a weapon definition and inspect or edit the definition there. Check which other items share that definition before editing its mechanics.
C++ entry point. In an editor module, add StormEquippedWeaponsAdapterEditor and include Settings/StormEquippedWeaponsAdapterEditorSettings.h. See StormEquippedWeaponsAdapterEditorSettings.h.
This lets weapons reload from reserve ammunition in inventory.
Connect it. Map the weapon’s ammo type to the reserve item in the ammo catalogue, then provide the backing inventory. Compare the loaded magazine and reserve item quantity before and after reload. Follow loaded and reserve ammo.
Try it. In the ammo catalogue, map the weapon's ammo type to the item used as its reserve supply and connect that inventory to the ammo provider. Check that a reload consumes the expected number of units.
C++ entry point. Add StormInventoryWeaponsAdapter to your consuming module and include Weapons/Providers/StormInventoryWeaponAmmoProvider.h. See StormInventoryWeaponAmmoProvider.h.
StormDeployables provides the grenade foundation, including release, fuse and area exposure.
Try it. Start with a grenade definition and a grenade component on a test character. Try one throw and compare an exposed target with a target behind cover.
C++ entry point. Add StormDeployables to your consuming module and include Grenades/StormGrenadeComponent.h. See StormGrenadeComponent.h.
This supplies grenades from inventory.
Try it. Map the grenade to its supply item and connect the grenade supply component to the character's inventory. Start with one unit and check that it is consumed and that another release is refused once the supply is empty.
C++ entry point. Add StormInventoryDeployablesAdapter to your consuming module and include Grenades/StormInventoryGrenadeSupplyComponent.h. See StormInventoryGrenadeSupplyComponent.h.