3 [
Attribute(
"{F7E8D4834A3AFF2F}UI/Imagesets/Conflict/conflict-icons-bw.imageset",
UIWidgets.ResourceNamePicker,
"Imageset with foreground textures",
"imageset",
category:
"Campaign")]
48 [
Attribute(
"0",
desc:
"If enabled, this base will be treated as an HQ when handling supply income.",
category:
"Campaign")]
51 [
Attribute(
"#AR-MapSymbol_Installation",
desc:
"The display name of this base.",
category:
"Campaign")]
54 [
Attribute(
"#AR-MapSymbol_Installation",
desc:
"The display name of this base, in upper case.",
category:
"Campaign")]
63 [
Attribute(
"true",
desc:
"Enables or disables the automatic creation of resupply tasks upon reaching the supply limit threshold.",
category:
"Campaign")]
66 [
Attribute(
"60",
desc:
"Defines how much time must elapse before a player can spawn at this base after it has been captured. [s]",
category:
"Campaign",
params:
"0 inf")]
67 protected float m_fRespawnDelayAfterCaptureSeconds;
69 [
Attribute(
"-1",
desc:
"How many supplies are periodically replenished. If value is -1, default Gamemode value will be used.",
params:
"-1 inf 1",
category:
"Campaign")]
72 [
Attribute(
"-1",
desc:
"How often are supplies replenished in bases [s]. If value is -1, default Gamemode value will be used.",
params:
"-1 inf 1",
category:
"Campaign")]
73 protected int m_iSuppliesArrivalInterval;
75 [
RplProp(),
Attribute(
"0.2",
UIWidgets.Slider,
"Defines the supply limit as a percentage of total storage capacity (TSC). If the supply falls below this threshold, a resupply request is triggered.",
params:
"0, 0.9, 0.01",
category:
"Campaign")]
115 protected ref array<SCR_AmbientPatrolSpawnPointComponent>
m_aRemnants = {};
154 [
RplProp(onRplName:
"OnHQSet")]
157 [
RplProp(onRplName:
"OnInitialized")]
163 [
RplProp(onRplName:
"OnCapturingFactionChanged")]
169 [
RplProp(onRplName:
"OnRadioRangeChanged")]
172 [
RplProp(onRplName:
"OnRespawnCooldownChanged")]
175 [
RplProp(onRplName:
"OnAttackingFactionChanged")]
187 [
RplProp(onRplName:
"OnEnemyPresenceChanged")]
275 if (!resourceConsumer)
278 float aggregatedResources = resourceConsumer.GetAggregatedResourceValue();
281 return supplyLimitValue - aggregatedResources;
337 int minPriority, maxPriority, newPriority;
340 newPriority =
Math.ClampInt(priority, minPriority, maxPriority);
355 if (!resourceComponent)
381 int callsignOffset = campaign.GetCallsignOffset();
382 if (callsignOffset == INVALID_BASE_CALLSIGN)
385 SCR_MilitaryBaseCallsign callsignInfo;
496 SCR_CoverageRadioComponent radio = SCR_CoverageRadioComponent.Cast(
GetOwner().FindComponent(SCR_CoverageRadioComponent));
498 radio.SetPower(
true);
512 SCR_CoverageRadioComponent radio = SCR_CoverageRadioComponent.Cast(
GetOwner().FindComponent(SCR_CoverageRadioComponent));
514 radio.SetPower(
false);
555 SCR_CampaignBuildingProviderComponent buildingProvider = SCR_CampaignBuildingProviderComponent.Cast(
GetOwner().FindComponent(SCR_CampaignBuildingProviderComponent));
556 if (buildingProvider)
557 m_SpawnPoint.SetSpawnPositionRange(buildingProvider.GetBuildingRadius());
576 array<SCR_ServicePointComponent> services = {};
579 foreach (SCR_ServicePointComponent service : services)
590 playerFaction = campaign.GetBaseManager().GetLocalPlayerFaction();
602 campaign.GetBaseManager().AddActiveBase();
607 if (!
m_bIsHQ && SCR_XPHandlerComponent.IsXpSystemEnabled())
615 SCR_CampaignSeizingComponent seizingComponent = SCR_CampaignSeizingComponent.Cast(
GetOwner().FindComponent(SCR_CampaignSeizingComponent));
616 if (seizingComponent)
619 seizingComponent.GetOnCaptureInterrupt().Insert(
EndCapture);
624 if (isSupportedBaseType && !campaign.IsTutorial())
643 SCR_CoverageRadioComponent coverageComp = SCR_CoverageRadioComponent.Cast(
GetOwner().FindComponent(SCR_CoverageRadioComponent));
648 float radioRange = settings.GetRadioRange();
653 BaseRadioComponent radio = BaseRadioComponent.Cast(
GetOwner().FindComponent(BaseRadioComponent));
664 transceiver.SetRange(radioRange);
669 override void OnServiceStateChanged(SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent)
673 case SCR_EServicePointStatus.UNDER_CONSTRUCTION:
678 case SCR_EServicePointStatus.ONLINE:
700 bool duringInit = (
GetGame().GetWorld().GetWorldTime() <= 0);
808 return campaign.GetRegularSuppliesIncome();
812 if (campaign.GetSuppliesAutoRegenerationEnabled())
813 return campaign.GetRegularSuppliesIncomeBase();
827 if (!
m_bIsSupplyHub && campaign.GetSuppliesAutoRegenerationEnabled())
828 return campaign.GetSuppliesArrivalInterval();
831 if (m_iSuppliesArrivalInterval > -1)
832 return m_iSuppliesArrivalInterval;
834 return campaign.GetSuppliesArrivalIntervalSource();
840 SCR_CampaignBuildingCompositionComponent buildingComponent = SCR_CampaignBuildingCompositionComponent.Cast(
SCR_EntityHelper.
GetMainParent(service.GetOwner(),
true).
FindComponent(SCR_CampaignBuildingCompositionComponent));
842 if (buildingComponent && !buildingComponent.GetProviderEntity())
844 array<SCR_CampaignBuildingProviderComponent> buildingProviders = {};
847 foreach (SCR_CampaignBuildingProviderComponent provider : buildingProviders)
849 if (provider && provider.IsMasterProvider())
851 buildingComponent.SetProviderEntityServer(provider.GetOwner());
868 if (msg < topPriorityEnum)
869 topPriorityEnum = msg;
873 faction.SendHQMessage(topPriorityEnum,
m_iCallsign);
880 SCR_ServicePointComponent serviceCast = SCR_ServicePointComponent.Cast(service);
882 if (!serviceCast || serviceCast.GetServiceState() != SCR_EServicePointStatus.ONLINE)
904 ResourceName delegatePrefab = service.GetDelegatePrefab();
906 if (delegatePrefab.IsEmpty())
911 if (!delegateResource || !delegateResource.IsValid())
915 params.TransformMode = ETransformMode.WORLD;
916 service.GetOwner().GetTransform(
params.Transform);
922 SCR_ServicePointDelegateComponent delegateComponent = SCR_ServicePointDelegateComponent.Cast(delegateEntity.
FindComponent(SCR_ServicePointDelegateComponent));
924 if (!delegateComponent)
927 service.SetDelegate(delegateComponent);
928 delegateComponent.SetParentBaseId(
Replication.FindItemId(
this));
932 if (RplSession.Mode() !=
RplMode.Dedicated)
958 if (RplSession.Mode() !=
RplMode.Dedicated)
963 SCR_CampaignSeizingComponent seizingComponent = SCR_CampaignSeizingComponent.Cast(
GetOwner().FindComponent(SCR_CampaignSeizingComponent));
964 if (seizingComponent)
967 seizingComponent.GetOnCaptureInterrupt().Remove(
EndCapture);
993 if (previousHQ && previousHQ !=
this && previousHQ != enemyHQ)
1086 if (!m_OnBaseCreatedasFOB)
1089 return m_OnBaseCreatedasFOB;
1106 for (
int i = 0, count = radio.TransceiversCount(); i < count; i++)
1113 thisRange = transceiver.GetRange();
1115 if (thisRange <= range)
1127 SCR_CoverageRadioComponent radio = SCR_CoverageRadioComponent.Cast(entity.FindComponent(SCR_CoverageRadioComponent));
1143 return SCR_ERadioCoverageStatus.NONE;
1145 SCR_CoverageRadioComponent radioHQ = SCR_CoverageRadioComponent.Cast(hq.GetOwner().FindComponent(SCR_CoverageRadioComponent));
1148 return SCR_ERadioCoverageStatus.NONE;
1150 string encryption = radioHQ.GetEncryptionKey();
1152 SCR_CoverageRadioComponent radio = SCR_CoverageRadioComponent.Cast(
GetOwner().FindComponent(SCR_CoverageRadioComponent));
1155 return SCR_ERadioCoverageStatus.NONE;
1157 return radio.GetCoverageByEncryption(encryption);
1176 case SCR_ERadioCoverageStatus.RECEIVE:
1178 return (status == SCR_ERadioCoverageStatus.RECEIVE || status == SCR_ERadioCoverageStatus.BOTH_WAYS);
1181 case SCR_ERadioCoverageStatus.SEND:
1183 return (status == SCR_ERadioCoverageStatus.SEND || status == SCR_ERadioCoverageStatus.BOTH_WAYS);
1225 if (!campaignFaction)
1249 FactionManager fManager =
GetGame().GetFactionManager();
1273 if (m_OnBaseAttackEnd)
1274 m_OnBaseAttackEnd.Invoke(
this);
1340 if (m_OnBaseUnderAttack)
1341 m_OnBaseUnderAttack.Invoke(
this,
GetFaction(
true), faction);
1390 ownerKey = owner.GetFactionKey();
1391 finalKey = ownerKey;
1416 if (finalKey == currentKey)
1432 super.OnCapturingFactionChanged();
1434 SCR_CampaignFactionManager factionmanager = SCR_CampaignFactionManager.Cast(
GetGame().GetFactionManager());
1435 if (!factionmanager)
1448 campaign.GetBaseManager().EvaluateControlPoints();
1451 if (RplSession.Mode() !=
RplMode.Dedicated)
1462 void FlashBaseIcon(
float remainingTime = 0,
Faction faction = null,
bool changeToDefault =
false,
bool infiniteTimer =
false)
1469 remainingTime -= SCR_CampaignFeedbackComponent.ICON_FLASH_PERIOD;
1471 if (infiniteTimer || remainingTime > 0 || !changeToDefault)
1472 GetGame().GetCallqueue().CallLater(
FlashBaseIcon, SCR_CampaignFeedbackComponent.ICON_FLASH_PERIOD * 1000,
false, remainingTime, faction, !changeToDefault, infiniteTimer);
1491 campaign.GetBaseManager().GetOnSignalChanged().Invoke(
this);
1508 super.OnFactionChanged(owner, previousFaction, faction);
1518 if (!newCampaignFaction)
1526 float curTime =
GetGame().GetWorld().GetWorldTime();
1538 BaseGameMode gameMode =
GetGame().GetGameMode();
1539 if (gameMode && wasCaptured && previousFaction && previousFaction != faction)
1541 SCR_XPHandlerComponent xpHandlerComponent = SCR_XPHandlerComponent.Cast(gameMode.FindComponent(SCR_XPHandlerComponent));
1542 if (xpHandlerComponent)
1543 xpHandlerComponent.OnBaseSeized(
this);
1547 if (curTime > 10000)
1549 campaign.GetBaseManager().RecalculateRadioCoverage(campaign.GetFactionByEnum(
SCR_ECampaignFaction.BLUFOR));
1550 campaign.GetBaseManager().RecalculateRadioCoverage(campaign.GetFactionByEnum(
SCR_ECampaignFaction.OPFOR));
1574 if (newCampaignFaction.IsPlayable() && !
m_bIsHQ)
1576 foreach (SCR_AmbientPatrolSpawnPointComponent remnants :
m_aRemnants)
1578 AIGroup grp = remnants.GetSpawnedGroup();
1581 if (grp && !remnants.IsGroupActive())
1583 remnants.SetMembersAlive(0);
1584 RplComponent.DeleteRplEntity(grp,
false);
1593 params.TransformMode = ETransformMode.WORLD;
1616 if (RplSession.Mode() !=
RplMode.Dedicated)
1682 int factionFrequency = faction.GetFactionRadioFrequency();
1685 if (factionFrequency < tsv.GetMinFrequency() || factionFrequency > tsv.GetMaxFrequency())
1688 tsv.SetFrequency(factionFrequency);
1692 array<SCR_CoverageRadioComponent> radios = {};
1695 foreach (SCR_CoverageRadioComponent radio : radios)
1700 SCR_CampaignMilitaryBaseComponent
base = SCR_CampaignMilitaryBaseComponent.Cast(radio.GetOwner().FindComponent(SCR_CampaignMilitaryBaseComponent));
1703 base.RefreshSeizingTimers();
1710 foreach (SCR_MilitaryBaseLogicComponent logic : m_aSystems)
1714 if (!seizingComponent)
1738 return componentData.GetBuildingIconImageset();
1777 int callsignOffset = campaign.GetCallsignOffset();
1780 if (callsignOffset == INVALID_BASE_CALLSIGN)
1787 SCR_MilitaryBaseCallsign callsignInfo;
1789 callsignInfo = faction.GetBaseCallsignByIndex(
m_iCallsign);
1791 callsignInfo = faction.GetBaseCallsignByIndex(
m_iCallsign, callsignOffset);
1796 m_sCallsign = callsignInfo.GetCallsign();
1797 m_sCallsignNameOnly = callsignInfo.GetCallsignShort();
1798 m_sCallsignNameOnlyUC = callsignInfo.GetCallsignUpperCase();
1799 m_iCallsignSignal = callsignInfo.GetSignalIndex();
1828 WorldTimestamp curTime = world.GetServerTimestamp();
1842 Replication.BumpMe();
1866 spaceLimit =
float.MAX;
1868 spaceLimit = campaign.GetSuppliesReplenishThreshold() - currentSupplies;
1870 spaceLimit =
Math.Min(spaceLimit, maxSupplies - currentSupplies);
1871 if (spaceLimit <= 0 || currentSupplies >= maxSupplies)
1886 int quickReplenishThreshold = campaign.GetQuickSuppliesReplenishThreshold();
1887 float quickReplenishMultiplier = campaign.GetQuickSuppliesReplenishMultiplier();
1891 if (currentSupplies < quickReplenishThreshold)
1893 int incomeHQQuick = income * quickReplenishMultiplier;
1894 incomeHQQuick =
Math.Min(incomeHQQuick, quickReplenishThreshold - currentSupplies);
1895 toAdd =
Math.Max(incomeHQQuick, income);
1902 int extraBasesCount;
1904 if (!
m_bIsHQ && campaign.GetSuppliesAutoRegenerationEnabled())
1907 array<SCR_CoverageRadioComponent> radios = {};
1910 foreach (SCR_CoverageRadioComponent radio : radios)
1920 if (
base.GetCampaignFaction() != faction)
1923 if (!
base.IsHQRadioTrafficPossible(faction))
1928 if (extraBasesCount == BASES_IN_RANGE_RESUPPLY_THRESHOLD)
1936 Replication.BumpMe();
1967 if (!resourceComponent)
1972 if (!resourceConsumer)
1976 GetGame().GetResourceGrid().UpdateInteractor(resourceConsumer);
1978 return resourceConsumer.GetAggregatedResourceValue();
1987 if (!resourceComponent)
1992 if (!resourceConsumer)
1996 GetGame().GetResourceGrid().UpdateInteractor(resourceConsumer);
1998 return resourceConsumer.GetAggregatedMaxResourceValue();
2011 super.RegisterLogicComponent(component);
2013 SCR_FlagComponent flag = SCR_FlagComponent.Cast(component);
2044 item.SetVisible(
false);
2051 return SCR_ResourceComponent.FindResourceComponent(
GetOwner());
2060 if (suppliesCount == 0)
2065 if (!resourceComponent)
2068 if (suppliesCount > 0)
2072 if (!resourceGenerator)
2081 if (!resourceConsumer)
2084 resourceConsumer.RequestConsumtion(-suppliesCount);
2099 if (!resourceComponent)
2104 if (!resourceConsumer)
2108 GetGame().GetResourceGrid().UpdateInteractor(resourceConsumer);
2110 AddSupplies(suppliesCount - resourceConsumer.GetAggregatedResourceValue());
2119 if (!resourceComponent)
2124 if (!resourceConsumer)
2128 GetGame().GetResourceGrid().UpdateInteractor(resourceConsumer);
2131 if (suppliesCount > resourceConsumer.GetAggregatedResourceValue())
2177 if(!faction ||
m_FactionComponent.GetAffiliatedFactionKey() != faction.GetFactionKey())
2247 FlashBaseIcon(SCR_CampaignFeedbackComponent.ICON_FLASH_DURATION, enemyFaction);
2312 if (!buildingPrefab)
2316 if (Math.RandomFloat01() >= 0.5)
2317 buildingPrefab = campaign.GetFactionByEnum(
SCR_ECampaignFaction.BLUFOR).GetBuildingPrefab(label);
2319 buildingPrefab = campaign.GetFactionByEnum(
SCR_ECampaignFaction.OPFOR).GetBuildingPrefab(label);
2335 array<SCR_ServicePointComponent> antennas = {};
2337 BaseRadioComponent radio;
2340 foreach (SCR_ServicePointComponent service : antennas)
2342 SCR_AntennaServicePointComponent antenna = SCR_AntennaServicePointComponent.Cast(service);
2343 radio = BaseRadioComponent.Cast(antenna.GetOwner().FindComponent(BaseRadioComponent));
2349 if (radio.IsPowered())
2350 radio.SetPower(
false);
2354 if (thisRange > range)
2364 RelayTransceiver transceiver;
2366 for (
int i = 0, count =
m_RadioComponent.TransceiversCount(); i < count; i++)
2373 transceiver.SetRange(range);
2378 Replication.BumpMe();
2402 if (
GetGame().GetWorld().GetWorldTime() > campaign.BACKEND_DELAY)
2439 if (newOwnerPoints == campaign.GetControlPointTreshold() &&
IsControlPoint())
2444 FactionManager factionManager =
GetGame().GetFactionManager();
2445 if (!factionManager)
2486 if (campaign.IsTutorial())
2490 params.TransformMode = ETransformMode.WORLD;
2495 array<ResourceName> prefabNames = {};
2498 foreach (ResourceName prefabName : prefabNames)
2504 if (vector.DistanceSqXZ(pos, oldPos) < 1)
2507 params.Transform[3] = pos;
2512 physicsComponent = vehicleEntity.
GetPhysics();
2513 if (physicsComponent)
2514 physicsComponent.SetVelocity(
"0 -0.1 0");
2527 RplComponent.DeleteRplEntity(veh,
false);
2539 if (child.
FindComponent(SCR_CampaignBuildingCompositionComponent))
2557 if (prefab.IsEmpty())
2565 params.TransformMode = ETransformMode.WORLD;
2582 SCR_AIWorld aiWorld = SCR_AIWorld.Cast(
GetGame().GetAIWorld());
2587 SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(composition.
FindComponent(SCR_EditableEntityComponent));
2588 vector transform[4];
2590 if (!editableEntity)
2593 SCR_TerrainHelper.SnapToTerrain(transform, composition.
GetWorld());
2600 if (!SCR_TerrainHelper.SnapToTerrain(transform, composition.
GetWorld()))
2612 if (!baseFaction.IsPlayable())
2615 SCR_CampaignFactionManager factionManager = SCR_CampaignFactionManager.Cast(
GetGame().GetFactionManager());
2617 if (!factionManager)
2620 if (
GetHQRadioCoverage(factionManager.GetEnemyFaction(baseFaction)) == SCR_ERadioCoverageStatus.NONE)
2624 array<int> playerIds = {};
2625 array<int> playerIdsPresent = {};
2626 playerManager.GetPlayers(playerIds);
2629 SCR_XPHandlerComponent compXP = SCR_XPHandlerComponent.Cast(
GetGame().
GetGameMode().FindComponent(SCR_XPHandlerComponent));
2630 bool enemiesPresent;
2633 radiusSq = m_iRadius * m_iRadius;
2637 foreach (
int playerId : playerIds)
2639 SCR_ChimeraCharacter player = SCR_ChimeraCharacter.Cast(playerManager.GetPlayerControlledEntity(playerId));
2644 CharacterControllerComponent charController = player.GetCharacterController();
2646 if (charController.IsDead())
2649 if (
vector.DistanceSqXZ(player.GetOrigin(), basePos) > radiusSq)
2652 if (player.GetFaction() == baseFaction)
2653 playerIdsPresent.Insert(playerId);
2655 enemiesPresent =
true;
2659 WorldTimestamp curTime = world.GetServerTimestamp();
2660 foreach (
int playerId : playerIdsPresent)
2663 if (startedDefendingAt == 0)
2672 compXP.AwardXP(playerManager.GetPlayerController(playerId),
SCR_EXPRewards.BASE_DEFENDED, DEFENDERS_REWARD_MULTIPLIER);
2674 compXP.AwardXP(playerManager.GetPlayerController(playerId),
SCR_EXPRewards.BASE_DEFENDED);
2683 if (playerIdsPresent.Contains(playerId))
2697 if (!baseFaction || !baseFaction.IsPlayable())
2713 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(entity);
2718 if (!characterDamageManager || characterDamageManager.GetState() ==
EDamageState.DESTROYED)
2721 if (!
GetFaction().IsFactionEnemy(character.GetFaction()))
2724 CharacterControllerComponent charController = character.GetCharacterController();
2725 if (!charController)
2728 int playerId =
GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(entity);
2732 AIControlComponent aiControlComponent = charController.GetAIControlComponent();
2733 if (!aiControlComponent)
2736 if (aiControlComponent.IsAIActivated())
2794 super.EOnInit(owner);
2800 if (resourceComponent)
2804 if (consumerComponent)
2821 if (RplSession.Mode() ==
RplMode.Dedicated)
2824 m_MapDescriptor = SCR_CampaignMilitaryBaseMapDescriptorComponent.Cast(
GetOwner().FindComponent(SCR_CampaignMilitaryBaseMapDescriptorComponent));
2835 super.OnPostInit(owner);
2852 if (seizingComponent)
2855 seizingComponent.GetOnCaptureInterrupt().Remove(
EndCapture);
2872 if (resourceComponent)
2875 if (consumerComponent)
2881 super.OnDelete(owner);
2903 if (!campaign || campaign.GetCallsignOffset() == SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN)
2911class SCR_CampaignCustomBase
string FactionKey
Faction unique identifier type.
ArmaReforgerScripted GetGame()
PrefabImporterRequest status
RplMode
Mode of replication.
FactionAffiliationComponent m_FactionComponent
SCR_BaseGameMode GetGameMode()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
RplComponent m_RplComponent
SCR_ECampaignPopupPriority
Popup message priorities sorted from lowest to highest.
func OnBaseCapturedDelegate
func OnBaseCreatedAsFOBDelegate
void OnSupplyLimitChanged(SCR_CampaignMilitaryBaseComponent campaignBase, float supplyLimit)
SCR_CampaignMilitaryBaseComponent SCR_MilitaryBaseComponent BaseContainerProps()
WorldTimestamp m_fSuppliesArrivalTime
ref array< SCR_AIGroup > m_aDefendersGroups
ref array< IEntity > m_aStartingVehicles
bool IsHQRadioTrafficPossible(notnull SCR_CampaignFaction faction, SCR_ERadioCoverageStatus direction=SCR_ERadioCoverageStatus.RECEIVE)
ScriptInvokerBase< OnBaseStateChangedDelegate > OnBaseStateChangedInvoker
string GetBaseNameUpperCase()
Returns the upper-case name of this base.
SCR_CampaignFaction GetCampaignFaction()
Returns the owning faction.
bool m_bDisableWhenUnusedAsHQ
void SendHighestPriorityMessage(notnull SCR_CampaignFaction faction)
ScriptInvokerBase< OnBaseAttackEndDelegate > OnBaseAttackEndInvoker
void CaptureStateChanged(SCR_EBaseCaptureState state)
SCR_CampaignMilitaryBaseComponent SCR_MilitaryBaseComponent SCR_BaseContainerCustomTitleResourceName("m_sBaseName", true)
void OnAllBasesInitialized()
enum SCR_ECampaignBaseType WEST
func OnSupplyLimitChangedDelegate
func OnSpawnPointAssignedDelegate
ScriptInvokerBase< OnBaseCreatedAsFOBDelegate > OnBaseCreatedAsFOBInvoker
ResourceName m_sBuildingIconImageset
float m_fStartingSupplies
bool GetDisableWhenUnusedAsHQ()
int m_iRegularSuppliesIncomeBase
ResourceName GetBuildingIconImageset()
SCR_CampaignFaction m_CapturingFaction
ScriptInvokerBase< OnSpawnPointAssignedDelegate > OnSpawnPointAssignedInvoker
float m_fReservedSupplyAmount
void OnHasSignalChanged()
ScriptInvokerBase< OnSupplyLimitChangedDelegate > OnSupplyLimitChangedInvoker
enum SCR_ECampaignBaseType EAST
ref ScriptInvokerFloat m_OnReservedSupplyAmountChanged
ref OnSupplyLimitChangedInvoker m_OnSupplyLimitChanged
func OnBaseAttackEndDelegate
SCR_CampaignMilitaryBaseMapDescriptorComponent m_MapDescriptor
void HandleSpawnPointFaction()
Changes the faction which can spawn on spawn point groups owned by this base.
FactionKey m_sBuiltFaction
void OnLocalPlayerFactionAssigned(Faction assignedFaction)
WorldTimestamp m_fLastEnemyContactTimestamp
SCR_CampaignMapUIBase m_UIElement
void SetInitialSupplies(float suppliesCount)
func OnBaseStateChangedDelegate
string GetBaseName()
Returns the name of this base.
float m_fRadioRangeDefault
SCR_CoverageRadioComponent m_RadioComponent
If value default Gamemode value will be category
void OnCaptureStart(SCR_Faction faction)
IEntity m_BaseBuildingComposition
void SpawnStartingVehicles()
void FlashBaseIcon(float remainingTime=0, Faction faction=null, bool changeToDefault=false, bool infiniteTimer=false)
void EndCapture()
Capturing has been terminated.
SCR_SpawnPoint m_SpawnPoint
SCR_CampaignFaction GetFaction()
SCR_CharacterSoundComponentClass GetComponentData()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_ESupplyRequestExecutionPriority
void SCR_FactionManager(IEntitySource src, IEntity parent)
int GetRegularSuppliesIncomeExtra()
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
Faction GetCapturingFaction()
void OnCallsignAssigned()
int GetServices(out array< SCR_ServicePointComponent > services=null)
int GetBuildingProviders(out array< SCR_CampaignBuildingProviderComponent > providers)
Get all registered systems inherited from SCR_CampaignBuildingProviderComponent.
int GetServicesByType(out array< SCR_ServicePointComponent > services, SCR_EServicePointType type)
SCR_ServicePointDelegateComponent GetServiceDelegateByType(SCR_EServicePointType type)
LocalizedString GetCallsignDisplayNameOnlyUC()
FactionKey m_sCapturingFaction
bool GetIsLocalPlayerPresent()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
ScriptInvokerBase< ScriptInvokerFloatMethod > ScriptInvokerFloat
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
class SCR_SeizeProgressionXpRewardInfo SOURCE_BASE
void Unregister(SCR_CampaignMilitaryBaseComponent component)
void Register(SCR_CampaignMilitaryBaseComponent component)
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external Physics GetPhysics()
proto external IEntity GetChildren()
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
proto external BaseWorld GetWorld()
proto external bool SetTransform(vector mat[4])
proto external void GetTransform(out vector mat[])
proto external IEntity GetSibling()
Object holding reference to resource. In destructor release the resource.
ScriptInvoker_AIGroupOnEmpty GetOnEmpty()
void RequestNavmeshRebuildEntity(IEntity entity)
void GetStartingVehiclePrefabs(out notnull array< ResourceName > prefabs)
int GetControlPointsHeld()
ResourceName GetBuildingPrefab(EEditableEntityLabel type)
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)
void SetMainBase(SCR_CampaignMilitaryBaseComponent mainBase)
SCR_CampaignMilitaryBaseComponent GetMainBase()
string GetFactionNameUpperCase()
void RegisterRemnants(notnull SCR_AmbientPatrolSpawnPointComponent remnants)
void SetStartingSupplies(float suppliesCount)
static const float SUPPLY_LIMIT_MAX
ref ScriptInvokerFloat m_OnReservedSupplyAmountChanged
static ref OnBaseAttackEndInvoker m_OnBaseAttackEnd
ref OnSupplyLimitChangedInvoker m_OnSupplyLimitChanged
void RefreshSeizingTimers()
void OnLocalPlayerFactionAssigned(Faction assignedFaction)
bool GetDisableWhenUnusedAsHQ()
void SetSuppliesArrivalTime(WorldTimestamp timestamp)
SCR_CampaignFaction m_CapturingFaction
static OnBaseStateChangedInvoker GetOnFactionChangedExtended()
void SetFaction(SCR_CampaignFaction faction)
void SpawnStartingVehicles()
SCR_SpawnPoint GetSpawnPoint()
void UpdateRespawnCooldown()
static const float RADIO_RECONFIGURATION_DURATION
OnSpawnPointAssignedInvoker GetOnSpawnPointAssigned()
void HandleSpawnPointFaction()
Changes the faction which can spawn on spawn point groups owned by this base.
float GetRelayRadioRange(notnull BaseRadioComponent radio)
bool IsValidForSeizeTask()
SCR_EBaseCaptureState m_eCaptureState
void OnAllBasesInitialized()
void OnSpawnPointFactionAssigned(FactionKey faction)
SCR_EBaseCaptureState GetCaptureState()
void SetInitialSupplies(float suppliesCount)
void SetBuiltByPlayers(bool builtByPlayers)
void SendHQMessageBaseCaptured()
SCR_ECampaignBaseType GetType()
Returns type of this base.
void EvaluateDefenders()
Periodically add XP to players defending their base.
static const int SUPPLY_DEPOT_CAPACITY
int GetReconfiguredByID()
IEntity m_BaseBuildingComposition
ref array< SCR_AIGroup > m_aDefendersGroups
void DeleteStartingVehicles()
bool m_bDisableWhenUnusedAsHQ
void SetBaseUI(SCR_CampaignMapUIBase base)
Called from SCR_MapCampaignUI when base UI elements are initialized.
void FlashBaseIcon(float remainingTime=0, Faction faction=null, bool changeToDefault=false, bool infiniteTimer=false)
bool IsResupplyTaskCreationEnabled()
void HideMapLocationLabel()
void CalculateSupplyRegenerationAmount(float currentSupplies, float maxSupplies, notnull SCR_CampaignFaction faction)
void OnCaptureStart(SCR_Faction faction)
SCR_CampaignMapUIBase m_UIElement
void EvaluateEnemyPresence()
string GetFormattedBaseNameWithCallsign(Faction faction)
static const int BASES_IN_RANGE_RESUPPLY_THRESHOLD
int GetSuppliesIncomeAmount()
bool IsHQRadioTrafficPossible(notnull SCR_CampaignFaction faction, SCR_ERadioCoverageStatus direction=SCR_ERadioCoverageStatus.RECEIVE)
bool DisableWhenUnusedAsHQ()
void CaptureStateChanged(SCR_EBaseCaptureState state)
bool CostSuppliesToSpawn()
void ConnectToCampaignBasesSystem()
void SetSupplyLimit(float value)
int GetSuppliesArrivalTimer()
If value default Gamemode value will be category
static const int RELAY_BASE_RADIUS
float m_fReservedSupplyAmount
override void SetCallsignIndexAutomatic(int index)
SCR_CampaignFaction GetCampaignFaction()
Returns the owning faction.
ref ScriptInvokerInt m_OnSupplyRequestExecutionPriorityChanged
SCR_CoverageRadioComponent m_RadioComponent
bool ContainsGroup(SCR_AIGroup grp)
OnSupplyLimitChangedInvoker GetOnSupplyLimitChanged()
void SetReservedSupplyAmount(float value)
ref ScriptInvokerVoid m_SuppliesArrivalInvoker
static OnBaseAttackEndInvoker GetOnBaseAttackEnd()
void DisconnectFromCampaignBasesSystem()
void SpawnBuilding(ResourceName prefab, vector position, vector rotation, bool isMainTent=false)
float m_fRadioRangeDefault
static ref OnBaseStateChangedInvoker m_OnBaseUnderAttack
override void EOnInit(IEntity owner)
static const int DEFENDERS_REWARD_MULTIPLIER
static ref OnBaseCreatedAsFOBInvoker m_OnBaseCreatedasFOB
bool m_bLocalPlayerPresent
void OnServiceBuilt_AfterInit(SCR_ServicePointComponent service)
ScriptInvokerBool GetOnEnemyPresenceChanged()
ScriptInvokerInt GetOnSupplyRequestExecutionPriorityChanged()
int m_iRegularSuppliesIncomeBase
ref ScriptInvokerBool m_OnEnemyPresenceChanged
void Update(float timeSlice)
void OnRadioRangeChanged()
WorldTimestamp m_fRespawnAvailableSince
ref map< int, WorldTimestamp > m_mDefendersData
void AlterSupplyIncomeTimer(float time)
ref OnSpawnPointAssignedInvoker m_OnSpawnPointAssigned
static const int DEFENDERS_REWARD_PERIOD
void ApplyHeaderSettings(notnull SCR_CampaignCustomBase settings)
bool GetIsEntityInMyRange(notnull IEntity entity)
ref array< SCR_ERadioMsg > m_aServiceBuiltMsgQueue
string GetBaseName()
Returns the name of this base.
SCR_SpawnPoint m_SpawnPoint
static const int CONTESTED_RESPAWN_DELAY
float m_fStartingSupplies
void SetProviderEntity(notnull SCR_ServicePointComponent service)
SCR_ResourceConsumer GetResourceConsumer()
ref array< IEntity > m_aStartingVehicles
void SendHighestPriorityMessage(notnull SCR_CampaignFaction faction)
bool EvaluateEnemyCharacterPresence(notnull IEntity entity)
static OnBaseStateChangedInvoker GetOnBaseUnderAttack()
static ScriptInvokerBase< OnBaseCapturedDelegate > GetOnBaseCaptured()
ResourceName GetBuildingIconImageset()
static const int INVALID_FACTION_INDEX
float GetBaseSpawnCostFactor()
static ref OnBaseStateChangedInvoker m_OnFactionChangedExtended
void OnAttackingFactionChanged()
void ChangeRadioSettings(notnull SCR_Faction faction)
void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
Event which is triggered when the owning faction changes.
ScriptInvokerVoid GetOnSuppliesArrivalInvoker()
bool IsBeingCaptured()
Returns whether this base is being captured.
void OnBaseCreatedAsFOB(Faction establishingFaction)
Event which is triggered when creating a FOB.
void OnHasSignalChanged()
float GetReservedSupplyAmount()
WorldTimestamp m_fSuppliesArrivalTime
static OnBaseCreatedAsFOBInvoker GetOnBaseCreatedAsFOB()
void SetSupplies(float suppliesCount)
FactionKey GetBuiltFaction()
void SetBuiltFaction(notnull Faction faction)
SCR_ECampaignBaseType m_eType
void EndCapture()
Capturing has been terminated.
ScriptInvokerFloat GetOnReservedSupplyAmountChanged()
static const float BARRACKS_REDUCED_DEPLOY_COST
FactionKey m_sBuiltFaction
ref array< SCR_AmbientPatrolSpawnPointComponent > m_aRemnants
SCR_ESupplyRequestExecutionPriority m_eSupplyRequestExecutionPriority
IEntity GetBaseBuildingComposition()
void SetDefendersGroup(SCR_AIGroup grp)
bool m_bIsResupplyTaskCreationEnabled
void AddRegularSupplyPackage(notnull SCR_CampaignFaction faction)
Reinforcements timer has finished, send in reinforcements.
static const int TICK_TIME
bool CanReachByRadio(notnull IEntity entity)
static const int UNDER_ATTACK_WARNING_PERIOD
static const float SUPPLY_LIMIT_MIN
override void OnPostInit(IEntity owner)
void UpdateCaptureUI()
If the base is being captured or contested and the map is open, update the UI to show the background ...
void SupplyRequestExecutionPriorityReplicated()
void CaptureRelay(notnull SCR_CampaignFaction faction, int playerId)
static const int INVALID_PLAYER_INDEX
static const float HQ_VEHICLE_SPAWN_RADIUS
string m_sMapLocationName
SCR_TimedWaypoint m_SeekDestroyWP
void SupplyIncomeTimer(bool reset=false)
static const int ENEMY_PRESENCE_EVALUATION_PERIOD_MS
static ref ScriptInvokerBase< OnBaseCapturedDelegate > s_OnBaseCaptured
SCR_CampaignFaction m_OwningFactionPrevious
void OnEnemyPresenceChanged()
override void RegisterLogicComponent(notnull SCR_MilitaryBaseLogicComponent component)
SCR_CampaignMapUIBase GetMapUI()
WorldTimestamp GetRespawnTimestamp()
void RemoveFortifications()
SCR_CampaignMilitaryBaseMapDescriptorComponent GetMapDescriptor()
void SetBaseBuildingComposition(IEntity building)
override void SetCallsign(notnull SCR_Faction faction)
SCR_CampaignMilitaryBaseMapDescriptorComponent m_MapDescriptor
SCR_ERadioCoverageStatus GetHQRadioCoverage(notnull SCR_CampaignFaction faction)
WorldTimestamp GetSuppliesArrivalTime()
void SetAttackingFaction(int enemyFaction)
SCR_ESupplyRequestExecutionPriority GetSupplyRequestExecutionPriority()
WorldTimestamp m_fLastEnemyContactTimestamp
static const float HQ_VEHICLE_QUERY_SPACE
string GetBaseNameUpperCase()
Returns the upper-case name of this base.
void RemoveGroup(SCR_AIGroup grp)
static const int RESPAWN_DELAY_AFTER_CAPTURE
SCR_ResourceComponent GetResourceComponent()
return ResourceComponent of base
void OnServiceRemoved(notnull SCR_MilitaryBaseLogicComponent service)
void NotifyAboutEnemyAttack(notnull Faction attackingFaction)
void OnServiceBuilt(notnull SCR_ServicePointComponent service)
void OnRespawnCooldownChanged()
override void OnServiceStateChanged(SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent)
void SetSupplyRequestExecutionPriority(SCR_ESupplyRequestExecutionPriority priority)
override void OnDelete(IEntity owner)
bool IsValidTarget(notnull SCR_CampaignFaction faction)
bool BeginCapture(SCR_CampaignFaction faction, int playerID=INVALID_PLAYER_INDEX)
Capturing has begun.
void AddSupplies(int suppliesCount, bool replicate=true)
void RecalculateRadioRange()
static const int DEFENDERS_CHECK_PERIOD
override void OnCapturingFactionChanged()
Event which is triggered when the capturing faction changes.
Created in SCR_GameModeCampaign.
void RecalculateRadioCoverage(notnull SCR_CampaignFaction faction)
Determine the radio coverage of all bases (no coverage / can be reached / can respond / both ways).
void OnBaseInitialized(notnull SCR_CampaignMilitaryBaseComponent base)
int UpdateBases(bool refreshTargetCount=false)
Update the list of Conflict bases.
void OnServiceBuilt(SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent)
Takes care of Campaign-specific server <> client communication and requests.
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)
OnCaptureStateChangedInvoker GetOnCaptureStateChanged()
override void RefreshSeizingTimer()
bool GetTransform(out vector outTransform[4])
void SetTransformWithChildren(vector transform[4])
static IEntity GetMainParent(IEntity entity, bool self=false)
SCR_MilitaryBaseCallsign GetBaseCallsignByIndex(int index, int offset=0)
static sealed bool IsLoadInProgress(float msSinceLoad=1000.0)
static IEntity GetLocalControlledEntity()
Takes care of dynamic and static onscreen popups.
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 SCR_PopUpNotification GetInstance()
static bool UpdateAll(bool forceRecalculation=false)
SCR_ResourceGenerationResponse RequestGeneration(float resourceAmount, SCR_ResourceGenerator generator=null)
Spawn point entity defines positions on which players can possibly spawn.
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute
RespawnSystemComponentClass GameComponentClass vector vector rotation
proto external PlayerController GetPlayerController()
RplRole
Role of replicated node (and all items in it) within the replication system.
proto native bool IsEmpty()