How-To: Set Up Pages

Goal: a second manual page the player cycles to with keys, and an automatic bear form page that takes over the bar while the player carries a stance tag - with no code.

Prerequisites
Quick Start (one bar working). A gameplay tag the player carries in the stance, e.g. State.Stance.Bear, granted by a gameplay effect (loose tags do not replicate; effect-granted tags do).

1. Add a manual page

Open DA_ActionBars. Bars[0].Pages -> add an entry: LayoutId = ActionBar.Layout.Main.2, eight Slots, ActivationQuery empty. Create IA_ActionBar_PageUp / IA_ActionBar_PageDown, map them (Mouse Wheel Up/Down with Shift, or Page Up/Down), and set them on the bar's PageUpAction / PageDownAction.

Verify
Play. Page Up flips the bar to an empty page 2 (OnPageChanged fires with 1); bindings you drop there stay there; Page Down returns. The manual page replicates and survives a save.

2. Add an automatic page

Bars[0].Pages -> add a third entry: LayoutId = ActionBar.Layout.Main.Bear, eight Slots, ActivationQuery = Any Tags Match State.Stance.Bear, ActivationPriority = 10.

Verify
Apply the stance effect (server). The bar flips to the bear page on the owning client immediately - the rule is evaluated locally from replicated tags, no round trip. Remove the effect and the bar returns to whatever manual page it was on. Page Up/Down never selects the bear page.

3. Vehicle bars keyed by the pawn

Rules see the union of the owning player's tags (PlayerState / ASC) and the possessed pawn's tags, so a vehicle bar is keyed by what you are driving: give the vehicle pawn's ASC (or IGameplayTagAssetInterface) a Vehicle.Tank tag and author a page with that query. Re-possession re-binds the tag sources automatically.

See also

  • Concept: Bars, Pages and the Store
  • API Reference -> Pages