9 protected bool m_bTerminateScenario;
12 protected int m_iControlPointsThreshold;
14 [
Attribute(
"300",
desc:
"How long does a faction need to hold the control points to win (seconds).",
params:
"0 inf 1",
category:
"Campaign")]
15 protected float m_fVictoryTimer;
17 [
Attribute(
"1000",
desc:
"Supplies will be autoreplenished in bases until this limit is reached.",
params:
"0 inf 1",
category:
"Campaign")]
18 protected int m_iSuppliesReplenishThreshold;
20 [
Attribute(
"200",
desc:
"Supplies will be autoreplenished in bases quickly until this limit is reached (HQs are not affected).",
params:
"0 inf 1",
category:
"Campaign")]
21 protected int m_iQuickSuppliesReplenishThreshold;
23 [
Attribute(
"2",
desc:
"Supplies income will be multiplied by this number unless the quick replenish threshold has been reached.",
params:
"1 inf 0.05",
category:
"Campaign")]
24 protected float m_fQuickSuppliesReplenishMultiplier;
27 protected int m_iSuppliesArrivalInterval;
30 protected int m_iRegularSuppliesIncome;
35 [
Attribute(
"4",
desc:
"How many extra supplies are periodically replenished in non-HQ bases per base connected via radio.",
params:
"0 inf 1",
category:
"Campaign")]
36 protected int m_iRegularSuppliesIncomeExtra;
39 protected int m_iHQStartingSupplies;
41 [
Attribute(
"100",
desc:
"When randomized, the least supplies a base can hold at the start.",
params:
"0 inf 1",
category:
"Campaign")]
42 protected int m_iMinStartingSupplies;
44 [
Attribute(
"500",
desc:
"When randomized, the most supplies a base can hold at the start.",
params:
"0 inf 1",
category:
"Campaign")]
45 protected int m_iMaxStartingSupplies;
47 [
Attribute(
"25",
desc:
"The step by which randomized supplies will be added in randomization. Min and Max limits should be divisible by this.",
params:
"1 inf 1",
category:
"Campaign")]
48 protected int m_iStartingSuppliesInterval;
50 [
Attribute(
"0.5",
desc:
"Fraction of XP awarded to players unloading supplies which they have not loaded themselves.",
params:
"0 inf",
category:
"Campaign")]
51 protected float m_fSupplyOffloadAssistanceReward;
66 protected bool m_bRandomizeSupplies;
68 [
Attribute(
"1200",
UIWidgets.EditBox,
"The furthest an independent supply depot can be from the nearest base to still be visible in the map.",
params:
"0 inf 1",
category:
"Campaign")]
69 protected int m_iSupplyDepotIconThreshold;
71 [
Attribute(
"{B3E7B8DC2BAB8ACC}Prefabs/AI/Waypoints/AIWaypoint_SearchAndDestroy.et",
category:
"Campaign")]
74 [
Attribute(
"1800",
UIWidgets.EditBox,
"If suicide is committed more than once in this time (seconds), a respawn penalty is issued.",
params:
"0 inf 1",
category:
"Campaign")]
77 [
Attribute(
"30",
UIWidgets.EditBox,
"Stacking extra deploy cooldown after suicide (seconds). Gets deducted over time.",
params:
"0 inf 1",
category:
"Campaign")]
86 [
Attribute(
"2000",
desc:
"HQ candidates with greater distance than this are considered for selection",
params:
"0 inf 1",
category:
"Campaign")]
89 [
Attribute(
"3000",
desc:
"HQ candidates with greater distance than this are preferred for selection",
params:
"0 inf 1",
category:
"Campaign")]
92 [
Attribute(
"0",
UIWidgets.CheckBox,
"Players can establish bases. If disabled, the game starts with existing FOBs",
category:
"Campaign")]
98 [
Attribute(
"0",
UIWidgets.CheckBox,
"INDFOR players can spawn on distant bases at the start of the game",
category:
"Campaign")]
113 [
Attribute(
"2500",
desc:
"How many supplies are periodically replenished in source bases.",
params:
"0 inf 1",
category:
"Campaign")]
116 [
Attribute(
"1",
desc:
"Priority of HQ spawn point in spawn point list. Spawn points are listed from highest priority to lowest.",
params:
"0 inf 1",
category:
"Campaign")]
119 [
Attribute(SCR_ECharacterRank.PRIVATE.ToString(), uiwidget:
UIWidgets.ComboBox,
desc:
"All players will start the match at this rank.", enums: ParamEnumArray.FromEnum(SCR_ECharacterRank),
category:
"Campaign")]
122 [
Attribute(
"-1",
desc:
"Maximum amount of bases that can be established per faction. The amount of Established bases is also limited by the amount of callsigns. If value of -1 is used, the amount of established bases is only limited by callsign amount.",
params:
"-1 inf 1",
category:
"Campaign")]
125 [
Attribute(
"{11A29F36F362D318}Prefabs/MP/Campaign/SCR_HQRadioSoundEntity.et",
desc:
"Entity with a sound component that is used to load and play HQ radio sounds.",
params:
"et",
category:
"Campaign")]
128 static const int MINIMUM_DELAY = 100;
129 static const int UI_UPDATE_DELAY = 250;
130 static const int MEDIUM_DELAY = 1000;
131 static const int DEFAULT_DELAY = 2000;
132 static const int BACKEND_DELAY = 25000;
149 [
RplProp(onRplName:
"OnStarted")]
152 [
RplProp(onRplName:
"OnMatchSituationChanged")]
155 [
RplProp(onRplName:
"OnMatchSituationChanged")]
158 [
RplProp(onRplName:
"OnMatchSituationChanged")]
161 [
RplProp(onRplName:
"OnCallsignOffsetChanged")]
293 return m_iSuppliesReplenishThreshold;
299 return m_iQuickSuppliesReplenishThreshold;
305 return m_fQuickSuppliesReplenishMultiplier;
311 return m_iSuppliesArrivalInterval;
317 return m_iRegularSuppliesIncome;
329 return m_iRegularSuppliesIncomeExtra;
335 return m_iSupplyDepotIconThreshold;
347 return m_fVictoryTimer;
353 return m_iControlPointsThreshold;
359 return m_iMinStartingSupplies;
365 return m_iMaxStartingSupplies;
371 return m_iStartingSuppliesInterval;
377 return m_fSupplyOffloadAssistanceReward;
383 return m_sSeekDestroyWaypointPrefab;
435 [Friend(SCR_GameModeCampaignSerializer)]
460 int controlPointsHeldBLUFOR;
461 int controlPointsHeldOPFOR;
472 writer.WriteInt(controlPointsHeldBLUFOR);
473 writer.WriteInt(controlPointsHeldOPFOR);
482 int activeBasesTotal;
484 reader.ReadInt(activeBasesTotal);
491 int controlPointsHeldBLUFOR, controlPointsHeldOPFOR
493 reader.ReadInt(controlPointsHeldBLUFOR);
494 reader.ReadInt(controlPointsHeldOPFOR);
518 if (playerIdentity.IsNull())
532 if (!clientData && create)
535 clientData.
SetID(playerIdentity);
548 int index =
GetGame().GetFactionManager().GetFactionIndex(faction);
580 SCR_CampaignFeedbackComponent comp = SCR_CampaignFeedbackComponent.GetInstance();
585 comp.MobileAssemblyFeedback(msgID, playerID, factionID)
613 float hQSupplies = m_iHQStartingSupplies;
614 bool whitelist =
false;
615 array<string> customBaseList = {};
620 if (header.m_iStartingHQSupplies != -1)
621 hQSupplies = header.m_iStartingHQSupplies;
623 whitelist = header.m_bCustomBaseWhitelist;
624 foreach (SCR_CampaignCustomBase customBase : header.m_aCampaignCustomBaseList)
626 customBaseList.Insert(customBase.GetBaseName());
630 array<SCR_CampaignMilitaryBaseComponent> candidatesForHQ = {};
631 array<SCR_CampaignMilitaryBaseComponent> controlPoints = {};
632 array<SCR_MilitaryBaseComponent> bases = {};
635 foreach (SCR_MilitaryBaseComponent
base : bases)
644 const string baseName = campaignBase.GetOwner().GetName();
645 const int listIndex = customBaseList.Find(baseName);
657 if (whitelist && listIndex != -1)
665 candidatesForHQ.Insert(campaignBase);
668 controlPoints.Insert(campaignBase);
671 if (candidatesForHQ.Count() < 2)
673 Print(
"Not enough suitable starting locations found in current setup. Check 'Can Be HQ' attributes in SCR_CampaignMilitaryBaseComponent!",
LogLevel.ERROR);
678 array<SCR_CampaignMilitaryBaseComponent> selectedHQs = {};
680 m_BaseManager.SelectHQs(candidatesForHQ, controlPoints, selectedHQs);
688 hq.SetStartingSupplies(hQSupplies);
694 if (candidate.IsHQ())
697 if (!candidate.DisableWhenUnusedAsHQ())
699 candidate.Initialize();
703 RplComponent baseRplComponent = RplComponent.Cast(candidate.GetOwner().FindComponent(RplComponent));
704 if (!baseRplComponent)
708 baseRplComponent.DeleteRplEntity(candidate.GetOwner(),
false);
713 m_BaseManager.InitializeBases(selectedHQs, m_bRandomizeSupplies);
718 const int basesHalf =
Math.Ceil(basesCount * 0.5);
719 const int offset =
Math.RandomIntInclusive(1, basesHalf);
742 array<SCR_SpawnPoint> spawnpoints =
SCR_SpawnPoint.GetSpawnPoints();
764 super.OnPlayerRegistered(playerId);
767 if (!localController)
770 if (playerId != localController.GetPlayerId())
774 if (!playerFactionAff)
807 IEntity spawnpointParent = spawnpoint.GetRootParent();
808 if (!spawnpointParent)
812 if (!baseComponent || !baseComponent.
IsHQ())
822 FactionManager factionManager =
GetGame().GetFactionManager();
823 array<Faction> factions = {};
824 factionManager.GetFactionsList(factions);
832 foreach (
Faction faction : factions)
841 if (blockPauseTimestamp == 0)
844 actualVictoryTimestamp = curTime.PlusMilliseconds(
848 if (actualVictoryTimestamp != 0)
850 if (!winner || actualVictoryTimestamp.Less(lowestVictoryTimestamp))
852 lowestVictoryTimestamp = actualVictoryTimestamp;
860 if (lowestVictoryTimestamp.LessEqual(curTime))
863 int winnerId = factionManager.GetFactionIndex(winner);
896 FactionManager fManager =
GetGame().GetFactionManager();
897 array<Faction> factions = {};
898 fManager.GetFactionsList(factions);
899 Faction winningFaction = fManager.GetFactionByIndex(winningFactionId);
903 foreach (
Faction faction : factions)
910 if (winningFaction == f)
922 if (m_bTerminateScenario)
943 return m_sINDFORFactionKey;
946 return m_sBLUFORFactionKey;
949 return m_sOPFORFactionKey;
952 return m_sRNGDFactionKey;
961 FactionManager fManager =
GetGame().GetFactionManager();
997 SCR_HelicopterDamageManagerComponent helicopterDamageManager = SCR_HelicopterDamageManagerComponent.Cast(vehicle.FindComponent(SCR_HelicopterDamageManagerComponent));
1000 if (!helicopterDamageManager)
1003 array<HitZone> hitZones = {};
1004 helicopterDamageManager.GetAllHitZonesInHierarchy(hitZones);
1006 transform[0] = vehicle.GetOrigin();
1007 transform[1] =
vector.Forward;
1008 transform[2] =
vector.Up;
1013 foreach (
HitZone hitZone : hitZones)
1015 if (!hitZone.IsInherited(
SCR_EngineHitZone) && !hitZone.IsInherited(SCR_FlammableHitZone))
1023 helicopterDamageManager.HandleDamage(damageContext);
1026 array<SCR_FuelManagerComponent> fuelManagers = {};
1027 array<BaseFuelNode> fuelNodes = {};
1034 fuelManager.GetFuelNodesList(fuelNodes);
1038 fuelNode.SetFuel(0.0);
1044 protected void OnRankChanged(SCR_ECharacterRank oldRank, SCR_ECharacterRank newRank, notnull
IEntity owner,
bool silent)
1049 int playerId =
GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(owner);
1055 if (!factionManager)
1063 if (newRank < oldRank && !rank.IsRankRenegade())
1068 faction.
SendHQMessage(radio, calledID: playerId,
public:
false, param: newRank)
1083 SCR_XPHandlerComponent comp = SCR_XPHandlerComponent.Cast(FindComponent(SCR_XPHandlerComponent));
1090 if (!factionManager)
1093 int playerID = playerController.GetPlayerId();
1104 comp.AwardXP(playerController.GetPlayerId(),
SCR_EXPRewards.STARTING_RANK, 1,
false, requiredXp);
1110 super.OnPlayerAuditSuccess(iPlayerID);
1121 super.OnPlayerDisconnected(playerId, cause, timeout);
1128 super.OnPlayerEntityChanged_S(playerId, previousEntity, newEntity);
1132 PlayerController pc =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1137 if (campaignNetworkComponent)
1144 super.OnPlayerSpawnOnPoint_S(requestComponent, handlerComponent, entity, spawnPointData);
1147 SCR_XPHandlerComponent compXP = SCR_XPHandlerComponent.Cast(FindComponent(SCR_XPHandlerComponent));
1155 SCR_PlayerSpawnPoint playerSpawnpoint = SCR_PlayerSpawnPoint.Cast(spawnpoint);
1158 if (playerSpawnpoint)
1160 compXP.AwardXP(playerSpawnpoint.GetPlayerID(),
SCR_EXPRewards.SPAWN_PROVIDER);
1162 else if (radioSpawnpoint)
1168 int playerId = comp.GetItemOwnerID();
1171 if (playerId !=
GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(entity))
1179 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(requestComponent.GetPlayerId());
1181 if (playerController)
1191 if (spawnPointParentBase)
1198 if (spawnPointParentBase)
1202 if (campaignNetworkComponent)
1212 IEntity owner = spawnpoint.GetParent();
1224 super.OnPlayerKilledEx(instigatorContextData);
1229 int playerId = instigatorContextData.GetVictimPlayerID();
1230 PlayerController pc =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1235 if (campaignNetworkComponent)
1259 if (respawnPenalty == 0)
1262 float curTime =
GetGame().GetWorld().GetWorldTime();
1265 float penaltiesForgiven =
Math.Floor(timeSinceLastDeduction / penaltyCooldownMs);
1267 if (penaltiesForgiven < 1)
1274 array<Managed> timers = {};
1277 foreach (Managed timer : timers)
1280 if (timer.Type() == SCR_TimedSpawnPointComponent)
1288 timerCast.SetRespawnTime(playerId, timerCast.GetRespawnTime() - respawnPenalty - forgivenPenalty);
1299#ifdef NO_SUICIDE_PENALTY
1308 PlayerController pc =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1313 SCR_CampaignFeedbackComponent comp = SCR_CampaignFeedbackComponent.Cast(pc.FindComponent(SCR_CampaignFeedbackComponent));
1315 if (comp && !comp.IsConscious())
1322 Print(
"Client data is null, this should only be happening in a dev environment.",
LogLevel.WARNING);
1328 float curTime =
GetGame().GetWorld().GetWorldTime();
1331 if (lastSuicideTimestamp == 0)
1334 float timeSinceLastSuicide = curTime - lastSuicideTimestamp;
1338 if (timeSinceLastSuicide > penaltyCooldownMs)
1346 array<Managed> timers = {};
1349 foreach (Managed timer : timers)
1352 if (timer.Type() == SCR_TimedSpawnPointComponent)
1360 timerCast.SetRespawnTime(playerId, timerCast.GetRespawnTime() + respawnPenalty + addedPenalty);
1377 if (!super.CanPlayerSpawn_S(requestComponent, handlerComponent,
data, result))
1382 if (!spawnpointSpawnData)
1388 PlayerController pc = requestComponent.GetPlayerController();
1390 if (spawnpointCampaign)
1392 IEntity spawnpointParent = spawnpointCampaign.GetParent();
1394 if (spawnpointParent)
1431 if (spawnpoint.
IsSpawnPointRandom() || spawnpoint.FindComponent(SCR_CampaignMobileAssemblyStandaloneComponent))
1457 super.OnControllableDestroyedEx(instigatorContextData);
1462 Instigator instigator = instigatorContextData.GetInstigator();
1465 if (instigator.GetInstigatorType() !=
InstigatorType.INSTIGATOR_PLAYER)
1472 SCR_XPHandlerComponent compXP = SCR_XPHandlerComponent.Cast(FindComponent(SCR_XPHandlerComponent));
1477 SCR_ChimeraCharacter victimCharacter = SCR_ChimeraCharacter.Cast(instigatorContextData.GetVictimEntity());
1478 if (!victimCharacter)
1481 vector victimPos = victimCharacter.GetOrigin();
1489 if (!factionManager)
1492 int killerId = instigator.GetInstigatorPlayerID();
1495 Faction factionKiller = factionManager.GetPlayerFaction(killerId);
1500 if (nearestBase.GetFaction() != factionKiller)
1504 if (
vector.DistanceXZ(victimPos, nearestBase.GetOwner().GetOrigin()) > nearestBase.GetRadius())
1543 if (!militaryBaseManager)
1549 if (!spawnedEntity.IsInherited(
Vehicle))
1553 array<SCR_FuelManagerComponent> fuelManagers = {};
1554 array<BaseFuelNode> fuelNodes = {};
1556 array<SCR_MilitaryBaseComponent> serviceBases = {};
1557 service.GetBases(serviceBases);
1558 bool fuelDepotNearby;
1560 foreach (SCR_MilitaryBaseComponent serviceBase : serviceBases)
1564 fuelDepotNearby =
true;
1569 if (!fuelDepotNearby)
1574 fuelManager.GetFuelNodesList(fuelNodes);
1578 fuelNode.SetFuel(fuelNode.GetMaxFuel() * 0.3);
1585 int playerId = playerManager.GetPlayerIdFromControlledEntity(user);
1592 if (!playerController)
1603 BaseRadioComponent radioComponent = BaseRadioComponent.Cast(spawnedEntity.FindComponent(BaseRadioComponent));
1606 if (radioComponent && faction)
1612 radioComponent.SetPower(
false);
1614 radioComponent.SetEncryptionKey(faction.GetFactionRadioEncryptionKey());
1619 SlotManagerComponent slotManager = SlotManagerComponent.Cast(spawnedEntity.FindComponent(SlotManagerComponent));
1623 array<EntitySlotInfo> slots = {};
1624 slotManager.GetSlotInfos(slots);
1627 SCR_CampaignMobileAssemblyComponent mobileAssemblyComponent;
1634 truckBed = slot.GetAttachedEntity();
1638 mobileAssemblyComponent = SCR_CampaignMobileAssemblyComponent.Cast(truckBed.
FindComponent(SCR_CampaignMobileAssemblyComponent));
1639 if (mobileAssemblyComponent)
1648 const PlayerController pc =
GetGame().GetPlayerManager().GetPlayerController(playerID);
1655 Print(
"SCR_GameModeCampaign.UpdateClientData: Game was unable to fetch information about the player with playerID = " + playerID,
LogLevel.WARNING);
1667 SCR_FastTravelComponent fastTravel = SCR_FastTravelComponent.Cast(pc.FindComponent(SCR_FastTravelComponent));
1671 SCR_PlayerSupplyAllocationComponent supplyAllocationComp = SCR_PlayerSupplyAllocationComponent.Cast(pc.FindComponent(SCR_PlayerSupplyAllocationComponent));
1672 if (supplyAllocationComp)
1679 PlayerController pc =
GetGame().GetPlayerManager().GetPlayerController(playerId);
1690 bool allowFactionLoad =
true;
1694 allowFactionLoad =
false;
1699 if (allowFactionLoad && forcedFaction != -1)
1704 Faction faction =
GetGame().GetFactionManager().GetFactionByIndex(forcedFaction);
1714 SCR_XPHandlerComponent comp = SCR_XPHandlerComponent.Cast(FindComponent(SCR_XPHandlerComponent));
1718 SCR_FastTravelComponent fastTravel = SCR_FastTravelComponent.Cast(pc.FindComponent(SCR_FastTravelComponent));
1722 SCR_PlayerSupplyAllocationComponent supplyAllocationComp = SCR_PlayerSupplyAllocationComponent.Cast(pc.FindComponent(SCR_PlayerSupplyAllocationComponent));
1723 if (supplyAllocationComp)
1731 super.EOnDiag(owner, timeSlice);
1733 PlayerController playerController =
GetGame().GetPlayerController();
1734 if (!playerController)
1741 SCR_PlayerXPHandlerComponent comp = SCR_PlayerXPHandlerComponent.Cast(playerController.FindComponent(SCR_PlayerXPHandlerComponent));
1750 SCR_PlayerXPHandlerComponent comp = SCR_PlayerXPHandlerComponent.Cast(playerController.FindComponent(SCR_PlayerXPHandlerComponent));
1759 SCR_PlayerXPHandlerComponent comp = SCR_PlayerXPHandlerComponent.Cast(playerController.FindComponent(SCR_PlayerXPHandlerComponent));
1768 SCR_PlayerXPHandlerComponent comp = SCR_PlayerXPHandlerComponent.Cast(playerController.FindComponent(SCR_PlayerXPHandlerComponent));
1773 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_BECOME_COMMANDER_DEBUG))
1775 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_BECOME_COMMANDER_DEBUG, 0);
1777 SCR_CampaignFactionCommanderPlayerComponent comp = SCR_CampaignFactionCommanderPlayerComponent.Cast(playerController.FindComponent(SCR_CampaignFactionCommanderPlayerComponent));
1779 comp.CheatCommander();
1784 if (DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_VICTORY_BLUFOR))
1786 DiagMenu.SetValue(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_VICTORY_BLUFOR, 0);
1787 FactionManager fManager =
GetGame().GetFactionManager();
1799 FactionManager fManager =
GetGame().GetFactionManager();
1816 Print(
"SCR_GameModeCampaign: Empty BLUFOR faction key!",
LogLevel.ERROR);
1819 Print(
"SCR_GameModeCampaign: Empty OPFOR faction key!",
LogLevel.ERROR);
1822 Print(
"SCR_GameModeCampaign: Empty INDFOR faction key!",
LogLevel.ERROR);
1825 Print(
"SCR_GameModeCampaign: Empty RNGD faction key!",
LogLevel.ERROR);
1833 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_INSTANT_BUILDING,
"",
"Instant composition spawning",
"Conflict");
1838 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_BECOME_COMMANDER_DEBUG,
"",
"Become Commander",
"Conflict");
1839 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_VICTORY_BLUFOR,
"",
"Match victory: BLUFOR",
"Conflict");
1840 DiagMenu.RegisterBool(
SCR_DebugMenuID.DEBUGUI_CAMPAIGN_VICTORY_OPFOR,
"",
"Match victory: OPFOR",
"Conflict");
1841 ConnectToDiagSystem();
1850 int suppliesMax = header.m_iMaximumBaseSupplies;
1851 int suppliesMin = header.m_iMinimumBaseSupplies;
1852 int controlPointsLimit = header.m_iControlPointsCap;
1853 float victoryTimeout = header.m_fVictoryTimeout;
1854 float supplyAssistanceReward = header.m_fSupplyOffloadAssistanceReward;
1856 if (suppliesMax != -1)
1857 m_iMaxStartingSupplies = suppliesMax;
1859 if (suppliesMin != -1)
1860 m_iMinStartingSupplies = suppliesMin;
1862 if (controlPointsLimit != -1)
1863 m_iControlPointsThreshold = controlPointsLimit;
1865 if (victoryTimeout != -1)
1866 m_fVictoryTimer = victoryTimeout;
1868 if (supplyAssistanceReward >= 0)
1869 m_fSupplyOffloadAssistanceReward = supplyAssistanceReward;
1887 SCR_HQRadioSoundEntity.GetInstance();
1893 DisconnectFromDiagSystem();
ArmaReforgerScripted GetGame()
override string GetID(string fileName, string varName, array< BaseContainer > objects, array< int > indexes)
RplMode
Mode of replication.
void Start()
Start this tracking time in this menu, adds it to previous time if we have not yet sended previous da...
SCR_BaseGameMode GetGameMode()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
RplComponent m_RplComponent
void OnMatchSituationChanged()
void OnSpawnPointFactionAssigned(FactionKey faction)
int m_iRegularSuppliesIncomeBase
void OnLocalPlayerFactionAssigned(Faction assignedFaction)
SCR_EMobileAssemblyStatus
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void OnRankChanged(SCR_ECharacterRank prevRank, SCR_ECharacterRank newRank, bool silent)
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_ECharacterControlType
What kind of controller the character or (in some cases vehicle) has, eg: AI, Player,...
SCR_ECharacterDeathStatusRelations
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_FuelManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void RpcDo_BroadcastMHQFeedback(SCR_EMobileAssemblyStatus msgID, int playerID, int factionID)
float GetAcceptableDistanceBetweenFactionHQs()
SCR_CampaignFaction GetFactionByEnum(SCR_ECampaignFaction faction)
ResourceName GetHQRadioSoundEntityPrefab()
void ~SCR_GameModeCampaign()
ref ScriptInvoker m_OnStarted
void SetControlPointsHeld(SCR_CampaignFaction faction, int newCount)
bool m_bEstablishingBasesEnabled
int GetRegularSuppliesIncomeSource()
void SetCallsignOffset(int offset)
ScriptInvoker GetOnFactionAssignedLocalPlayer()
Triggered when the local player picks a faction.
void OnEntityRequested(notnull IEntity spawnedEntity, IEntity user, SCR_Faction faction, SCR_MilitaryBaseLogicComponent service)
Called when an entity is spawned by Free Roam Building.
float GetQuickSuppliesReplenishMultiplier()
float GetPreferredDistanceBetweenFactionHQs()
bool m_bCommanderRoleEnabled
ref ScriptInvoker m_OnMatchSituationChanged
float m_fAcceptableDistanceBetweenFactionHQs
ref array< ref SCR_CampaignClientData > m_aRegisteredClients
ref array< SCR_PlayerRadioSpawnPointCampaign > m_aRadioSpawnPoints
SCR_CampaignClientData GetClientData(int playerId, bool create=false)
WorldTimestamp GetVictoryPauseTimestamp()
int GetMinStartingSupplies()
int GetHQSpawnPointPriority()
int GetSuppliesReplenishThreshold()
int GetSupplyDepotIconThreshold()
WorldTimestamp m_fVictoryTimestamp
int GetRegularSuppliesIncomeExtra()
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void BroadcastMHQFeedback(SCR_EMobileAssemblyStatus msgID, int playerID, int factionID)
int GetRegularSuppliesIncome()
bool GetINDFORCanSpawnOnDistantBases()
int GetFactionEstablishBaseLimit()
int GetQuickSuppliesReplenishThreshold()
ScriptInvoker GetOnCallsignOffsetChanged()
void RPC_DoEndMatch(int winningFactionId)
int m_iFactionEstablishBaseLimit
SCR_ECharacterRank GetStartingRank()
int GetWinningFactionId()
bool GetINDFORCanSpawnOnBases()
void OnCallsignOffsetChanged()
ResourceName GetSeekDestroyWaypointPrefab()
void SetPrioritySpawnpoint(SCR_SpawnPoint spawnpoint)
bool m_bINDFORCanSpawnOnBases
SCR_ECharacterRank m_eStartingRank
ResourceName m_sHQRadioSoundEntityPrefab
void DisableExtraSpawnpoint(SCR_SpawnPoint spawnpoint)
void SetIsTutorial(bool isTutorial)
int GetMaxStartingSupplies()
int GetSuppliesArrivalIntervalSource()
bool m_bSuppliesAutoRegenerationEnabled
int GetSuppliesArrivalInterval()
int m_iHQSpawnPointPriority
int GetControlPointTreshold()
bool CanRequestVehicleWithoutRank()
Getter for "Rank required" parameter for spawning vehicles.
ref ScriptInvokerEntity2 s_OnEntityRequested
void OnSuicide(int playerId)
WorldTimestamp GetVictoryTimestamp()
FactionKey GetFactionKeyByEnum(SCR_ECampaignFaction faction)
ScriptInvokerEntity2 GetOnEntityRequested()
ref ScriptInvoker m_OnFactionAssignedLocalPlayer
void SetStartingRank(notnull PlayerController playerController)
float GetSupplyOffloadAssistanceReward()
ref ScriptInvoker m_OnCallsignOffsetChanged
bool m_bINDFORCanSpawnOnDistantBases
bool m_bRandomSpawnpointsEnabled
SCR_CampaignMilitaryBaseManager GetBaseManager()
bool GetSpawnRandomCaches()
ref SCR_CampaignMilitaryBaseManager m_BaseManager
void OnAmbientVehicleSpawned(SCR_AmbientVehicleSpawnPointComponent spawnpoint, Vehicle vehicle)
int GetStartingSuppliesInterval()
WorldTimestamp m_fVictoryPauseTimestamp
float m_fPreferredDistanceBetweenFactionHQs
bool GetCommanderRoleEnabled()
ScriptInvoker GetOnMatchSituationChanged()
Triggered when an event happened which should be communicated to players (i.e. amount of control poin...
bool m_bSpawnRandomCaches
int m_iSuppliesArrivalIntervalSource
bool m_bIgnoreMinimumVehicleRank
int m_iSuicideRespawnDelay
void ApplyClientData(int playerId)
int GetRegularSuppliesIncomeBase()
int m_iRegularSuppliesIncomeSource
void UpdateClientData(int playerID)
Save object with player's current data.
bool GetSuppliesAutoRegenerationEnabled()
void UpdateRespawnPenalty(int playerId)
Handles forgiving of post-suicide deploy timer penalties.
int m_iSuicidePenaltyCooldown
int m_iSuicideForgiveCooldown
ScriptInvoker GetOnStarted()
Triggered when Conflict gamemode has started.
void RPC_DoSetControlPointsHeld(int factionIndex, int count)
void CheckForWinner()
Find out if any faction has won and it's time to end the match.
bool GetEstablishingBasesEnabled()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_RespawnTimerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
ScriptInvokerBase< ScriptInvokerEntity2Method > ScriptInvokerEntity2
enum EVehicleType IEntity
Adds ability to attach an object to a slot.
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
OnAmbientVehicleSpawnedInvoker GetOnVehicleSpawned()
static SCR_AmbientVehicleSystem GetInstance()
override void OnPlayerAuditSuccess(int iPlayerID)
override bool RplSave(ScriptBitWriter writer)
bool CanPlayerSpawn_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, out SCR_ESpawnResult result=SCR_ESpawnResult.SPAWN_NOT_ALLOWED)
override void OnPlayerRegistered(int playerId)
void EndGameMode(SCR_GameModeEndData endData)
void OnPlayerEntityChanged_S(int playerId, IEntity previousEntity, IEntity newEntity)
override bool RplLoad(ScriptBitReader reader)
void OnControllableDestroyedEx(notnull SCR_InstigatorContextData instigatorContextData)
override void OnGameStart()
override void OnPlayerDisconnected(int playerId, KickCauseCode cause, int timeout)
void OnPlayerSpawnOnPoint_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnPointSpawnData spawnPointData)
void OnPlayerKilledEx(notnull SCR_InstigatorContextData instigatorContextData)
Used for storing client data to be reapplied for reconnecting clients.
float GetLastPenaltyDeductionTimestamp()
void SetLastSuicideTimestamp(float timestamp)
void SetLastPenaltyDeductionTimestamp(float timestamp)
int GetAvailableAllocatedSupplies()
void SetAvailableAllocatedSupplies(int amount)
float GetRespawnPenalty()
void SetNextFastTravelTimestamp(WorldTimestamp timestamp)
void SetFactionIndex(int faction)
void SetRespawnPenalty(float penalty)
float GetLastSuicideTimestamp()
WorldTimestamp GetNextFastTravelTimestamp()
int GetControlPointsHeld()
void SendHQMessage(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)
WorldTimestamp GetPauseByBlockTimestamp()
void SetControlPointsHeld(int count)
WorldTimestamp GetVictoryTimestamp()
bool CanSpawnOnSourceBases()
void OnSpawnPointFactionAssigned(FactionKey faction)
void ApplyHeaderSettings(notnull SCR_CampaignCustomBase settings)
static const int INVALID_FACTION_INDEX
Created in SCR_GameModeCampaign.
void OnDefenderGroupSpawned(notnull SCR_MilitaryBaseLogicComponent service, notnull SCR_AIGroup group)
Called when a new AI group is spawned by Free Roam Building.
Takes care of Campaign-specific server <> client communication and requests.
void OnPlayerAliveStateChanged(bool alive)
void SetLastRequestTimestamp(WorldTimestamp timestamp)
void RespawnLocationPopup(int baseID)
void SendVehicleSpawnHint(int hintID)
void ResetSavedSupplies()
SCR_BaseDeployableSpawnPointComponent GetDeployableSpawnPointComponent()
int GetFactionRadioFrequency()
int GetBases(notnull out array< SCR_MilitaryBaseComponent > bases)
void UnregisterBase(notnull SCR_MilitaryBaseComponent base)
static SCR_MilitaryBaseSystem GetInstance()
static sealed bool IsLoadInProgress(float msSinceLoad=1000.0)
OnPlayerFactionChangedInvoker GetOnPlayerFactionChangedInvoker()
bool RequestFaction(Faction faction)
SCR_BasePlayerLoadout GetLoadout()
void CheatXP(int xpChange)
int GetPlayerXP()
Getter for player XP.
void CheatRank(bool demote=false)
SCR_ECharacterRank GetPlayerRankByXP()
Takes care of dynamic and static onscreen popups.
static void SetFilter(SCR_EPopupMsgFilter filter)
void TogglePeriodicUpdates(bool toggle)
static SCR_RadioCoverageSystem GetInstance()
bool IsRankRenegade(SCR_ECharacterRank rankID)
int GetRequiredRankXP(SCR_ECharacterRank rankID)
SCR_ERadioMsg GetRadioMsg()
Spawn point entity defines positions on which players can possibly spawn.
void SetPriority(int priority)
void SetFaction(Faction faction)
bool IsSpawnPointRandom()
SCR_SpawnPoint GetSpawnPoint()
enum EPhysicsLayerPresets Vehicle
override void EOnDiag(IEntity owner, float timeSlice)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
proto external Faction GetFactionByIndex(int index)
proto external PlayerController GetPlayerController()
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.