|
Arma Reforger Script API
|
Created in SCR_GameModeCampaign. More...
Public Member Functions | |
| bool | CanFactionBuildNewBase (notnull Faction faction) |
| OnBaseBuiltInvoker | GetOnBaseBuilt () |
| int | GetBases (notnull out array< SCR_CampaignMilitaryBaseComponent > bases, Faction faction=null) |
| int | GetActiveBasesCount () |
| Bases which have been initialized. | |
| int | GetTargetActiveBasesCount () |
| Total bases expected to be initialized. | |
| void | AddActiveBase () |
| 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 (bool refreshTargetCount=false) |
| 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 | 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 | 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) |
| SCR_CampaignSuppliesComponent | FindClosestSupplyDepot (vector position) |
| bool | IsEntityInFactionRadioSignal (notnull IEntity entity, notnull Faction faction) |
| bool | IsPositionInFactionRadioSignal (vector position, notnull Faction faction, float signalRangeOffset=0) |
| 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 () |
| SCR_CampaignMilitaryBaseComponent | SelectAndReturnPrimaryTarget (notnull SCR_CampaignFaction faction) |
| void | OnBaseInitialized (notnull SCR_CampaignMilitaryBaseComponent base) |
| void | RecalculateRadioCoverageForced (notnull SCR_CampaignFaction faction) |
| Determine the radio coverage of all bases (no coverage / can be reached / can respond / both ways) | |
| void | SCR_CampaignMilitaryBaseManager (notnull SCR_GameModeCampaign campaign) |
| void | ~SCR_CampaignMilitaryBaseManager () |
Protected Member Functions | |
| void | CalculateMaxAvailableCallsignAmount () |
| Calculates the maximum amount of available callsigns for establishing of new bases. | |
| void | CountFactionEstablishedBasesAmount () |
| Goes through all bases and counts the amount of established bases for each faction. | |
| 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) |
| void | DisablePatrolSpawn (IEntity entity) |
| void | CreateCampaignMilitaryBase (notnull SCR_MilitaryBaseComponent base) |
| void | OnBaseRegistered (notnull SCR_MilitaryBaseComponent base) |
| void | OnBaseUnregistered (SCR_MilitaryBaseComponent base) |
| void | SetFactionBaseEstablished (Faction faction) |
| Increments faction established bases counter with newly established base. | |
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 |
| ref OnBaseBuiltInvoker | m_OnBaseBuilt |
| int | m_iActiveBases |
| int | m_iTargetActiveBases |
| int | m_iMaxAvailableCallsignsAmount |
| ref map< FactionKey, int > | m_mFactionEstablishedBasesAmount = new map<FactionKey, int>() |
| 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.
|
protected |
Calculates the maximum amount of available callsigns for establishing of new bases.
| bool SCR_CampaignMilitaryBaseManager.CanFactionBuildNewBase | ( | notnull Faction | faction | ) |
| [in] | faction |
|
protected |
Goes through all bases and counts the amount of established bases for each faction.
|
protected |
|
protected |
|
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 | ) |
| SCR_CampaignSuppliesComponent SCR_CampaignMilitaryBaseManager.FindClosestSupplyDepot | ( | 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.
| int SCR_CampaignMilitaryBaseManager.GetBases | ( | notnull out array< SCR_CampaignMilitaryBaseComponent > | bases, |
| Faction | faction = null ) |
| SCR_CampaignFaction SCR_CampaignMilitaryBaseManager.GetLocalPlayerFaction | ( | ) |
| OnAllBasesInitializedInvoker SCR_CampaignMilitaryBaseManager.GetOnAllBasesInitialized | ( | ) |
Triggered when all bases have been successfully initialized.
| OnBaseBuiltInvoker SCR_CampaignMilitaryBaseManager.GetOnBaseBuilt | ( | ) |
| 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 ) |
| bool SCR_CampaignMilitaryBaseManager.IsPositionInFactionRadioSignal | ( | vector | position, |
| notnull Faction | faction, | ||
| float | signalRangeOffset = 0 ) |
| [in] | position | |
| [in] | faction | |
| [in] | signalRangeOffset |
| void SCR_CampaignMilitaryBaseManager.OnAllBasesInitialized | ( | ) |
|
protected |
| void SCR_CampaignMilitaryBaseManager.OnBaseInitialized | ( | notnull SCR_CampaignMilitaryBaseComponent | base | ) |
|
protected |
|
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.RecalculateRadioCoverageForced | ( | 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 | ) |
| SCR_CampaignMilitaryBaseComponent SCR_CampaignMilitaryBaseManager.SelectAndReturnPrimaryTarget | ( | notnull SCR_CampaignFaction | faction | ) |
| 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.
|
protected |
Increments faction established bases counter with newly established base.
| [in] | faction | which built the base |
| void SCR_CampaignMilitaryBaseManager.SetHQFactions | ( | notnull array< SCR_CampaignMilitaryBaseComponent > | selectedHQs | ) |
| void SCR_CampaignMilitaryBaseManager.SetLocalPlayerFaction | ( | notnull SCR_CampaignFaction | faction | ) |
| void SCR_CampaignMilitaryBaseManager.SetTargetActiveBasesCount | ( | int | count | ) |
| int SCR_CampaignMilitaryBaseManager.UpdateBases | ( | bool | refreshTargetCount = false | ) |
Update the list of Conflict bases.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |