Class action_planner

C++ class action_planner

action_planner

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 generic action by id for planner execution.

    Parameters

    • id: number

      unique identifier of new action

    • action: action_base

      action implementation containing preconditions, logics, effects and other meta infos

    Returns void

  • Get currently active action identifier.

    Returns number

    unique identifier of current action

  • Returns boolean

    whether object action planner is already initialized

  • Remove action by unique id.

    Parameters

    • id: number

      unique identifier of the action to remove

    Returns void

  • Return evaluator instance for current action planner.

    Parameters

    • id: number

      unique identifier of the evaluator for removal

    Returns void

  • Set target world state to try to reach with all the graph logics. All graphs will be built from current state to goal world state with the shortest possible path.

    Parameters

    • state: world_state

      target world state to reach with planner

    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

  • Lifecycle method to handle generic game loop updates.

    Returns void