PulseGameplay integration
The bridge plugin PulseBuildGameplayBridge connects Pulse Build to PulseGameplay: inventory, combat, HUD and interaction. Neither plugin depends on the other. Enable PulseBuild, PulseGameplay and PulseBuildGameplayBridge; the defaults work without further setup.
At startup the bridge registers what it adds with Pulse::Build::Registry; the Pulse Build settings stay as your project set them (what they name wins):
| Registered | What | Switch off in |
|---|---|---|
| Cluster class | APulseBuildCombatCluster (while the build settings name no ClusterClass) | Build Combat > Damageable Clusters |
| Cluster component | UPulseBuildSiteInteractComponent | Build HUD > Hold To Build |
| Piece source | Inventory Build Kits | Build Inventory > Add Build Kit Source |
A switch applies at once (cluster class and components to clusters spawned afterwards).
Item costs
Item costs need no bridge: add the Items cost of PulseGameplay (FPulseCost_Items) to the Costs trait of a piece (or to a tier’s upgrade costs):
| Property | Meaning |
|---|---|
Item | The item definition |
ItemTag | Or any item with this tag (when Item is empty) |
RefundItem | Given back for a cost by tag |
Count | Items per piece (spline pieces: per length unit) |
bIncludeEquipped | Equipped stacks pay too |
The inventory is found on the player (pawn, controller or player state). Payment stages, refunds, repairs and undo work like with build points. Refunds go back into the inventory; what does not fit, and refunds without a player (destroyed pieces with DestroyedRefundFraction), drop as pickups where the piece stood. Lent items (e.g. given by a skill) never pay.
Build kits
Give an item the Build Kit trait (FPulseItemTrait_BuildKit, Piece). A player who carries the item may build the piece, also without a catalog, and sees it in the build menu. Add an Items cost with the kit item to the piece, so placing uses the kit up and removing gives it back. UPulseBuildInventoryLibrary::SelectBuildKit(Builder, Item) starts placing it, e.g. when the item is used from the hotbar.
Chests
Actor pieces with a UPulseInventoryComponent (chests, storage) keep their items in the building world’s save data (Pulse Build saves the inventory itself, see Save and load) and drop them as pickups when the piece is removed or destroyed (Build Inventory > bDropContainerItems, ContainerDropScatter). Loading a save and RemoveAllPieces drop nothing.
Combat
Pieces with the Health trait take combat damage: melee hits, projectiles (also blocking hits on a wall), hitscan and Pulse::Combat::ApplyDamage. The cluster finds the hit piece by the hit location (HitSearchRadius).
| Setting (Build Combat) | Meaning |
|---|---|
DamagePolicy | Everyone; not the owner and team; only non-players (AI raids) |
DamageMultiplier | Multiplier of all damage to pieces |
The Damage Resistance trait (FPulseBuildPieceTrait_DamageResistance) gives a piece Multipliers per damage type (the most specific tag wins), DefaultMultiplier, MinDamage (smaller hits do nothing: stone walls ignore fists) and TierMultipliers. Actor pieces derive from APulseBuildDamageableActor or call UPulseBuildCombatLibrary::DamagePiece(PieceId, Spec). Destroyed pieces follow the construction rules (refund without payer, integrity collapse).
HUD
The building widgets need no bridge: Pulse Build opens them through the UI host of PulseFoundation, which is the Pulse HUD when PulseGameplay is enabled. The build menu and the radial menu open on the menu layer (Build UI > MenuLayer, RadialMenuLayer), the overlay goes into the gameplay part of the HUD layout, so it hides with the HUD and while menus are open; OverlayPlacement (default 84 at the bottom) keeps it above the item hotbar of the default HUD. See UI.
Site markers: construction sites near local players get a world marker with name and progress (bShowSiteMarkers, SiteMarkerRange, MaxSiteMarkers, bOnlyOwnSites, SiteMarkerIcon, SiteMarkerColorRole, SiteMarkerInterval). The marker timer runs only while sites exist.
Hold to build
UPulseBuildSiteInteractComponent makes construction sites interactable with the PulseGameplay interact ability: the prompt shows “Build Foundation (50%)”, and while the player holds the interaction the build component works on the site (range and permission checked on the server; the player pays due stages). The aimed site wins, else the nearest site within SiteInteractRange. Every cluster gets the component; add it to actor pieces that can be sites, too.
Cheats
| Cheat | What it does |
|---|---|
PulseBuildItemCost <piece> <item> <count> | Gives a loaded piece an item cost (in memory, for tests) |
PulseBuildKit <item> <piece> | Makes a loaded item a build kit (in memory, for tests) |
PulseBuildSiteMarkers | Prints the sites this machine knows and the markers per local player |