Planner Type

What is a Planner Type?


Script Reference

A Planner Type is responsible for producing Plans that reduce a Drive Type. It is attached to a Decider Type. The Decider Type is then responsible for selecting a plan to run.

Planner Type follows TAIs common pattern of ScriptableObject Logic Customization. Planner Type is the abstract base class and its subclasses can be set as one of the DeciderType's PlannerTypes. For example, GOAPPlannerType inherits from PlannerType and overrides the two abstract Planner Type methods to implement a GOAP-like planning process. GOAPPlannerType is selected as the GOAPDeciderType's only PlannerType.

Planner Type Methods



    public abstract void Setup();
    public abstract Plans CreatePlansForDriveType(Agent agent,
                                                  DriveType driveType);
          

Setup is used for any intialization required by the PlannerType.

CreatePlansForDriveType takes in a DriveType and returns a Plans object. The Plans object contains all of the possible plans for the specified DriveType. The Decider is then responsible for evaluating and choosing a Plan or asking the PlannerType for Plans for a different DriveType. If you would prefer the PlannerType to evaluate and choose a Plan, have it just return one Plan in the Plans and then create a custom DeciderType to always choose the first plan.