Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CampaignNetworkComponent Interface Reference

Takes care of Campaign-specific server <> client communication and requests. More...

Inheritance diagram for SCR_CampaignNetworkComponent:

Public Member Functions

WorldTimestamp GetLastRequestTimestamp ()
 
void SetLastRequestTimestamp (WorldTimestamp timestamp)
 
void RepairComposition (int index, int repairCost, int destructibleID, SCR_SiteSlotEntity slotEnt, notnull SCR_CampaignMilitaryBaseComponent base)
 Repair destroyed mandatory part of composition.
 
void LoadSupplies (RplId suppliesID, IEntity player, SCR_CampaignMilitaryBaseComponent base, int amount=0)
 Send server request to load supplies at a base.
 
void LoadSuppliesStandalone (RplId suppliesID, IEntity player, SCR_CampaignSuppliesComponent depot, int amount=0)
 
void StartLoading (RplId suppliesID, int supplies, bool IsUnloading=false)
 
void StopLoading (RplId suppliesID, bool IsUnloading=false)
 
void UnloadSupplies (RplId suppliesID, IEntity player, SCR_CampaignMilitaryBaseComponent base, int amount=0)
 Send server request to unload supplies at a base.
 
void AddRadio ()
 
void DeployMobileAsembly (notnull SCR_CampaignMobileAssemblyComponent comp, bool deploy)
 
void CaptureBase (SCR_CampaignMilitaryBaseComponent base)
 Send server request to capture a base (change its owner)
 
void CaptureBaseGM (SCR_CampaignMilitaryBaseComponent base, int factionIndex)
 
void ToggleBaseCapture (notnull SCR_CampaignMilitaryBaseComponent base, bool isBeingCaptured)
 
void AddSuppliesFromContextMenu (notnull SCR_CampaignMilitaryBaseComponent base, int suppliesCnt)
 
void SendPlayerMessage (SCR_ERadioMsg msgType, int baseCallsign=SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN, int calledID=SCR_CampaignMilitaryBaseComponent.INVALID_PLAYER_INDEX, bool public=true, int param=SCR_CampaignRadioMsg.INVALID_RADIO_MSG_PARAM, bool checkHQReached=false)
 
void SetLastHQRadioMessageTimestamp (WorldTimestamp time)
 
void SendVehicleSpawnHint (int hintID)
 
void RespawnLocationPopup (int baseID)
 
void OnPlayerAliveStateChanged (bool alive)
 
void RpcDo_PlayerEnableShowingSpawnPosition (bool enable)
 
void PlayRadioMsg (SCR_ERadioMsg msg, int FactionId, int baseCallsign, int callerCallsignCompany, int callerCallsignPlatoon, int callerCallsignSquad, int calledCallsignCompany, int calledCallsignPlatoon, int calledCallsignSquad, bool isPublic, int param, float seed, float quality, int playerID)
 
void RpcDo_PlayRadioMsg (SCR_ERadioMsg msg, int factionId, int baseCallsign, int callerCallsign, int calledCallsign, int param, float seed, float quality)
 
void CheckHQReached ()
 
void OnPlayerSuppliesInteraction (EResourcePlayerInteractionType interactionType, PlayerController playerController, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
 
void ResetSavedSupplies ()
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
void ~SCR_CampaignNetworkComponent ()
 

Static Public Member Functions

static SCR_CampaignNetworkComponent GetCampaignNetworkComponent (int playerID)
 
static ScriptInvokerInt3 GetOnSuppliesDelivered ()
 
static ScriptInvokerBase< OnBaseCapturedDelegate > GetOnBaseCaptured ()
 Get event called when the player captures a base.
 

Static Public Attributes

static const float FULL_SUPPLY_TRUCK_AMOUNT = 1500.0
 
static const int SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200
 

Protected Member Functions

bool IsProxy ()
 
void RpcAsk_AddRadio (int playerID)
 
void RpcDo_AddRadio (RplId ID)
 
void FindRadioDelayed (RplId ID)
 
void RpcAsk_DeployMobileAsembly (RplId assemblyComponentID, bool deploy, int playerID)
 
void RpcAsk_RepairComposition (int index, int repairCost, int destructibleID, RplId slotID, RplId baseID)
 Repair damaged entity in composition.
 
void RpcAsk_AddSuppliesFromContextMenu (RplId baseID, int suppliesCnt)
 
void SendToVehicleOccupants (ENotification messageID, IEntity vehicleEntity, int playerID, int number=0)
 
void RpcAsk_SuppliesLoadingStarted (RplId suppliesID, int playerID, int supplies, bool IsUnloading)
 
void RpcAsk_SuppliesLoadingCanceled (RplId suppliesID, int playerID, bool IsUnloading)
 
void RpcAsk_LoadSupplies (RplId suppliesID, int playerID, RplId baseID, int amount)
 Load supplies at a base.
 
void RpcAsk_LoadSuppliesStandalone (RplId suppliesID, int playerID, RplId depotID, int amount)
 
void RpcAsk_UnloadSupplies (RplId suppliesID, int playerID, RplId baseID, int amount)
 Unload supplies at a base.
 
void RpcAsk_CaptureBaseBegin (RplId baseID, int factionIndex, int playerID)
 
void RpcAsk_CaptureBaseEnd (RplId baseID)
 
int CompressCallsign (int company, int platoon, int squad)
 
void DecompressCallsign (int callsign, out int company, out int platoon, out int squad)
 
void RpcAsk_CaptureBase (RplId baseID, int factionIndex, int playerID)
 Capture a base (change its owner)
 
void RpcDo_PlayerFeedback (int msgID)
 Show notification about request result to the requester.
 
void RpcDo_PlayerFeedbackValueBase (int msgID, float value, int baseID)
 Show notification about request result to the requester.
 
void RpcDo_PlayerFeedbackBase (int msgID, int baseID)
 Show notification about request result to the requester.
 
void PlayerFeedbackImpl (int msgID, float value=0, int assetID=-1, int baseID=-1)
 Show notification about request result to the requester.
 
void RpcDo_VehicleSpawnHint (int hintID)
 
void HandleRadioRespawnTimer (RplId spawnPointId)
 
void RpcAsk_HandleRadioRespawnTimer (RplId selectedSpawnPointId)
 
void OnSuppliesLoaded (vector position, float amount, notnull SCR_ResourceComponent resourceComponentTo)
 
void OnSuppliesUnloaded (vector position, float amount, int playerId)
 

Protected Attributes

SCR_PlayerController m_PlayerController
 
RplComponent m_RplComponent
 
bool m_bFirstSpawn = true
 
vector m_vLastLoadedAt
 
vector m_vLastUnloadedAt
 
float m_fLoadedSupplyAmount
 
float m_fNoRewardSupplies
 
int m_iTotalSuppliesDelivered
 
WorldTimestamp m_fLastAssetRequestTimestamp
 
WorldTimestamp m_fLastHQRadioMessageTimestamp
 

Static Protected Attributes

static ref ScriptInvokerInt3 s_OnSuppliesDelivered
 
static ref ScriptInvokerBase< OnBaseCapturedDelegate > s_OnBaseCaptured
 

Detailed Description

Takes care of Campaign-specific server <> client communication and requests.

Constructor & Destructor Documentation

◆ ~SCR_CampaignNetworkComponent()

void SCR_CampaignNetworkComponent.~SCR_CampaignNetworkComponent ( )

Member Function Documentation

◆ AddRadio()

void SCR_CampaignNetworkComponent.AddRadio ( )

◆ AddSuppliesFromContextMenu()

void SCR_CampaignNetworkComponent.AddSuppliesFromContextMenu ( notnull SCR_CampaignMilitaryBaseComponent base,
int suppliesCnt )
Parameters
[in]base
[in]suppliesCnt

◆ CaptureBase()

void SCR_CampaignNetworkComponent.CaptureBase ( SCR_CampaignMilitaryBaseComponent base)

Send server request to capture a base (change its owner)

Parameters
[in]baseBase to be captured

◆ CaptureBaseGM()

void SCR_CampaignNetworkComponent.CaptureBaseGM ( SCR_CampaignMilitaryBaseComponent base,
int factionIndex )
Parameters
[in]base
[in]factionIndex

◆ CheckHQReached()

void SCR_CampaignNetworkComponent.CheckHQReached ( )

◆ CompressCallsign()

int SCR_CampaignNetworkComponent.CompressCallsign ( int company,
int platoon,
int squad )
protected

◆ DecompressCallsign()

void SCR_CampaignNetworkComponent.DecompressCallsign ( int callsign,
out int company,
out int platoon,
out int squad )
protected

◆ DeployMobileAsembly()

void SCR_CampaignNetworkComponent.DeployMobileAsembly ( notnull SCR_CampaignMobileAssemblyComponent comp,
bool deploy )
Parameters
[in]comp
[in]deploy

◆ EOnInit()

override void SCR_CampaignNetworkComponent.EOnInit ( IEntity owner)

◆ FindRadioDelayed()

void SCR_CampaignNetworkComponent.FindRadioDelayed ( RplId ID)
protected

◆ GetCampaignNetworkComponent()

static SCR_CampaignNetworkComponent SCR_CampaignNetworkComponent.GetCampaignNetworkComponent ( int playerID)
static
Parameters
[in]playerID
Returns

◆ GetLastRequestTimestamp()

WorldTimestamp SCR_CampaignNetworkComponent.GetLastRequestTimestamp ( )
Returns
request cooldown

◆ GetOnBaseCaptured()

static ScriptInvokerBase< OnBaseCapturedDelegate > SCR_CampaignNetworkComponent.GetOnBaseCaptured ( )
static

Get event called when the player captures a base.

Invoker params are: SCR_CampaignMilitaryBaseComponent base, int playerId

Returns
ScriptInvokerBase<OnBaseCapturedDelegate>

◆ GetOnSuppliesDelivered()

static ScriptInvokerInt3 SCR_CampaignNetworkComponent.GetOnSuppliesDelivered ( )
static
Returns

◆ HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent.HandleRadioRespawnTimer ( RplId spawnPointId)
protected

◆ IsProxy()

bool SCR_CampaignNetworkComponent.IsProxy ( )
protected
Returns
if the session is run as client

◆ LoadSupplies()

void SCR_CampaignNetworkComponent.LoadSupplies ( RplId suppliesID,
IEntity player,
SCR_CampaignMilitaryBaseComponent base,
int amount = 0 )

Send server request to load supplies at a base.

Parameters
[in]suppliesIDUnique ID identifying the supplies
[in]playerPlayer trying to unload supplies
[in]baseBase at which the supplies are being unloaded
[in]amount

◆ LoadSuppliesStandalone()

void SCR_CampaignNetworkComponent.LoadSuppliesStandalone ( RplId suppliesID,
IEntity player,
SCR_CampaignSuppliesComponent depot,
int amount = 0 )
Parameters
[in]suppliesID
[in]player
[in]depot
[in]amount

◆ OnPlayerAliveStateChanged()

void SCR_CampaignNetworkComponent.OnPlayerAliveStateChanged ( bool alive)
Parameters
[in]alive

◆ OnPlayerSuppliesInteraction()

void SCR_CampaignNetworkComponent.OnPlayerSuppliesInteraction ( EResourcePlayerInteractionType interactionType,
PlayerController playerController,
SCR_ResourceComponent resourceComponentFrom,
SCR_ResourceComponent resourceComponentTo,
EResourceType resourceType,
float resourceValue )
Parameters
[in]interactionType
[in]playerController
[in]resourceComponentFrom
[in]resourceComponentTo
[in]resourceType
[in]resourceValue

◆ OnPostInit()

override void SCR_CampaignNetworkComponent.OnPostInit ( IEntity owner)

◆ OnSuppliesLoaded()

void SCR_CampaignNetworkComponent.OnSuppliesLoaded ( vector position,
float amount,
notnull SCR_ResourceComponent resourceComponentTo )
protected

◆ OnSuppliesUnloaded()

void SCR_CampaignNetworkComponent.OnSuppliesUnloaded ( vector position,
float amount,
int playerId )
protected

◆ PlayerFeedbackImpl()

void SCR_CampaignNetworkComponent.PlayerFeedbackImpl ( int msgID,
float value = 0,
int assetID = -1,
int baseID = -1 )
protected

Show notification about request result to the requester.

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]value
[in]assetID
[in]baseID

◆ PlayRadioMsg()

void SCR_CampaignNetworkComponent.PlayRadioMsg ( SCR_ERadioMsg msg,
int FactionId,
int baseCallsign,
int callerCallsignCompany,
int callerCallsignPlatoon,
int callerCallsignSquad,
int calledCallsignCompany,
int calledCallsignPlatoon,
int calledCallsignSquad,
bool isPublic,
int param,
float seed,
float quality,
int playerID )
Parameters
[in]msg
[in]FactionId
[in]baseCallsign
[in]callerCallsignCompany
[in]callerCallsignPlatoon
[in]callerCallsignSquad
[in]calledCallsignCompany
[in]calledCallsignPlatoon
[in]calledCallsignSquad
[in]isPublic
[in]param
[in]seed
[in]quality
[in]playerID

◆ RepairComposition()

void SCR_CampaignNetworkComponent.RepairComposition ( int index,
int repairCost,
int destructibleID,
SCR_SiteSlotEntity slotEnt,
notnull SCR_CampaignMilitaryBaseComponent base )

Repair destroyed mandatory part of composition.

◆ ResetSavedSupplies()

void SCR_CampaignNetworkComponent.ResetSavedSupplies ( )

◆ RespawnLocationPopup()

void SCR_CampaignNetworkComponent.RespawnLocationPopup ( int baseID)
Parameters
[in]baseID

◆ RpcAsk_AddRadio()

void SCR_CampaignNetworkComponent.RpcAsk_AddRadio ( int playerID)
protected

◆ RpcAsk_AddSuppliesFromContextMenu()

void SCR_CampaignNetworkComponent.RpcAsk_AddSuppliesFromContextMenu ( RplId baseID,
int suppliesCnt )
protected

◆ RpcAsk_CaptureBase()

void SCR_CampaignNetworkComponent.RpcAsk_CaptureBase ( RplId baseID,
int factionIndex,
int playerID )
protected

Capture a base (change its owner)

Parameters
[in]baseIDBase entity ID
[in]factionIndexIndex of new faction to own the base
[in]playerID

◆ RpcAsk_CaptureBaseBegin()

void SCR_CampaignNetworkComponent.RpcAsk_CaptureBaseBegin ( RplId baseID,
int factionIndex,
int playerID )
protected

◆ RpcAsk_CaptureBaseEnd()

void SCR_CampaignNetworkComponent.RpcAsk_CaptureBaseEnd ( RplId baseID)
protected

◆ RpcAsk_DeployMobileAsembly()

void SCR_CampaignNetworkComponent.RpcAsk_DeployMobileAsembly ( RplId assemblyComponentID,
bool deploy,
int playerID )
protected

◆ RpcAsk_HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent.RpcAsk_HandleRadioRespawnTimer ( RplId selectedSpawnPointId)
protected

◆ RpcAsk_LoadSupplies()

void SCR_CampaignNetworkComponent.RpcAsk_LoadSupplies ( RplId suppliesID,
int playerID,
RplId baseID,
int amount )
protected

Load supplies at a base.

Parameters
[in]suppliesIDsupplies entity ID
[in]playerIDplayer entity ID
[in]baseIDbase entity ID
[in]amount

◆ RpcAsk_LoadSuppliesStandalone()

void SCR_CampaignNetworkComponent.RpcAsk_LoadSuppliesStandalone ( RplId suppliesID,
int playerID,
RplId depotID,
int amount )
protected

◆ RpcAsk_RepairComposition()

void SCR_CampaignNetworkComponent.RpcAsk_RepairComposition ( int index,
int repairCost,
int destructibleID,
RplId slotID,
RplId baseID )
protected

Repair damaged entity in composition.

◆ RpcAsk_SuppliesLoadingCanceled()

void SCR_CampaignNetworkComponent.RpcAsk_SuppliesLoadingCanceled ( RplId suppliesID,
int playerID,
bool IsUnloading )
protected

◆ RpcAsk_SuppliesLoadingStarted()

void SCR_CampaignNetworkComponent.RpcAsk_SuppliesLoadingStarted ( RplId suppliesID,
int playerID,
int supplies,
bool IsUnloading )
protected

◆ RpcAsk_UnloadSupplies()

void SCR_CampaignNetworkComponent.RpcAsk_UnloadSupplies ( RplId suppliesID,
int playerID,
RplId baseID,
int amount )
protected

Unload supplies at a base.

Parameters
[in]vehicleIDVehicle entity ID
[in]playerIDVehicle entity ID
[in]baseIDVehicle entity ID

◆ RpcDo_AddRadio()

void SCR_CampaignNetworkComponent.RpcDo_AddRadio ( RplId ID)
protected

◆ RpcDo_PlayerEnableShowingSpawnPosition()

void SCR_CampaignNetworkComponent.RpcDo_PlayerEnableShowingSpawnPosition ( bool enable)
Parameters
[in]enable

◆ RpcDo_PlayerFeedback()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedback ( int msgID)
protected

Show notification about request result to the requester.

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)

◆ RpcDo_PlayerFeedbackBase()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedbackBase ( int msgID,
int baseID )
protected

Show notification about request result to the requester.

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]baseID

◆ RpcDo_PlayerFeedbackValueBase()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedbackValueBase ( int msgID,
float value,
int baseID )
protected

Show notification about request result to the requester.

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]value
[in]baseID

◆ RpcDo_PlayRadioMsg()

void SCR_CampaignNetworkComponent.RpcDo_PlayRadioMsg ( SCR_ERadioMsg msg,
int factionId,
int baseCallsign,
int callerCallsign,
int calledCallsign,
int param,
float seed,
float quality )
Parameters
[in]msg
[in]factionId
[in]baseCallsign
[in]callerCallsign
[in]calledCallsign
[in]param
[in]seed
[in]quality

◆ RpcDo_VehicleSpawnHint()

void SCR_CampaignNetworkComponent.RpcDo_VehicleSpawnHint ( int hintID)
protected

◆ SendPlayerMessage()

void SCR_CampaignNetworkComponent.SendPlayerMessage ( SCR_ERadioMsg msgType,
int baseCallsign = SCR_MilitaryBaseComponent::INVALID_BASE_CALLSIGN,
int calledID = SCR_CampaignMilitaryBaseComponent::INVALID_PLAYER_INDEX,
bool public = true,
int param = SCR_CampaignRadioMsg::INVALID_RADIO_MSG_PARAM,
bool checkHQReached = false )
Parameters
[in]msgType
[in]baseCallsign
[in]calledID
[in]public
[in]param
[in]checkHQReached

◆ SendToVehicleOccupants()

void SCR_CampaignNetworkComponent.SendToVehicleOccupants ( ENotification messageID,
IEntity vehicleEntity,
int playerID,
int number = 0 )
protected
Parameters
[in]messageID
[in]vehicleEntityentity of vehicle
[in]playerIDID of player to notify about
[in]numberoptional second parameter for another int number

◆ SendVehicleSpawnHint()

void SCR_CampaignNetworkComponent.SendVehicleSpawnHint ( int hintID)
Parameters
[in]hintID

◆ SetLastHQRadioMessageTimestamp()

void SCR_CampaignNetworkComponent.SetLastHQRadioMessageTimestamp ( WorldTimestamp time)
Parameters
[in]time

◆ SetLastRequestTimestamp()

void SCR_CampaignNetworkComponent.SetLastRequestTimestamp ( WorldTimestamp timestamp)
Parameters
[in]requestcooldown timestamp

◆ StartLoading()

void SCR_CampaignNetworkComponent.StartLoading ( RplId suppliesID,
int supplies,
bool IsUnloading = false )
Parameters
[in]suppliesID
[in]supplies
[in]IsUnloading

◆ StopLoading()

void SCR_CampaignNetworkComponent.StopLoading ( RplId suppliesID,
bool IsUnloading = false )
Parameters
[in]suppliesID
[in]IsUnloading

◆ ToggleBaseCapture()

void SCR_CampaignNetworkComponent.ToggleBaseCapture ( notnull SCR_CampaignMilitaryBaseComponent base,
bool isBeingCaptured )
Parameters
[in]base
[in]isBeingCaptured

◆ UnloadSupplies()

void SCR_CampaignNetworkComponent.UnloadSupplies ( RplId suppliesID,
IEntity player,
SCR_CampaignMilitaryBaseComponent base,
int amount = 0 )

Send server request to unload supplies at a base.

Parameters
[in]truckIDUnique ID identifying the supply truck
[in]playerPlayer trying to unload supplies
[in]baseBase at which the supplies are being unloaded

Member Data Documentation

◆ FULL_SUPPLY_TRUCK_AMOUNT

const float SCR_CampaignNetworkComponent.FULL_SUPPLY_TRUCK_AMOUNT = 1500.0
static

◆ m_bFirstSpawn

bool SCR_CampaignNetworkComponent.m_bFirstSpawn = true
protected

◆ m_fLastAssetRequestTimestamp

WorldTimestamp SCR_CampaignNetworkComponent.m_fLastAssetRequestTimestamp
protected

◆ m_fLastHQRadioMessageTimestamp

WorldTimestamp SCR_CampaignNetworkComponent.m_fLastHQRadioMessageTimestamp
protected

◆ m_fLoadedSupplyAmount

float SCR_CampaignNetworkComponent.m_fLoadedSupplyAmount
protected

◆ m_fNoRewardSupplies

float SCR_CampaignNetworkComponent.m_fNoRewardSupplies
protected

◆ m_iTotalSuppliesDelivered

int SCR_CampaignNetworkComponent.m_iTotalSuppliesDelivered
protected

◆ m_PlayerController

SCR_PlayerController SCR_CampaignNetworkComponent.m_PlayerController
protected

◆ m_RplComponent

RplComponent SCR_CampaignNetworkComponent.m_RplComponent
protected

◆ m_vLastLoadedAt

vector SCR_CampaignNetworkComponent.m_vLastLoadedAt
protected

◆ m_vLastUnloadedAt

vector SCR_CampaignNetworkComponent.m_vLastUnloadedAt
protected

◆ s_OnBaseCaptured

ref ScriptInvokerBase<OnBaseCapturedDelegate> SCR_CampaignNetworkComponent.s_OnBaseCaptured
staticprotected

◆ s_OnSuppliesDelivered

ref ScriptInvokerInt3 SCR_CampaignNetworkComponent.s_OnSuppliesDelivered
staticprotected

◆ SUPPLY_DELIVERY_THRESHOLD_SQ

const int SCR_CampaignNetworkComponent.SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200
static

The documentation for this interface was generated from the following file: