PoBDSDocs
简体中文v1.0.0
POBDS / 02

Flow Graph, BDS and Ability

Separate how a behavior executes from which behavior should execute now.

Four core concepts

ConceptResponsibilityExamples
Flow GraphOrganize execution across framesEntry → Action → child graph / BDS → Return
BDSEvaluate candidates every frameGates, base scores, bonuses and Evaluation
AbilityA candidate participating in a decisionConditions, scoring Context and Execution
ActionPerform a concrete operationMove, wait, invoke a method or set a variable
Flow Graphs and BDS graphs can call one another in nested execution branches. · Click to view full image

How one BDS works

One BDS: ordered candidate evaluation, a Decision, the selected Ability and its Execution. The diagram includes bilingual labels. · Click to view full image
  1. Sequence: visit candidates in order

    Evaluate Ability 1…N in configuration order. This is evaluation order, not execution of all behaviors, and not an extra execution Sequence node to add to the graph.

  2. Ability: gate, then score

    A failed gate excludes the candidate. Eligible candidates calculate their base score plus contextual bonuses using the logical frame’s data.

  3. Decision: select an eligible candidate

    Choose the highest score among available candidates. The current implementation keeps the first encountered candidate on an equal maximum, so ordering must be stable. Disabled/cooldown eligibility still applies.

  4. Selected Ability: apply switching policy

    A leader is not automatically the executor. After completion, another candidate may start; while the current behavior is unfinished, normal candidates wait and eligible forced-interrupt leaders can exit the old branch.

  5. Execution: perform concrete behavior

    The behavior may be a complex flow graph or a child BDS. Leaf Actions operate through Enter / Update / Exit. Active parent BDS layers continue evaluating on subsequent frames.

Evaluate before executing

Gates and scores choose a leader; completion and interruption determine execution. · Click to view full image

An Ability first checks its gate. Eligible candidates calculate a base score and conditional bonuses. Evaluation compares those scores to identify the current leader. The leader and the executing Ability can differ: a normal candidate waits for the current behavior to finish; an eligible leader with forced interruption may replace it.

How nested decisions cooperate

Parents keep thinking while leaf Actions execute. · Click to view full image

In Acquire → Combat → Defense → Evade, all active BDS layers continue evaluating conditions and scores. Concrete Actions execute along the current leaf branch. When Acquire chooses an eligible interrupting alternative, the old branch and its descendants exit together. Combat and Defense can similarly replace their own descendants.

An Action is not just one function call

Advance only after all Actions on this node finish. · Click to view full image

Enter initializes an Action, Update continues it on later frames, and Exit cleans it up when the graph leaves or interrupts the node. Several Actions can share a node; every unfinished updating Action runs until all have finished. Use one node for concurrent movement and firing, or several connected nodes for an ordered approach → reload → fire → return sequence.

Combine keywords with / · Enter opens first result · Esc closes