Faction integration (PulseBuildFactionTerritoryBridge)

The bridge PulseBuildFactionTerritoryBridge ties claims to the ground of factions: a claim totem stands only in a territory of Pulse Faction Territory that the builder’s faction owns, and members of a faction can share their claims. Enable PulseBuild, PulseFactionTerritory (with PulseFaction) and PulseBuildFactionTerritoryBridge. The territory rule is on once the bridge is enabled (turn it off with bRegisterTerritoryRule); sharing claims is off until you choose it.

A typical flow: the players take the heart of an occupied island (a capture point of Pulse Faction Territory), their faction owns the island, one of them places a totem there, and the totem’s claim is where they build. With the rule In Own Claim of Pulse Build they build nowhere else.

Setup

Set Up in the Pulse window (Build Faction Territory) has two optional steps:

  • Claim pieces only on territory of the own faction (bRegisterTerritoryRule, Project Settings > Pulse > Build Faction Territory, on by default): the bridge registers the rule Own Faction Territory as a default rule (Pulse::Build::Registry, see Registering at runtime); it does not write the Default Rules of Pulse Build. It checks only pieces with the Claim trait and Use Default Rules on, so the other pieces are not affected. To use other values, put the rule into the Default Rules (Project Settings > Pulse > Build): that one is used instead of the registered one. With the setting off, put the rule on the claim pieces themselves.
  • Members of a faction share claims: turns on bFactionMembersShareClaims (Project Settings > Pulse > Build Faction).

To build only inside claims, add the rule In Own Claim of Pulse Build too (its own optional step Build only inside own claims, or on single pieces).

The rule Own Faction Territory

The place of the piece must lie in a territory whose owner is a faction the builder is a member of (the faction component of PulseFaction on its player state).

Property Default What it does
bOnlyClaimPieces on Only pieces with the Claim trait check it
bWholeClaimInside on Eight points on the edge of the claim (its Radius) must lie in territories of the faction too: no claim reaches over the border or into the sea; another territory of the same faction is fine
bAllowWhileContested off A contested territory (players of factions against each other inside) counts
Factions empty Only these factions of the builder count
Reason Text
Pulse.Result.Failure.BuildFaction.NoTerritory You can only claim ground in a territory of your faction.
Pulse.Result.Failure.BuildFaction.NotOwned Your faction does not own this territory.
Pulse.Result.Failure.BuildFaction.Contested This territory is being fought over.
Pulse.Result.Failure.BuildFaction.CrossesBorder The claim would reach beyond the territory of your faction.

Replace the texts in Project Settings > Pulse > Foundation > Result Texts. The territories and the memberships replicate to every machine, so the preview shows the same answer as the server; a territory a client does not know yet passes there, and the server decides.

The rule only refuses a placement. The claim is the Claim trait of the piece; it stays when the faction loses the territory later.

Faction members share claims

With bFactionMembersShareClaims the bridge answers the group check of Pulse Build (Pulse::Build::OnCheckOwnerGroup): the owner of a claim or piece and the player belong to one group when both are in the game and share a faction (only the factions in SharedFactions when that list is not empty). Claims, decay in claims and the rule In Own Claim use the group; with Allow Group of the permission Owner and Team (on by default) members also remove and change the pieces of each other. An owner who is not in the game shares nothing.

Test

The example map /PulseBuildFactionTerritoryBridge/Examples/LV_PulseBuildFactionTerritory_Example (built by Tools/make_examples.py of the bridge) has a start island without territory and an occupied island owned by the Guards, with its heart: a capture point held by two example guards.

  1. Play, PulseBuildGrant, PulseFactionJoin Bandits.
  2. Select DA_PulseBuildFactionTerritoryExample_Totem (PulseBuildSelect DA_PulseBuildFactionTerritoryExample_Totem): on both islands the preview is red (“Your faction does not own this territory.” on the occupied one).
  3. Remove the guards, stand at the heart until the island is yours (PulseFactionTerritoryInfo).
  4. Place the totem on the island: its claim appears. DA_PulseBuildFactionTerritoryExample_Floor (rule In Own Claim) can be built inside the claim and is refused outside it.

PulseBuildFactionTerritoryInfo [radius] prints on the server what the rule sees at the pawn.


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