Vixen
caa30e12
csharp
public sealed class GoapAction

One thing an agent can do, and what it needs and changes.

Read the guide page for this →

Remarks

doc 37 § D2 again: Action is an index into the world's AgentActionRegistry, the same thing a behaviour-tree task and a utility action name.

⚠ BaseCost is what a designer tunes and the distance is what the world adds. An action set whose costs are all one plans by depth, which is the default and is usually right; a set that wants "shooting is cheaper than punching" says so here rather than in a heuristic.

Fields and properties (8)

  • public Symbol Name

    What it is called.

  • public ushort Action

    Which action it runs.

  • public GoapCondition[] Conditions

    What has to be true before it can run.

  • public GoapEffect[] Effects

    What it changes.

  • public float BaseCost

    What it costs before the world has its say.

  • public Symbol Target

    Which target sensor says where it happens, or none.

  • public float StoppingDistance

    How close is close enough, in metres.

  • public GoapMoveMode Move

    Whether the agent has to be there first.

Methods (2)

Used by (20)

  • AiSnapshotsVixen.Ai
  • AiSystemVixen.Ai
  • FlatCostModelVixen.Ai
  • GoapBudgetTestsVixen.Ai.Tests
  • GoapCostTestsVixen.Ai.Tests
  • GoapDomainVixen.Ai
  • GoapDomainContentCompilerVixen.Ai
  • GoapDomainTestsVixen.Ai.Tests
  • GoapPearTestsVixen.Ai.Tests
  • GoapPlannerVixen.Ai
  • GoapReplanTestsVixen.Ai.Tests
  • GoapSnapshotVixen.Ai
  • GoapThroughputTestsVixen.Ai.Tests
  • IActionCostModelVixen.Ai
  • NavigationCostModelVixen.Ai.Nodes
  • StraightLineCostModelVixen.Ai
  • VillageVixen.Ai.Nodes.Tests
  • VillageSampleTestsVixen.Ai.Nodes.Tests
  • GoapGraphProjectionVixen.Editor.Ai
  • LiveAgentVixen.Editor.AssetEditors.Tests