Arma Reforger Script API
|
Created in SCR_GameModeCampaign. More...
Public Member Functions | |
int | GetActiveBasesCount () |
Bases which have been initialized. | |
int | GetTargetActiveBasesCount () |
Total bases expected to be initialized. | |
void | AddActiveBase () |
void | AddTargetActiveBase () |
void | SetTargetActiveBasesCount (int count) |
OnLocalPlayerEnteredBaseInvoker | GetOnLocalPlayerEnteredBase () |
OnLocalPlayerLeftBaseInvoker | GetOnLocalPlayerLeftBase () |
OnAllBasesInitializedInvoker | GetOnAllBasesInitialized () |
Triggered when all bases have been successfully initialized. | |
OnSignalChangedInvoker | GetOnSignalChanged () |
Triggered when a base's radio coverage changes. | |
void | OnAllBasesInitialized () |
bool | IsBasesInitDone () |
void | SetLocalPlayerFaction (notnull SCR_CampaignFaction faction) |
SCR_CampaignFaction | GetLocalPlayerFaction () |
int | UpdateBases () |
Update the list of Conflict bases. | |
void | SelectHQs (notnull array< SCR_CampaignMilitaryBaseComponent > candidates, notnull array< SCR_CampaignMilitaryBaseComponent > controlPoints, out notnull array< SCR_CampaignMilitaryBaseComponent > selectedHQs) |
Picks Main Operating Bases from a list of candidates by checking average distance to active control points. | |
void | SetHQFactions (notnull array< SCR_CampaignMilitaryBaseComponent > selectedHQs) |
void | InitializeBases (notnull array< SCR_CampaignMilitaryBaseComponent > selectedHQs, bool randomizeSupplies) |
void | AddRandomSupplies (notnull array< SCR_CampaignMilitaryBaseComponent > basesSorted, notnull array< SCR_CampaignMilitaryBaseComponent > selectedHQs) |
Add randomized supplies to each base, calculate batches so each side encounters similarly stacked bases. | |
void | UpdateTaskBases (Faction assignedFaction) |
On clients, the tasks are not properly synced upon deserialization due to delay in callsign assignment This method will update the task list with the proper bases. | |
void | InitializeSupplyDepotIcons () |
Show icons only for supply depots close enough to an active base. | |
void | RegisterRemnantSupplyDepot (notnull SCR_CampaignSuppliesComponent comp) |
void | HideUnusedBaseIcons () |
void | RecalculateRadioCoverage (notnull SCR_CampaignFaction faction) |
Determine the radio coverage of all bases (no coverage / can be reached / can respond / both ways) | |
void | SelectPrimaryTarget (notnull SCR_CampaignFaction faction) |
Find a base which is most profitable for a faction to capture next. | |
void | EvaluateControlPoints () |
void | OnEnemyDetectedByDefenders (SCR_AIGroup group, SCR_AITargetInfo target, AIAgent reporter) |
SCR_CampaignMilitaryBaseComponent | FindClosestBase (vector position) |
SCR_CampaignMilitaryBaseComponent | FindBaseByCallsign (int callsign) |
SCR_CampaignMilitaryBaseComponent | FindBaseByPosition (vector position) |
bool | IsEntityInFactionRadioSignal (notnull IEntity entity, notnull Faction faction) |
void | StoreBasesStates (out notnull array< ref SCR_CampaignBaseStruct > outEntries) |
void | LoadBasesStates (notnull array< ref SCR_CampaignBaseStruct > entries) |
void | ProcessRemnantsPresence () |
Clean up ambient patrols around Main Operating Bases, assign parent bases where applicable. | |
void | OnPlayerDisconnected (int playerId) |
void | OnLocalPlayerPresenceChanged (notnull SCR_CampaignMilitaryBaseComponent base, bool present) |
void | OnServiceBuilt (SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent) |
void | OnServiceRemoved (notnull SCR_MilitaryBaseComponent base, notnull SCR_MilitaryBaseLogicComponent service) |
void | OnDefenderGroupSpawned (notnull SCR_MilitaryBaseLogicComponent service, notnull SCR_AIGroup group) |
Called when a new AI group is spawned by Free Roam Building. | |
void | OnConflictStarted () |
void | SCR_CampaignMilitaryBaseManager (notnull SCR_GameModeCampaign campaign) |
void | ~SCR_CampaignMilitaryBaseManager () |
Protected Member Functions | |
void | DisableExtraSeizingComponents (SCR_MilitaryBaseComponent base, SCR_MilitaryBaseLogicComponent logic) |
void | SelectHQsSimple (notnull array< SCR_CampaignMilitaryBaseComponent > candidates, out notnull array< SCR_CampaignMilitaryBaseComponent > selectedHQs) |
If there are only two candidates for main HQ or the main process fails, HQs are selected simply and cheaply. | |
int | GetAvgCPDistanceSq (notnull SCR_CampaignMilitaryBaseComponent HQ, notnull array< SCR_CampaignMilitaryBaseComponent > controlPoints) |
Returns squared average distance to control points - used for starting HQ location calculations. | |
void | OnBaseFactionChanged (SCR_MilitaryBaseComponent base, Faction newFaction) |
Protected Attributes | |
SCR_GameModeCampaign | m_Campaign |
SCR_CampaignFaction | m_LocalPlayerFaction |
ref array< SCR_CampaignMilitaryBaseComponent > | m_aBases = {} |
ref array< SCR_CampaignMilitaryBaseComponent > | m_aControlPoints = {} |
ref array< SCR_CampaignSuppliesComponent > | m_aRemnantSupplyDepots = {} |
ref OnSignalChangedInvoker | m_OnSignalChanged |
ref OnAllBasesInitializedInvoker | m_OnAllBasesInitialized |
ref OnLocalPlayerEnteredBaseInvoker | m_OnLocalPlayerEnteredBase |
ref OnLocalPlayerLeftBaseInvoker | m_OnLocalPlayerLeftBase |
int | m_iActiveBases |
int | m_iTargetActiveBases |
bool | m_bAllBasesInitialized |
Static Protected Attributes | |
static const int | PARENT_BASE_DISTANCE_THRESHOLD = 300 |
static const int | HQ_NO_REMNANTS_RADIUS = 300 |
static const int | HQ_NO_REMNANTS_PATROL_RADIUS = 600 |
static const int | MAX_HQ_SELECTION_ITERATIONS = 20 |
static const int | DEPOT_PLAYER_PRESENCE_CHECK_INTERVAL = 2000 |
static const float | CP_AVG_DISTANCE_TOLERANCE = 0.25 |
static const string | ICON_NAME_SUPPLIES = "Slot_Supplies" |
static const float | MAX_DIST_TO_BASE = 300 |
static const float | PARKED_LIFETIME = 3600 |
Created in SCR_GameModeCampaign.
void SCR_CampaignMilitaryBaseManager.SCR_CampaignMilitaryBaseManager | ( | notnull SCR_GameModeCampaign | campaign | ) |
void SCR_CampaignMilitaryBaseManager.~SCR_CampaignMilitaryBaseManager | ( | ) |
void SCR_CampaignMilitaryBaseManager.AddActiveBase | ( | ) |
void SCR_CampaignMilitaryBaseManager.AddRandomSupplies | ( | notnull array< SCR_CampaignMilitaryBaseComponent > | basesSorted, |
notnull array< SCR_CampaignMilitaryBaseComponent > | selectedHQs | ||
) |
Add randomized supplies to each base, calculate batches so each side encounters similarly stacked bases.
void SCR_CampaignMilitaryBaseManager.AddTargetActiveBase | ( | ) |
|
protected |
void SCR_CampaignMilitaryBaseManager.EvaluateControlPoints | ( | ) |
SCR_CampaignMilitaryBaseComponent SCR_CampaignMilitaryBaseManager.FindBaseByCallsign | ( | int | callsign | ) |
SCR_CampaignMilitaryBaseComponent SCR_CampaignMilitaryBaseManager.FindBaseByPosition | ( | vector | position | ) |
SCR_CampaignMilitaryBaseComponent SCR_CampaignMilitaryBaseManager.FindClosestBase | ( | vector | position | ) |
int SCR_CampaignMilitaryBaseManager.GetActiveBasesCount | ( | ) |
Bases which have been initialized.
|
protected |
Returns squared average distance to control points - used for starting HQ location calculations.
SCR_CampaignFaction SCR_CampaignMilitaryBaseManager.GetLocalPlayerFaction | ( | ) |
OnAllBasesInitializedInvoker SCR_CampaignMilitaryBaseManager.GetOnAllBasesInitialized | ( | ) |
Triggered when all bases have been successfully initialized.
OnLocalPlayerEnteredBaseInvoker SCR_CampaignMilitaryBaseManager.GetOnLocalPlayerEnteredBase | ( | ) |
OnLocalPlayerLeftBaseInvoker SCR_CampaignMilitaryBaseManager.GetOnLocalPlayerLeftBase | ( | ) |
OnSignalChangedInvoker SCR_CampaignMilitaryBaseManager.GetOnSignalChanged | ( | ) |
Triggered when a base's radio coverage changes.
int SCR_CampaignMilitaryBaseManager.GetTargetActiveBasesCount | ( | ) |
Total bases expected to be initialized.
void SCR_CampaignMilitaryBaseManager.HideUnusedBaseIcons | ( | ) |
void SCR_CampaignMilitaryBaseManager.InitializeBases | ( | notnull array< SCR_CampaignMilitaryBaseComponent > | selectedHQs, |
bool | randomizeSupplies | ||
) |
void SCR_CampaignMilitaryBaseManager.InitializeSupplyDepotIcons | ( | ) |
Show icons only for supply depots close enough to an active base.
bool SCR_CampaignMilitaryBaseManager.IsBasesInitDone | ( | ) |
bool SCR_CampaignMilitaryBaseManager.IsEntityInFactionRadioSignal | ( | notnull IEntity | entity, |
notnull Faction | faction | ||
) |
void SCR_CampaignMilitaryBaseManager.LoadBasesStates | ( | notnull array< ref SCR_CampaignBaseStruct > | entries | ) |
void SCR_CampaignMilitaryBaseManager.OnAllBasesInitialized | ( | ) |
|
protected |
void SCR_CampaignMilitaryBaseManager.OnConflictStarted | ( | ) |
void SCR_CampaignMilitaryBaseManager.OnDefenderGroupSpawned | ( | notnull SCR_MilitaryBaseLogicComponent | service, |
notnull SCR_AIGroup | group | ||
) |
Called when a new AI group is spawned by Free Roam Building.
void SCR_CampaignMilitaryBaseManager.OnEnemyDetectedByDefenders | ( | SCR_AIGroup | group, |
SCR_AITargetInfo | target, | ||
AIAgent | reporter | ||
) |
void SCR_CampaignMilitaryBaseManager.OnLocalPlayerPresenceChanged | ( | notnull SCR_CampaignMilitaryBaseComponent | base, |
bool | present | ||
) |
void SCR_CampaignMilitaryBaseManager.OnPlayerDisconnected | ( | int | playerId | ) |
void SCR_CampaignMilitaryBaseManager.OnServiceBuilt | ( | SCR_EServicePointStatus | state, |
notnull SCR_ServicePointComponent | serviceComponent | ||
) |
void SCR_CampaignMilitaryBaseManager.OnServiceRemoved | ( | notnull SCR_MilitaryBaseComponent | base, |
notnull SCR_MilitaryBaseLogicComponent | service | ||
) |
void SCR_CampaignMilitaryBaseManager.ProcessRemnantsPresence | ( | ) |
Clean up ambient patrols around Main Operating Bases, assign parent bases where applicable.
void SCR_CampaignMilitaryBaseManager.RecalculateRadioCoverage | ( | notnull SCR_CampaignFaction | faction | ) |
Determine the radio coverage of all bases (no coverage / can be reached / can respond / both ways)
void SCR_CampaignMilitaryBaseManager.RegisterRemnantSupplyDepot | ( | notnull SCR_CampaignSuppliesComponent | comp | ) |
void SCR_CampaignMilitaryBaseManager.SelectHQs | ( | notnull array< SCR_CampaignMilitaryBaseComponent > | candidates, |
notnull array< SCR_CampaignMilitaryBaseComponent > | controlPoints, | ||
out notnull array< SCR_CampaignMilitaryBaseComponent > | selectedHQs | ||
) |
Picks Main Operating Bases from a list of candidates by checking average distance to active control points.
|
protected |
If there are only two candidates for main HQ or the main process fails, HQs are selected simply and cheaply.
void SCR_CampaignMilitaryBaseManager.SelectPrimaryTarget | ( | notnull SCR_CampaignFaction | faction | ) |
Find a base which is most profitable for a faction to capture next.
void SCR_CampaignMilitaryBaseManager.SetHQFactions | ( | notnull array< SCR_CampaignMilitaryBaseComponent > | selectedHQs | ) |
void SCR_CampaignMilitaryBaseManager.SetLocalPlayerFaction | ( | notnull SCR_CampaignFaction | faction | ) |
void SCR_CampaignMilitaryBaseManager.SetTargetActiveBasesCount | ( | int | count | ) |
void SCR_CampaignMilitaryBaseManager.StoreBasesStates | ( | out notnull array< ref SCR_CampaignBaseStruct > | outEntries | ) |
int SCR_CampaignMilitaryBaseManager.UpdateBases | ( | ) |
Update the list of Conflict bases.
void SCR_CampaignMilitaryBaseManager.UpdateTaskBases | ( | Faction | assignedFaction | ) |
On clients, the tasks are not properly synced upon deserialization due to delay in callsign assignment This method will update the task list with the proper bases.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |