Configuration Profiders
This page presents functionalities provided by Grail UE 4 Plugin’s configuration data provider classes.
Internal Classes
Grail Configuration Loader
A class responsible for loading Grail config file and storing its data.
The user chooses which file this object should be responsible for and then provides it with ReasonerFactories
and/or behavior loader along with consideration repository so it will be able to instantiate default factory producing UtilityReasoners
.
Create separate blueprint classes inheriting from UGrailConfigurationLoader
to support multiple configuration files or sets of Reasoner Factories;

Behavior Loader
This class represents a set of all available UBehaviorProviders
associated with at least one configuration file.
A user can use one monolithic UBehaviorLoader
derived blueprint class for all behaviors from multiple configuration files or use one repository per file.
Nevertheless, each UBehaviorLoader
must contain all UBehaviorProviders
defined in given file.

Consideration Repository
A set of all available UConsiderationProviders
associated with at least one configuration file.
The user can use one monolithic UConsiderationRepository
derived blueprint class for all considerations from multiple configuration files or user one repository per file.
Nevertheless, each UConsiderationRepository
must constain all UConsiderationProviders
defined in given file.

User-defined config-related classes
Those classes objects need to be derived from and their function need to be overriden by the user.
UBehaviorProvider
An abstract class from which the user should inherit when making use of Grail’s internal Utility System.
The user needs to override InstantiateBlueprint
method, which should return a Blueprint
able to provide instance of the desired type of Behavior.
References to classes derived from UBehaviorProvider
are held by UBehaviorLoader
, as described above.
When constructing a Blueprint , remember to pass it a name identical to the one defined in Grail config file you intend to use.
|
Consideration Provider
An abstract class from which the user should inherit when making use of Grail’s internal Utility System.
User needs to override ProduceConsideration
method, which should return a Consideration
defining subset of current game state.
References to classes derived from UConsiderationProvider
are held by UConsiderationRepository
, as described above.
Remember to set ConsiderationProvider’s name to be identical with the one defined in Grail config file you intend to use.
|