Arma Reforger Script API
|
Public Member Functions | |
string | GetProviderDisplayName () |
Return name of the provider. | |
bool | UseMasterProvider () |
Should this provider use a master provider? | |
bool | IsMasterProvider () |
Master provider can be for an example HQ where there are other services that can serve as providers (living area for an example) but master provider counts budget limits or define a building area. | |
bool | CanCommandAI () |
bool | ObstrucViewWhenEnemyInRange () |
IEntity | GetMasterProviderEntity () |
Returns master provider entity of this provider if any. If not, return itself. | |
bool | UseMasterProviderBudget (EEditableEntityBudget budget, out SCR_CampaignBuildingProviderComponent masterProviderComponent) |
Check if for this budget should be used budget of master provider. | |
void | SetClientLock (bool lock, IEntity provider, int playerId) |
void | SetCooldownClientLock (bool val) |
void | SetPlayerCooldown (int playerId, int cooldownTime) |
Set the cooldown time. First calculate if there is a potential adjustment of the time, based on the budget setting of provider. Make loop running on server. | |
void | RemovePlayerCooldowns (int playerId) |
Remove all cooldown times for player. | |
void | UpdateCooldownTimer () |
Periodically called method to evaluate a current status of the cooldown. | |
bool | HasCooldownSet (int playerId) |
Is placing allowed for this player? | |
float | GetCooldownValue (int playerId) |
Return current value of the cooldown time for a given player. | |
ScriptInvokerVoid | GetOnCooldownLockUpdated () |
override void | RegisterBase (notnull SCR_MilitaryBaseComponent base) |
bool | CanRegisterAtMilitaryBase () |
SCR_MilitaryBaseComponent | GetMilitaryBaseComponent () |
SCR_ECharacterRank | GetAccessRank () |
float | GetBuildingRadius () |
int | GetMaxBudgetValue (EEditableEntityBudget budget) |
Return max value of the given budget if this budget is added to be evaluated with this provider and has max value set. | |
int | GetCurrentPropValue () |
void | SetPropValue (int value) |
void | AddPropValue (int value) |
int | GetCurrentAIValue () |
void | SetAIValue (int value) |
void | AddAIValue (int value) |
void | SetOnEntityKilled (IEntity ent) |
Set an event called when entity spawned by this provider get killed. | |
array< EEditableEntityLabel > | GetAvailableTraits () |
override void | OnPostInit (IEntity owner) |
override void | EOnInit (IEntity owner) |
void | AddNewActiveUser (int userID) |
Add an ID of a user on the list of those who are currently in use of provider. | |
void | RemoveActiveUser (int userID) |
Remove an ID of a user from the list of those who are currently in use of provider. | |
int | GetActiveUsers (out notnull array< int > users) |
Return the array of users id and it's count. | |
bool | ContainActiveUsers (int playerId) |
void | AddNewAvailableUser (int userID) |
void | RemoveAvailableUser (int userID) |
int | GetAvailableUsers (out array< int > users) |
bool | ContainAvailableUsers (int playerId) |
void | RequestBuildingMode (int playerID, bool userActionUsed) |
Requesting a building mode. | |
void | RequestEnterBuildingMode (int playerID, bool userActionUsed) |
void | SetOnPlayerTeleported (int playerID) |
void | SetOnPlayerConsciousnessChanged () |
Set even when player consciousness changed. | |
void | OnLifeStateChanged (ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState) |
void | PlayerTeleported (SCR_EditableCharacterComponent character, bool isLongFade, SCR_EPlayerTeleportedReason teleportReason) |
void | RemoveOnLifeStateChanged () |
void | SetOnProviderFactionChangedEvent () |
Insert a method called when the provider faction is changed, e.g a base is taken by an enemy. | |
void | SetOnPlayerDeathActiveUserEvent (int userID) |
void | SetOnPlayerDeathAvailableUserEvent (int userID) |
void | OnActiveUserDeath (SCR_CharacterControllerComponent characterControllerComponent, IEntity instigatorEntity, notnull Instigator instigator) |
void | OnAvailableUserDeath (SCR_CharacterControllerComponent characterControllerComponent, IEntity instigatorEntity, notnull Instigator instigator) |
void | BuildingModeCreated () |
void | EntitySpawnedByProvider (int prefabID, SCR_EditableEntityComponent editableEntity) |
Event rised when the entity is spawned by this provider. | |
void | OnModeClosed () |
void | RemoveOnModeClosed () |
void | RemoveOnPlayerTeleported () |
bool | GetUserActionInitOnly () |
bool | IsCharacterFactionSame (notnull IEntity character) |
Does character faction match the provider faction. | |
SCR_ResourceComponent | GetResourceComponent () |
Caches and returns the resource component. | |
SCR_CampaignSuppliesComponent | GetSuppliesComponent () |
SCR_CampaignBuildingBudgetToEvaluateData | GetBudgetData (EEditableEntityBudget budget) |
Get data of given budget. | |
int | GetBudgetTypesToEvaluate (notnull out array< ref EEditableEntityBudget > budgets) |
Returns all budget types to evaluate with this provider. | |
bool | IsBudgetToEvaluate (EEditableEntityBudget blockingBudget) |
EEditableEntityBudget | GetShownBudget () |
Evaluate all set budgets with this provider and return first one that is marked as to be shown in UI. | |
int | CalculateCooldownTime (int playerId, int cooldownTime) |
Checks the budget setting and calculate final cooldown time based on it. | |
void | RemoveActiveUsers () |
Method called when the provider was destroyed or deleted to remove a provider. | |
void | RemoveCheckProviderMove () |
void | SetCheckProviderMove () |
bool | IsEnemyFaction (notnull ChimeraCharacter char) |
Check if given character faction is a hostile to player, or not. | |
override bool | RplLoad (ScriptBitReader reader) |
void | ~SCR_CampaignBuildingProviderComponent () |
Public Member Functions inherited from SCR_MilitaryBaseLogicComponent | |
void | RegisterBase (notnull SCR_MilitaryBaseComponent base) |
void | OnBaseRegistered (notnull SCR_MilitaryBaseComponent base) |
void | UnregisterBase (notnull SCR_MilitaryBaseComponent base) |
void | OnBaseUnregistered (notnull SCR_MilitaryBaseComponent base) |
int | GetBases (out array< SCR_MilitaryBaseComponent > bases) |
void | OnBaseFactionChanged (Faction faction) |
override void | EOnInit (IEntity owner) |
override void | OnPostInit (IEntity owner) |
void | ~SCR_MilitaryBaseLogicComponent () |
Static Public Member Functions | |
static ScriptInvokerVoid | GetOnProviderCreated () |
Public Attributes | |
SCR_CampaignBuildingProviderComponent | m_MasterProviderComponent |
Protected Member Functions | |
void | OnAIRemoved (IEntity ent) |
An event called when AI spawned by this provider is killed or deleted. | |
void | RemoveEvents (IEntity ent) |
remove all methods invoked to entity and related to it's dead or delete. | |
SCR_CampaignBuildingNetworkComponent | GetNetworkManager () |
SCR_EditorManagerEntity | GetEditorManager () |
SCR_EditorManagerEntity | GetEditorManagerByID (int playerId) |
SCR_CharacterControllerComponent | GetCharacterControllerComponent (int playerID) |
int | GetPlayerIdFromCharacterController (SCR_CharacterControllerComponent characterControllerComponent) |
Faction | GetEntityFaction (notnull IEntity ent) |
void | OnBaseOwnerChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction) |
Method triggered when owning faction of provider has changed. | |
Protected Attributes | |
string | m_sProviderDisplayName |
bool | m_bUserActionActivationOnly |
bool | m_bIsMasterProvider |
bool | m_bUseMasterProvider |
bool | m_bRegisterAtBase |
bool | m_bCanCommandAI |
bool | m_bObstructViewWhenEnemyInRange |
float | m_fBuildingRadius |
SCR_ECharacterRank | m_iRank |
ref array< ref SCR_CampaignBuildingBudgetToEvaluateData > | m_aBudgetsToEvaluate |
ref array< EEditableEntityLabel > | m_aAvailableTraits |
int | m_iCurrentPropValue |
Current props Value represents, how many entities with set prop budget can be spawned with this provider. The max number is limited by Prop budget. | |
int | m_iCurrentAIValue |
Current AI Value represents, how many AI is currently spawned with this provider. The max number is limited by AI budget. | |
Physics | m_ProviderPhysics |
SCR_ResourceComponent | m_ResourceComponent |
ref array< int > | m_aActiveUsersIDs = {} |
ref array< int > | m_aAvailableUsersIDs = {} |
ref array< SCR_CampaignBuildingBudgetToEvaluateData > | m_aShownBudget = {} |
ref ScriptInvokerVoid | m_OnCooldownLockUpdated |
ref array< ref Tuple2< int, WorldTimestamp > > | m_aPlacingCooldown = {} |
bool | m_bCooldownClientLock |
Protected Attributes inherited from SCR_MilitaryBaseLogicComponent | |
ref array< SCR_MilitaryBaseComponent > | m_aBases = {} |
Static Protected Attributes | |
static ref ScriptInvokerVoid | s_OnProviderCreated = new ScriptInvokerVoid() |
const int | MOVING_CHECK_PERIOD = 1000 |
const int | PROVIDER_SPEED_TO_REMOVE_BUILDING_SQ = 1 |
void SCR_CampaignBuildingProviderComponent.~SCR_CampaignBuildingProviderComponent | ( | ) |
void SCR_CampaignBuildingProviderComponent.AddAIValue | ( | int | value | ) |
void SCR_CampaignBuildingProviderComponent.AddNewActiveUser | ( | int | userID | ) |
Add an ID of a user on the list of those who are currently in use of provider.
[in] | userID |
void SCR_CampaignBuildingProviderComponent.AddNewAvailableUser | ( | int | userID | ) |
[in] | userID |
void SCR_CampaignBuildingProviderComponent.AddPropValue | ( | int | value | ) |
[in] | value |
void SCR_CampaignBuildingProviderComponent.BuildingModeCreated | ( | ) |
int SCR_CampaignBuildingProviderComponent.CalculateCooldownTime | ( | int | playerId, |
int | cooldownTime | ||
) |
Checks the budget setting and calculate final cooldown time based on it.
bool SCR_CampaignBuildingProviderComponent.CanCommandAI | ( | ) |
bool SCR_CampaignBuildingProviderComponent.CanRegisterAtMilitaryBase | ( | ) |
bool SCR_CampaignBuildingProviderComponent.ContainActiveUsers | ( | int | playerId | ) |
[in] | playerId |
bool SCR_CampaignBuildingProviderComponent.ContainAvailableUsers | ( | int | playerId | ) |
[in] | playerId |
void SCR_CampaignBuildingProviderComponent.EntitySpawnedByProvider | ( | int | prefabID, |
SCR_EditableEntityComponent | editableEntity | ||
) |
Event rised when the entity is spawned by this provider.
override void SCR_CampaignBuildingProviderComponent.EOnInit | ( | IEntity | owner | ) |
Implements SCR_MilitaryBaseLogicComponent.
SCR_ECharacterRank SCR_CampaignBuildingProviderComponent.GetAccessRank | ( | ) |
int SCR_CampaignBuildingProviderComponent.GetActiveUsers | ( | out notnull array< int > | users | ) |
Return the array of users id and it's count.
[out] | users |
array< EEditableEntityLabel > SCR_CampaignBuildingProviderComponent.GetAvailableTraits | ( | ) |
int SCR_CampaignBuildingProviderComponent.GetAvailableUsers | ( | out array< int > | users | ) |
[out] | users |
SCR_CampaignBuildingBudgetToEvaluateData SCR_CampaignBuildingProviderComponent.GetBudgetData | ( | EEditableEntityBudget | budget | ) |
Get data of given budget.
int SCR_CampaignBuildingProviderComponent.GetBudgetTypesToEvaluate | ( | notnull out array< ref EEditableEntityBudget > | budgets | ) |
Returns all budget types to evaluate with this provider.
float SCR_CampaignBuildingProviderComponent.GetBuildingRadius | ( | ) |
|
protected |
float SCR_CampaignBuildingProviderComponent.GetCooldownValue | ( | int | playerId | ) |
Return current value of the cooldown time for a given player.
int SCR_CampaignBuildingProviderComponent.GetCurrentAIValue | ( | ) |
int SCR_CampaignBuildingProviderComponent.GetCurrentPropValue | ( | ) |
|
protected |
|
protected |
|
protected |
IEntity SCR_CampaignBuildingProviderComponent.GetMasterProviderEntity | ( | ) |
Returns master provider entity of this provider if any. If not, return itself.
int SCR_CampaignBuildingProviderComponent.GetMaxBudgetValue | ( | EEditableEntityBudget | budget | ) |
Return max value of the given budget if this budget is added to be evaluated with this provider and has max value set.
SCR_MilitaryBaseComponent SCR_CampaignBuildingProviderComponent.GetMilitaryBaseComponent | ( | ) |
|
protected |
ScriptInvokerVoid SCR_CampaignBuildingProviderComponent.GetOnCooldownLockUpdated | ( | ) |
|
static |
|
protected |
string SCR_CampaignBuildingProviderComponent.GetProviderDisplayName | ( | ) |
Return name of the provider.
SCR_ResourceComponent SCR_CampaignBuildingProviderComponent.GetResourceComponent | ( | ) |
Caches and returns the resource component.
EEditableEntityBudget SCR_CampaignBuildingProviderComponent.GetShownBudget | ( | ) |
Evaluate all set budgets with this provider and return first one that is marked as to be shown in UI.
SCR_CampaignSuppliesComponent SCR_CampaignBuildingProviderComponent.GetSuppliesComponent | ( | ) |
bool SCR_CampaignBuildingProviderComponent.GetUserActionInitOnly | ( | ) |
bool SCR_CampaignBuildingProviderComponent.HasCooldownSet | ( | int | playerId | ) |
Is placing allowed for this player?
bool SCR_CampaignBuildingProviderComponent.IsBudgetToEvaluate | ( | EEditableEntityBudget | blockingBudget | ) |
[in] | blockingBudget |
bool SCR_CampaignBuildingProviderComponent.IsCharacterFactionSame | ( | notnull IEntity | character | ) |
Does character faction match the provider faction.
[in] | character |
bool SCR_CampaignBuildingProviderComponent.IsEnemyFaction | ( | notnull ChimeraCharacter char | ) |
Check if given character faction is a hostile to player, or not.
[in] | char | Character to be evaluated if is enemy or not. |
bool SCR_CampaignBuildingProviderComponent.IsMasterProvider | ( | ) |
Master provider can be for an example HQ where there are other services that can serve as providers (living area for an example) but master provider counts budget limits or define a building area.
bool SCR_CampaignBuildingProviderComponent.ObstrucViewWhenEnemyInRange | ( | ) |
void SCR_CampaignBuildingProviderComponent.OnActiveUserDeath | ( | SCR_CharacterControllerComponent | characterControllerComponent, |
IEntity | instigatorEntity, | ||
notnull Instigator | instigator | ||
) |
[in] | characterControllerComponent | |
[in] | instigatorEntity | |
[in] | instigator |
|
protected |
An event called when AI spawned by this provider is killed or deleted.
void SCR_CampaignBuildingProviderComponent.OnAvailableUserDeath | ( | SCR_CharacterControllerComponent | characterControllerComponent, |
IEntity | instigatorEntity, | ||
notnull Instigator | instigator | ||
) |
[in] | characterControllerComponent | |
[in] | instigatorEntity | |
[in] | instigator |
|
protected |
Method triggered when owning faction of provider has changed.
[in] | owner | |
[in] | previousFaction | |
[in] | newFaction |
void SCR_CampaignBuildingProviderComponent.OnLifeStateChanged | ( | ECharacterLifeState | previousLifeState, |
ECharacterLifeState | newLifeState | ||
) |
[in] | conscious |
void SCR_CampaignBuildingProviderComponent.OnModeClosed | ( | ) |
override void SCR_CampaignBuildingProviderComponent.OnPostInit | ( | IEntity | owner | ) |
Implements SCR_MilitaryBaseLogicComponent.
void SCR_CampaignBuildingProviderComponent.PlayerTeleported | ( | SCR_EditableCharacterComponent | character, |
bool | isLongFade, | ||
SCR_EPlayerTeleportedReason | teleportReason | ||
) |
[in] | character | |
[in] | isLongFade | |
[in] | teleportReason |
override void SCR_CampaignBuildingProviderComponent.RegisterBase | ( | notnull SCR_MilitaryBaseComponent | base | ) |
[in] | base |
Implements SCR_MilitaryBaseLogicComponent.
void SCR_CampaignBuildingProviderComponent.RemoveActiveUser | ( | int | userID | ) |
Remove an ID of a user from the list of those who are currently in use of provider.
[in] | userID |
void SCR_CampaignBuildingProviderComponent.RemoveActiveUsers | ( | ) |
Method called when the provider was destroyed or deleted to remove a provider.
void SCR_CampaignBuildingProviderComponent.RemoveAvailableUser | ( | int | userID | ) |
[in] | userID |
void SCR_CampaignBuildingProviderComponent.RemoveCheckProviderMove | ( | ) |
|
protected |
remove all methods invoked to entity and related to it's dead or delete.
void SCR_CampaignBuildingProviderComponent.RemoveOnLifeStateChanged | ( | ) |
void SCR_CampaignBuildingProviderComponent.RemoveOnModeClosed | ( | ) |
void SCR_CampaignBuildingProviderComponent.RemoveOnPlayerTeleported | ( | ) |
void SCR_CampaignBuildingProviderComponent.RemovePlayerCooldowns | ( | int | playerId | ) |
Remove all cooldown times for player.
void SCR_CampaignBuildingProviderComponent.RequestBuildingMode | ( | int | playerID, |
bool | userActionUsed | ||
) |
Requesting a building mode.
If trigger exist (was spawned with provider, because "Y" can be used to enter the mode, it will open the mode directly. If not, it 1st spawn the building area trigger.
[in] | playerID | |
[in] | userActionUsed |
void SCR_CampaignBuildingProviderComponent.RequestEnterBuildingMode | ( | int | playerID, |
bool | userActionUsed | ||
) |
[in] | playerID | |
[in] | userActionUsed |
override bool SCR_CampaignBuildingProviderComponent.RplLoad | ( | ScriptBitReader | reader | ) |
void SCR_CampaignBuildingProviderComponent.SetAIValue | ( | int | value | ) |
void SCR_CampaignBuildingProviderComponent.SetCheckProviderMove | ( | ) |
void SCR_CampaignBuildingProviderComponent.SetClientLock | ( | bool | lock, |
IEntity | provider, | ||
int | playerId | ||
) |
void SCR_CampaignBuildingProviderComponent.SetCooldownClientLock | ( | bool | val | ) |
void SCR_CampaignBuildingProviderComponent.SetOnEntityKilled | ( | IEntity | ent | ) |
Set an event called when entity spawned by this provider get killed.
void SCR_CampaignBuildingProviderComponent.SetOnPlayerConsciousnessChanged | ( | ) |
Set even when player consciousness changed.
void SCR_CampaignBuildingProviderComponent.SetOnPlayerDeathActiveUserEvent | ( | int | userID | ) |
[in] | userID |
void SCR_CampaignBuildingProviderComponent.SetOnPlayerDeathAvailableUserEvent | ( | int | userID | ) |
[in] | userID |
void SCR_CampaignBuildingProviderComponent.SetOnPlayerTeleported | ( | int | playerID | ) |
[in] | playerID |
void SCR_CampaignBuildingProviderComponent.SetOnProviderFactionChangedEvent | ( | ) |
Insert a method called when the provider faction is changed, e.g a base is taken by an enemy.
void SCR_CampaignBuildingProviderComponent.SetPlayerCooldown | ( | int | playerId, |
int | cooldownTime | ||
) |
Set the cooldown time. First calculate if there is a potential adjustment of the time, based on the budget setting of provider. Make loop running on server.
void SCR_CampaignBuildingProviderComponent.SetPropValue | ( | int | value | ) |
[in] | value |
void SCR_CampaignBuildingProviderComponent.UpdateCooldownTimer | ( | ) |
Periodically called method to evaluate a current status of the cooldown.
bool SCR_CampaignBuildingProviderComponent.UseMasterProvider | ( | ) |
Should this provider use a master provider?
bool SCR_CampaignBuildingProviderComponent.UseMasterProviderBudget | ( | EEditableEntityBudget | budget, |
out SCR_CampaignBuildingProviderComponent | masterProviderComponent | ||
) |
Check if for this budget should be used budget of master provider.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Current AI Value represents, how many AI is currently spawned with this provider. The max number is limited by AI budget.
|
protected |
Current props Value represents, how many entities with set prop budget can be spawned with this provider. The max number is limited by Prop budget.
|
protected |
SCR_CampaignBuildingProviderComponent SCR_CampaignBuildingProviderComponent.m_MasterProviderComponent |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |