Tactical Assignment Reference
Tactical Assignment configuration lives at three levels. A Plan defines batches and reevaluation cadence; a StateTree Task supplies the top-level Sources for one run; project policy and settings define capacity and location canonicalization for physical targets. Candidate flow, Allocator context, and Session tracking state are produced at runtime and are not saved Plan fields.
UGAIS_TacticalAssignmentPlan
A Plan can be a Data Asset or an Inline Plan on a StateTree Task. It stores reusable planning rules; the Task Sources provide candidate Units and targets for a run.
Plan validation requires at least one Batch, a valid IntentTag on every Batch, valid Filter instances, finite score adjustments, and a valid reevaluation interval.
Data Asset versus Inline Plan
Standalone asset validation covers the Plan itself. When a Session starts, the system also validates the complete runtime configuration together with Sources supplied by the calling Task. An Inline Plan has the same fields and runtime capability; its configuration ownership is local to the Task.
FGAIS_TacticalAssignmentBatch
A Batch states which semantic request this priority makes, which candidates may participate, how scores are adjusted, and who makes the final selection. The Task supplies Sources centrally.
StateTree Task runtime inputs
FGAIS_STT_RunTacticalAssignmentPlan owns Session lifetime and top-level inputs while its StateTree state is active.
Sources and SourceTag
UGAIS_TacticalAssignmentAssigneeSource and UGAIS_TacticalAssignmentTargetSource Gather entry points only fill output arrays. Fixed Actor/Target Data arrays, squad members, EQS Actors or locations, and project-specific input can all be implemented as Sources.
Built-in Assignee Sources
Built-in Target Sources
Every Target Source inherits SourceTag.
SourceTag writing, matching, and boundary
- TargetData with a valid
SourceTagkeeps its value. - TargetData without a Tag receives the producing Target Source's
SourceTag. TargetFilter_SourceTagchecksBlockedSourceTagsfirst and rejects a match. If Allowed is empty, other sources pass; otherwise a source must match an Allowed Tag. Matching follows GameplayTag parent-child hierarchy.- Intent Resolver receives this Tag in its context and can choose a Command by source.
- GameplayDebugger displays the Tag on Assigned and Unassigned rows.
- Candidates and reservations treat different SourceTags for one Actor as distinct logical candidates, but reservations canonicalize by Actor; pure locations canonicalize by location grid.
Built-in Assignee Filters
Distance To Desired Location can use predicted/smoothed DesiredLocation or raw RawDesiredLocation; DistanceMetric can be 2D or 3D; a maximum distance of 0 means no upper bound.
Built-in Target Filters
The boundary is simple: Sources decide where the global candidate pool comes from; each Batch's Filters decide who from that union can participate in its current tactical intent. Filtering occurs before pairing and Intent Resolver. CommandDefinition still runs CanObeyCommand and IsValidTarget afterward.
Target capacity and location canonicalization
The World Subsystem owns target capacity. It uses UGAIS_ProjectPolicy::ResolveTacticalAssignmentTargetCapacity to establish authoritative capacity for a canonical physical target. The default policy uses MaxAssigneesPerTacticalTarget: a positive value is a hard limit and 0 permits unlimited sharing. Batches and the Greedy Allocator do not have independent capacity-number fields.
UGAIS_DeveloperSettings.TacticalAssignmentLocationTargetGridSize controls the canonicalization grid for pure location targets. Actor targets use Actor identity; targetless Commands do not reserve physical targets. Do not look for removed Plan fields such as TargetLocationTolerance or MaxAssigneesPerTarget.
What a custom Allocator sees
FGAIS_TacticalAssignmentAllocatorContext is read-only Batch input: Context Actor, Batch Index, Batch copy, scored CandidateAssignments, and TargetCapacities. The capacity view already includes existing World claims; the core still validates candidate origin and capacity when it accepts results.
An Allocator selects. It must not call Sources again, redo Filters, resolve Intent again, or bypass Command validation. To change whether a Unit can execute or a target is legal, use a Command, Resolver, or Filter.
The default UGAIS_TacticalAssignmentAllocator_GreedyWithCapacity visits candidates in stable descending AdjustedScore order. One Actor produces at most one selection. A reservation-requiring candidate must also satisfy ExistingClaims + selections in this Batch <= MaxAssignees; equal scores retain original candidate order.
FGAIS_TacticalAssignmentCandidate
Every item an Allocator receives has passed Sources, Filters, Resolver, and Command validation.
A custom Allocator writes selected original candidates to SelectedAssignments. The core looks them up in the canonical candidate set, so altered fields, fabricated candidates, or duplicate selection of an Actor are rejected.
Target capacity modes
FGAIS_TacticalAssignmentTargetCapacity has three modes.
FGAIS_TacticalAssignmentTargetCapacityView.ExistingClaims is the number held by other Sessions. The requesting Session's own existing claim is handled separately during replacement. Resolved capacity remains stable while a reservation bucket is non-empty so repeated reevaluations have stable results.
Customize capacity through UGAIS_ProjectPolicy::ResolveTacticalAssignmentTargetCapacity(World, CanonicalTargetData). The policy is called through its CDO and can immediately inspect the target Actor, type, tags, or project rules. The World Subsystem owns cross-frame usage, so the policy need not cache Actors or counts.
Results and diagnosis
Deferred means a World-update guard conflict or synchronous reentry and preserves tracked assignments and reservations. When a Source produces nothing this run, normal evaluation still completes, reconciling old assignments against the current candidate flow and marking them Stale when necessary.
For the end-to-end configuration workflow, see Configure a Tactical Assignment Plan; for extension ownership, see Tactical Assignment Extension Points; for failure signals, see Troubleshooting Flows.