Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SCR_PlayerData Interface Reference
Inheritance diagram for SCR_PlayerData:
[legend]

Public Member Functions

void SCR_PlayerData (int id, bool hasPlayerBeenAuditted, bool requestFromBackend=true)
 
void SetTimeOut (int time)
 Called manually from the SCR_DataCollectorCrimesModule.
 
int GetTimeOut ()
 
void SetPreviousStats (array< float > previousStats)
 Overrides previous stats array with the provided one To be used on clients only!
 
array< float > GetPreviousStats ()
 
void SetStats (array< float > stats)
 Overrides stats array with the provided one To be used on clients only!
 
array< float > GetStats ()
 
void RequestLoadData (bool HasPlayerBeenAuditted=false)
 
ScriptInvoker GetDataReadyInvoker ()
 
void BackendDataReady ()
 
void LoadEmptyProfile ()
 
sealed void StoreProfile ()
 
Managed GetDataEventStats ()
 
sealed void DebugCalculateStats ()
 
sealed void CalculateStatsChange ()
 
array< float > GetArrayEarntPoints ()
 
bool IsDataReady ()
 
bool IsDataProgressionReady ()
 
void FillArrayWithSpecializationPoints (inout array< float > SpPoints, bool newStats=true)
 
sealed array< float > CalculateStatsDifference ()
 
float GetSpecializationPoints (int n, bool newStats=true)
 
void PrepareSpecializationStatsDisplay ()
 This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Career Menu will use this.
 
void PrepareSpecializationProgressionStatsDisplay ()
 This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Debrief screen will use this.
 
bool IsEmptyProfile ()
 
void AddStat (SCR_EDataStats stat, float amount=1, bool temp=true)
 temp: True: The stat should be added to temporary actions that might be evaluated further by a module False: The stat is final.
 
void OverrideStat (SCR_EDataStats stat, float amount=1)
 
float GetStat (SCR_EDataStats stat, bool newStat=true)
 
int GetAccumulatedActionsTick ()
 
int GetLatestActionTick ()
 
int GetLatestCriminalScoreUpdateTick ()
 
SCR_PlayerDataConfigs GetConfigs ()
 
array< float > GetAccumulatedActions ()
 
float GetCriminalScore ()
 
void SetCriminalScore (float score)
 
void ResetAccumulatedActions ()
 
void CalculateSessionDuration ()
 
float GetSpecializationCount (int n)
 

Public Attributes

ref SCR_PlayerDataEvent dataEvent = new SCR_PlayerDataEvent
 DataEvent to send stats to the database for tracking purposes.
 
bool accumulationEnabled = false
 

Static Public Attributes

static ref ScriptInvoker s_OnStatAdded = new ScriptInvoker()
 

Protected Member Functions

void UpdateTrackingController (EInputDeviceType oldDevice, EInputDeviceType newDevice)
 
void AddPointsToSpecialization (int n, float value)
 

Protected Attributes

int m_iPlayerID
 
ref array< float > m_aStats = {}
 Stats that we keep updating.
 
int m_iSecondsAsController = 0
 
int m_iSecondsAsKeyboard = 0
 
int m_iLastEvaluationCurrentController = 0
 
ref array< float > m_aPreviousStats = {}
 Original stats.
 
ref array< float > m_aAccumulatedActions = {}
 Possibly criminal stats - We use this to accumulate actions and afterwards decide whether they are criminal or not.
 
int m_iAccumulatedActionsTick
 
int m_iLatestActionTick
 
int m_iLatestCriminalScoreUpdateTick
 
float m_fCriminalScore
 
int m_iTimeOut = 0
 TimeOut in case the player is kicked or banned on the current session for notification purposes.
 
ref array< float > m_aStatsGained = {}
 Stats difference - We need this variable because we need a pointer for it to be used on TD from C++ side.
 
ref array< float > m_aEarnt = {}
 We store in m_aEarnt the number of points provided by each of the fields to the specializations, and the total sum for each specialization in the corresponding field (sp0, sp1, etc)
 
ref CharacterDataLoadingCallback m_CharacterDataCallback = new CharacterDataLoadingCallback(this)
 Backend callbacks necessary to make the request to load and store the characterdata from the player's profile.
 
ref BackendCallback m_StoringCallback = new BackendCallback()
 
int m_iSessionStartedTickCount
 Starting session tick to calculate session duration.
 
bool m_bIsEmptyProfile
 Empty Profile.
 
ref ScriptInvoker m_OnDataReady = new ScriptInvoker()
 Invoker that notifies UI screens listening to it that the data object is ready.
 
ref SCR_PlayerDataConfigs m_Configs
 Stats configs.
 

Constructor & Destructor Documentation

◆ SCR_PlayerData()

void SCR_PlayerData.SCR_PlayerData ( int  id,
bool  hasPlayerBeenAuditted,
bool  requestFromBackend = true 
)

Member Function Documentation

◆ AddPointsToSpecialization()

void SCR_PlayerData.AddPointsToSpecialization ( int  n,
float  value 
)
protected

◆ AddStat()

void SCR_PlayerData.AddStat ( SCR_EDataStats  stat,
float  amount = 1,
bool  temp = true 
)

temp: True: The stat should be added to temporary actions that might be evaluated further by a module False: The stat is final.

Add it to this player session's stats

◆ BackendDataReady()

void SCR_PlayerData.BackendDataReady ( )

◆ CalculateSessionDuration()

void SCR_PlayerData.CalculateSessionDuration ( )

◆ CalculateStatsChange()

sealed void SCR_PlayerData.CalculateStatsChange ( )

◆ CalculateStatsDifference()

sealed array< float > SCR_PlayerData.CalculateStatsDifference ( )

◆ DebugCalculateStats()

sealed void SCR_PlayerData.DebugCalculateStats ( )

◆ FillArrayWithSpecializationPoints()

void SCR_PlayerData.FillArrayWithSpecializationPoints ( inout array< float >  SpPoints,
bool  newStats = true 
)

◆ GetAccumulatedActions()

array< float > SCR_PlayerData.GetAccumulatedActions ( )

◆ GetAccumulatedActionsTick()

int SCR_PlayerData.GetAccumulatedActionsTick ( )

◆ GetArrayEarntPoints()

array< float > SCR_PlayerData.GetArrayEarntPoints ( )

◆ GetConfigs()

SCR_PlayerDataConfigs SCR_PlayerData.GetConfigs ( )

◆ GetCriminalScore()

float SCR_PlayerData.GetCriminalScore ( )

◆ GetDataEventStats()

Managed SCR_PlayerData.GetDataEventStats ( )

◆ GetDataReadyInvoker()

ScriptInvoker SCR_PlayerData.GetDataReadyInvoker ( )

◆ GetLatestActionTick()

int SCR_PlayerData.GetLatestActionTick ( )

◆ GetLatestCriminalScoreUpdateTick()

int SCR_PlayerData.GetLatestCriminalScoreUpdateTick ( )

◆ GetPreviousStats()

array< float > SCR_PlayerData.GetPreviousStats ( )

◆ GetSpecializationCount()

float SCR_PlayerData.GetSpecializationCount ( int  n)

◆ GetSpecializationPoints()

float SCR_PlayerData.GetSpecializationPoints ( int  n,
bool  newStats = true 
)

◆ GetStat()

float SCR_PlayerData.GetStat ( SCR_EDataStats  stat,
bool  newStat = true 
)

◆ GetStats()

array< float > SCR_PlayerData.GetStats ( )

◆ GetTimeOut()

int SCR_PlayerData.GetTimeOut ( )

◆ IsDataProgressionReady()

bool SCR_PlayerData.IsDataProgressionReady ( )

◆ IsDataReady()

bool SCR_PlayerData.IsDataReady ( )

◆ IsEmptyProfile()

bool SCR_PlayerData.IsEmptyProfile ( )

◆ LoadEmptyProfile()

void SCR_PlayerData.LoadEmptyProfile ( )

◆ OverrideStat()

void SCR_PlayerData.OverrideStat ( SCR_EDataStats  stat,
float  amount = 1 
)

◆ PrepareSpecializationProgressionStatsDisplay()

void SCR_PlayerData.PrepareSpecializationProgressionStatsDisplay ( )

This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Debrief screen will use this.

◆ PrepareSpecializationStatsDisplay()

void SCR_PlayerData.PrepareSpecializationStatsDisplay ( )

This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Career Menu will use this.

◆ RequestLoadData()

void SCR_PlayerData.RequestLoadData ( bool  HasPlayerBeenAuditted = false)

◆ ResetAccumulatedActions()

void SCR_PlayerData.ResetAccumulatedActions ( )

◆ SetCriminalScore()

void SCR_PlayerData.SetCriminalScore ( float  score)

◆ SetPreviousStats()

void SCR_PlayerData.SetPreviousStats ( array< float >  previousStats)

Overrides previous stats array with the provided one To be used on clients only!

◆ SetStats()

void SCR_PlayerData.SetStats ( array< float >  stats)

Overrides stats array with the provided one To be used on clients only!

◆ SetTimeOut()

void SCR_PlayerData.SetTimeOut ( int  time)

Called manually from the SCR_DataCollectorCrimesModule.

◆ StoreProfile()

sealed void SCR_PlayerData.StoreProfile ( )

◆ UpdateTrackingController()

void SCR_PlayerData.UpdateTrackingController ( EInputDeviceType  oldDevice,
EInputDeviceType  newDevice 
)
protected

Member Data Documentation

◆ accumulationEnabled

bool SCR_PlayerData.accumulationEnabled = false

◆ dataEvent

ref SCR_PlayerDataEvent SCR_PlayerData.dataEvent = new SCR_PlayerDataEvent

DataEvent to send stats to the database for tracking purposes.

◆ m_aAccumulatedActions

ref array<float> SCR_PlayerData.m_aAccumulatedActions = {}
protected

Possibly criminal stats - We use this to accumulate actions and afterwards decide whether they are criminal or not.

◆ m_aEarnt

ref array<float> SCR_PlayerData.m_aEarnt = {}
protected

We store in m_aEarnt the number of points provided by each of the fields to the specializations, and the total sum for each specialization in the corresponding field (sp0, sp1, etc)

◆ m_aPreviousStats

ref array<float> SCR_PlayerData.m_aPreviousStats = {}
protected

Original stats.

◆ m_aStats

ref array<float> SCR_PlayerData.m_aStats = {}
protected

Stats that we keep updating.

◆ m_aStatsGained

ref array<float> SCR_PlayerData.m_aStatsGained = {}
protected

Stats difference - We need this variable because we need a pointer for it to be used on TD from C++ side.

◆ m_bIsEmptyProfile

bool SCR_PlayerData.m_bIsEmptyProfile
protected

Empty Profile.

◆ m_CharacterDataCallback

ref CharacterDataLoadingCallback SCR_PlayerData.m_CharacterDataCallback = new CharacterDataLoadingCallback(this)
protected

Backend callbacks necessary to make the request to load and store the characterdata from the player's profile.

◆ m_Configs

ref SCR_PlayerDataConfigs SCR_PlayerData.m_Configs
protected

Stats configs.

◆ m_fCriminalScore

float SCR_PlayerData.m_fCriminalScore
protected

◆ m_iAccumulatedActionsTick

int SCR_PlayerData.m_iAccumulatedActionsTick
protected

◆ m_iLastEvaluationCurrentController

int SCR_PlayerData.m_iLastEvaluationCurrentController = 0
protected

◆ m_iLatestActionTick

int SCR_PlayerData.m_iLatestActionTick
protected

◆ m_iLatestCriminalScoreUpdateTick

int SCR_PlayerData.m_iLatestCriminalScoreUpdateTick
protected

◆ m_iPlayerID

int SCR_PlayerData.m_iPlayerID
protected

◆ m_iSecondsAsController

int SCR_PlayerData.m_iSecondsAsController = 0
protected

◆ m_iSecondsAsKeyboard

int SCR_PlayerData.m_iSecondsAsKeyboard = 0
protected

◆ m_iSessionStartedTickCount

int SCR_PlayerData.m_iSessionStartedTickCount
protected

Starting session tick to calculate session duration.

◆ m_iTimeOut

int SCR_PlayerData.m_iTimeOut = 0
protected

TimeOut in case the player is kicked or banned on the current session for notification purposes.

◆ m_OnDataReady

ref ScriptInvoker SCR_PlayerData.m_OnDataReady = new ScriptInvoker()
protected

Invoker that notifies UI screens listening to it that the data object is ready.

◆ m_StoringCallback

ref BackendCallback SCR_PlayerData.m_StoringCallback = new BackendCallback()
protected

◆ s_OnStatAdded

ref ScriptInvoker SCR_PlayerData.s_OnStatAdded = new ScriptInvoker()
static

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