Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DataCollectorComponent.c File Reference

Go to the source code of this file.

Classes

class  SCR_DataCollectorComponentClass

Functions

SCR_DataCollectorComponentClass SCR_BaseGameModeComponentClass Attribute ()] protected ref array< ref SCR_DataCollectorModule > m_aModules
override void OnGameModeEnd (SCR_GameModeEndData data)
array< floatGetFactionStats (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.
SCR_DataCollectorModule FindModule (typename type)
bool IsMaster ()
Managed GetSessionDataStats ()
Managed GetPlayerDataStats (int playerID)
void RemovePlayer (int playerID)
SCR_PlayerData GetPlayerData (int playerID, bool createNew=true, bool requestFromBackend=true)
int GetPlayers (out notnull array< int > outPlayers)
SCR_SessionData GetSessionData ()
override void OnPlayerAuditSuccess (int playerId)
override void OnPlayerConnected (int playerId)
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
override void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
override void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
void OnAIKilled (IEntity AIEntity, IEntity killerEntity, notnull Instigator instigator, notnull SCR_InstigatorContextData instigatorContextData)
override void OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
override void OnGameModeStart ()
void DisableModules ()
 Use this method to disable all the modules.
void StartDataCollectorSession ()
override void EOnFrame (IEntity owner, float timeSlice)
override void OnPostInit (IEntity owner)
 Editable Mine.

Variables

bool m_bOptionalKicking
int m_iOptionalKickingFriendlyPlayerKillPenalty
int m_iOptionalKickingFriendlyAIKillPenalty
int m_iOptionalKickingKickPenaltyLimit
int m_iOptionalKickingBanDuration
int m_iOptionalKickingPenaltySubtractionPeriod
int m_iOptionalKickingPenaltySubtractionPoints
ref SCR_LocalPlayerPenalty m_OptionalKicking
ref map< int, ref SCR_PlayerDatam_mPlayerData = new map<int, ref SCR_PlayerData>()
ref SCR_SessionData m_SessionData
IEntity m_Owner
ref SCR_DataCollectorUI m_UiHandler
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 )
protected
Parameters
[in]key
[in]stats

Definition at line 153 of file SCR_DataCollectorComponent.c.

◆ Attribute()

◆ DisableModules()

void DisableModules ( )
protected

Use this method to disable all the modules.

Definition at line 449 of file SCR_DataCollectorComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity owner,
float timeSlice )
protected

Definition at line 499 of file SCR_DataCollectorComponent.c.

◆ FindModule()

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

Definition at line 194 of file SCR_DataCollectorComponent.c.

◆ GetAllFactionStats()

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

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 144 of file SCR_DataCollectorComponent.c.

◆ GetFactionStats()

array< float > GetFactionStats ( FactionKey key)
protected

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 133 of file SCR_DataCollectorComponent.c.

◆ GetPlayerData()

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

Definition at line 242 of file SCR_DataCollectorComponent.c.

◆ GetPlayerDataStats()

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

Definition at line 223 of file SCR_DataCollectorComponent.c.

◆ GetPlayers()

int GetPlayers ( out notnull array< int > outPlayers)
protected

Definition at line 255 of file SCR_DataCollectorComponent.c.

◆ GetSessionData()

SCR_SessionData GetSessionData ( )
protected

Definition at line 269 of file SCR_DataCollectorComponent.c.

◆ GetSessionDataStats()

Managed GetSessionDataStats ( )
protected

Definition at line 212 of file SCR_DataCollectorComponent.c.

◆ OnAIKilled()

void OnAIKilled ( IEntity AIEntity,
IEntity killerEntity,
notnull Instigator instigator,
notnull SCR_InstigatorContextData instigatorContextData )
protected

Definition at line 357 of file SCR_DataCollectorComponent.c.

◆ OnControllableDestroyed()

override void OnControllableDestroyed ( notnull SCR_InstigatorContextData instigatorContextData)
protected

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

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

Definition at line 371 of file SCR_DataCollectorComponent.c.

◆ OnGameEnd()

override void OnGameEnd ( )
protected

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 180 of file SCR_DataCollectorComponent.c.

◆ OnGameModeEnd()

override void OnGameModeEnd ( SCR_GameModeEndData data)
protected

Called when game mode ends.

Parameters
[in]dataEnd game data with game logic.

Definition at line 51 of file SCR_DataCollectorComponent.c.

◆ OnGameModeStart()

override void OnGameModeStart ( )
protected

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 441 of file SCR_DataCollectorComponent.c.

◆ OnPlayerAuditSuccess()

override void OnPlayerAuditSuccess ( int playerId)
protected

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 276 of file SCR_DataCollectorComponent.c.

◆ OnPlayerConnected()

override void OnPlayerConnected ( int playerId)
protected

Called after a player is connected. Server-only.

Parameters
[in]playerIdPlayerId of connected player.
[in]playerId

Definition at line 290 of file SCR_DataCollectorComponent.c.

◆ OnPlayerDisconnected()

override void OnPlayerDisconnected ( int playerId,
KickCauseCode cause,
int timeout )
protected

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

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Definition at line 297 of file SCR_DataCollectorComponent.c.

◆ OnPlayerKilled()

override void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 340 of file SCR_DataCollectorComponent.c.

◆ OnPlayerSpawnFinalize_S()

override void OnPlayerSpawnFinalize_S ( SCR_SpawnRequestComponent requestComponent,
SCR_SpawnHandlerComponent handlerComponent,
SCR_SpawnData data,
IEntity entity )
protected
Parameters
[in]requestComponent
[in]handlerComponent
[in]data
[in]entity

Definition at line 330 of file SCR_DataCollectorComponent.c.

◆ RemovePlayer()

void RemovePlayer ( int playerID)
protected
Parameters
[in]playerID

Definition at line 232 of file SCR_DataCollectorComponent.c.

◆ StartDataCollectorSession()

void StartDataCollectorSession ( )
protected

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 458 of file SCR_DataCollectorComponent.c.

Variable Documentation

◆ m_bOptionalKicking

bool m_bOptionalKicking
protected

Definition at line 12 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingBanDuration

int m_iOptionalKickingBanDuration
protected

Definition at line 24 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingFriendlyAIKillPenalty

int m_iOptionalKickingFriendlyAIKillPenalty
protected

Definition at line 18 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingFriendlyPlayerKillPenalty

int m_iOptionalKickingFriendlyPlayerKillPenalty
protected

Definition at line 15 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingKickPenaltyLimit

int m_iOptionalKickingKickPenaltyLimit
protected

Definition at line 21 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingPenaltySubtractionPeriod

int m_iOptionalKickingPenaltySubtractionPeriod
protected

Definition at line 27 of file SCR_DataCollectorComponent.c.

◆ m_iOptionalKickingPenaltySubtractionPoints

int m_iOptionalKickingPenaltySubtractionPoints
protected

Definition at line 30 of file SCR_DataCollectorComponent.c.

◆ m_mFactionScore

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

Definition at line 42 of file SCR_DataCollectorComponent.c.

◆ m_mPlayerData

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

Definition at line 34 of file SCR_DataCollectorComponent.c.

◆ m_OptionalKicking

ref SCR_LocalPlayerPenalty m_OptionalKicking
protected

Definition at line 32 of file SCR_DataCollectorComponent.c.

◆ m_Owner

IEntity m_Owner
protected

Definition at line 38 of file SCR_DataCollectorComponent.c.

◆ m_SessionData

ref SCR_SessionData m_SessionData
protected

Definition at line 36 of file SCR_DataCollectorComponent.c.

◆ m_UiHandler

ref SCR_DataCollectorUI m_UiHandler
protected

Definition at line 40 of file SCR_DataCollectorComponent.c.