Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CampaignFactionCommanderPlayerComponent Interface Reference
Inheritance diagram for SCR_CampaignFactionCommanderPlayerComponent:
SCR_FactionCommanderPlayerComponent

Public Member Functions

override void OnMapOpen (MapConfiguration config)
 
override void OnMapClose (MapConfiguration config)
 
SCR_CampaignMilitaryBaseComponent GetHoveredBase ()
 
override void ClearRadialMenu ()
 
override void OnEntryHovered (SCR_SelectionMenuEntry entry, int id)
 Triggered when a radial menu entry is hovered on.
 
void CreateCampaignMilitaryBaseTask (ResourceName taskPrefab, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null, vector positionOffset=vector.Zero)
 Create campaign military base task.
 
void CheatCommander ()
 Cheat method to set a local player as commander.
 
void SetSuppliesLimit (notnull SCR_CampaignMilitaryBaseComponent base, float value)
 Sets the supply limit for a given campaign military base.
 
void SetReservedSupplyAmount (notnull SCR_CampaignMilitaryBaseComponent base, float value)
 Sets the reserved supply amount for a specified campaign military base.
 
void SetSupplyRequestExecutionPriority (notnull SCR_CampaignMilitaryBaseComponent base, int priority)
 Sets the supply request execution priority for a specified campaign military base.
 
- Public Member Functions inherited from SCR_FactionCommanderPlayerComponent
SCR_FactionCommanderMenuEntry GetConfigForEntry (notnull SCR_SelectionMenuEntry entry)
 
void SetReplaceCommanderCooldownTimestamp (WorldTimestamp timeStamp)
 
WorldTimestamp GetReplaceCommanderCooldownTimestamp ()
 
void OnCommanderRightsGained ()
 
void OnCommanderRightsLost ()
 
void SetNextVolunteeringTimestamp (WorldTimestamp timestamp)
 
WorldTimestamp GetNextVolunteeringTimestamp ()
 
void CreateRequestedTask (string taskPrefab, vector position, int requesterGroupId, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null)
 Create requested task.
 
void CreateTask (ResourceName taskPrefab, vector position, SCR_AIGroup group, int playerId, SCR_FactionCommanderBaseMenuHandler handler=null)
 Create task.
 
void AssignGroupToTask (int groupId, string taskId, int requesterID)
 
void CancelTask (int playerId, string taskId)
 
void FinishTask (int playerId, string taskId)
 Finish task.
 
void OnOwnershipChanged (bool changing, bool becameOwner)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Static Public Member Functions

static SCR_CampaignFactionCommanderPlayerComponent GetLocalCampaignCommanderComponent ()
 
- Static Public Member Functions inherited from SCR_FactionCommanderPlayerComponent
static int GenerateTaskID ()
 
static bool IsLocalPlayerCommander ()
 

Static Public Attributes

static const string CAMPAIGN_MILITARY_BASE_TASK_ID = "%1_CampaignMilitaryBaseTask_%2_%3"
 
- Static Public Attributes inherited from SCR_FactionCommanderPlayerComponent
static const string TASK_ID = "%1_Task_%2"
 
static const string REQUESTED_TASK_ID = "%1_RequestedTask_%2"
 

Protected Member Functions

SCR_CommanderGraphLinesData GetGraphLinesData ()
 
void OnBaseHovered (SCR_CampaignMilitaryBaseComponent base)
 
override void OnRadialMenuBeforeOpen ()
 Called each time the radial menu is before open in the map.
 
void LinkBaseWithGroup (notnull SCR_AIGroup group)
 Draw a map link from a base to a group leader.
 
void ClearAllLinks ()
 Remove all existing map links.
 
void RpcAsk_CreateCampaignMilitaryBaseTask (ResourceName taskPrefab, int assigneeId, int factionIndex, int playerId, int data, int baseCallsign, vector positionOffset)
 
void RpcAsk_CheatCommander (int playerId)
 
void RpcAsk_SetSuppliesLimit (int baseCallsign, float value)
 
void RpcAsk_SetReservedSupplyAmount (int baseCallsign, float value)
 
void RpcAsk_SetSupplyRequestExecutionPriority (int baseCallsign, int priority)
 
- Protected Member Functions inherited from SCR_FactionCommanderPlayerComponent
SCR_SelectionMenuEntry GetEntryByName (string name)
 
SCR_AIGroup GetAssignedGroup (SCR_SelectionMenuEntry entry)
 Returns a group associated with given entry.
 
void AddRequestOrder (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 
void AddCreateObjectiveOrder (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 
void FillMenuWithGroups (SCR_SelectionMenuCategoryEntry category, notnull SCR_FactionCommanderBaseMenuHandler handler)
 Adds all groups of Commander's faction under a given category as menu entries.
 
string GetGroupEntryDisplayName (SCR_AIGroup group)
 Returns the display name to be shown in radial menu for the given group.
 
void GetGroupEntryIconData (SCR_AIGroup group, out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the given group and category.
 
string GetDefaultGroupOrderIcon ()
 
string GetRequestOrderEntryDisplayName ()
 Returns the display name to be shown in radial menu for the Request order category.
 
void GetRequestOrderEntryIconData (out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the Faction order category.
 
string GetDefaultRequestOrderIcon ()
 
string GetCreateObjectiveOrderEntryDisplayName ()
 Returns the display name to be shown in radial menu for the create objective order.
 
void GetCreateObjectiveOrderEntryIconData (out ResourceName imagesetName, out string iconName)
 Returns the imageset and icon name to be shown in radial menu for the create objective order.
 
string GetDefaultCreateObjectiveOrderIcon ()
 
void OnContextualMenuInit ()
 Called when opening the radial menu for the first time after opening the map.
 
void CreateConfigEntries ()
 Adds entries as defined in the hierarchy config (stored in SCR_Faction)
 
void CreateConfigEntry (notnull SCR_FactionCommanderMenuEntry configEntry, SCR_SelectionMenuCategoryEntry parentCategory, SCR_FactionCommanderMenuEntry rootConfigEntry)
 Creates a radial menu entry from config data SCR_FactionCommanderMenuEntry.
 
void CreateConfigCategory (notnull SCR_FactionCommanderMenuEntry configEntry, SCR_SelectionMenuCategoryEntry parentCategory, notnull array< ref SCR_FactionCommanderMenuEntry > childEntries, SCR_FactionCommanderMenuEntry rootConfigEntry)
 Creates a radial menu category from config data (SCR_FactionCommanderMenuEntry)
 
void OnRadialMenuOpen ()
 Called each time the radial menu is open in the map.
 
void OnRadialMenuClose ()
 Called each time the radial menu is closed in the map.
 
void OnCommandPerformed (SCR_SelectionMenuEntry element, float[] worldPos)
 Called when a radial menu action is triggered.
 
void RpcAsk_CreateRequestedTask (string taskPrefab, vector destination, int requesterGroupId, int assigneeId, int playerId)
 
void RpcAsk_CreateTask (string taskPrefab, int assigneeId, int playerId, vector destination, int factionIndex, int data)
 
void RpcAsk_AssignGroupToTask (int groupId, string taskId, int requesterID)
 
void RpcAsk_CancelTask (int playerId, string taskId)
 
void RpcAsk_FinishTask (int playerId, string taskId)
 
void OnTaskHovered (SCR_Task task)
 
bool IsTaskValid (SCR_Task task)
 
void ProcessEvents (bool activate)
 

Protected Attributes

SCR_CampaignMilitaryBaseComponent m_HoveredBase
 
SCR_CampaignMilitaryBaseComponent m_CurrentHoveredBase
 
bool m_bMustClearHoveredBase
 
ref array< MapLinkm_aMapLinks = {}
 
- Protected Attributes inherited from SCR_FactionCommanderPlayerComponent
bool m_bMenuVisible
 
SCR_MapRadialUI m_MapContextualMenu
 
SCR_RadialMenu m_RadialMenu
 
SCR_PlayerController m_PlayerController
 
SCR_MapEntity m_MapEntity
 
IEntity m_HoveredEntity
 
SCR_Task m_HoveredTask
 
SCR_Task m_CurrentHoveredTask
 
IEntity m_CurrentHoveredEntity
 
ref map< string, SCR_SelectionMenuEntrym_mEntryNames = new map<string, SCR_SelectionMenuEntry>()
 
ref map< SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntrym_mEntryParents = new map<SCR_SelectionMenuEntry, SCR_SelectionMenuCategoryEntry>()
 
ref map< SCR_SelectionMenuEntry, SCR_AIGroupm_mEntryGroups = new map<SCR_SelectionMenuEntry, SCR_AIGroup>()
 
ref map< SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandlerm_mEntryHandlers = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderBaseMenuHandler>()
 
ref map< SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntrym_mTaskRootMenuEntries = new map<SCR_SelectionMenuEntry, ref SCR_FactionCommanderMenuEntry>()
 
WorldTimestamp m_fNextVolunteeringAvailableAt
 
SCR_MapCursorModule m_MapCursorModule
 
bool m_bShouldClearHoveredTask
 
WorldTimestamp m_ReplaceCommanderCooldown
 
SCR_GroupTaskManagerComponent m_GroupTaskManager
 

Additional Inherited Members

- Static Protected Attributes inherited from SCR_FactionCommanderPlayerComponent
static int s_iLastGeneratedTaskId
 

Member Function Documentation

◆ CheatCommander()

void SCR_CampaignFactionCommanderPlayerComponent.CheatCommander ( )

Cheat method to set a local player as commander.

◆ ClearAllLinks()

void SCR_CampaignFactionCommanderPlayerComponent.ClearAllLinks ( )
protected

Remove all existing map links.

◆ ClearRadialMenu()

override void SCR_CampaignFactionCommanderPlayerComponent.ClearRadialMenu ( )

◆ CreateCampaignMilitaryBaseTask()

void SCR_CampaignFactionCommanderPlayerComponent.CreateCampaignMilitaryBaseTask ( ResourceName taskPrefab,
SCR_AIGroup group,
int playerId,
SCR_FactionCommanderBaseMenuHandler handler = null,
vector positionOffset = vector::Zero )

Create campaign military base task.

Parameters
[in]taskPrefab
[in]group
[in]playerId
[in]handler
[in]positionOffset

◆ GetGraphLinesData()

SCR_CommanderGraphLinesData SCR_CampaignFactionCommanderPlayerComponent.GetGraphLinesData ( )
protected

◆ GetHoveredBase()

SCR_CampaignMilitaryBaseComponent SCR_CampaignFactionCommanderPlayerComponent.GetHoveredBase ( )

◆ GetLocalCampaignCommanderComponent()

static SCR_CampaignFactionCommanderPlayerComponent SCR_CampaignFactionCommanderPlayerComponent.GetLocalCampaignCommanderComponent ( )
static

◆ LinkBaseWithGroup()

void SCR_CampaignFactionCommanderPlayerComponent.LinkBaseWithGroup ( notnull SCR_AIGroup group)
protected

Draw a map link from a base to a group leader.

◆ OnBaseHovered()

void SCR_CampaignFactionCommanderPlayerComponent.OnBaseHovered ( SCR_CampaignMilitaryBaseComponent base)
protected

◆ OnEntryHovered()

override void SCR_CampaignFactionCommanderPlayerComponent.OnEntryHovered ( SCR_SelectionMenuEntry entry,
int id )

Triggered when a radial menu entry is hovered on.

Implements SCR_FactionCommanderPlayerComponent.

◆ OnMapClose()

override void SCR_CampaignFactionCommanderPlayerComponent.OnMapClose ( MapConfiguration config)

◆ OnMapOpen()

override void SCR_CampaignFactionCommanderPlayerComponent.OnMapOpen ( MapConfiguration config)

◆ OnRadialMenuBeforeOpen()

override void SCR_CampaignFactionCommanderPlayerComponent.OnRadialMenuBeforeOpen ( )
protected

Called each time the radial menu is before open in the map.

Implements SCR_FactionCommanderPlayerComponent.

◆ RpcAsk_CheatCommander()

void SCR_CampaignFactionCommanderPlayerComponent.RpcAsk_CheatCommander ( int playerId)
protected

◆ RpcAsk_CreateCampaignMilitaryBaseTask()

void SCR_CampaignFactionCommanderPlayerComponent.RpcAsk_CreateCampaignMilitaryBaseTask ( ResourceName taskPrefab,
int assigneeId,
int factionIndex,
int playerId,
int data,
int baseCallsign,
vector positionOffset )
protected

◆ RpcAsk_SetReservedSupplyAmount()

void SCR_CampaignFactionCommanderPlayerComponent.RpcAsk_SetReservedSupplyAmount ( int baseCallsign,
float value )
protected

◆ RpcAsk_SetSuppliesLimit()

void SCR_CampaignFactionCommanderPlayerComponent.RpcAsk_SetSuppliesLimit ( int baseCallsign,
float value )
protected

◆ RpcAsk_SetSupplyRequestExecutionPriority()

void SCR_CampaignFactionCommanderPlayerComponent.RpcAsk_SetSupplyRequestExecutionPriority ( int baseCallsign,
int priority )
protected

◆ SetReservedSupplyAmount()

void SCR_CampaignFactionCommanderPlayerComponent.SetReservedSupplyAmount ( notnull SCR_CampaignMilitaryBaseComponent base,
float value )

Sets the reserved supply amount for a specified campaign military base.

Parameters
[in]baseReference to the campaign military base for which the reserved supply amount is set.
[in]valueThe new value to assign as the reserved supply amount for the base.

◆ SetSuppliesLimit()

void SCR_CampaignFactionCommanderPlayerComponent.SetSuppliesLimit ( notnull SCR_CampaignMilitaryBaseComponent base,
float value )

Sets the supply limit for a given campaign military base.

Parameters
[in]baseReference to the campaign military base whose supply limit will be set.
[in]valueThe new supply limit to assign to the base.

◆ SetSupplyRequestExecutionPriority()

void SCR_CampaignFactionCommanderPlayerComponent.SetSupplyRequestExecutionPriority ( notnull SCR_CampaignMilitaryBaseComponent base,
int priority )

Sets the supply request execution priority for a specified campaign military base.

Parameters
[in]baseReference to the campaign military base whose supply request priority will be set.
[in]priorityThe new execution priority to assign to the base.

Member Data Documentation

◆ CAMPAIGN_MILITARY_BASE_TASK_ID

const string SCR_CampaignFactionCommanderPlayerComponent.CAMPAIGN_MILITARY_BASE_TASK_ID = "%1_CampaignMilitaryBaseTask_%2_%3"
static

◆ m_aMapLinks

ref array<MapLink> SCR_CampaignFactionCommanderPlayerComponent.m_aMapLinks = {}
protected

◆ m_bMustClearHoveredBase

bool SCR_CampaignFactionCommanderPlayerComponent.m_bMustClearHoveredBase
protected

◆ m_CurrentHoveredBase

SCR_CampaignMilitaryBaseComponent SCR_CampaignFactionCommanderPlayerComponent.m_CurrentHoveredBase
protected

◆ m_HoveredBase

SCR_CampaignMilitaryBaseComponent SCR_CampaignFactionCommanderPlayerComponent.m_HoveredBase
protected

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