Arma Reforger Script API
|
Takes care of Campaign-specific server <> client communication and requests. More...
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 |
Takes care of Campaign-specific server <> client communication and requests.
void SCR_CampaignNetworkComponent.~SCR_CampaignNetworkComponent | ( | ) |
void SCR_CampaignNetworkComponent.AddRadio | ( | ) |
void SCR_CampaignNetworkComponent.AddSuppliesFromContextMenu | ( | notnull SCR_CampaignMilitaryBaseComponent | base, |
int | suppliesCnt ) |
[in] | base | |
[in] | suppliesCnt |
void SCR_CampaignNetworkComponent.CaptureBase | ( | SCR_CampaignMilitaryBaseComponent | base | ) |
Send server request to capture a base (change its owner)
[in] | base | Base to be captured |
void SCR_CampaignNetworkComponent.CaptureBaseGM | ( | SCR_CampaignMilitaryBaseComponent | base, |
int | factionIndex ) |
[in] | base | |
[in] | factionIndex |
void SCR_CampaignNetworkComponent.CheckHQReached | ( | ) |
|
protected |
|
protected |
void SCR_CampaignNetworkComponent.DeployMobileAsembly | ( | notnull SCR_CampaignMobileAssemblyComponent | comp, |
bool | deploy ) |
[in] | comp | |
[in] | deploy |
override void SCR_CampaignNetworkComponent.EOnInit | ( | IEntity | owner | ) |
|
protected |
|
static |
[in] | playerID |
WorldTimestamp SCR_CampaignNetworkComponent.GetLastRequestTimestamp | ( | ) |
|
static |
Get event called when the player captures a base.
Invoker params are: SCR_CampaignMilitaryBaseComponent base, int playerId
|
static |
|
protected |
|
protected |
void SCR_CampaignNetworkComponent.LoadSupplies | ( | RplId | suppliesID, |
IEntity | player, | ||
SCR_CampaignMilitaryBaseComponent | base, | ||
int | amount = 0 ) |
Send server request to load supplies at a base.
[in] | suppliesID | Unique ID identifying the supplies |
[in] | player | Player trying to unload supplies |
[in] | base | Base at which the supplies are being unloaded |
[in] | amount |
void SCR_CampaignNetworkComponent.LoadSuppliesStandalone | ( | RplId | suppliesID, |
IEntity | player, | ||
SCR_CampaignSuppliesComponent | depot, | ||
int | amount = 0 ) |
[in] | suppliesID | |
[in] | player | |
[in] | depot | |
[in] | amount |
void SCR_CampaignNetworkComponent.OnPlayerAliveStateChanged | ( | bool | alive | ) |
[in] | alive |
void SCR_CampaignNetworkComponent.OnPlayerSuppliesInteraction | ( | EResourcePlayerInteractionType | interactionType, |
PlayerController | playerController, | ||
SCR_ResourceComponent | resourceComponentFrom, | ||
SCR_ResourceComponent | resourceComponentTo, | ||
EResourceType | resourceType, | ||
float | resourceValue ) |
[in] | interactionType | |
[in] | playerController | |
[in] | resourceComponentFrom | |
[in] | resourceComponentTo | |
[in] | resourceType | |
[in] | resourceValue |
override void SCR_CampaignNetworkComponent.OnPostInit | ( | IEntity | owner | ) |
|
protected |
|
protected |
|
protected |
Show notification about request result to the requester.
[in] | msgID | Message ID (see ECampaignClientNotificationID) |
[in] | value | |
[in] | assetID | |
[in] | baseID |
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 ) |
[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 |
void SCR_CampaignNetworkComponent.RepairComposition | ( | int | index, |
int | repairCost, | ||
int | destructibleID, | ||
SCR_SiteSlotEntity | slotEnt, | ||
notnull SCR_CampaignMilitaryBaseComponent | base ) |
Repair destroyed mandatory part of composition.
void SCR_CampaignNetworkComponent.ResetSavedSupplies | ( | ) |
void SCR_CampaignNetworkComponent.RespawnLocationPopup | ( | int | baseID | ) |
[in] | baseID |
|
protected |
|
protected |
|
protected |
Capture a base (change its owner)
[in] | baseID | Base entity ID |
[in] | factionIndex | Index of new faction to own the base |
[in] | playerID |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Load supplies at a base.
[in] | suppliesID | supplies entity ID |
[in] | playerID | player entity ID |
[in] | baseID | base entity ID |
[in] | amount |
|
protected |
|
protected |
Repair damaged entity in composition.
|
protected |
|
protected |
|
protected |
|
protected |
void SCR_CampaignNetworkComponent.RpcDo_PlayerEnableShowingSpawnPosition | ( | bool | enable | ) |
[in] | enable |
|
protected |
Show notification about request result to the requester.
[in] | msgID | Message ID (see ECampaignClientNotificationID) |
|
protected |
Show notification about request result to the requester.
[in] | msgID | Message ID (see ECampaignClientNotificationID) |
[in] | baseID |
|
protected |
Show notification about request result to the requester.
[in] | msgID | Message ID (see ECampaignClientNotificationID) |
[in] | value | |
[in] | baseID |
void SCR_CampaignNetworkComponent.RpcDo_PlayRadioMsg | ( | SCR_ERadioMsg | msg, |
int | factionId, | ||
int | baseCallsign, | ||
int | callerCallsign, | ||
int | calledCallsign, | ||
int | param, | ||
float | seed, | ||
float | quality ) |
[in] | msg | |
[in] | factionId | |
[in] | baseCallsign | |
[in] | callerCallsign | |
[in] | calledCallsign | |
[in] | param | |
[in] | seed | |
[in] | quality |
|
protected |
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 ) |
[in] | msgType | |
[in] | baseCallsign | |
[in] | calledID | |
[in] | public | |
[in] | param | |
[in] | checkHQReached |
|
protected |
[in] | messageID | |
[in] | vehicleEntity | entity of vehicle |
[in] | playerID | ID of player to notify about |
[in] | number | optional second parameter for another int number |
void SCR_CampaignNetworkComponent.SendVehicleSpawnHint | ( | int | hintID | ) |
[in] | hintID |
void SCR_CampaignNetworkComponent.SetLastHQRadioMessageTimestamp | ( | WorldTimestamp | time | ) |
[in] | time |
void SCR_CampaignNetworkComponent.SetLastRequestTimestamp | ( | WorldTimestamp | timestamp | ) |
[in] | request | cooldown timestamp |
void SCR_CampaignNetworkComponent.StartLoading | ( | RplId | suppliesID, |
int | supplies, | ||
bool | IsUnloading = false ) |
[in] | suppliesID | |
[in] | supplies | |
[in] | IsUnloading |
void SCR_CampaignNetworkComponent.StopLoading | ( | RplId | suppliesID, |
bool | IsUnloading = false ) |
[in] | suppliesID | |
[in] | IsUnloading |
void SCR_CampaignNetworkComponent.ToggleBaseCapture | ( | notnull SCR_CampaignMilitaryBaseComponent | base, |
bool | isBeingCaptured ) |
[in] | base | |
[in] | isBeingCaptured |
void SCR_CampaignNetworkComponent.UnloadSupplies | ( | RplId | suppliesID, |
IEntity | player, | ||
SCR_CampaignMilitaryBaseComponent | base, | ||
int | amount = 0 ) |
Send server request to unload supplies at a base.
[in] | truckID | Unique ID identifying the supply truck |
[in] | player | Player trying to unload supplies |
[in] | base | Base at which the supplies are being unloaded |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
static |