Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_Faction.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_Faction
 

Typedefs

typedef func ScriptInvoker_FactionPlayableChangedMethod
 
typedef ScriptInvokerBase< ScriptInvoker_FactionPlayableChangedMethodScriptInvoker_FactionPlayableChanged
 

Functions

void ScriptInvoker_FactionPlayableChangedMethod (SCR_Faction faction, bool playable)
 
SCR_Faction ScriptedFaction BaseContainerProps ()
 
int GetOrder ()
 
bool GetCanCreateOnlyPredefinedGroups ()
 
void GetPredefinedGroups (notnull array< ref SCR_GroupPreset > groupArray)
 
ResourceName GetFlagName (int index)
 
int GetFlagNames (out array< string > flagNames)
 
ResourceName GetGroupFlagImageSet ()
 
int GetGroupFlagTextures (out array< ResourceName > textures)
 
ResourceName GetFactionFlag ()
 
ResourceName GetFactionFlagMaterial ()
 
void SetFactionFlagMaterial (ResourceName materialResource)
 
EEditableEntityLabel GetFactionLabel ()
 
SCR_FactionCallsignInfo GetCallsignInfo ()
 
Color GetOutlineFactionColor ()
 
void InitializeFaction ()
 
void SetAncestors (notnull array< string > ancestors)
 
bool IsPlayable ()
 
void InitFactionIsPlayable (bool isPlayable)
 
bool IsInherited (string factionKey)
 
void SetIsPlayable (bool isPlayable, bool killPlayersIfNotPlayable=false)
 
ScriptInvoker_FactionPlayableChanged GetOnFactionPlayableChanged ()
 
override bool DoCheckIfFactionFriendly (Faction faction)
 
void SetFactionFriendly (notnull Faction faction)
 
void SetFactionHostile (notnull Faction faction)
 
int GetPlayerCount ()
 
int GetPlayersInFaction (notnull out array< int > players)
 
string GetFactionRadioEncryptionKey ()
 
int GetFactionRadioFrequency ()
 
protected SCR_CharacterRank GetRankByID (SCR_ECharacterRank rankID)
 
string GetRankName (SCR_ECharacterRank rankID)
 
string GetRankNameUpperCase (SCR_ECharacterRank rankID)
 
string GetRankNameShort (SCR_ECharacterRank rankID)
 
string GetRankInsignia (SCR_ECharacterRank rankID)
 
SCR_EntityCatalog GetFactionEntityCatalogOfType (EEntityCatalogType catalogType)
 
int GetAllFactionEntityCatalogs (notnull out array< SCR_EntityCatalog > outEntityCatalogs)
 
override void Init (IEntity owner)
 
array< intGetBaseCallsignIndexes ()
 
SCR_MilitaryBaseCallsign GetBaseCallsignByIndex (int index, int offset=0)
 
SCR_Faction ScriptedFaction SCR_BaseContainerCustomTitleField ("m_sCallsign")
 

Variables

protected int m_iOrder
 
private ref Color m_OutlineFactionColor
 
private bool m_bIsPlayable
 
private ResourceName m_sFactionFlag
 
protected ResourceName m_FactionFlagMaterial
 
protected EEditableEntityLabel m_FactionLabel
 
protected bool m_bFriendlyToSelf
 
protected ref array< string > m_aFriendlyFactionsIds
 
protected ref SCR_FactionCallsignInfo m_CallsignInfo
 
protected ref array< ref SCR_GroupPresetm_aPredefinedGroups
 
protected bool m_bCreateOnlyPredefinedGroups
 
protected string m_sFactionRadioEncryptionKey
 
protected int m_iFactionRadioFrequency
 
protected ref array< string > m_aAncestors
 
protected ref ScriptInvoker_FactionPlayableChanged m_OnFactionPlayableChanged
 
protected ref array< ref SCR_CharacterRankm_aRanks
 
protected ref array< ref SCR_EntityCatalogm_aEntityCatalogs
 
protected ref array< ResourceName > m_aGroupFlags
 
protected ResourceName m_sGroupFlagsImageSet
 
protected ref array< string > m_aFlagNames
 
protected ref array< ref SCR_MilitaryBaseCallsign > m_aBaseCallsigns
 
protected ref map< EEntityCatalogType, ref SCR_EntityCatalogm_mEntityCatalogs = new map<EEntityCatalogType, ref SCR_EntityCatalog>()
 
protected bool m_bCatalogInitDone
 
protected ref set< Factionm_FriendlyFactions = new set<Faction>
 

Typedef Documentation

◆ ScriptInvoker_FactionPlayableChanged

◆ ScriptInvoker_FactionPlayableChangedMethod

Definition at line 2 of file SCR_Faction.c.

Function Documentation

◆ BaseContainerProps()

SCR_Faction ScriptedFaction BaseContainerProps ( )

◆ DoCheckIfFactionFriendly()

override bool BaseContainerProps::DoCheckIfFactionFriendly ( Faction  faction)

Check if provided faction is friendly

Definition at line 320 of file SCR_Faction.c.

◆ GetAllFactionEntityCatalogs()

int BaseContainerProps::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

Definition at line 547 of file SCR_Faction.c.

◆ GetBaseCallsignByIndex()

SCR_MilitaryBaseCallsign BaseContainerProps::GetBaseCallsignByIndex ( int  index,
int  offset = 0 
)
Parameters
index
offset
Returns

Definition at line 651 of file SCR_Faction.c.

◆ GetBaseCallsignIndexes()

array<int> BaseContainerProps::GetBaseCallsignIndexes ( )
Returns

Definition at line 635 of file SCR_Faction.c.

◆ GetCallsignInfo()

SCR_FactionCallsignInfo BaseContainerProps::GetCallsignInfo ( )
Returns

Definition at line 161 of file SCR_Faction.c.

◆ GetCanCreateOnlyPredefinedGroups()

bool BaseContainerProps::GetCanCreateOnlyPredefinedGroups ( )
Returns

Definition at line 85 of file SCR_Faction.c.

◆ GetFactionEntityCatalogOfType()

SCR_EntityCatalog BaseContainerProps::GetFactionEntityCatalogOfType ( EEntityCatalogType  catalogType)

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
catalogType
Returns

Definition at line 517 of file SCR_Faction.c.

◆ GetFactionFlag()

ResourceName BaseContainerProps::GetFactionFlag ( )
Returns

Definition at line 133 of file SCR_Faction.c.

◆ GetFactionFlagMaterial()

ResourceName BaseContainerProps::GetFactionFlagMaterial ( )
Returns

Definition at line 140 of file SCR_Faction.c.

◆ GetFactionLabel()

EEditableEntityLabel BaseContainerProps::GetFactionLabel ( )
Returns

Definition at line 154 of file SCR_Faction.c.

◆ GetFactionRadioEncryptionKey()

string BaseContainerProps::GetFactionRadioEncryptionKey ( )
Returns

Definition at line 425 of file SCR_Faction.c.

◆ GetFactionRadioFrequency()

int BaseContainerProps::GetFactionRadioFrequency ( )
Returns

Definition at line 432 of file SCR_Faction.c.

◆ GetFlagName()

ResourceName BaseContainerProps::GetFlagName ( int  index)
Parameters
index
Returns

Definition at line 103 of file SCR_Faction.c.

◆ GetFlagNames()

int BaseContainerProps::GetFlagNames ( out array< string >  flagNames)
Parameters
[out]flagNames
Returns

Definition at line 111 of file SCR_Faction.c.

◆ GetGroupFlagImageSet()

ResourceName BaseContainerProps::GetGroupFlagImageSet ( )
Returns

Definition at line 118 of file SCR_Faction.c.

◆ GetGroupFlagTextures()

int BaseContainerProps::GetGroupFlagTextures ( out array< ResourceName >  textures)
Parameters
[out]textures
Returns

Definition at line 126 of file SCR_Faction.c.

◆ GetOnFactionPlayableChanged()

ScriptInvoker_FactionPlayableChanged BaseContainerProps::GetOnFactionPlayableChanged ( )

Get On Playable Changed Script Invoker

Returns
ScriptInvoker_FactionPlayableChanged OnFactionPlayableChanged

Definition at line 306 of file SCR_Faction.c.

◆ GetOrder()

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

Definition at line 78 of file SCR_Faction.c.

◆ GetOutlineFactionColor()

Color BaseContainerProps::GetOutlineFactionColor ( )
Returns

Definition at line 168 of file SCR_Faction.c.

◆ GetPlayerCount()

int BaseContainerProps::GetPlayerCount ( )

Get the number of players assigned to this faction

Returns
Examples
C:/tmp/scripts_Arma_Reforger_v1.1.0.42/scripts/Game/GameMode/SCR_GameModeEditor.c.

Definition at line 365 of file SCR_Faction.c.

◆ GetPlayersInFaction()

int BaseContainerProps::GetPlayersInFaction ( notnull out array< int players)
Parameters
[out]players
Returns

Definition at line 402 of file SCR_Faction.c.

◆ GetPredefinedGroups()

void BaseContainerProps::GetPredefinedGroups ( notnull array< ref SCR_GroupPreset groupArray)
Parameters
groupArray

Definition at line 92 of file SCR_Faction.c.

◆ GetRankByID()

protected SCR_CharacterRank BaseContainerProps::GetRankByID ( SCR_ECharacterRank  rankID)

Definition at line 438 of file SCR_Faction.c.

◆ GetRankInsignia()

string BaseContainerProps::GetRankInsignia ( SCR_ECharacterRank  rankID)
Parameters
rankID
Returns

Definition at line 494 of file SCR_Faction.c.

◆ GetRankName()

string BaseContainerProps::GetRankName ( SCR_ECharacterRank  rankID)
Parameters
rankID
Returns

Definition at line 455 of file SCR_Faction.c.

◆ GetRankNameShort()

string BaseContainerProps::GetRankNameShort ( SCR_ECharacterRank  rankID)
Parameters
rankID
Returns

Definition at line 481 of file SCR_Faction.c.

◆ GetRankNameUpperCase()

string BaseContainerProps::GetRankNameUpperCase ( SCR_ECharacterRank  rankID)
Parameters
rankID
Returns

Definition at line 468 of file SCR_Faction.c.

◆ Init()

override void BaseContainerProps::Init ( IEntity  owner)

Definition at line 559 of file SCR_Faction.c.

◆ InitFactionIsPlayable()

void BaseContainerProps::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

Definition at line 212 of file SCR_Faction.c.

◆ InitializeFaction()

void BaseContainerProps::InitializeFaction ( )

Definition at line 176 of file SCR_Faction.c.

◆ IsInherited()

bool BaseContainerProps::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

Definition at line 227 of file SCR_Faction.c.

◆ IsPlayable()

bool BaseContainerProps::IsPlayable ( )

Check if the faction is playable. Non-playable factions will not appear in the respawn menu.

Returns
True when playable

Definition at line 197 of file SCR_Faction.c.

◆ SCR_BaseContainerCustomTitleField()

Returns

Definition at line 672 of file SCR_Faction.c.

◆ ScriptInvoker_FactionPlayableChangedMethod()

void ScriptInvoker_FactionPlayableChangedMethod ( SCR_Faction  faction,
bool  playable 
)

◆ SetAncestors()

void BaseContainerProps::SetAncestors ( notnull array< string >  ancestors)
Parameters
ancestors

Definition at line 182 of file SCR_Faction.c.

◆ SetFactionFlagMaterial()

void BaseContainerProps::SetFactionFlagMaterial ( ResourceName  materialResource)
Parameters
materialResource

Definition at line 147 of file SCR_Faction.c.

◆ SetFactionFriendly()

void BaseContainerProps::SetFactionFriendly ( notnull Faction  faction)

Add given faction as friendly towards this faction (Server Only) 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
factionFaction to set friendly
faction

Definition at line 335 of file SCR_Faction.c.

◆ SetFactionHostile()

void BaseContainerProps::SetFactionHostile ( notnull Faction  faction)

Remove given faction as friendly towards this faction (Server Only) 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
factionFaction to set hostile
faction

Definition at line 350 of file SCR_Faction.c.

◆ SetIsPlayable()

void BaseContainerProps::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

Definition at line 244 of file SCR_Faction.c.

Variable Documentation

◆ m_aAncestors

protected ref array<string> m_aAncestors

Definition at line 43 of file SCR_Faction.c.

◆ m_aBaseCallsigns

protected ref array<ref SCR_MilitaryBaseCallsign> m_aBaseCallsigns

Definition at line 62 of file SCR_Faction.c.

◆ m_aEntityCatalogs

protected ref array<ref SCR_EntityCatalog> m_aEntityCatalogs

Definition at line 50 of file SCR_Faction.c.

◆ m_aFlagNames

protected ref array<string> m_aFlagNames

Definition at line 59 of file SCR_Faction.c.

◆ m_aFriendlyFactionsIds

protected ref array<string> m_aFriendlyFactionsIds

Definition at line 26 of file SCR_Faction.c.

◆ m_aGroupFlags

protected ref array<ResourceName> m_aGroupFlags

Definition at line 53 of file SCR_Faction.c.

◆ m_aPredefinedGroups

protected ref array<ref SCR_GroupPreset> m_aPredefinedGroups

Definition at line 32 of file SCR_Faction.c.

◆ m_aRanks

protected ref array<ref SCR_CharacterRank> m_aRanks

Definition at line 47 of file SCR_Faction.c.

◆ m_bCatalogInitDone

protected bool m_bCatalogInitDone

Definition at line 67 of file SCR_Faction.c.

◆ m_bCreateOnlyPredefinedGroups

protected bool m_bCreateOnlyPredefinedGroups

Definition at line 35 of file SCR_Faction.c.

◆ m_bFriendlyToSelf

protected bool m_bFriendlyToSelf

Definition at line 23 of file SCR_Faction.c.

◆ m_bIsPlayable

private bool m_bIsPlayable

Definition at line 11 of file SCR_Faction.c.

◆ m_CallsignInfo

protected ref SCR_FactionCallsignInfo m_CallsignInfo

Definition at line 29 of file SCR_Faction.c.

◆ m_FactionFlagMaterial

protected ResourceName m_FactionFlagMaterial

Definition at line 17 of file SCR_Faction.c.

◆ m_FactionLabel

protected EEditableEntityLabel m_FactionLabel

Definition at line 20 of file SCR_Faction.c.

◆ m_FriendlyFactions

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

Definition at line 69 of file SCR_Faction.c.

◆ m_iFactionRadioFrequency

protected int m_iFactionRadioFrequency

Definition at line 41 of file SCR_Faction.c.

◆ m_iOrder

protected int m_iOrder

Definition at line 5 of file SCR_Faction.c.

◆ m_mEntityCatalogs

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

Definition at line 65 of file SCR_Faction.c.

◆ m_OnFactionPlayableChanged

protected ref ScriptInvoker_FactionPlayableChanged m_OnFactionPlayableChanged

Definition at line 44 of file SCR_Faction.c.

◆ m_OutlineFactionColor

private ref Color m_OutlineFactionColor

Definition at line 8 of file SCR_Faction.c.

◆ m_sFactionFlag

private ResourceName m_sFactionFlag

Definition at line 14 of file SCR_Faction.c.

◆ m_sFactionRadioEncryptionKey

protected string m_sFactionRadioEncryptionKey

Definition at line 38 of file SCR_Faction.c.

◆ m_sGroupFlagsImageSet

protected ResourceName m_sGroupFlagsImageSet

Definition at line 56 of file SCR_Faction.c.