Class planner_action

GOAP action class implementing both action base and action planner. Captures execution as action and plans its internal logic with separate logics graph.

Examples: combat planner, anomaly planner, items looting planner, alife planner, state planner

C++ class planner_action : action_planner,action_base

planner_action

Hierarchy (View Summary)

Constructors

Properties

__name: string

Name of luabind class constructor.

__name: string

Name of luabind class instance constructor.

object: game_object

Game object that is handled by current planner instance.

Container reference with state of planner preconditions.

Methods

  • Add action effect. Describes what target world state is expected to be if action is completed.

    Parameters

    • property: world_property

      world state property describing a pair of evaluator ID and value

    Returns unknown

  • Add action execution precondition. When building logics graph, action will be considered blocked by some preconditions.

    Parameters

    • property: world_property

      world state property describing a pair of evaluator ID and value

    Returns void

  • Lifecycle method. Execution tick of the action, called from object logics update cycle when current action is active.

    Returns void

  • Lifecycle method called once on action execution stop. Means that action is finished / preconditions are not met anymore.

    Returns void

  • Lifecycle method called once on action execution start. Means that lifecycle of the action begun.

    Returns void

  • Remove action effect. Action will be not considered as property changing for id anymore

    Parameters

    • id: number

      world state property id

    Returns void

  • Remove precondition for action. When building logics graph, action will not be considered blocked by evaluator id states.

    Parameters

    • id: number

      world state property id

    Returns void

  • Set weight of planner action switch.

    Parameters

    • weight: number

      weight value to express how prioritized action is

    Returns void

  • Debug method. With mixed / debug build allows investigation of evaluators and actions matches. Helps to debug custom actions and actions pre-conditions with state printing in log files.

    Note: Available only in mixed / debug engine builds, not for direct usage from lua.

    Parameters

    • prefix: string

      string prefix to display current action state in logs

    Returns void