API reference

Blueprint categories Pulse|Build|.... Functions marked authority change state only on the server.

UPulseBuildComponent (builder)

Function Notes
FindBuildComponent(Actor) From pawn, controller or player state
SelectPiece(Piece), SetTool(Tool), StopBuilding() Local tool
RotatePreview(Steps), AddHeightOffset(Delta), Confirm(), UpdatePlacement() Local preview
GetPlacement(), GetTargetPieceId(), GetMovingPieceId(), GetSelectedPiece() Local state
BeginDrag(Shape), EndDrag(), CancelDrag(), GetDragTransforms() Rows and areas
FinishSpline(), RemoveLastSplinePoint(), IsPlacingSpline(), GetPendingSplinePoints() Splines
SelectBlueprint(Asset), SelectBlueprintData(Data), CopyPieces(Ids), MirrorCurrentBlueprint(), ExportCurrentBlueprint(), ImportBlueprint(Text), GetCurrentBlueprint() Building blueprints
RequestBuildChange(Request, Callback) (C++), node Request Build Every request as an FPulseBuildRequest with an answer (FPulseResult); at once on the authority
RequestPlace, RequestPlaceMany, RequestRemove, RequestMove, RequestPlaceBlueprint Requests (run at once on the authority)
RequestSetSplinePoints, RequestSplitSpline, RequestJoinSplines Spline edits
RequestUpgrade, RequestRepair, RequestStartWork, RequestStopWork, RequestCancelDismantle Construction
RequestUndo, RequestRedo, GetUndoCount() History
ToggleFavorite, SetHotbarSlot, SelectHotbarSlot, GetRecentPieces, ExportUserData, ImportUserData Favorites and hotbar
GetBuildPoints(), AddBuildPoints(Amount), SetBuildPoints(Points) (authority) Build points
GetNetState() What the owner gets replicated: build points, working site, undo and redo counts (FPulseBuildBuilderNetState)
GetPlacementCostLines, GetUpgradeCostLines, GetRepairCostLines, GetRemoveRefundLines Cost lines for the UI
CanBuildPiece(Piece), GetAvailablePieces() Catalogs and piece sources, without locked pieces (CanBuildPiece); the list keeps them
IsPieceLocked(Piece, OutReason) Whether a Lock Piece adjustment locks the piece for this player, and why
NotifyAvailablePiecesChanged() Tells menus that the available pieces changed (local; piece sources call it, the component itself when adjustments or the difficulty change)
K2_CheckPermission(Action, PieceId) (“Can Do Build Action”, an FPulseResult), CheckPermission(Action, Piece) (C++), CanRemovePiece(PieceId) Permissions
CheckUpgrade(Id), CheckRepair(Id) Whether the player can upgrade or repair now (FPulseResult, any machine)
GetBuildOwner(), GetBuildRange(), GetWorkingPieceId(), GetLastResult() (the last answer with its text) Queries
GetPlayerId(), GetBuilderId() Stable player id (FallbackPlayerId without a player state); runtime key of this builder (authority)

Events: OnToolChanged, OnPlacementChanged (local), OnBuildResult (owner: the FPulseResult of a request, or why a tool could not start one), OnBuildPointsChanged (owner and authority), OnAvailablePiecesChanged (where NotifyAvailablePiecesChanged was called); each also as ...Native.

The authority functions behind the requests (PlacePiece, PlaceMany, RemovePiece, MovePiece, PlaceBlueprint, Undo, Redo, UpgradePiece, RepairPiece, StartWork, CancelDismantle) answer with an FPulseResult too. Reasons: Pulse.Result.Failure.Build.* (not in the catalog, out of range, overlapping, not allowed, …) with a text each, and the reasons of PulseFoundation for authority, an invalid piece, a missing piece and costs. A detail of one case (“Needs 4 more build points.”, the zone that refused) is the message of the result. The placement modes (ValidatePlacement), rules and permissions answer with an FPulseResult as well, so the reason of a rule of the game reaches the answer as it is; CheckPlacement(Piece, InOutPlacement, IgnorePieceId) runs catalog, range, rules and permissions (with an IgnorePieceId, a placed piece that is moved or edited, neither the catalog nor the lock). Pulse::Build::ToResult and ToCode turn a code (EPulseBuildResult) into an answer and back. Pulse::Build::Request::Validate(Request) checks what a request carries before ExecuteRequest runs it (array sizes against MaxDragCount, MaxRequestPoints, MaxRequestExtras, MaxRequestConnections, Blueprint::MaxEntries; finite vectors and transforms, Pulse::Build::Math::IsFinite).

Spline helpers in Pulse::Build::Spline (Splines): AddConfirmedPoints(Extra, Points) (the points a confirm keeps, with the corners of the shapers), CheckShape(Points, AngleStep, Slopes, Tolerance) (the check of the rule Spline Shape), MakeEditPlacement(Subsystem, Piece, Points, Builder, OutInput, OutPlacement) (a placed spline at new points as a placement for the rules), SetSplinePoints(..., Rules) (authority; limits and rules, EPulseBuildRuleCheck::Skip only for points checked before; bCheckRulesOnEdit of the trait turns the rules off for a piece). SplitSpline and JoinSplines run no rules: they reuse checked segments.

Properties: Catalogs, bRequireCatalog, PieceSources, BuildRange, AimChannel, FallbackPlayerId, bShowPreview, “Build Points” (the start value in NetState), WorkSpeed, HotbarSize. The team of the owner comes from Pulse::Team.

UPulseBuildSubsystem (building world)

Function Notes
Get(WorldContext)  
AddPiece / K2_AddPiece, AddPieceById, UpdatePiece, RemovePiece / K2_RemovePiece, RemoveAllPieces Authority, no checks; AddPiece refuses a piece whose DefinitionId is not the id of its Definition (Pulse::Build::Pieces::SetDefinition sets both)
FindPiece, GetPiece, QueryPieces, GetPiecesInRadius, ForEachPiece, GetPieceCount Every machine
QueryPiecesWithTrait(TraitType, Center, Radius, Out), K2_QueryPiecesWithTrait (Blueprint: Query Pieces With Trait), Pulse::Build::QueryPiecesWithTrait<T>(Subsystem or world context, Center, Radius, Out) Every machine: pieces in a sphere whose definition has a trait of a type (also derived), each with the trait
FindPieceIdFromHit(Hit), GetPieceActor(Id), GetPieceCluster(Id)  
GetPieceBox, GetPieceBoxes, GetPieceBounds Static helpers
ExportSaveData, ImportSaveData, SaveToBytes, LoadFromBytes Authority; the IPulseByteSaveable of piece actors and their components are saved with their piece
Pulse::Build::Save::IsSavedWithPiece(Object) Whether the building world saves the object with its piece (filter for save systems that collect every IPulseByteSaveable)
IsClearingPieces(), HasBuildAuthority()  
SubmitReceivedPiece(Piece, Source, Apply), CancelReceivedPiece(Id), GetNumPiecesWaitingForDefinition(), GetNumPiecesWithMissingDefinition() Clusters and piece components: a received piece is applied once its definition is there (Multiplayer)
BeginBlueprintPlacement, EndBlueprintPlacement, IsPlacingBlueprint() Authority: the pieces added between them form one blueprint; an end without a begin ensures
FPulseBuildBlueprintPlacementScope(Subsystem, Blueprint, Origin, Instigator), AddPlaced(Id) Scoped Begin/End: ends on every path with the added ids

Events: OnPieceAdded, OnPieceChanged, OnPieceRemoved (+ Native, every machine), OnSaveExtras, OnLoadExtras, OnSavePieceActor, OnLoadPieceActor, OnSaveDataAppliedNative, OnBlueprintPlacementStarted and OnBlueprintPlaced (+ Native) (authority).

OnPieceEndedNative(Piece, Instigator, End) fires right after OnPieceRemovedNative and says how the piece leaves (EPulseBuildPieceEnd): Removed (RemovePiece on the authority outside RemoveAllPieces: removed, dismantled, destroyed, joined into another spline), Cleared (RemoveAllPieces, also when loading replaces the pieces) or Unregistered (its cluster entry or actor went away without RemovePiece; every removal a client sees).

Pulse::Build::Pieces (pieces by id)

PulseBuildPieces.h, see Pieces: MakePieceId(Name), GetPieceId(Definition), IsPieceId(Id), FindPiece(Context, Id) (ready now, never loads), LoadPieceSynchronous(Context, Id), LoadPiece(Context, Id, Done), GetPieceIds(Context) (sorted by name), RegisterPiece(Context, Definition), UnregisterPiece(Context, Id), ParsePieceId(Context, Text), SetDefinition(Piece, Definition), FindOtherAssetWithId(BaseClass, Name, Package, OutOther) (editor checks). Blueprint: UPulseBuildPieceLibrary (Get Piece Id, Find Piece, Get All Piece Ids, Register Piece, Unregister Piece). The asset classes have PrimaryAssetType (PulseBuildPiece, PulseBuildCatalog, PulseBuildBlueprint). Requests: Pulse::Build::Request::ResolvePiece(Builder, Id, OutDefinition). Blueprints: Pulse::Build::Blueprint::MakePieces(Context, Data, Origin, OutPieces, OutMissing), LoadDefinitions(Context, Data, Done).

Pulse::Build::Registry (extension points at runtime)

Function Notes
RegisterPieceSource(Owner, Source), RegisterRule(Owner, Rule), RegisterClusterComponent(Owner, Class), RegisterClusterClass(Owner, Class) Bridges add piece sources, default rules, cluster components and the cluster class without writing the settings (game thread)
UnregisterPieceSources, UnregisterRules, UnregisterClusterComponents, UnregisterClusterClass, Unregister(Owner), IsRegistered(Owner), Reset() Take them back (the module of Pulse Build resets at shutdown)
ForEachDefaultRule, ForEachPieceSource, GetClusterComponentClasses, GetClusterClass, HasDefaultRule(Type), HasPieceSource(Type), OnChanged() The settings first, then the registered entries whose type the settings do not hold (Extending)

UPulseBuildConstructionSubsystem

Function Notes
FinishConstruction(Id), FinishAllConstruction() Authority
CancelDismantle(Id), SetTier(Id, Tier, Instigator) Authority
SetTierPaid(Id, Tier, Instigator, Payment) (C++) Authority: SetTier for a paid upgrade; the new tiers keep what the payment took (RecordPayment)
ApplyDamage(Id, Amount, Instigator), DestroyPiece(Id, Instigator), Repair(Id, Amount, Instigator) Authority
RegisterBuilder, UnregisterBuilder, FindBuilder(PlayerId), FindBuilderById(BuilderId) Authority; build components register themselves
GetProgress(Id), IsUnderConstruction(Id), GetHealth(Id, OutMax) Every machine

Events (authority): OnConstructionCompleted, OnPieceUpgraded, OnPieceDamaged, OnPieceDestroyed. Hook: IsUpkeepPaid (decay).

Helpers in Pulse::Build::Construction: FValue (Add of a piece, of a tier, of a tier with other costs, AddPaid), GetCosts, MakeCostContext, SetCostPiece, GetCostExtra, GetCostBuilder, GetSizeFactor, FindSite, GetProgress, GetHealth, GetHealthFraction, GetMaxHealth, GetTierCount, GetTierName, RemoveWithRefund(..., bInRecordHistory). What a piece was paid with: GetCostFactor, FindPaidCosts, GetPaymentFactor(Context, Piece, Tier) (knob times cost adjustments now), SetPayment(Piece, Factor, Tier, Replaced), RecordPayment(Piece, Context, FromTier). Adjustments (pure, the tuning data as a parameter) in Pulse::Build::Adjustments: GetEffectiveCosts, IsPieceLocked, GetDecayPerHour, MakePieceContext (see Construction). Pure rules (no world): GetDecayHours, GetSiteWork, AdvanceSite, MarkStagePaid, SetStagePart, ShouldSendSite, IsSameSite, MergeSiteProgress, GetPayerCandidates, ApplyHealthDelta (see Construction). Message contexts: Pulse::Build::MakeMessageContext (and Pulse::Build::Integrity::MakeCollapseContext).

UPulseBuildIntegritySubsystem

GetStability(Id), ComputePlacementStability(Input, Placement), Recompute(), RecomputeAll(), NotifyGroundChanged(Area); OnPiecesCollapsed; hook IsGroundedOverride.

UPulseBuildZoneSubsystem

GetZones(Bounds), GetZonesAt(Location), FindClaimAt(Location, OutClaim), GetPlayerPieceCount(PlayerId), CheckAction(Context) (an FPulseResult), MakeQuery(Context), CheckTerrain(Player, Area, Check) and Can Change Terrain (K2_CanChangeTerrain(Player, Location, Radius, bOnlyInOwnClaim)), IsInClaimOf(Point, Player, bAllowTeam, bAllowGroup); free functions Pulse::Build::CheckTerrain and Pulse::Build::MakePlayerOwner (Changing the ground). Zone actor: APulseBuildZone::SetupZone(Type, Owner, Extent), SetPieceLimit(Limit) (authority), GetZoneData(), GetNetState().

Pure zone rule in Pulse::Build::Zones: CheckAction(Query, OutReason), IsOwnerOrGroup, NeedsPieceCount, NeedsPlayerPieceCount, NeedsClaims, IsOverPlayerLimit, MakePlayerLimitText, GetPieceTags, MakeClaimZone (see Permissions and zones).

UPulseBuildUISubsystem (local player)

GetBuilderViewModel(), ShowOverlay(), HideOverlay(), OpenMenu(), OpenRadialMenu(), CloseMenus(), GetPresenter() (the UPulseUIPresenter of the player).

Helpers in Pulse::Build::UI: GetSettings(), ResolveMenuLayer(Layer) (empty: Pulse.UI.Layer.Menu), MakeOverlayPlacement(Settings), CloseMenus(Presenter, Controller, Menus) (closes the widgets of the given classes on their layers with CloseWidget of the presenter, also covered ones, returns how many were open).

Types

Type Purpose
FPulseBuildPiece A placed piece: id, DefinitionId (replicated, saved), Definition (local, IsResolved), transform, owner, tier, states
FPulseBuildOwner Player id and team
FPulseBuildPlacement A placement: transform, result (an FPulseResult: why it cannot be placed, with its text), socket, preview tint
FPulseBuildBlueprintData Group of pieces relative to an origin (version 2, entries by definition id)
FPulseBuildUserData Favorites, hotbar, recent pieces by definition id (version 2)
FPulseBuildSaveData, FPulseBuildBuilderSaveData Saved building world (version 5); saved builder (version 2: build points, favorites, hotbar, recent pieces)
FPulseBuildSavedPiece, FPulseBuildSavedComponent A saved piece (DefinitionId, State, ActorState of other systems, Components: the bytes its actor and its components saved of themselves)
FPulseCost_BuildPoints, FPulseBuildCostExtra Build points cost; build data of a payment (extra of FPulseCostContext)
FPulseBuildPieceState_Payment, FPulseBuildPaidCosts What a piece was paid with: the factor of each tier, the costs of tiers an adjustment replaced
FPulseAdjustment_BuildPieceCost, EPulseBuildCostChange, FPulseAdjustment_BuildPieceLock, FPulseAdjustment_BuildDecay Tuning adjustments of pieces: costs (factor or other costs), lock, decay
FPulseBuildSiteAdvance, FPulseBuildHealthChange Results of AdvanceSite and ApplyHealthDelta
FPulseBuildSitePlayer, FPulseBuildSiteParticipants, FPulseBuildConstructionTracking Players of a site by id (component as cache); bookkeeping of the construction subsystem
FPulseBuildRule_Condition Rule with Pulse conditions
FPulseBuildPermissionContext, EPulseBuildAction Permissions (the context carries the world of the check)
FPulseBuildZoneQuery Everything the zone rule looks at (MakeQuery)
FPulseBuildZoneNetState Replicated state of a zone actor
FPulseBuildBuilderNetState Replicated state of a builder (owner only)
Pulse::Build::OnCheckOwnerGroup(), IsInOwnerGroup, IsOwnerOrGroup The group of an owner (party, friends) that bridges answer; IsOwnerOrTeam without the group
EPulseBuildTool, EPulseBuildResult Tools; the codes of the reasons (preview code of the view model, pure zone rule, spline limits, construction work)
FPulseBuildRequest, EPulseBuildRequestAction A request of a builder (RequestBuildChange, node Request Build); the piece as DefinitionId
FPulseBuildMessage, FPulseBuildCollapseMessage Message payloads

This site uses Just the Docs, a documentation theme for Jekyll.