Arma Reforger Script API
|
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) |
![]() | |
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_IdentityBioTypeHolderConfig > | m_aIdentityBioTypeHolders = {} |
ref SCR_BloodTypeHolderConfig | m_BloodTypeHolder |
TimeAndWeatherManagerEntity | m_TimeAndWeatherManager |
SCR_FactionManager | m_FactionManager |
![]() | |
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" |
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.()!
[in] | identityType | Identity type to obtain Bio info from |
[in] | bioGroupIndex | group index to assign bio from |
[in] | bioIndex | Bio index within group to assign |
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
[in] | useRandomWeighted | If false will ignore weights in randomization (Will never randomize groups that have no weight assigned) |
[in] | identityType | Identity type to obtain Bio info from |
[in] | factionIndex | Checks all groups that allow given faction |
[out] | bioGroupIndex | Index of Bio Group |
[out] | bioIndex | Index of Bio within group |
[in] | randomizer | RandomGenerator to use in randomization. Leave null to not use seeded randomization |
int SCR_IdentityManagerComponent.CombineBioIndexes | ( | int | bioGroupIndex, |
int | bioIndex ) |
Combine Bio group index and Bio index into one int for optimized replication.
[in] | bioGroupIndex | group index |
[in] | bioIndex | entry index |
override void SCR_IdentityManagerComponent.EOnInit | ( | IEntity | owner | ) |
SCR_IdentityBio SCR_IdentityManagerComponent.GetBioFromIndexes | ( | IEntity | entity, |
SCR_EIdentityType | identityType, | ||
int | bioGroupIndex, | ||
int | bioIndex ) |
Get bio from given indexes.
[in] | entity | Entity linked to bio |
[in] | identityType | Identity type to obtain Bio info from |
[in] | bioGroupIndex | group index |
[in] | bioIndex | entry index |
int SCR_IdentityManagerComponent.GetBioGroupIndexFromID | ( | SCR_EIdentityType | identityType, |
string | bioGroupID ) |
Go over all groups and returns group index with given ID string.
[in] | identityType | Identity type to obtain Bio info from |
[in] | groupID |
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.
[in] | Combined | index |
[out] | bioGroupIndex | group index |
[out] | bioIndex | entry index |
SCR_UIInfo SCR_IdentityManagerComponent.GetBloodTypeUIInfo | ( | SCR_EBloodType | bloodType | ) |
Get bloodtype index Ui Info.
[in] | index | Index of bloodtype |
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.
[in] | identityComponent | Identity Component to get Birthday from |
[out] | format | Format of birthday/creationday |
[out] | day | Day of birth/creation |
[out] | month | Month of of Birth/creation |
[out] | age | string |
[out] | year | Year of birth/creation using character age and current year |
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.
[in] | identityComponent | Identity Component to get Birthday from |
[out] | formatDate | Format of date |
[out] | dayString | Day of death |
[out] | monthString | Month of of death |
[out] | yearString | Year of of death |
[out] | time | Time of death (Not included in Format in default format settings) |
|
protected |
|
static |
int SCR_IdentityManagerComponent.GetRandomBloodTypeIndex | ( | RandomGenerator | randomizer = null, |
bool | useWeightedRandom = true ) |
Get bloodtype index, either random or weighted random.
[in] | randomizer | If set will use given generator to use sseded randomization |
[in] | useWeightedRandom | If true will use weighted random |
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)
[in] | identityType | Identity type to obtain Bio info from |
[in] | factionIndex | Checks all groups that allow given faction |
[out] | validBioGroups | List of all valid Bio groups |
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.
bool SCR_IdentityManagerComponent.HasIdentityItemGenerationType | ( | SCR_EIdentityItemGenerationType | type | ) |
[in] | type | Type to check |
bool SCR_IdentityManagerComponent.IsCreationDay | ( | SCR_ExtendedIdentityComponent | identityComponent | ) |
Check if today (ingame) is the characters birthday.
[in] | identityComponent | Identity Component to get Birthday/creation day from |
bool SCR_IdentityManagerComponent.IsGenerateValuableIntelEnabled | ( | ) |
bool SCR_IdentityManagerComponent.IsIdentityItemSlotEnabled | ( | ) |
void SCR_IdentityManagerComponent.OnCharacterBecomeUnconscious | ( | IEntity | character | ) |
|
protected |
override void SCR_IdentityManagerComponent.OnControllableDestroyed | ( | notnull SCR_InstigatorContextData | instigatorContextData | ) |
When a controllable entity is destroyed, this event is raised.
[in] | instigatorContextData | Holds the data of the victim and killer |
Implements SCR_BaseGameModeComponent.
override void SCR_IdentityManagerComponent.OnPlayerConnected | ( | int | playerId | ) |
Called after a player is connected.
Server-only.
[in] | playerId | PlayerId of connected player. |
Implements SCR_BaseGameModeComponent.
override void SCR_IdentityManagerComponent.OnPlayerDisconnected | ( | int | playerId, |
KickCauseCode | cause, | ||
int | timeout ) |
Called after a player is disconnected.
[in] | playerId | PlayerId of disconnected player. |
[in] | cause | Reason player disconnected |
[in] | timeout | Timeout for when players are allowed to connect again. -1 means Ban without an assigned timeout |
Implements SCR_BaseGameModeComponent.
override void SCR_IdentityManagerComponent.OnPostInit | ( | IEntity | owner | ) |
|
protected |
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.
override bool SCR_IdentityManagerComponent.PreparePlayerEntity_S | ( | SCR_SpawnRequestComponent | requestComponent, |
SCR_SpawnHandlerComponent | handlerComponent, | ||
SCR_SpawnData | data, | ||
IEntity | entity ) |
[in] | requestComponent | |
[in] | handlerComponent | |
[in] | data | |
[in] | entity |
Implements SCR_BaseGameModeComponent.
void SCR_IdentityManagerComponent.ShowHint | ( | EHint | hintType | ) |
bool SCR_IdentityManagerComponent.ShowPlayerNameOnIdentityItem | ( | ) |
|
protected |
|
static |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int SCR_IdentityManagerComponent.m_DebugBioGroupIndexOverwrite |
int SCR_IdentityManagerComponent.m_DebugBioIndexOverwrite |
int SCR_IdentityManagerComponent.m_DebugRandomizeSeedOverwrite |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
static |
|
static |