Changelog

Unreleased

Pieces by definition id

  • Pieces are known by their definition id (FPulseDefinitionId of PulseFoundation, PulseBuildPiece:<asset name>) wherever they leave the machine. FPulseBuildPiece replicates and saves DefinitionId; Definition is local (Transient, NotReplicated) and found by each machine. New FPulseBuildPiece::IsResolved; IsValid needs the id, not the pointer. Code that makes a piece sets both with Pulse::Build::Pieces::SetDefinition; UPulseBuildSubsystem::AddPiece refuses a piece whose id is not the one of its definition.
  • New Pulse::Build::Pieces (PulseBuildPieces.h) and UPulseBuildPieceLibrary: make, read and parse ids, find (never loads), load at once or in the background, list, register and unregister runtime pieces. New UPulseBuildSubsystem::AddPieceById (Blueprint Add Piece By Id).
  • The kinds PulseBuildPiece (always cooked), PulseBuildCatalog and PulseBuildBlueprint are registered with the asset manager in code (PrimaryAssetType on each class); no project config needed.
  • Clients show and register a received piece once its definition is there (SubmitReceivedPiece, an FPulseDefinitionResolver); pieces whose definition does not come wait, are warned about once per id, counted in the debug snapshot and in PulseBuildInfo, and are tried again when the definitions of pieces change.
  • Requests: FPulseBuildRequest::Piece is replaced by DefinitionId. The server takes pieces it has ready and never loads a path for a request (Pulse::Build::Request::ResolvePiece); unknown ids, ids of another kind and blueprints with an unknown piece answer Invalid Piece. Only a builder that may build every piece (bRequireCatalog off, free build) loads a piece asset the asset manager knows by the id, once, and keeps it (UPulseBuildComponent::FindOrLoadBuildablePiece), so creative building works on a dedicated server. Catalogs compare pieces by id. Hosts of bridges outside this repository that fill Request.Piece set Request.DefinitionId instead.
  • Blueprint text version 2: FPulseBuildBlueprintEntry::DefinitionId replaces the soft pointer Definition; text of another version or with more entries than Blueprint::MaxEntries is refused. Blueprint::MakePieces takes a world context and only ready definitions and lists the missing ids; Blueprint::LoadDefinitions loads them first, ImportBlueprint and SelectBlueprint select a blueprint once they are there and name unknown pieces in the result.
  • Save data version 5: FPulseBuildSavedPiece::DefinitionId replaces the soft pointer; loading finds pieces by id (LoadPieceSynchronous) and lists unknown ids (MissingPiece); data of another version is refused. The builder saves favorites, hotbar and recent pieces as ids (FPulseBuildUserData, FPulseBuildBuilderSaveData version 2); ImportUserData loads pieces that are not ready, fills only places the player left empty meanwhile and closes the gaps of unknown ids once every load answered (hotbar slots keep their places).
  • Cheats take a name or an id of a piece (ParsePieceId, any case); PulseBuildInfo lists the piece names and the pieces waiting for their definition. The creative menu (no catalogs, bRequireCatalog off) lists every piece id; the builder keeps the pieces it loaded for it, and a selected blueprint keeps the definitions of its pieces, so the garbage collector does not take them while they are named.
  • Editor: data validation reports two pieces with one name (one id); new and renamed pieces, catalogs and blueprint assets whose name is taken get a warning, and renaming a piece tells that saves need a Primary Asset Id Redirect. Id fields carry PulseDefinitionType = "PulseBuildPiece" for the definition picker.

Extension points

  • New Pulse::Build::Registry (PulseBuildRegistry.h): bridges register piece sources, default rules, cluster components and the cluster class at runtime (RegisterPieceSource, RegisterRule, RegisterClusterComponent, RegisterClusterClass) and take them back (Unregister(Owner) and one call per kind) instead of writing UPulseBuildSettings at module startup. The settings stay the base list: a registered source or rule of a type the settings hold is left out, a cluster class in the settings wins. Placement rules, the piece sources of the build component, cluster components, the cluster class and the spline check of piece validation read through it. Nothing changes for projects and bridges that keep using the settings.

Range

  • The build range checks of placing (and every spline point), removing, editing spline points and placing blueprints go through Pulse::Requests::CheckReach of PulseFoundation, on the preview and the server. The tolerance stays 400 cm unless the Reach Tolerance of the request guard is larger; the refusal stays Out Of Range. Upgrades, repairs and the other changes of a placed piece measure to its bounds with the same tolerance, so a piece placed at the edge of the reach can be changed from there.

Save

  • The building world saves what the actors of actor pieces and their components save of themselves (IPulseByteSaveable) in the new FPulseBuildSavedPiece::Components (FPulseBuildSavedComponent: name and bytes) and loads it before OnLoadPieceActor. OnSavePieceActor and OnLoadPieceActor stay for other data; OnLoadPieceActor is called only for pieces with such data.
  • New Pulse::Build::Save::IsSavedWithPiece(Object): filter for save systems that collect every IPulseByteSaveable of the world (Pulse::Save::AddObjectFilter of PulseSave), so those objects are not saved twice.

Splines

  • Pulse::Build::Spline::SetSplinePoints now runs the placement rules by default (EPulseBuildRuleCheck::Check): the new points must pass what placing the piece there would check. Code that restores points it checked before passes EPulseBuildRuleCheck::Skip; bCheckRulesOnEdit off on the Spline trait turns the rules off for a piece.
  • SplitSpline and JoinSplines do not run the placement rules: they reuse segments that were checked already (joining checks the limits only).
  • FindConnection breaks ties in a fixed order (a socket before a spline end, then the lower piece id, then the socket name), so the result no longer depends on the order of the query.
  • A piece with a socket of a fitting type within 1 cm of a spline end counts as connected (a support two belts meet at), in the placement, on the server and in GetConnectedPieces.
  • The server empties AddedPoints of FPulseBuildPlacementExtra_Spline in placements it receives, so no rule reads corner points a client sent.

Builder

  • UPulseBuildComponent::CheckPlacement with an IgnorePieceId (moving or editing a placed piece) no longer checks the catalog, as it did not check the lock: placed pieces from world seeds, saves or catalogs that have shrunk can be moved and edited with bRequireCatalog on.

Security

  • MovePiece (request Move) no longer takes spline points from the client: the server carries the stored shape with the sent transform (turned around the first point), so a move cannot make a spline longer than what was paid. Shape edits stay with RequestSetSplinePoints, which pays the difference.
  • PlaceBlueprint runs every piece through the checks of PlacePiece before anything is placed or paid: the placement mode (pieces may sit on sockets of other pieces of the blueprint that stand; grid pieces keep the grid offset of the blueprint; a group that stands nowhere is refused), catalog, lock, the range of every piece and spline point, the rules, zones, claims and permissions. Piece limits count the whole blueprint, now also per zone. The preview of the PlaceBlueprint tool runs the same checks. Blueprints wider than the build range must be placed in parts.
  • Pulse::Build::Blueprint::MakePieces drops the scale of entries: pieces never get a scale from blueprint text.
  • Undo and redo run the checks of the direct actions: a piece a step takes away needs the right to remove it (CanRemovePiece), a piece set back needs the right to change it (fixed pieces stay), and a piece that comes back is checked like a new piece for zones, claims and piece limits (counted for the whole step). Payment keeps its refund and charge rules.
  • New Pulse::Build::Request::Validate, run first by ExecuteRequest: requests with more copies than MaxDragCount (no longer cut to it), more spline points than the new setting MaxRequestPoints (256), more extras or blueprint entry states than MaxRequestExtras (8), more connected ids than MaxRequestConnections (32) or more blueprint entries than Blueprint::MaxEntries are refused (Invalid), and so are vectors and transforms that are not finite (Invalid Transform). New Pulse::Build::Math::IsFinite for vectors and transforms.

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