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

Go to the source code of this file.

Data Structures

class  SCR_DataCollectorComponentClass
 

Functions

SCR_DataCollectorComponentClass SCR_BaseGameModeComponentClass Attribute ()] protected ref array< ref SCR_DataCollectorModule > m_aModules
 Post-process effect of scripted camera. More...
 
protected override void OnGameModeEnd (SCR_GameModeEndData data)
 
array< float > GetFactionStats (FactionKey key)
 
map< FactionKey, ref array< float > > GetAllFactionStats ()
 
void AddStatsToFaction (FactionKey key, notnull array< float > stats)
 
override void OnGameEnd ()
 When game shuts down, store the profile of every player who hasn't disconnected yet. More...
 
SCR_DataCollectorModule FindModule (typename type)
 
protected bool IsMaster ()
 
Managed GetPlayerDataStats (int playerID)
 
protected void RemovePlayer (int playerID)
 
SCR_PlayerData GetPlayerData (int playerID, bool createNew=true, bool requestFromBackend=true)
 
protected int GetPlayers (out notnull array< int > outPlayers)
 
protected override void OnPlayerAuditSuccess (int playerId)
 
protected override void OnPlayerConnected (int playerId)
 
protected override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 
protected override void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 
protected override void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
protected void OnAIKilled (IEntity AIEntity, IEntity killerEntity, notnull Instigator killer)
 
protected override void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator killer)
 
protected override void OnGameModeStart ()
 
protected void DisableModules ()
 Use this method to disable all the modules. More...
 
void StartDataCollectorSession ()
 
protected override void EOnFrame (IEntity owner, float timeSlice)
 
protected override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 

Variables

protected bool m_bOptionalKicking
 
protected int m_iOptionalKickingFriendlyPlayerKillPenalty
 
protected int m_iOptionalKickingFriendlyAIKillPenalty
 
protected int m_iOptionalKickingKickPenaltyLimit
 
protected int m_iOptionalKickingBanDuration
 
protected int m_iOptionalKickingPenaltySubtractionPeriod
 
protected int m_iOptionalKickingPenaltySubtractionPoints
 
protected ref SCR_LocalPlayerPenalty m_OptionalKicking
 
protected ref map< int, ref SCR_PlayerDatam_mPlayerData = new map<int, ref SCR_PlayerData>()
 
protected IEntity m_Owner
 
protected ref SCR_DataCollectorUI m_UiHandler
 
protected ref map< FactionKey, ref array< float > > m_mFactionScore = new map<FactionKey, ref array<float>>()
 

Function Documentation

◆ AddStatsToFaction()

void AddStatsToFaction ( FactionKey  key,
notnull array< float >  stats 
)
Parameters
[in]key
[in]stats

Definition at line 138 of file SCR_DataCollectorComponent.c.

◆ Attribute()

Post-process effect of scripted camera.

◆ DisableModules()

protected void DisableModules ( )

Use this method to disable all the modules.

Definition at line 415 of file SCR_DataCollectorComponent.c.

◆ EOnFrame()

protected override void EOnFrame ( IEntity  owner,
float  timeSlice 
)

Definition at line 465 of file SCR_DataCollectorComponent.c.

◆ FindModule()

SCR_DataCollectorModule FindModule ( typename type  )
Parameters
[in]type
Returns
found module or null if not found

Definition at line 179 of file SCR_DataCollectorComponent.c.

◆ GetAllFactionStats()

map<FactionKey, ref array<float> > GetAllFactionStats ( )

GetAllFactionStats can be used in weird user cases Most of the time GetFactionStats should be enough Also, I am returning the pointer to the original attribute, so technically, this is unsafe. May make safer (or remove) in the future. Use responsibly!

Returns

Definition at line 129 of file SCR_DataCollectorComponent.c.

◆ GetFactionStats()

array<float> GetFactionStats ( FactionKey  key)

SCR_EDataStats of all players belonging to a faction added Some of those stats don't make sense as they are (ie. Rank, LevelOfExperience) Bear that in mind when using these

Parameters
[in]key
Returns

Definition at line 118 of file SCR_DataCollectorComponent.c.

◆ GetPlayerData()

SCR_PlayerData GetPlayerData ( int  playerID,
bool  createNew = true,
bool  requestFromBackend = true 
)
Parameters
[in]playerID
[in]createNew
[in]requestFromBackend
Returns

Definition at line 220 of file SCR_DataCollectorComponent.c.

◆ GetPlayerDataStats()

Managed GetPlayerDataStats ( int  playerID)
Parameters
[in]playerID
Returns

Definition at line 199 of file SCR_DataCollectorComponent.c.

◆ GetPlayers()

protected int GetPlayers ( out notnull array< int outPlayers)

Definition at line 233 of file SCR_DataCollectorComponent.c.

◆ IsMaster()

protected bool IsMaster ( )

Definition at line 190 of file SCR_DataCollectorComponent.c.

◆ OnAIKilled()

protected void OnAIKilled ( IEntity  AIEntity,
IEntity  killerEntity,
notnull Instigator  killer 
)

Definition at line 325 of file SCR_DataCollectorComponent.c.

◆ OnControllableDestroyed()

protected override void OnControllableDestroyed ( IEntity  entity,
IEntity  killerEntity,
notnull Instigator  killer 
)

When a controllable entity is destroyed, this event is raised. Entity is destroyed when DamageManager.OnStateChanged -> EDamageState.Destroyed

Parameters
[in]entityDestroyed entity that raised this event
[in]killerEntityInstigator entity that destroyed our victim
[in]killerInstigator of the kill

Definition at line 339 of file SCR_DataCollectorComponent.c.

◆ OnGameEnd()

override void OnGameEnd ( )

When game shuts down, store the profile of every player who hasn't disconnected yet.

Called on all machines when the world ends.

Definition at line 165 of file SCR_DataCollectorComponent.c.

◆ OnGameModeEnd()

protected override void OnGameModeEnd ( SCR_GameModeEndData  data)

Called when game mode ends.

Parameters
[in]dataEnd game data with game logic.

Definition at line 49 of file SCR_DataCollectorComponent.c.

◆ OnGameModeStart()

protected override void OnGameModeStart ( )

Called on every machine when game mode starts. This can be immediate (if no pre-game period is set) or can happen after a certain delay, as deemed appropriate by the authority.

Definition at line 408 of file SCR_DataCollectorComponent.c.

◆ OnPlayerAuditSuccess()

protected override void OnPlayerAuditSuccess ( int  playerId)

Event is called when player connecting Session hosting current Game Mode where is required authentication verification via. platform services AuditSuccess() call specifically mean this verification was successful Basically audited player has access to persistency/ etc. related functionality provided by online services.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Definition at line 248 of file SCR_DataCollectorComponent.c.

◆ RemovePlayer()

protected void RemovePlayer ( int  playerID)

Definition at line 210 of file SCR_DataCollectorComponent.c.

◆ StartDataCollectorSession()

void StartDataCollectorSession ( )

We call StartDataCollectorSession when the backend session is ready (OnGameModeStart) because that's the time when we can check whether the server has writing privileges If the server has no writing privileges, we don't bother tracking their performance

Definition at line 424 of file SCR_DataCollectorComponent.c.

Variable Documentation

◆ m_bOptionalKicking

protected bool m_bOptionalKicking

Definition at line 12 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingBanDuration

protected int m_iOptionalKickingBanDuration

Definition at line 24 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingFriendlyAIKillPenalty

protected int m_iOptionalKickingFriendlyAIKillPenalty

Definition at line 18 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingFriendlyPlayerKillPenalty

protected int m_iOptionalKickingFriendlyPlayerKillPenalty

Definition at line 15 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingKickPenaltyLimit

protected int m_iOptionalKickingKickPenaltyLimit

Definition at line 21 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingPenaltySubtractionPeriod

protected int m_iOptionalKickingPenaltySubtractionPeriod

Definition at line 27 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingPenaltySubtractionPoints

protected int m_iOptionalKickingPenaltySubtractionPoints

Definition at line 30 of file SCR_DataCollectorComponent.c.

◆ m_mFactionScore

protected ref map<FactionKey, ref array<float> > m_mFactionScore = new map<FactionKey, ref array<float>>()

Definition at line 40 of file SCR_DataCollectorComponent.c.

◆ m_mPlayerData

protected ref map<int, ref SCR_PlayerData> m_mPlayerData = new map<int, ref SCR_PlayerData>()

Definition at line 34 of file SCR_DataCollectorComponent.c.

◆ m_OptionalKicking

protected ref SCR_LocalPlayerPenalty m_OptionalKicking

Definition at line 32 of file SCR_DataCollectorComponent.c.

◆ m_Owner

protected IEntity m_Owner

Definition at line 36 of file SCR_DataCollectorComponent.c.

◆ m_UiHandler

protected ref SCR_DataCollectorUI m_UiHandler

Definition at line 38 of file SCR_DataCollectorComponent.c.