Arma Reforger Script API
|
Base class for all AI settings. More...
Public Member Functions | |
int | GetPriority () |
SCR_EAISettingOrigin | GetOrigin () |
SCR_AISettingBase | GetParentSetting () |
SCR_EAISettingFlags | GetFlags () |
bool | HasFlag (SCR_EAISettingFlags f) |
int | GetMaxActionCause () |
Returns action cause value to which this setting applies. | |
SCR_AISettingBase | CreateCopy () |
This method must make a deep copy of data describing this setting. | |
void | Internal_InitCopyFrom (SCR_AISettingBase from) |
Called right after this setting object was created as copy from elsewhere. | |
void | Internal_ConstructedAtProperty (SCR_EAISettingOrigin origin, SCR_EAISettingFlags flagsToSet) |
Must be called if the setting is part of some property. | |
void | Internal_SetFlag (SCR_EAISettingFlags flagsToSet) |
TypeName | GetCategorizationType () |
Returns type which is used for identification of setting type. | |
void | OnAdded (SCR_AISettingsBaseComponent settingsComp) |
Called after the setting was added to SCR_AISettingsBaseComponent. | |
void | OnRemoved (SCR_AISettingsBaseComponent settingsComp) |
Called after the setting was removed from SCR_AISettingsBaseComponent. | |
void | ApplyEffects (SCR_AISettingsBaseComponent settingsComp) |
This is meant for settings which apply some permanent effect to AI (like setting skill), instead of some other system to look up current settings through GetCurrentSetting call. | |
string | GetDebugText () |
Static Public Attributes | |
const int | ACTION_CAUSE_NOT_SUPPORTED = int.MAX |
Protected Member Functions | |
void | Init (SCR_EAISettingOrigin origin) |
Must be called from the factory method, if setting is created dynamically. | |
Protected Attributes | |
SCR_AISettingBase | m_ParentSetting |
SCR_EAISettingOrigin | m_eOrigin |
SCR_EAISettingFlags | m_eFlags |
int | m_iPriority |
Static Protected Attributes | |
static ref SCR_AISettingOriginPriorityTable | s_OriginPriorityTable = new SCR_AISettingOriginPriorityTable() |
Base class for all AI settings.
When making own settings classes, following parts must be done:
void SCR_AISettingBase.ApplyEffects | ( | SCR_AISettingsBaseComponent | settingsComp | ) |
This is meant for settings which apply some permanent effect to AI (like setting skill), instead of some other system to look up current settings through GetCurrentSetting call.
The method is called when addition or removal of this or another setting causes this setting to be the one with highest priority among those of same categorization type. Keep in mind that now it might get called several times, and also we can't know if our setting unbecame highest priority. So here we should just propagate our values 'downwards' and do nothing else.
Implemented in SCR_AIGroupCombatModeSettingBase.
SCR_AISettingBase SCR_AISettingBase.CreateCopy | ( | ) |
This method must make a deep copy of data describing this setting.
Data aquired after application of the setting to Agent should be omitted. !!! This must be implemented in derived class if data of the setting is non-trivial.
TypeName SCR_AISettingBase.GetCategorizationType | ( | ) |
Returns type which is used for identification of setting type.
There might be settings which inherit some base setting class and should be categorized according to that parent class. For instance, some specific classes of movement restriction can be categorized according to their base class of movement restriction.
Implemented in SCR_AICharacterLightInteractionSettingBase, SCR_AICharacterMovementSpeedSettingBase, SCR_AICharacterStanceSettingBase, SCR_AIGroupCharactersMovementSpeedSettingBase, SCR_AIGroupCombatModeSettingBase, and SCR_AIGroupFormationSettingBase.
string SCR_AISettingBase.GetDebugText | ( | ) |
Implemented in SCR_AICharacterLightInteractionSetting, SCR_AICharacterMovementSpeedSetting, SCR_AICharacterMovementSpeedSetting_Range, SCR_AICharacterStanceSetting, SCR_AICharacterStanceSetting_Range, SCR_AIGroupCharactersMovementSpeedSetting, SCR_AIGroupCombatModeSetting, and SCR_AIGroupFormationSetting.
SCR_EAISettingFlags SCR_AISettingBase.GetFlags | ( | ) |
int SCR_AISettingBase.GetMaxActionCause | ( | ) |
Returns action cause value to which this setting applies.
Must be implemented in derived class. The returned value means: this setting applies to this action cause and all below it. For instance, setting applies to combat cause and all below it. If ACTION_CAUSE_NOT_SUPPORTED is returned, the setting is always active as long as it has highest priority, since some settings can't be active or inactive based on current action. For instance settings related to AI skills.
Implemented in SCR_AICharacterSetting, SCR_AICharacterSettingWithCause, SCR_AIGroupSetting, and SCR_AIGroupSettingWithCause.
SCR_EAISettingOrigin SCR_AISettingBase.GetOrigin | ( | ) |
SCR_AISettingBase SCR_AISettingBase.GetParentSetting | ( | ) |
int SCR_AISettingBase.GetPriority | ( | ) |
bool SCR_AISettingBase.HasFlag | ( | SCR_EAISettingFlags | f | ) |
|
protected |
Must be called from the factory method, if setting is created dynamically.
void SCR_AISettingBase.Internal_ConstructedAtProperty | ( | SCR_EAISettingOrigin | origin, |
SCR_EAISettingFlags | flagsToSet ) |
Must be called if the setting is part of some property.
Call this if you declare property with AI settings somewhere.
void SCR_AISettingBase.Internal_InitCopyFrom | ( | SCR_AISettingBase | from | ) |
Called right after this setting object was created as copy from elsewhere.
void SCR_AISettingBase.Internal_SetFlag | ( | SCR_EAISettingFlags | flagsToSet | ) |
void SCR_AISettingBase.OnAdded | ( | SCR_AISettingsBaseComponent | settingsComp | ) |
Called after the setting was added to SCR_AISettingsBaseComponent.
Can be overridden in child classes. OnAdded call does not mean that this setting now has highest priority, as there can be other settings of same type but with different priority. For that see function ApplyEffects.
void SCR_AISettingBase.OnRemoved | ( | SCR_AISettingsBaseComponent | settingsComp | ) |
Called after the setting was removed from SCR_AISettingsBaseComponent.
Can be overridden in child classes.
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |