Skip to main content

IAction

An interface in Root.Township, Alta.Intelligence.

One thing an AI creature can do, as used by the action decider. Its lists of target operations score the action, and IAction<TAgent>.Start begins it on an agent.

Properties​

MemberWhat it is
List<TargetOperation> CalculateBasePreferred { get; }Operations that add to or take from the action's score, without a target. Each result is weighted and summed.
List<TargetOperation> CalculateBaseRequired { get; }Operations that must pass without a target. A negative result rules the action out; others multiply its score.
List<TargetOperation> CalculateTargetPreferred { get; }Like CalculateBasePreferred, but scored against each possible target.
List<TargetOperation> CalculateTargetRequired { get; }Like CalculateBaseRequired, but checked against each possible target.
IActionSettings GeneralSettings { get; }Shared settings such as cancel priority and whether the action can be cancelled.
bool IsUsingTarget { get; }Whether the action is aimed at a target.
float Multiplier { get; }Starting score for the action before operations are applied.
string Name { get; }The action's name.

Used in​

Members of other types that take, return or hold a IAction: