|
Storm Game Framework 2.0.0
User guide
|
The Humanoid, appearance, movement, cameras and animation.
SGF has two Humanoid classes, and one builds on the other. AStormHumanoidCharacter, in StormCharacters, derives from AStormNativeHumanoid, in StormCharactersNative. Both move and animate the same way, with Storm's native movement and animation, StormCamera views, first person and hit reactions.
| Humanoid | Native Humanoid | |
|---|---|---|
| Class | AStormHumanoidCharacter | AStormNativeHumanoid |
| Shipped Blueprint | /SGF/Characters/BP_Humanoid | /SGF/StormAnimation/BP_StormNativeHumanoid |
| Adds | Abilities, appearance, inventory, equipment and wearables, set up from an Actor Definition; Enhanced Input bindings; player and AI control transfer; a chosen first- or third-person view | Nothing: it is the shared base |
| Ready to play | Yes: mesh, animation, catalogue, input, camera and AI controller are set | No: mesh, catalogues, reactions and first-person profile are empty, and it binds no input |
Use the Humanoid for a playable character or an NPC that uses SGF's gameplay modules. The pawn Blueprints Playable Starter makes are children of BP_Humanoid.
Use the native Humanoid when you want only Storm's native animation, on a character whose input and gameplay you write yourself. A placed native Humanoid is possessed by stock AI. See Native animation and the native Humanoid.
Check it in Play. Open /SGF/Characters/L_Humanoid, or the level Playable Starter made, and press Play. The Humanoid spawns in third person as SKM_Manny_Simple, and stands idle.
| Input | What the Humanoid does |
|---|---|
| WASD or the left stick | Runs at the jog cycle's speed in eight directions, with starts, stops and pivots matched to the distance moved. |
| Mouse | Turns the view. |
| Space | Jumps, falls and lands. |
| Left Shift (hold) | Sprints. |
| Left Ctrl | Crouches. SGF ships no crouch clips, so it plays the standing clips. |
| 2 | Switches between third person and first person, which shows the Humanoid's arms, SK_HumanoidArms. |
A Humanoid placed in the level is not possessed automatically. To try AI, spawn a BP_HumanoidAIController and pass it to the Humanoid's TransferControl on the authority. That controller's shipped state machine only idles.
StormCharacters supplies the Humanoid and its player and AI control options.
Connect it. The pawn Blueprint supplies the components and the Actor Definition supplies per-character profiles. Initialise the actor on authority and wait for readiness before transferring control. After transfer, check the controller’s AI startup separately. Trace the character's definition and profiles.
Try it. Start with the included Humanoid, then make a project-owned character definition. Choose the character as the default pawn in your test map for player control, or give a placed Humanoid an AI controller.
C++ entry point. Add StormCharacters to your consuming module and include Characters/StormHumanoidCharacter.h. See StormHumanoidCharacter.h.
After the starter pawn is possessed and configured, pass it as Pawn.
Supplies tools used to build the included Humanoid template assets.
Try it. In Actor Definition Browser, create a project-owned character using DA_Humanoid as its template.
StormAppearance assembles a character's visible parts.
Connect it. Register form, part and profile assets with the Asset Manager. Index the form and part types for tag lookup. Apply a profile through Actor Assembly, then compare committed appearance with applied appearance on the rendering machine. Trace the asset lookup and application.
Try it. A form describes the body and its available slots, parts fill those slots, and a profile picks the form and parts to use. Assign a project-owned profile to your character, then check the result in Play.
C++ entry point. Add StormAppearance to your consuming module and include StormAppearanceComponent.h. See StormAppearanceComponent.h.
After the Humanoid is ready, check whether its committed appearance has been applied.
StormAppearanceEditor adds the Appearance tools in Character Designer and the separate Form and Part Designers.
Try it. Open a profile to choose the form and parts. Open the form or part itself when you need to edit its slots, meshes or attachment setup.
C++ entry point. In an editor module, add StormAppearanceEditor and include StormAppearanceEditorAuthoring.h. See StormAppearanceEditorAuthoring.h.
StormBody tracks named body regions and their gameplay state.
Try it. Use it when rules depend on the affected region, such as a damaged arm. Create a body layout and profile for your character and check that a hit changes the intended region.
C++ entry point. Add StormBody to your consuming module and include Body/Components/StormBodyComponent.h. See StormBodyComponent.h.
Pass an authored body region tag after a damage test.
StormBodyPresentation turns body state changes into visible results, such as hiding part of a mesh or showing a detached limb.
Try it. Set up a presentation mapping for the character's mesh and test one region before configuring the rest of the body.
C++ entry point. Add StormBodyPresentation to your consuming module and include BodyPresentation/StormBodyPresentationComponent.h. See StormBodyPresentationComponent.h.
This connects equipped items to appearance parts.
Try it. In the equipment-to-appearance catalogue, map an item and equipment slot to a part for the character's form. Equip and remove the item to check that the wearable appears and the underlying appearance returns.
C++ entry point. Add StormEquipmentAppearanceAdapter to your consuming module and include StormEquipmentAppearanceBridge.h. See StormEquipmentAppearanceBridge.h.
This adds the Wearables tool under Equipment in Character Designer, along with wearable mapping tools in the appearance editors.
Try it. Pick the item and the part it should show, then use the character preview to compare the equipped and removed states.
A compile-time check of the Appearance Editor’s public C++ interface. It is not loaded automatically and adds no tools.
Try it. There is nothing to try here. Use the Appearance tools in Character Designer when editing a project asset.
StormCamera frames each local player's view from an authored camera profile. It is opt-in: it works only when the player controller uses AStormPlayerCameraManager, and only for view targets that carry a UStormCameraComponent. Any other view target, such as a cinematic camera, keeps Unreal's standard view.
Set it up.
Use it. Call RequestCameraMode on the camera manager with a mode tag to switch views. It returns false, and keeps the current view, when the profile has no usable mode with that tag. The manager keeps each player's blend and lag state, so two players sharing a profile, or watching the same actor, don't affect each other.
A view target whose visible body can lag behind its collision, such as a character whose crouch animation lowers it over a second, can implement IStormCameraPresentation so the view follows the body instead of the capsule.
The Humanoid uses StormCamera for both its first- and third-person views. See Which Humanoid?.
StormFirstPerson handles the local first-person camera, arms and held visuals.
Try it. Choose an arms definition and an animation set that match the character's skeleton. Test the view while moving and check how switching perspectives affects what the player sees.
C++ entry point. Add StormFirstPerson to your consuming module and include Camera/StormFirstPersonComponent.h. See StormFirstPersonComponent.h.
Switch to first person on the local player, then inspect the rig state.
This connects the equipped weapon to first-person visuals and animations.
Try it. Create a first-person weapon catalogue entry for the exact item type and body form, and select its presentation profile and action animations. Check that equipping, firing and reloading display the expected arms and weapon motion.
C++ entry point. Add StormFirstPersonEquippedWeaponsAdapter to your consuming module and include FirstPerson/StormFirstPersonWeaponCatalog.h. See StormFirstPersonWeaponCatalog.h.
StormAnimationNative animates a stock Unreal character: clips chosen by tag, distance-matched starts, stops and pivots, overlays, actions, hit reactions and foot placement.
Connect it. Give the character UStormNativeCharacterMovement and a UStormNativeAnimationComponent, and play a host Animation Blueprint derived from UStormNativeAnimInstance. The component's catalogue says what each locomotion tag plays. Set up the character and build the host.
Try it. Request another locomotion family with RequestLocomotionTag while moving and standing, and watch both from a second client. Enter ShowDebug Storm.State to see what the host presents.
C++ entry point. Add StormAnimationNative to your consuming module and include StormNativeAnimationComponent.h. See StormNativeAnimationComponent.h.
StormAnimationNativeEditor adds the Storm nodes to the Animation Blueprint graph editor: Storm Locomotion, Storm Lean, Storm Action, Storm Overlay Grip, Storm Reaction, Storm Turn In Place, Storm Look, Storm Layering, Storm Foot Placement and Storm Hand Reach.
Try it. Open your host Animation Blueprint and search the graph's context menu for Storm. Place the nodes in the host's order.
StormCharactersNative supplies AStormNativeHumanoid, a stock ACharacter with Storm's native animation, camera, first-person and hit reaction components, and its player controller.
Connect it. Make a child of SGF's /SGF/StormAnimation/BP_StormNativeHumanoid, which already plays SGF's host template, or a Blueprint derived from AStormNativeHumanoid. Assign its mesh, its host Animation Blueprint if it is not SGF's, and its catalogue, and select AStormNativeHumanoidController in the game mode. Its combat and body adapters bind to StormCombat and StormBody components on the same character once you set their reaction maps. Wire its hit reactions.
C++ entry point. Add StormCharactersNative to your consuming module and include Characters/StormNativeHumanoid.h. See StormNativeHumanoid.h.
This turns a character's StormCombat resolutions into hit reactions on the characters it hits.
Connect it. Put UStormCombatAnimationAdapterComponent on the attacker, beside its StormCombat resolution component, and set its Reactions map from outcomes and attack tags to reaction tags. The native Humanoid carries one as Combat Reactions. Resolutions happen on the server, so the requests are the server's.
C++ entry point. Add StormCombatAnimationAdapter to your consuming module and include StormCombatAnimationAdapter.h. See StormCombatAnimationAdapter.h.
This turns region changes of a character's StormBody into its own hit reactions.
Connect it. Put UStormBodyAnimationAdapterComponent on the character, beside its StormBody component, and set its Reactions map from regions and states to reaction tags. The native Humanoid carries one as Body Reactions. Only the server sends, and only for changes made by damage or an explicit transition.
C++ entry point. Add StormBodyAnimationAdapter to your consuming module and include StormBodyAnimationAdapter.h. See StormBodyAnimationAdapter.h.
This sends hit reactions for StormWeapons hits. StormWeapons raises no hit events, so the game calls it with each shot's result.
Connect it. Make a weapon reaction map from attack tags to reaction tags. On the server, after committing a hitscan shot, pass its result and the map to SendShotReactions. Use SendHitReaction for a single hit, such as a projectile's impact.
C++ entry point. Add StormWeaponsAnimationAdapter to your consuming module and include StormWeaponsAnimationAdapter.h. See StormWeaponsAnimationAdapter.h.
This puts a character's held items into its animation: the overlay each item asks for, and its support-hand grip.
Connect it. Put UStormItemsAnimationComponent on the character, beside its held-items and animation components, and set its Profile. A Storm Items Animation Profile maps an item archetype, and optionally one presentation tag, to an Overlay Tag with its Overlay Priority, and to a grip: the Grip Hand that reaches, and either a Grip Socket on the presentation Actor's attached component or the overlay's clip IK bones. The component binds at BeginPlay to the held-items and animation components on its owner, or call Bind yourself.
While an item it maps is presented, the component requests the overlay on the authority and gives each copy's animation component that copy's grip. When the presentation is removed, it releases both. A dedicated server presents no Actor, so it requests the overlay and sends no grip.
Choose what animates. A character that presents several items at once, such as weapons on a sling or in holsters, names the one in its hands:
Set the selection and conditions on every machine, from state your game already replicates, such as its drawn weapon. The component does not replicate them. The overlay follows the server's choice; each machine's grip follows its own. Changes apply at once. Call Refresh after replacing the Profile while playing.
Restrict movement while holding an item. Tick Restrict Movement on an entry and fill its Movement Restriction, such as walk only with no jump or mantle for a crate. While that entry applies, the server restricts the character's Storm native movement, under Movement Restriction Source or Storm.Movement.Restriction.HeldItems if that is empty. The restriction lifts when the entry stops applying: the item is deselected, removed, or a condition picks another entry. Your game's own restrictions, made under other sources, are left alone. See Set up the character.
C++ entry point. Add StormItemsAnimationAdapter to your consuming module and include StormItemsAnimationAdapter.h. See StormItemsAnimationAdapter.h.
This adds Equipment > Fit in Character Designer.
Try it. Pick a held item and adjust its position on the preview character. Check the fit in several poses before using it in a playable character.
This adds Equipment > Loadout in Character Designer.
Try it. Choose the items the character should start with, assign each item to a compatible slot and preview the loadout. Verify it again when the character spawns in your map.