7 [
Attribute(
"{3EE26F4747B6E99D}Configs/Hints/Conflict/ConflictHints.conf",
params:
"conf class=SCR_CampaignHintStorage")]
10 [
Attribute(defvalue:
"3000",
desc:
"Delay before the vehicle inventory hint appears (ms)")]
11 protected int m_iVehicleHintDelay;
21 protected vector m_vFirstSpawnPosition;
31 protected ref array<int> m_aShownHints = {};
47 static const float ICON_FLASH_DURATION = 20;
48 static const float ICON_FLASH_PERIOD = 0.5;
50 protected static const int AFTER_RESPAWN_HINT_DELAY_MS = 16500;
51 protected static const int DELAY_BETWEEN_HINTS_MS = 1000;
52 protected static const int FEATURE_HINT_DELAY = 120000;
53 protected static const int NIGHT_HINT_DELAY_MS = 10000;
54 protected static const int COHESION_HINT_DELAY_MS = 20000;
56 static const string POPUP_HELP_CONTEST =
"#AR-Campaign_Popup_HelpContest";
57 static const string POPUP_SEIZING_CONTESTED =
"#AR-Campaign_SeizingContested-UC";
58 static const string POPUP_HELP_CAPTURE =
"#AR-Campaign_Popup_HelpCapture";
59 static const string POPUP_SEIZING_FRIENDLY =
"#AR-Campaign_SeizingFriendly-UC";
60 static const string POPUP_STOP_CAPTURE =
"#AR-Campaign_Popup_StopCapture";
61 static const string POPUP_SEIZING_ENEMY =
"#AR-Campaign_SeizingEnemy-UC";
65 static SCR_CampaignFeedbackComponent GetInstance()
67 PlayerController pc =
GetGame().GetPlayerController();
72 return SCR_CampaignFeedbackComponent.Cast(pc.FindComponent(SCR_CampaignFeedbackComponent));
84 if (m_vFirstSpawnPosition !=
vector.Zero)
106 m_MapCampaignUI = mapUi;
116 m_SpawnTime = manager.
GetTime();
118 Print(
"Time And Weather manager not found",
LogLevel.WARNING);
140 return m_vFirstSpawnPosition;
162 return m_BaseWithPlayer;
168 SCR_CampaignFactionManager fManager = SCR_CampaignFactionManager.Cast(
GetGame().GetFactionManager());
183 bool isInRangeNow =
m_Campaign.GetBaseManager().IsEntityInFactionRadioSignal(player, faction);
246 if (!player.IsInVehicle())
254 SCR_EditableVehicleComponent comp = SCR_EditableVehicleComponent.Cast(vehicle.FindComponent(SCR_EditableVehicleComponent));
259 array<CompartmentAccessComponent> compartments = {};
261 if (comp.GetCrew(compartments,
false) > 1)
272 if (m_BaseWithPlayer)
275 SCR_ChimeraCharacter player = SCR_ChimeraCharacter.Cast(
m_PlayerController.GetControlledEntity());
277 if (!player || player.IsInVehicle())
285 array<SCR_MilitaryBaseComponent> bases = {};
287 int minDistanceSq = 500 * 500;
288 vector playerPos = player.GetOrigin();
292 foreach (SCR_MilitaryBaseComponent
base : bases)
299 if (
vector.DistanceSqXZ(playerPos, campaignBase.GetOwner().GetOrigin()) < minDistanceSq)
303 minDistanceSq = 300 * 300;
304 array<int> playerIds = {};
306 GetGame().GetPlayerManager().GetPlayers(playerIds);
309 foreach (
int playerId : playerIds)
311 if (playerId == localPlayerId)
314 SCR_ChimeraCharacter otherPlayer = SCR_ChimeraCharacter.Cast(
GetGame().GetPlayerManager().GetPlayerControlledEntity(playerId));
319 CharacterControllerComponent charControl = otherPlayer.GetCharacterController();
321 if (!charControl || charControl.IsDead())
324 if (
vector.DistanceSqXZ(playerPos, otherPlayer.GetOrigin()) < minDistanceSq)
329 ShowHint(
EHint.CONFLICT_TRANSPORT_REQUEST, showMultipleTimes:
true);
339 if (!playerFaction ||
base.GetFaction() != playerFaction)
342 if (
base.GetHQRadioCoverage(playerFaction) != SCR_ERadioCoverageStatus.RECEIVE)
354 if (mapContextualMenu)
379 if (
GetGame().GetWorld().GetWorldTime() < FEATURE_HINT_DELAY)
388 switch (config.MapEntityMode)
446 SCR_FactionCommanderPlayerComponent commander = SCR_FactionCommanderPlayerComponent.Cast(
m_PlayerController.FindComponent(SCR_FactionCommanderPlayerComponent));
450 SCR_FactionCommanderMenuEntry configForEntry = commander.GetConfigForEntry(entry);
454 if (configForEntry.GetShowHint())
455 ShowHint(configForEntry.GetHintId());
504 if (SCR_FactionCommanderHandlerComponent.GetInstance())
521 return m_EPopUpState;
531 if (currentMsg && currentMsg.m_iPriority > SCR_ECampaignSeizingMessagePrio.SEIZING_ENEMY)
548 SCR_EBaseCaptureState capturestate = m_BaseWithPlayer.
GetCaptureState();
550 if (capturestate == SCR_EBaseCaptureState.NONE)
555 if (capturestate == SCR_EBaseCaptureState.CONTESTED)
567 if (capturestate == SCR_EBaseCaptureState.CAPTURING)
580 bool isPlayerFaction = capturingFaction ==
SCR_FactionManager.SGetLocalPlayerFaction();
605 if (currentMsg && (currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_YOU || currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_ENEMY || currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.CONTESTING))
606 popup.HideCurrentMsg();
613 if (currentMsg && (currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_ENEMY || currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_YOU))
614 popup.HideCurrentMsg();
617 subTitle = POPUP_HELP_CONTEST;
619 SetPopup(popup, currentMsg, POPUP_SEIZING_CONTESTED, subTitle, SCR_ECampaignSeizingMessagePrio.CONTESTING);
626 if (currentMsg && (currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_ENEMY || currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.CONTESTING))
627 popup.HideCurrentMsg();
630 subTitle = POPUP_HELP_CAPTURE;
639 if (currentMsg && (currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.SEIZING_YOU || currentMsg.m_iPriority == SCR_ECampaignSeizingMessagePrio.CONTESTING))
640 popup.HideCurrentMsg();
643 subTitle = POPUP_STOP_CAPTURE;
655 bool needsUpdate = !currentMsg || currentMsg.m_iPriority != priority || currentMsg.m_sText != title || currentMsg.m_sSubtitle != subtitle;
677 CharacterControllerComponent charController = player.GetCharacterController();
682 vector playerPos = player.GetOrigin();
686 vector boundsMin, boundsMax;
687 player.GetWorldBounds(boundsMin, boundsMax);
688 float distanceDiff =
vector.DistanceXZ(boundsMin, boundsMax) * 0.5;
691 return vector.DistanceXZ(playerPos, m_BaseWithPlayer.GetOwner().GetOrigin()) <= (seizingComp.GetRadius() + distanceDiff);
716 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_SQUAD_LEADER_RECON,
false,
false);
722 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_SQUAD_LEADER_SUPPLIES,
false,
false);
729 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_SQUAD_LEADER_BASIC,
false,
false);
733 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_SQUAD_LEADER_SUPPORT,
false,
false);
742 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_ASSAULT,
false,
false);
746 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_MECHANIZED,
false,
false);
750 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_TRANSPORT,
false,
false);
754 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_HELI_TRANSPORT,
false,
false);
758 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_RECON,
false,
false);
762 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_MACHINEGUN,
false,
false);
766 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_ANTITANK,
false,
false);
770 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_ENGINEER,
false,
false);
774 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_MEDIC,
false,
false);
778 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_GROUPS_MORTAR,
false,
false);
783 if (!m_aShownHints.Contains(
EHint.CONFLICT_SERVICE_DEPOTS))
784 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_SERVICE_DEPOTS,
false,
false);
785 else if (!m_aShownHints.Contains(
EHint.CONFLICT_RALLY_POINTS))
786 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_RALLY_POINTS,
false,
false);
787 else if (!m_aShownHints.Contains(
EHint.CONFLICT_RESPAWN))
788 GetGame().GetCallqueue().CallLater(
ShowHint, AFTER_RESPAWN_HINT_DELAY_MS,
false,
EHint.CONFLICT_RESPAWN,
false,
false);
812 array<int> playerIds = {};
831 if (SCR_EstablishBaseTaskEntity.Cast(
task))
841 if (SCR_PickupRequestedTaskEntity.Cast(
task))
847 if (SCR_ReinforceRequestedTaskEntity.Cast(
task))
853 if (SCR_RearmRequestedTaskEntity.Cast(
task))
859 if (SCR_RepairRequestedTaskEntity.Cast(
task))
865 if (SCR_FireSupportRequestedTaskEntity.Cast(
task))
871 if (SCR_ResupplyCampaignMilitaryBaseTaskEntity.Cast(
task))
877 if (SCR_AttackTaskEntity.Cast(
task))
883 if (SCR_SeizeCampaignMilitaryBaseTaskEntity.Cast(
task))
889 if (SCR_HoldCampaignMilitaryBaseTaskEntity.Cast(
task))
895 if (SCR_ReconTaskEntity.Cast(
task))
901 if (SCR_DismantleCampaignMilitaryBaseTaskEntity.Cast(
task))
907 if (SCR_ClearTaskEntity.Cast(
task))
921 void ShowHint(
EHint hintID,
bool showImmediately =
false,
bool showMultipleTimes =
false)
934 if (!showMultipleTimes && (m_aShownHints.Contains(hintID) ||
m_aHintQueue.Contains(hintID)))
937 float currentTime =
GetGame().GetWorld().GetWorldTime();
945 if (!SCR_HintManagerComponent.ShowHint(info))
951 m_aShownHints.Insert(hintID);
970 ShowHint(hintId, showMultipleTimes:
true);
1001 CharacterControllerComponent charController = player.GetCharacterController();
1019 if (m_BaseWithPlayer)
1042 array<SCR_MilitaryBaseComponent> bases = {};
1046 foreach (SCR_MilitaryBaseComponent currentBase : bases)
1048 if (currentBase.GetOwner() != faction)
1053 if (friendlyBases == 3)
1066 if (m_BaseWithPlayer)
1069 m_BaseWithPlayer =
base;
1073 if (seizingComponent)
1075 OnSeizingTimerChange(seizingComponent.GetSeizingStartTimestamp(), seizingComponent.GetSeizingEndTimestamp());
1086 if (m_BaseWithPlayer.GetFaction() != playerFaction)
1095 array<SCR_Task> availableTasks = {};
1096 SCR_TaskSystem.GetInstance().GetTasksVisibleFor(availableTasks, executor);
1097 SCR_SeizeCampaignMilitaryBaseTaskEntity campaignTask;
1101 campaignTask = SCR_SeizeCampaignMilitaryBaseTaskEntity.Cast(
task);
1103 if (!campaignTask || campaignTask.GetMilitaryBase() != m_BaseWithPlayer || campaignTask.IsTaskAssignedTo(executor))
1124 if (player && player.IsInVehicle())
1157 if (seizingComponent)
1160 if (m_BaseWithPlayer ==
base)
1161 m_BaseWithPlayer = null;
1193 SCR_CampaignFactionManager fManager = SCR_CampaignFactionManager.Cast(
GetGame().GetFactionManager());
1200 if (fManager.GetFactionIndex(localPlayerFaction) != factionID)
1203 const int duration = 6;
1210 if (mapEntity && mapEntity.
IsOpen())
1217 text =
"#AR-Campaign_MobileAssemblyDeployed-UC";
1218 text2 =
"#AR-Campaign_MobileAssemblyPlayerName";
1224 text =
"#AR-Campaign_MobileAssemblyDismantled-UC";
1225 text2 =
"#AR-Campaign_MobileAssemblyPlayerName";
1228 if (reconfigurerFaction && localPlayerFaction != reconfigurerFaction)
1229 playerName = reconfigurerFaction.GetFactionName();
1236 text =
"#AR-Campaign_MobileAssemblyDestroyed-UC";
1241 if (text !=
string.Empty)
1243 if (text2 !=
string.Empty && playerName !=
string.Empty)
1266 void PlayRadioMsg(
SCR_ERadioMsg msg,
int factionId,
int baseCallsign,
int callerCallsignCompany,
int callerCallsignPlatoon,
int callerCallsignSquad,
int callerCallsignCharacter,
int calledCallsignCompany,
int calledCallsignPlatoon,
int calledCallsignSquad,
int calledCallsignCharacter,
int param,
float seed,
float quality)
1281 SCR_HQRadioSoundEntity radioSoundEntity = SCR_HQRadioSoundEntity.GetInstance();
1282 if (!radioSoundEntity)
1290 int signalCompanyCaller = soundComp.
GetSignalIndex(
"CompanyCaller");
1291 int signalCompanyCalled = soundComp.
GetSignalIndex(
"CompanyCalled");
1292 int signalPlatoonCaller = soundComp.
GetSignalIndex(
"PlatoonCaller");
1293 int signalPlatoonCalled = soundComp.
GetSignalIndex(
"PlatoonCalled");
1296 int signalSoldierCaller = soundComp.
GetSignalIndex(
"SoldierCaller");
1297 int signalSoldierCalled = soundComp.
GetSignalIndex(
"SoldierCalled");
1299 int signalQuality = soundComp.
GetSignalIndex(
"TransmissionQuality");
1301 SCR_CampaignFactionManager fManager = SCR_CampaignFactionManager.Cast(
GetGame().GetFactionManager());
1307 SCR_MilitaryBaseCallsign callsignInfo;
1310 callsignInfo = faction.GetBaseCallsignByIndex(
base.GetCallsign());
1312 callsignInfo = faction.GetBaseCallsignByIndex(
base.GetCallsign(),
m_Campaign.GetCallsignOffset());
1315 soundComp.
SetSignalValue(signalBase, callsignInfo.GetSignalIndex());
1320 soundComp.
SetSignalValue(signalCompanyCaller, callerCallsignCompany);
1321 soundComp.
SetSignalValue(signalPlatoonCaller, callerCallsignPlatoon);
1322 soundComp.
SetSignalValue(signalSquadCaller, callerCallsignSquad);
1323 soundComp.
SetSignalValue(signalSoldierCaller, callerCallsignCharacter);
1328 soundComp.
SetSignalValue(signalCompanyCalled, calledCallsignCompany);
1329 soundComp.
SetSignalValue(signalPlatoonCalled, calledCallsignPlatoon);
1330 soundComp.
SetSignalValue(signalSquadCalled, calledCallsignSquad);
1331 soundComp.
SetSignalValue(signalSoldierCalled, calledCallsignCharacter);
1346 bool mustSetFactionKey =
true;
1347 bool mustSetFactionIdentityVoice =
false;
1371 mustSetFactionKey =
false;
1372 mustSetFactionIdentityVoice =
true;
1374 text =
"#AR-Campaign_Demotion-UC";
1375 text2 =
"#AR-Rank_Renegade";
1381 mustSetFactionKey =
false;
1382 mustSetFactionIdentityVoice =
true;
1384 text =
"#AR-Campaign_Demotion-UC";
1387 if (campaignFaction)
1388 text2 = campaignFaction.GetRanks().GetRankNameUpperCase(param);
1395 mustSetFactionKey =
false;
1396 mustSetFactionIdentityVoice =
true;
1398 text =
"#AR-Campaign_Promotion-UC";
1399 text2 =
"#AR-Rank_WestPrivate";
1405 mustSetFactionKey =
false;
1406 mustSetFactionIdentityVoice =
true;
1408 text =
"#AR-Campaign_Promotion-UC";
1409 text2 =
"#AR-Rank_WestCorporal";
1415 mustSetFactionKey =
false;
1416 mustSetFactionIdentityVoice =
true;
1418 text =
"#AR-Campaign_Promotion-UC";
1419 text2 =
"#AR-Rank_WestSergeant";
1425 mustSetFactionKey =
false;
1426 mustSetFactionIdentityVoice =
true;
1428 text =
"#AR-Campaign_Promotion-UC";
1429 text2 =
"#AR-Rank_WestLieutenant";
1435 mustSetFactionKey =
false;
1436 mustSetFactionIdentityVoice =
true;
1438 text =
"#AR-Campaign_Promotion-UC";
1439 text2 =
"#AR-Rank_WestCaptain";
1445 mustSetFactionKey =
false;
1446 mustSetFactionIdentityVoice =
true;
1448 text =
"#AR-Campaign_Promotion-UC";
1449 text2 =
"#AR-Rank_WestMajor";
1461 mustSetFactionKey =
false;
1462 mustSetFactionIdentityVoice =
true;
1469 mustSetFactionKey =
false;
1470 mustSetFactionIdentityVoice =
true;
1477 mustSetFactionKey =
false;
1478 mustSetFactionIdentityVoice =
true;
1490 mustSetFactionKey =
false;
1491 mustSetFactionIdentityVoice =
true;
1593 mustSetFactionKey =
false;
1594 mustSetFactionIdentityVoice =
true;
1597 text =
"#AR-Campaign_BaseUnderAttack-UC";
1604 text2param1 =
base.GetBaseName();
1605 text2param2 =
base.GetCallsignDisplayName();
1607 if (m_BaseWithPlayer ==
base)
1681 text =
"#AR-Campaign_Building_Destroyed-UC";
1682 text2 =
base.GetBaseName();
1683 param1 =
"#AR-Campaign_Building_Armory-UC";
1694 text =
"#AR-Campaign_Building_Destroyed-UC";
1695 text2 =
base.GetBaseName();
1696 param1 =
"#AR-Campaign_Building_FuelDepot-UC";
1707 text =
"#AR-Campaign_Building_Destroyed-UC";
1708 text2 =
base.GetBaseName();
1709 param1 =
"#AR-Campaign_Building_RepairDepot-UC";
1720 text =
"#AR-Campaign_Building_Available-UC";
1721 text2 =
base.GetBaseName();
1722 param1 =
"#AR-Campaign_Building_Armory-UC";
1733 text =
"#AR-Campaign_Building_Available-UC";
1734 text2 =
base.GetBaseName();
1735 param1 =
"#AR-Campaign_Building_FuelDepot-UC";
1746 text =
"#AR-Campaign_Building_Available-UC";
1747 text2 =
base.GetBaseName();
1748 param1 =
"#AR-Campaign_Building_RepairDepot-UC";
1756 mustSetFactionKey =
false;
1757 mustSetFactionIdentityVoice =
true;
1764 mustSetFactionKey =
false;
1765 mustSetFactionIdentityVoice =
true;
1772 mustSetFactionKey =
false;
1773 mustSetFactionIdentityVoice =
true;
1778 bool isFriendly = faction == fManager.GetPlayerFaction(pc.GetPlayerId());
1780 if (!msgName.IsEmpty())
1782 if (mustSetFactionKey)
1783 msgName = msgName +
"_" + faction.GetFactionKey();
1785 if (mustSetFactionIdentityVoice)
1787 int signalIdentityVoice = soundComp.
GetSignalIndex(
"IdentityVoice");
1788 soundComp.
SetSignalValue(signalIdentityVoice, faction.GetIndentityVoiceSignal());
1792 bool announcerEnabled =
true;
1795 settings.Get(
"m_bHQAnnouncer", announcerEnabled);
1798 if (announcerEnabled)
1799 radioSoundEntity.PlayRadioSound(msgName);
1802 if (isFriendly && (!text.IsEmpty() || !text2.IsEmpty()))
1811 GetGame().GetCallqueue().CallLater(
ShowHint, 30000 +
Math.RandomIntInclusive(0, 30000),
false,
EHint.CONFLICT_ELIMINATING_ENEMIES,
false,
false);
1867 if (
task.IsInherited(SCR_PickupRequestedTaskEntity) ||
1868 task.IsInherited(SCR_ReinforceRequestedTaskEntity) ||
1869 task.IsInherited(SCR_RearmRequestedTaskEntity) ||
1870 task.IsInherited(SCR_RepairRequestedTaskEntity) ||
1871 task.IsInherited(SCR_FireSupportRequestedTaskEntity) ||
1872 task.IsInherited(SCR_HoldCampaignMilitaryBaseTaskEntity) ||
1873 task.IsInherited(SCR_ResupplyCampaignMilitaryBaseTaskEntity))
1879 if (
task.IsInherited(SCR_AttackTaskEntity) ||
1880 task.IsInherited(SCR_SeizeCampaignMilitaryBaseTaskEntity) ||
1881 task.IsInherited(SCR_HoldCampaignMilitaryBaseTaskEntity) ||
1882 task.IsInherited(SCR_ReconTaskEntity) ||
1883 task.IsInherited(SCR_DismantleCampaignMilitaryBaseTaskEntity))
1936 GetGame().GetCallqueue().CallLater(
ShowHint, m_iVehicleHintDelay,
false,
EHint.GAMEPLAY_VEHICLE_INVENTORY,
false,
false);
1985 array<int> assigneeIDs =
task.GetTaskAssigneePlayerIDs();
1987 if (assigneeIDs.Contains(myPlayerId))
2040 float now = timeManager.GetTimeOfTheDay();
2047 SCR_HintManagerComponent hintManager = SCR_HintManagerComponent.GetInstance();
2048 if (hintManager && hintManager.WasShown(
EHint.CONFLICT_NIGHT_PLAY))
2066 GetGame().GetCallqueue().CallLater(
ShowHint, 3000,
false,
EHint.GAMEPLAY_WEAPON_INSPECTION,
false,
false);
2095 SCR_AIGroupCohesionComponent cohesionComp = SCR_AIGroupCohesionComponent.Cast(group.FindComponent(SCR_AIGroupCohesionComponent));
2099 array<int> playersInCohesion = {};
2100 cohesionComp.GetPlayersInCohesion(playersInCohesion);
2106 float ratio = playersInCohesion.Count() / total;
2120 SCR_HintManagerComponent hintManager = SCR_HintManagerComponent.GetInstance();
2121 if (hintManager && hintManager.WasShown(
EHint.CONFLICT_SQUAD_LEADER_COHESION))
2179 if (SCR_FactionCommanderHandlerComponent.GetInstance())
2220 if (campaignBaseManager)
2244 if (SCR_FactionCommanderHandlerComponent.GetInstance())
2284 if (
GetGame().GetWorld().GetWorldTime() < FEATURE_HINT_DELAY)
2330 RplComponent rpl = RplComponent.Cast(
m_PlayerController.FindComponent(RplComponent));
2332 if (rpl && rpl.IsOwner())
2339 super.OnPostInit(owner);
2355 SCR_HintManagerComponent.GetInstance().GetOnHintHide().Insert(
OnHintHide);
2362 SCR_HintManagerComponent hintManager = SCR_HintManagerComponent.GetInstance();
2365 hintManager.GetOnHintHide().Remove(
OnHintHide);
2388enum SCR_ECampaignSeizingMessagePrio
ArmaReforgerScripted GetGame()
RplMode
Mode of replication.
SCR_GameModeCampaign m_Campaign
void OnMapClose(MapConfiguration config)
void SetMapOpened(bool wasOpened)
void OnBaseFactionChanged(notnull SCR_MilitaryBaseComponent base, Faction faction)
void UnregisterVehicleEnter()
void BaseOutOfRangeHint(SCR_CampaignMilitaryBaseComponent base)
void OnJournalOpened(bool newVisibility)
void ShowHint(EHint hintID, bool showImmediately=false, bool showMultipleTimes=false)
void OnHintHide(SCR_HintUIInfo info, bool isSilent)
void OnPlayerJoinedGroup(SCR_AIGroup group, int playerID)
WorldTimestamp m_fBaseWithPlayerCaptureStart
void RegisterTasksShown()
void RegisterVehicleListener()
Registers a callback for vehicle enter events for the local player.
void OnMapOpen(MapConfiguration config)
void TryRegisterInventoryHover()
bool m_bIsPlayerInRadioRange
void OnXPChanged(int totalXP, SCR_EXPRewards rewardID, int XP, bool volunteer, bool profileUsed, int skillLevel)
void CheckPlayerInsideRadioRange()
void OnVehicleEnter(ChimeraCharacter playerCharacter, IEntity compartmentEntit)
void CheckSquadCohesionHint()
void OnEntryPerformed(SCR_SelectionMenuEntry entry)
void SetMapCampaignUI(SCR_MapCampaignUI mapUi)
vector GetPlayerSpawnPos()
Returns players position after spawning.
void OnRadialMenuAvailable()
float m_fNextAllowedHintTimestamp
TimeContainer GetSpawnTime()
ref array< int > m_aHintQueue
void HandlePopUpState(SCR_EPopUpState state, notnull SCR_PopUpNotification popup, SCR_PopupMessage currentMsg)
void OnBaseClickedShowSupplyLimit(bool selected)
void MobileAssemblyFeedback(SCR_EMobileAssemblyStatus msgID, int playerID, int factionID)
WorldTimestamp m_fBaseWithPlayerCaptureEnd
void OnTaskStateChanged(SCR_Task task, SCR_ETaskState newState)
void OnBaseHovered(SCR_CampaignMilitaryBaseComponent base)
void ShowVolunteerHint(bool newVisibility)
bool CanShowPlayerSpawn()
void ~SCR_CampaignFeedbackComponent()
void PlayRadioMsg(SCR_ERadioMsg msg, int factionId, int baseCallsign, int callerCallsignCompany, int callerCallsignPlatoon, int callerCallsignSquad, int callerCallsignCharacter, int calledCallsignCompany, int calledCallsignPlatoon, int calledCallsignSquad, int calledCallsignCharacter, int param, float seed, float quality)
void OnItemSlotHover(SCR_InventorySlotUI slot)
enum SCR_ECampaignPopupPriority CONTESTING
void OnCommanderVolunteer(int playerId)
bool m_bCanShowSpawnPosition
void SetPopup(SCR_PopUpNotification popup, SCR_PopupMessage currentMsg, string title, string subtitle, int priority, bool useProgressBar=false)
void OnTaskAssigneeAdded(SCR_Task task, SCR_TaskExecutor executor, int requesterID)
void OnRespawn()
Hints are displayed with a delay after respawn so player has time to find their bearings.
void ProcessEvents(bool activate)
SCR_EPopUpState GetPopUpState()
void TransportRequestHint()
void RegisterVehicleEnter()
bool IsLocalPlayerAlive()
SCR_ECampaignPopupPriority
Popup message priorities sorted from lowest to highest.
void RefreshCurrentPopupMessage()
void OnMatchSituationChanged()
bool m_bCohesionHintWasShown
void OnBaseEntered(notnull SCR_CampaignMilitaryBaseComponent base)
SCR_CampaignMilitaryBaseComponent GetBaseWithPlayer()
SCR_EPopUpState GetCurrentPopUpState()
void OnSeizingTimerChange(WorldTimestamp start, WorldTimestamp end)
void OnPlayerKilled(notnull SCR_InstigatorContextData instigatorContextData)
void OnBaseLeft(notnull SCR_CampaignMilitaryBaseComponent base)
void SetIsPlayerInRadioRange(bool status)
enum SCR_ECampaignPopupPriority SEIZING_YOU
void OnTaskSelected(SCR_Task task)
void OnPlayerSuppliesInteraction(EResourcePlayerInteractionType interactionType, PlayerController playerController, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
void OnFactionCommanderChanged(SCR_Faction faction, int commanderPlayerId)
void UpdatePlayerSpawnHint(bool show, vector position=vector.Zero)
void OnCheckEstablishmentArea()
bool m_bIsPlayerCapturing
SCR_EMobileAssemblyStatus
SCR_EGroupRole
Group roles.
SCR_EPopUpState
State of a popup message so we can easily determine what to display.
void OnFactionCommanderChanged()
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_FastTravelComponentClass m_PlayerController
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
AudioHandle m_PlayedRadio
EMapEntityMode
Mode of the map.
EResourcePlayerInteractionType
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_Task(IEntitySource src, IEntity parent)
SCR_TaskManagerUIComponent m_TaskManager
void TimeContainer(int hours=0, int minutes=0, int seconds=0)
proto external int SetEventMask(notnull IEntity owner, int mask)
Object holding reference to resource. In destructor release the resource.
int GetPlayerCount(bool checkMasterAndSlaves=false)
SCR_EGroupRole GetGroupRole()
array< int > GetPlayerIDs()
static ScriptInvoker GetOnPlayerAdded()
static ScriptInvokerBool GetOnBaseSelected()
static const float RADIO_RECONFIGURATION_DURATION
SCR_EBaseCaptureState GetCaptureState()
SCR_ECampaignBaseType GetType()
Returns type of this base.
int GetReconfiguredByID()
bool IsHQRadioTrafficPossible(notnull SCR_CampaignFaction faction, SCR_ERadioCoverageStatus direction=SCR_ERadioCoverageStatus.RECEIVE)
static const int INVALID_PLAYER_INDEX
Created in SCR_GameModeCampaign.
OnLocalPlayerLeftBaseInvoker GetOnLocalPlayerLeftBase()
OnSignalChangedInvoker GetOnSignalChanged()
Triggered when a base's radio coverage changes.
OnLocalPlayerEnteredBaseInvoker GetOnLocalPlayerEnteredBase()
int GetContestingFactionsCount()
OnPlayerEnterCompartment GetOnPlayerCompartmentEnter(bool createNew=true)
static IEntity GetMainParent(IEntity entity, bool self=false)
static ScriptInvokerInt GetOnCanBePerformed()
static ScriptInvokerVoid GetOnArsenalEnter()
BaseHoveredInvoker GetOnBaseHovered()
void InitMobileAssembly(string factionKey, bool deployed)
void RemoveSpawnPositionHint()
Called to hide Spawn Position hint if player is killed (or his entity disappear for some reason).
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapClose()
Get on map close invoker.
SCR_MapUIBaseComponent GetMapUIComponent(typename componentType)
bool IsOpen()
Check if the map is opened.
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapOpen()
Get on map open invoker.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
ScriptInvokerVoid GetOnMenuInitInvoker()
static SCR_MapRadialUI GetInstance()
SCR_RadialMenuController GetRadialController()
int GetBases(notnull out array< SCR_MilitaryBaseComponent > bases)
OnBaseFactionChangedInvoker GetOnBaseFactionChanged()
static SCR_MilitaryBaseSystem GetInstance()
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
static IEntity GetLocalControlledEntity()
ScriptInvoker GetOnXPChanged()
Takes care of dynamic and static onscreen popups.
void ChangeProgressBarFinish(WorldTimestamp progressEnd)
void PopupMsg(string text, float duration=DEFAULT_DURATION, string text2="", int prio=-1, string param1="", string param2="", string param3="", string param4="", string text2param1="", string text2param2="", string text2param3="", string text2param4="", string sound="", SCR_EPopupMsgFilter category=SCR_EPopupMsgFilter.ALL, WorldTimestamp progressStart=null, WorldTimestamp progressEnd=null)
static const float DEFAULT_DURATION
static SCR_PopUpNotification GetInstance()
SCR_PopupMessage GetCurrentMsg()
ScriptInvokerResourceOnPlayerInteraction GetOnPlayerInteraction()
override int GetGroupID()
static SCR_TaskManagerUIComponent GetInstance()
ScriptInvokerBool GetOnTaskHUDVisible()
static float GetHeightAboveTerrain(vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
void EOnInit(IEntity owner)
proto external int GetSignalIndex(string name)
proto external void SetSignalValue(int signal, float value)
enum EPhysicsLayerPresets Vehicle
SCR_EditableEntityComponent GetControlledEntity()
void OnConsciousnessChanged(bool conscious)
Will be called when the consciousness of the character changes.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
@ NONE
When Shape is created and not initialized yet.
@ DEFAULT
Use currently set main RT format (based on game options).
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
proto external PlayerController GetPlayerController()
void OnOwnershipChanged(bool changing, bool becameOwner)