Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_Faction Interface Reference
Inheritance diagram for SCR_Faction:
ScriptedFaction Faction SCR_CampaignFaction SCR_Faction_BIKI SCR_FreeForAllFaction

Public Member Functions

int GetOrder ()
 
bool GetCanCreateOnlyPredefinedGroups ()
 
void GetPredefinedGroups (notnull array< ref SCR_GroupPreset > groupArray)
 
ResourceName GetFlagName (int index)
 
int GetFlagNames (out array< string > flagNames)
 
ResourceName GetGroupFlagImageSet ()
 
ResourceName GetGroupFlagImageSetOutlines ()
 
int GetGroupFlagTextures (out array< ResourceName > textures)
 
ResourceName GetFactionFlag ()
 
ResourceName GetFactionFlagMaterial ()
 
void SetFactionFlagMaterial (ResourceName materialResource)
 
EEditableEntityLabel GetFactionLabel ()
 
SCR_FactionCallsignInfo GetCallsignInfo ()
 
Color GetNotificationFactionColor ()
 
Color GetNotificationTextFactionColor ()
 
Color GetOutlineFactionColor ()
 
void InitializeFaction ()
 
void SetAncestors (notnull array< string > ancestors)
 
bool IsPlayable ()
 Check if the faction is playable.
 
bool IsShownInWelcomeScreenIfNonPlayable ()
 If faction should be shown in the welcome screen if it is not playable.
 
void InitFactionIsPlayable (bool isPlayable)
 Init faction is playable.
 
bool IsInherited (string factionKey)
 Check if the faction is inherited from a faction with given faction key.
 
void SetIsPlayable (bool isPlayable, bool killPlayersIfNotPlayable=false)
 Set if the faction is playable.
 
ScriptInvoker_FactionPlayableChanged GetOnFactionPlayableChanged ()
 Get On Playable Changed Script Invoker.
 
override bool DoCheckIfFactionFriendly (Faction faction)
 Check if provided faction is friendly.
 
void SetFactionFriendly (notnull Faction faction)
 Add given faction as friendly towards this faction Called by SCR_FactionManager please use the SCR_FactionManager.SetFactionsFriendly function instead of this to make sure the setting is mirrored! If you add factionA friendly towards factionB but not the other way around then factionA will not retaliate if shot at by factionB.
 
void SetFactionHostile (notnull Faction faction)
 Remove given faction as friendly towards this faction Called by SCR_FactionManager please use the SCR_FactionManager.SetFactionsHostile function instead of this to make sure the setting is mirrored! If you add factionB hostile towards factionA but not the other way around then factionA will not retaliate if shot at by factionB.
 
int GetPlayerCount ()
 Get the number of players assigned to this faction.
 
int GetPlayersInFaction (notnull out array< int > players)
 
string GetFactionRadioEncryptionKey ()
 
int GetFactionRadioFrequency ()
 
string GetRankName (SCR_ECharacterRank rankID)
 
string GetRankNameUpperCase (SCR_ECharacterRank rankID)
 
string GetRankNameShort (SCR_ECharacterRank rankID)
 
string GetRankInsignia (SCR_ECharacterRank rankID)
 
SCR_FactionHomeTerritoryConfig GetFactionHomeTerritoryConfig ()
 
SCR_EntityCatalog GetFactionEntityCatalogOfType (EEntityCatalogType catalogType, bool printNotFound=true)
 Get Entity catalog of specific type linked to faction The catalog contains all entities part of the faction of that specific type.
 
int GetAllFactionEntityCatalogs (notnull out array< SCR_EntityCatalog > outEntityCatalogs)
 Get all entity catalogs within the faction The catalogs contain all entities part of the faction.
 
int GetFriendlyFactions (notnull out array< Faction > friendlyFactions, bool includeSelf=true)
 
override void Init (IEntity owner)
 Called when faction is initialized.
 
array< int > GetBaseCallsignIndexes ()
 
SCR_MilitaryBaseCallsign GetBaseCallsignByIndex (int index, int offset=0)
 
ResourceName GetFactionBackground ()
 
bool IsMilitary ()
 
- Public Member Functions inherited from Faction
proto external FactionIdentity GetFactionIdentity ()
 
proto external bool IsFactionFriendly (Faction otherFaction)
 Returns true if this faction and other faction are friendly.
 
proto external bool IsFactionEnemy (Faction otherFaction)
 Returns true if this faction and other faction are hostile.
 
proto external string GetFactionName ()
 Returns the name of this faction for via this Faction's UI Info.
 
proto external FactionKey GetFactionKey ()
 Returns the identifier of this faction specified in FactionManager.
 
proto ref Color GetFactionColor ()
 Returns the color of this faction specified in FactionManager.
 
proto external UIInfo GetUIInfo ()
 Returns the UI info of this faction.
 

Static Public Member Functions

static Faction GetEntityFaction (notnull IEntity entity)
 Get the provided entity's Faction.
 

Protected Member Functions

SCR_CharacterRank GetRankByID (SCR_ECharacterRank rankID)
 

Protected Attributes

int m_iOrder
 
ref Color m_OutlineFactionColor
 
ref Color m_NotificationFactionColor
 
ref Color m_NotificationTextFactionColor
 
bool m_bIsPlayable
 
bool m_bShowInWelcomeScreenIfNonPlayable
 
bool m_bIsMilitary
 
ResourceName m_FactionFlagMaterial
 
EEditableEntityLabel m_FactionLabel
 
bool m_bFriendlyToSelf
 
ref array< string > m_aFriendlyFactionsIds
 
ref SCR_FactionCallsignInfo m_CallsignInfo
 
ref array< ref SCR_GroupPresetm_aPredefinedGroups
 
bool m_bCreateOnlyPredefinedGroups
 
string m_sFactionRadioEncryptionKey
 
int m_iFactionRadioFrequency
 
ref array< string > m_aAncestors
 
ref ScriptInvoker_FactionPlayableChanged m_OnFactionPlayableChanged
 
ref array< ref SCR_CharacterRankm_aRanks
 
ref array< ref SCR_EntityCatalogm_aEntityCatalogs
 
ref array< ResourceName > m_aGroupFlags
 
ResourceName m_sGroupFlagsImageSet
 
ResourceName m_sGroupFlagsImageSetOutlines
 
ref array< string > m_aFlagNames
 
ResourceName m_sFactionBackground
 
ref array< ref SCR_MilitaryBaseCallsignm_aBaseCallsigns
 
ref SCR_FactionHomeTerritoryConfig m_FactionHomeTerritoryConfig
 
ref map< EEntityCatalogType, ref SCR_EntityCatalogm_mEntityCatalogs = new map<EEntityCatalogType, ref SCR_EntityCatalog>()
 
bool m_bCatalogInitDone
 
ref set< Factionm_FriendlyFactions = new set<Faction>
 

Member Function Documentation

◆ DoCheckIfFactionFriendly()

override bool SCR_Faction.DoCheckIfFactionFriendly ( Faction faction)

Check if provided faction is friendly.

Implements ScriptedFaction.

Implemented in SCR_FreeForAllFaction.

◆ GetAllFactionEntityCatalogs()

int SCR_Faction.GetAllFactionEntityCatalogs ( notnull out array< SCR_EntityCatalog > outEntityCatalogs)

Get all entity catalogs within the faction The catalogs contain all entities part of the faction.

Parameters
[out]Listof all catalogs within the faction
Returns
List size
Parameters
[out]outEntityCatalogs
Returns
number of result's entries

◆ GetBaseCallsignByIndex()

SCR_MilitaryBaseCallsign SCR_Faction.GetBaseCallsignByIndex ( int index,
int offset = 0 )
Parameters
index
offset
Returns

◆ GetBaseCallsignIndexes()

array< int > SCR_Faction.GetBaseCallsignIndexes ( )
Returns

◆ GetCallsignInfo()

SCR_FactionCallsignInfo SCR_Faction.GetCallsignInfo ( )
Returns

◆ GetCanCreateOnlyPredefinedGroups()

bool SCR_Faction.GetCanCreateOnlyPredefinedGroups ( )
Returns

◆ GetEntityFaction()

static Faction SCR_Faction.GetEntityFaction ( notnull IEntity entity)
static

Get the provided entity's Faction.

Parameters
entity
Returns
the entity's Faction (not SCR_Faction)

◆ GetFactionBackground()

ResourceName SCR_Faction.GetFactionBackground ( )
Returns

◆ GetFactionEntityCatalogOfType()

SCR_EntityCatalog SCR_Faction.GetFactionEntityCatalogOfType ( EEntityCatalogType catalogType,
bool printNotFound = true )

Get Entity catalog of specific type linked to faction The catalog contains all entities part of the faction of that specific type.

Parameters
catalogTypeType to get catalog of
Returns
Catalog. Can be null if not found. Note that Only one catalog of each type can be in the list
Parameters
[in]catalogTypeCatalog type to find
[in]printNotFoundTrue will print a warning if the given category was not found
Returns
Entity catalog of faction of given type

◆ GetFactionFlag()

ResourceName SCR_Faction.GetFactionFlag ( )
Returns

◆ GetFactionFlagMaterial()

ResourceName SCR_Faction.GetFactionFlagMaterial ( )
Returns

◆ GetFactionHomeTerritoryConfig()

SCR_FactionHomeTerritoryConfig SCR_Faction.GetFactionHomeTerritoryConfig ( )
Returns
Get territories config associated with the faction

◆ GetFactionLabel()

EEditableEntityLabel SCR_Faction.GetFactionLabel ( )
Returns

◆ GetFactionRadioEncryptionKey()

string SCR_Faction.GetFactionRadioEncryptionKey ( )
Returns

◆ GetFactionRadioFrequency()

int SCR_Faction.GetFactionRadioFrequency ( )
Returns

◆ GetFlagName()

ResourceName SCR_Faction.GetFlagName ( int index)
Parameters
index
Returns

◆ GetFlagNames()

int SCR_Faction.GetFlagNames ( out array< string > flagNames)
Parameters
[out]flagNames
Returns

◆ GetFriendlyFactions()

int SCR_Faction.GetFriendlyFactions ( notnull out array< Faction > friendlyFactions,
bool includeSelf = true )
Parameters
[out]friendlyFactionsList of factions friendly to this faction
[in]includeSelfIf the list should include this faction if it is friendly to itself
Returns
number of factions friendly

◆ GetGroupFlagImageSet()

ResourceName SCR_Faction.GetGroupFlagImageSet ( )
Returns

◆ GetGroupFlagImageSetOutlines()

ResourceName SCR_Faction.GetGroupFlagImageSetOutlines ( )

◆ GetGroupFlagTextures()

int SCR_Faction.GetGroupFlagTextures ( out array< ResourceName > textures)
Parameters
[out]textures
Returns

◆ GetNotificationFactionColor()

Color SCR_Faction.GetNotificationFactionColor ( )
Returns
Faction color used in notifications

◆ GetNotificationTextFactionColor()

Color SCR_Faction.GetNotificationTextFactionColor ( )
Returns
Faction color for text used in notifications

◆ GetOnFactionPlayableChanged()

ScriptInvoker_FactionPlayableChanged SCR_Faction.GetOnFactionPlayableChanged ( )

Get On Playable Changed Script Invoker.

Returns
ScriptInvoker_FactionPlayableChanged OnFactionPlayableChanged

◆ GetOrder()

int SCR_Faction.GetOrder ( )
Returns
Order in which the faction appears in the list. Lower values are first.

◆ GetOutlineFactionColor()

Color SCR_Faction.GetOutlineFactionColor ( )
Returns

◆ GetPlayerCount()

int SCR_Faction.GetPlayerCount ( )

Get the number of players assigned to this faction.

Returns

◆ GetPlayersInFaction()

int SCR_Faction.GetPlayersInFaction ( notnull out array< int > players)
Parameters
[out]players
Returns

◆ GetPredefinedGroups()

void SCR_Faction.GetPredefinedGroups ( notnull array< ref SCR_GroupPreset > groupArray)
Parameters
groupArray

◆ GetRankByID()

SCR_CharacterRank SCR_Faction.GetRankByID ( SCR_ECharacterRank rankID)
protected

◆ GetRankInsignia()

string SCR_Faction.GetRankInsignia ( SCR_ECharacterRank rankID)
Parameters
rankID
Returns

◆ GetRankName()

string SCR_Faction.GetRankName ( SCR_ECharacterRank rankID)
Parameters
rankID
Returns

◆ GetRankNameShort()

string SCR_Faction.GetRankNameShort ( SCR_ECharacterRank rankID)
Parameters
rankID
Returns

◆ GetRankNameUpperCase()

string SCR_Faction.GetRankNameUpperCase ( SCR_ECharacterRank rankID)
Parameters
rankID
Returns

◆ Init()

override void SCR_Faction.Init ( IEntity owner)

Called when faction is initialized.

Implements ScriptedFaction.

◆ InitFactionIsPlayable()

void SCR_Faction.InitFactionIsPlayable ( bool isPlayable)

Init faction is playable.

Called on Init (if server) and on server join (is Client)

Parameters
isPlayableBool to set is playable
isPlayable

◆ InitializeFaction()

void SCR_Faction.InitializeFaction ( )

◆ IsInherited()

bool SCR_Faction.IsInherited ( string factionKey)

Check if the faction is inherited from a faction with given faction key.

Parameters
factionKeyAncestor faction key
Returns
True when inherited
Parameters
factionKey
Returns

◆ IsMilitary()

bool SCR_Faction.IsMilitary ( )

◆ IsPlayable()

bool SCR_Faction.IsPlayable ( )

Check if the faction is playable.

Non-playable factions will not appear in the respawn menu.

Returns
True when playable

◆ IsShownInWelcomeScreenIfNonPlayable()

bool SCR_Faction.IsShownInWelcomeScreenIfNonPlayable ( )

If faction should be shown in the welcome screen if it is not playable.

Returns
True if it should show even if not playable otherwise hide

◆ SetAncestors()

void SCR_Faction.SetAncestors ( notnull array< string > ancestors)
Parameters
ancestors

◆ SetFactionFlagMaterial()

void SCR_Faction.SetFactionFlagMaterial ( ResourceName materialResource)
Parameters
materialResource

◆ SetFactionFriendly()

void SCR_Faction.SetFactionFriendly ( notnull Faction faction)

Add given faction as friendly towards this faction Called by SCR_FactionManager please use the SCR_FactionManager.SetFactionsFriendly function instead of this to make sure the setting is mirrored! If you add factionA friendly towards factionB but not the other way around then factionA will not retaliate if shot at by factionB.

Parameters
[in]factionFaction to set friendly

◆ SetFactionHostile()

void SCR_Faction.SetFactionHostile ( notnull Faction faction)

Remove given faction as friendly towards this faction Called by SCR_FactionManager please use the SCR_FactionManager.SetFactionsHostile function instead of this to make sure the setting is mirrored! If you add factionB hostile towards factionA but not the other way around then factionA will not retaliate if shot at by factionB.

Parameters
[in]factionFaction to set hostile

◆ SetIsPlayable()

void SCR_Faction.SetIsPlayable ( bool isPlayable,
bool killPlayersIfNotPlayable = false )

Set if the faction is playable.

Non-playable factions will not appear in the respawn menu. Note that this is not broadcasted on the SCR_Faction side

Parameters
isPlayableBool to set is playable
killPlayersIfNotPlayableBool kills all players if on server if faction is set isplayable false
isPlayable
killPlayersIfNotPlayable

Member Data Documentation

◆ m_aAncestors

ref array<string> SCR_Faction.m_aAncestors
protected

◆ m_aBaseCallsigns

ref array<ref SCR_MilitaryBaseCallsign> SCR_Faction.m_aBaseCallsigns
protected

◆ m_aEntityCatalogs

ref array<ref SCR_EntityCatalog> SCR_Faction.m_aEntityCatalogs
protected

◆ m_aFlagNames

ref array<string> SCR_Faction.m_aFlagNames
protected

◆ m_aFriendlyFactionsIds

ref array<string> SCR_Faction.m_aFriendlyFactionsIds
protected

◆ m_aGroupFlags

ref array<ResourceName> SCR_Faction.m_aGroupFlags
protected

◆ m_aPredefinedGroups

ref array<ref SCR_GroupPreset> SCR_Faction.m_aPredefinedGroups
protected

◆ m_aRanks

ref array<ref SCR_CharacterRank> SCR_Faction.m_aRanks
protected

◆ m_bCatalogInitDone

bool SCR_Faction.m_bCatalogInitDone
protected

◆ m_bCreateOnlyPredefinedGroups

bool SCR_Faction.m_bCreateOnlyPredefinedGroups
protected

◆ m_bFriendlyToSelf

bool SCR_Faction.m_bFriendlyToSelf
protected

◆ m_bIsMilitary

bool SCR_Faction.m_bIsMilitary
protected

◆ m_bIsPlayable

bool SCR_Faction.m_bIsPlayable
protected

◆ m_bShowInWelcomeScreenIfNonPlayable

bool SCR_Faction.m_bShowInWelcomeScreenIfNonPlayable
protected

◆ m_CallsignInfo

ref SCR_FactionCallsignInfo SCR_Faction.m_CallsignInfo
protected

◆ m_FactionFlagMaterial

ResourceName SCR_Faction.m_FactionFlagMaterial
protected

◆ m_FactionHomeTerritoryConfig

ref SCR_FactionHomeTerritoryConfig SCR_Faction.m_FactionHomeTerritoryConfig
protected

◆ m_FactionLabel

EEditableEntityLabel SCR_Faction.m_FactionLabel
protected

◆ m_FriendlyFactions

ref set<Faction> SCR_Faction.m_FriendlyFactions = new set<Faction>
protected

◆ m_iFactionRadioFrequency

int SCR_Faction.m_iFactionRadioFrequency
protected

◆ m_iOrder

int SCR_Faction.m_iOrder
protected

◆ m_mEntityCatalogs

ref map<EEntityCatalogType, ref SCR_EntityCatalog> SCR_Faction.m_mEntityCatalogs = new map<EEntityCatalogType, ref SCR_EntityCatalog>()
protected

◆ m_NotificationFactionColor

ref Color SCR_Faction.m_NotificationFactionColor
protected

◆ m_NotificationTextFactionColor

ref Color SCR_Faction.m_NotificationTextFactionColor
protected

◆ m_OnFactionPlayableChanged

ref ScriptInvoker_FactionPlayableChanged SCR_Faction.m_OnFactionPlayableChanged
protected

◆ m_OutlineFactionColor

ref Color SCR_Faction.m_OutlineFactionColor
protected

◆ m_sFactionBackground

ResourceName SCR_Faction.m_sFactionBackground
protected

◆ m_sFactionRadioEncryptionKey

string SCR_Faction.m_sFactionRadioEncryptionKey
protected

◆ m_sGroupFlagsImageSet

ResourceName SCR_Faction.m_sGroupFlagsImageSet
protected

◆ m_sGroupFlagsImageSetOutlines

ResourceName SCR_Faction.m_sGroupFlagsImageSetOutlines
protected

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