Figure 17 Links between actions formed at run-time for GOAP
GOAP actions and goals are decoupled and modular so it is only the new actions or goals that need to be compiled to incorporate any changes. As a modern game can have hundreds of classes and compilation time can run into hours, reducing compile times and extensive recompilations is highly desirable.
It was possible to highlight the reusability of the GOAP system by creating three different types of agent. The first type of agent had all the GOAP actions and FSM states but couldn’t melee attack, the second agent had all the GOAP actions and FSM states but couldn’t fire, only perform melee attacks. The final agent had all the GOAP actions and FSM states available to it. When implementing this with the GOAP system, as all the same actions were used across all the agents, each of the three agent types just required an XML file with a different action and goal set defined. When the agent is being loaded, the XML