Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_IdentityManagerComponent Interface Reference
Inheritance diagram for SCR_IdentityManagerComponent:
SCR_BaseGameModeComponent

Public Member Functions

int GetBioGroupIndexFromID (SCR_EIdentityType identityType, string bioGroupID)
 Go over all groups and returns group index with given ID string.
 
SCR_IdentityBio GetBioFromIndexes (IEntity entity, SCR_EIdentityType identityType, int bioGroupIndex, int bioIndex)
 Get bio from given indexes.
 
int CombineBioIndexes (int bioGroupIndex, int bioIndex)
 Combine Bio group index and Bio index into one int for optimized replication.
 
void GetBioIndexesFromCombined (int combinedIndexes, out int bioGroupIndex, out int bioIndex)
 Get the combined bio index and seperate the group and the entry index.
 
int GetValidBioGroups (IEntity entity, SCR_EIdentityType identityType, int factionIndex, notnull array< ref SCR_IdentityBioGroupConfig > validBioGroups)
 Get list of all valid bio's for given info (Server only)
 
SCR_IdentityBio AssignRandomAvailableBio (RandomGenerator randomizer, IEntity entity, SCR_EIdentityType identityType, int factionIndex, out int bioGroupIndex, out int bioIndex, bool useRandomWeighted=true)
 Assign a random valid bio.
 
SCR_IdentityBio AssignBioManually (IEntity entity, SCR_EIdentityType identityType, int bioGroupIndex, int bioIndex)
 Assign a specific given Bio.
 
bool GetCreationdayString (SCR_ExtendedIdentityComponent identityComponent, out string format, out string day, out string month, out string year, out string age)
 Get date of character's birth.
 
bool IsCreationDay (SCR_ExtendedIdentityComponent identityComponent)
 Check if today (ingame) is the characters birthday.
 
int GetYearOfCreation (SCR_ExtendedIdentityComponent identityComponent)
 Get year of birth using character age and current year param[in] identityComponent Identity Component to get info from.
 
override void OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
 When a controllable entity is destroyed, this event is raised.
 
bool GetDeathDateAndTimeString (SCR_ExtendedCharacterIdentityComponent identityComponent, out string formatDate, out string dayString, out string monthString, out string yearString, out string time)
 Get date and time of character's death.
 
int GetRandomBloodTypeIndex (RandomGenerator randomizer=null, bool useWeightedRandom=true)
 Get bloodtype index, either random or weighted random.
 
SCR_UIInfo GetBloodTypeUIInfo (SCR_EBloodType bloodType)
 Get bloodtype index Ui Info.
 
override bool PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
void OnCharacterBecomeUnconscious (IEntity character)
 
bool HasIdentityItemGenerationType (SCR_EIdentityItemGenerationType type)
 
bool IsIdentityItemSlotEnabled ()
 
bool IsGenerateValuableIntelEnabled ()
 
bool ShowPlayerNameOnIdentityItem ()
 
override void OnPlayerConnected (int playerId)
 Called after a player is connected.
 
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 Called after a player is disconnected.
 
void OnValuableIntelHandIn_S (notnull PlayerController playerController)
 Called when Valuable intel is handed in param[in] playerController Player controller of player who handed in the valuable intel.
 
void ShowHint (EHint hintType)
 Show Extended Identity specific hints.
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
- Public Member Functions inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode GetGameMode ()
 
void OnGameEnd ()
 Called on all machines when the world ends.
 
void OnGameStateChanged (SCR_EGameModeState state)
 Called when game mode state changes called on all machines.
 
void OnGameModeStart ()
 Called on every machine when game mode starts.
 
void OnGameModeEnd (SCR_GameModeEndData data)
 Called when game mode ends.
 
void OnPlayerAuditSuccess (int playerId)
 Event is called when player connecting Session hosting current Game Mode where is required authentication verification via.
 
void OnPlayerAuditFail (int playerId)
 Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc.
 
void OnPlayerAuditTimeouted (int playerId)
 Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled.
 
void OnPlayerAuditRevived (int playerId)
 Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed).
 
void OnPlayerRegistered (int playerId)
 Called on every machine after a player is registered (identity, name etc.).
 
void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 Called after a player is spawned.
 
void OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason)
 
void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 See SCR_BaseGameMode.HandlePlayerKilled.
 
void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
 Called after a player gets killed.
 
void OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour.
 
void OnPlayerDeleted (int playerId, IEntity player)
 Called after a player gets deleted.
 
void OnPlayerRoleChange (int playerId, EPlayerRole roleFlags)
 Called when player role changes.
 
void OnWorldPostProcess (World world)
 Called once loading of all entities of the world have been finished (still within the loading)
 
void HandleOnLoadoutAssigned (int playerID, SCR_BasePlayerLoadout assignedLoadout)
 What happens when a player is assigned a loadout.
 
void HandleOnFactionAssigned (int playerID, Faction assignedFaction)
 What happens when a player is assigned a faction.
 
void HandleOnSpawnPointAssigned (int playerID, SCR_SpawnPoint spawnPoint)
 What happens when a player is assigned a spawn point.
 
void OnControllableSpawned (IEntity entity)
 When a controllable entity is spawned, this event is raised.
 
void OnControllableDeleted (IEntity entity)
 Prior to a controllable entity being DELETED, this event is raised.
 
void SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Static Public Member Functions

static SCR_IdentityManagerComponent GetInstance ()
 
static bool Static_IsGenerateValuableIntelEnabled ()
 

Public Attributes

int m_DebugRandomizeSeedOverwrite
 
int m_DebugBioGroupIndexOverwrite
 
int m_DebugBioIndexOverwrite
 

Static Public Attributes

static const int MAX_IDENTITY_GROUPS = 9999
 
static const int MAX_IDENTITY_ENTRIES = 99999
 

Protected Member Functions

SCR_IdentityBioTypeHolderConfig GetIdentityBioHolder (SCR_EIdentityType identityType)
 
void SpawnIdentityItemInInventory_S (ChimeraCharacter character, bool checkIfHadSpawnedIdentityItem=true)
 
void OnCharacterPossessed (IEntity entity)
 
void OnValuableIntelHandIn_RPL (int playerID)
 

Protected Attributes

LocalizedString m_sBirthDateFormat
 
LocalizedString m_sDateDeathFormat
 
ResourceName m_sCharacterIdentityBloodTypeConfig
 
ref array< ResourceName > m_aIdentityBioTypeHoldersConfigs
 
SCR_EIdentityItemGenerationType m_eIdentityItemGenerationType
 
bool m_bEnableIdentityItemSlot
 
bool m_bGenerateValuableIntel
 
bool m_bShowPlayerNameOnIdentityItem
 
ref SCR_GeneralHintStorage m_ExtendedIdentityHints
 
ref array< ref SCR_IdentityBioTypeHolderConfigm_aIdentityBioTypeHolders = {}
 
ref SCR_BloodTypeHolderConfig m_BloodTypeHolder
 
TimeAndWeatherManagerEntity m_TimeAndWeatherManager
 
SCR_FactionManager m_FactionManager
 
- Protected Attributes inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode m_pGameMode
 The game mode entity this component is attached to.
 

Static Protected Attributes

static SCR_IdentityManagerComponent m_sInstance
 
const string HAND_IN_VALUABLE_INTEL_SOUNDEVENT = "SOUND_DEPOSITINTEL"
 

Member Function Documentation

◆ AssignBioManually()

SCR_IdentityBio SCR_IdentityManagerComponent.AssignBioManually ( IEntity entity,
SCR_EIdentityType identityType,
int bioGroupIndex,
int bioIndex )

Assign a specific given Bio.

Makes sure that it is still removed from Available bio's so it cannot be randomized (if bio group has weight) (Server Only) This Function allows duplicate bio's even unique once. And allows Bio's that are not valid for randomization to be assigned NOTE: Gender specific bio's require the given entity to be the specific Gender AND the index to be += SCR_IdentityBioGroupConfig.m_aIdentityList.()!

Parameters
[in]identityTypeIdentity type to obtain Bio info from
[in]bioGroupIndexgroup index to assign bio from
[in]bioIndexBio index within group to assign
Returns
the Assigned Bio

◆ AssignRandomAvailableBio()

SCR_IdentityBio SCR_IdentityManagerComponent.AssignRandomAvailableBio ( RandomGenerator randomizer,
IEntity entity,
SCR_EIdentityType identityType,
int factionIndex,
out int bioGroupIndex,
out int bioIndex,
bool useRandomWeighted = true )

Assign a random valid bio.

(Server Only) NOTE! Make sure that the randomizer used for server and clients use the same seeds and are called at the same time! Else there will be a missmatch in data

Parameters
[in]useRandomWeightedIf false will ignore weights in randomization (Will never randomize groups that have no weight assigned)
[in]identityTypeIdentity type to obtain Bio info from
[in]factionIndexChecks all groups that allow given faction
[out]bioGroupIndexIndex of Bio Group
[out]bioIndexIndex of Bio within group
[in]randomizerRandomGenerator to use in randomization. Leave null to not use seeded randomization
Returns
Character bio that was assigned

◆ CombineBioIndexes()

int SCR_IdentityManagerComponent.CombineBioIndexes ( int bioGroupIndex,
int bioIndex )

Combine Bio group index and Bio index into one int for optimized replication.

Parameters
[in]bioGroupIndexgroup index
[in]bioIndexentry index
Returns
Combined index

◆ EOnInit()

override void SCR_IdentityManagerComponent.EOnInit ( IEntity owner)

◆ GetBioFromIndexes()

SCR_IdentityBio SCR_IdentityManagerComponent.GetBioFromIndexes ( IEntity entity,
SCR_EIdentityType identityType,
int bioGroupIndex,
int bioIndex )

Get bio from given indexes.

Parameters
[in]entityEntity linked to bio
[in]identityTypeIdentity type to obtain Bio info from
[in]bioGroupIndexgroup index
[in]bioIndexentry index
Returns
Bio

◆ GetBioGroupIndexFromID()

int SCR_IdentityManagerComponent.GetBioGroupIndexFromID ( SCR_EIdentityType identityType,
string bioGroupID )

Go over all groups and returns group index with given ID string.

Parameters
[in]identityTypeIdentity type to obtain Bio info from
[in]groupID
Returns
Index of group, Returns -1 if not found

◆ GetBioIndexesFromCombined()

void SCR_IdentityManagerComponent.GetBioIndexesFromCombined ( int combinedIndexes,
out int bioGroupIndex,
out int bioIndex )

Get the combined bio index and seperate the group and the entry index.

Parameters
[in]Combinedindex
[out]bioGroupIndexgroup index
[out]bioIndexentry index

◆ GetBloodTypeUIInfo()

SCR_UIInfo SCR_IdentityManagerComponent.GetBloodTypeUIInfo ( SCR_EBloodType bloodType)

Get bloodtype index Ui Info.

Parameters
[in]indexIndex of bloodtype
Returns
Ui Info

◆ GetCreationdayString()

bool SCR_IdentityManagerComponent.GetCreationdayString ( SCR_ExtendedIdentityComponent identityComponent,
out string format,
out string day,
out string month,
out string year,
out string age )

Get date of character's birth.

Parameters
[in]identityComponentIdentity Component to get Birthday from
[out]formatFormat of birthday/creationday
[out]dayDay of birth/creation
[out]monthMonth of of Birth/creation
[out]agestring
[out]yearYear of birth/creation using character age and current year
Returns
False if does not have creation string

◆ GetDeathDateAndTimeString()

bool SCR_IdentityManagerComponent.GetDeathDateAndTimeString ( SCR_ExtendedCharacterIdentityComponent identityComponent,
out string formatDate,
out string dayString,
out string monthString,
out string yearString,
out string time )

Get date and time of character's death.

Will return -1 if character has not died yet.

Parameters
[in]identityComponentIdentity Component to get Birthday from
[out]formatDateFormat of date
[out]dayStringDay of death
[out]monthStringMonth of of death
[out]yearStringYear of of death
[out]timeTime of death (Not included in Format in default format settings)
Returns
False if did not have a death date or time

◆ GetIdentityBioHolder()

SCR_IdentityBioTypeHolderConfig SCR_IdentityManagerComponent.GetIdentityBioHolder ( SCR_EIdentityType identityType)
protected

◆ GetInstance()

static SCR_IdentityManagerComponent SCR_IdentityManagerComponent.GetInstance ( )
static

◆ GetRandomBloodTypeIndex()

int SCR_IdentityManagerComponent.GetRandomBloodTypeIndex ( RandomGenerator randomizer = null,
bool useWeightedRandom = true )

Get bloodtype index, either random or weighted random.

Parameters
[in]randomizerIf set will use given generator to use sseded randomization
[in]useWeightedRandomIf true will use weighted random
Returns
Blood index

◆ GetValidBioGroups()

int SCR_IdentityManagerComponent.GetValidBioGroups ( IEntity entity,
SCR_EIdentityType identityType,
int factionIndex,
notnull array< ref SCR_IdentityBioGroupConfig > validBioGroups )

Get list of all valid bio's for given info (Server only)

Parameters
[in]identityTypeIdentity type to obtain Bio info from
[in]factionIndexChecks all groups that allow given faction
[out]validBioGroupsList of all valid Bio groups
Returns
Count of all valid bio's

◆ GetYearOfCreation()

int SCR_IdentityManagerComponent.GetYearOfCreation ( SCR_ExtendedIdentityComponent identityComponent)

Get year of birth using character age and current year param[in] identityComponent Identity Component to get info from.

Returns
Birth year

◆ HasIdentityItemGenerationType()

bool SCR_IdentityManagerComponent.HasIdentityItemGenerationType ( SCR_EIdentityItemGenerationType type)
Parameters
[in]typeType to check
Returns
If identity item generation type is true

◆ IsCreationDay()

bool SCR_IdentityManagerComponent.IsCreationDay ( SCR_ExtendedIdentityComponent identityComponent)

Check if today (ingame) is the characters birthday.

Parameters
[in]identityComponentIdentity Component to get Birthday/creation day from
Returns
True if it is currently the characters birthday/Entities creation day

◆ IsGenerateValuableIntelEnabled()

bool SCR_IdentityManagerComponent.IsGenerateValuableIntelEnabled ( )
Returns
If identity items will be generated with valuable intel

◆ IsIdentityItemSlotEnabled()

bool SCR_IdentityManagerComponent.IsIdentityItemSlotEnabled ( )
Returns
If identity item slot is enabled

◆ OnCharacterBecomeUnconscious()

void SCR_IdentityManagerComponent.OnCharacterBecomeUnconscious ( IEntity character)

◆ OnCharacterPossessed()

void SCR_IdentityManagerComponent.OnCharacterPossessed ( IEntity entity)
protected

◆ OnControllableDestroyed()

override void SCR_IdentityManagerComponent.OnControllableDestroyed ( notnull SCR_InstigatorContextData instigatorContextData)

When a controllable entity is destroyed, this event is raised.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer

Implements SCR_BaseGameModeComponent.

◆ OnPlayerConnected()

override void SCR_IdentityManagerComponent.OnPlayerConnected ( int playerId)

Called after a player is connected.

Server-only.

Parameters
[in]playerIdPlayerId of connected player.

Implements SCR_BaseGameModeComponent.

◆ OnPlayerDisconnected()

override void SCR_IdentityManagerComponent.OnPlayerDisconnected ( int playerId,
KickCauseCode cause,
int timeout )

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

Implements SCR_BaseGameModeComponent.

◆ OnPostInit()

override void SCR_IdentityManagerComponent.OnPostInit ( IEntity owner)

◆ OnValuableIntelHandIn_RPL()

void SCR_IdentityManagerComponent.OnValuableIntelHandIn_RPL ( int playerID)
protected

◆ OnValuableIntelHandIn_S()

void SCR_IdentityManagerComponent.OnValuableIntelHandIn_S ( notnull PlayerController playerController)

Called when Valuable intel is handed in param[in] playerController Player controller of player who handed in the valuable intel.

◆ PreparePlayerEntity_S()

override bool SCR_IdentityManagerComponent.PreparePlayerEntity_S ( SCR_SpawnRequestComponent requestComponent,
SCR_SpawnHandlerComponent handlerComponent,
SCR_SpawnData data,
IEntity entity )
Parameters
[in]requestComponent
[in]handlerComponent
[in]data
[in]entity
Returns

Implements SCR_BaseGameModeComponent.

◆ ShowHint()

void SCR_IdentityManagerComponent.ShowHint ( EHint hintType)

Show Extended Identity specific hints.

No hints set

No hint manager

Show the hint

◆ ShowPlayerNameOnIdentityItem()

bool SCR_IdentityManagerComponent.ShowPlayerNameOnIdentityItem ( )
Returns
If identity items will show the bio name or player name

◆ SpawnIdentityItemInInventory_S()

void SCR_IdentityManagerComponent.SpawnIdentityItemInInventory_S ( ChimeraCharacter character,
bool checkIfHadSpawnedIdentityItem = true )
protected

◆ Static_IsGenerateValuableIntelEnabled()

static bool SCR_IdentityManagerComponent.Static_IsGenerateValuableIntelEnabled ( )
static
Returns
If identity items will be generated with valuable intel

Member Data Documentation

◆ HAND_IN_VALUABLE_INTEL_SOUNDEVENT

const string SCR_IdentityManagerComponent.HAND_IN_VALUABLE_INTEL_SOUNDEVENT = "SOUND_DEPOSITINTEL"
staticprotected

◆ m_aIdentityBioTypeHolders

ref array<ref SCR_IdentityBioTypeHolderConfig> SCR_IdentityManagerComponent.m_aIdentityBioTypeHolders = {}
protected

◆ m_aIdentityBioTypeHoldersConfigs

ref array<ResourceName> SCR_IdentityManagerComponent.m_aIdentityBioTypeHoldersConfigs
protected

◆ m_bEnableIdentityItemSlot

bool SCR_IdentityManagerComponent.m_bEnableIdentityItemSlot
protected

◆ m_bGenerateValuableIntel

bool SCR_IdentityManagerComponent.m_bGenerateValuableIntel
protected

◆ m_BloodTypeHolder

ref SCR_BloodTypeHolderConfig SCR_IdentityManagerComponent.m_BloodTypeHolder
protected

◆ m_bShowPlayerNameOnIdentityItem

bool SCR_IdentityManagerComponent.m_bShowPlayerNameOnIdentityItem
protected

◆ m_DebugBioGroupIndexOverwrite

int SCR_IdentityManagerComponent.m_DebugBioGroupIndexOverwrite

◆ m_DebugBioIndexOverwrite

int SCR_IdentityManagerComponent.m_DebugBioIndexOverwrite

◆ m_DebugRandomizeSeedOverwrite

int SCR_IdentityManagerComponent.m_DebugRandomizeSeedOverwrite

◆ m_eIdentityItemGenerationType

SCR_EIdentityItemGenerationType SCR_IdentityManagerComponent.m_eIdentityItemGenerationType
protected

◆ m_ExtendedIdentityHints

ref SCR_GeneralHintStorage SCR_IdentityManagerComponent.m_ExtendedIdentityHints
protected

◆ m_FactionManager

SCR_FactionManager SCR_IdentityManagerComponent.m_FactionManager
protected

◆ m_sBirthDateFormat

LocalizedString SCR_IdentityManagerComponent.m_sBirthDateFormat
protected

◆ m_sCharacterIdentityBloodTypeConfig

ResourceName SCR_IdentityManagerComponent.m_sCharacterIdentityBloodTypeConfig
protected

◆ m_sDateDeathFormat

LocalizedString SCR_IdentityManagerComponent.m_sDateDeathFormat
protected

◆ m_sInstance

SCR_IdentityManagerComponent SCR_IdentityManagerComponent.m_sInstance
staticprotected

◆ m_TimeAndWeatherManager

TimeAndWeatherManagerEntity SCR_IdentityManagerComponent.m_TimeAndWeatherManager
protected

◆ MAX_IDENTITY_ENTRIES

const int SCR_IdentityManagerComponent.MAX_IDENTITY_ENTRIES = 99999
static

◆ MAX_IDENTITY_GROUPS

const int SCR_IdentityManagerComponent.MAX_IDENTITY_GROUPS = 9999
static

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