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

Public Member Functions

override void OnPlayerAuditSuccess (int playerID)
 
override void OnPlayerDisconnected (int playerID, IEntity controlledEntity=null)
 
override void OnGameModeEnd ()
 
override void Update (float timeTick)
 
void KickOrBanPlayer (int playerId, SCR_PlayerManagerKickReason reason, int minimmumDuration)
 
void VoteForKickOrBan (int playerId, SCR_PlayerManagerKickReason reason, int minimmumDurationBackup)
 Vote for kicking or banning a player.
 
- Public Member Functions inherited from SCR_DataCollectorModule
void Update (float timeTick)
 
void OnPlayerDisconnected (int playerID, IEntity controlledEntity=null)
 
void OnPlayerSpawned (int playerID, IEntity controlledEntity)
 
void OnPlayerAuditSuccess (int playerID)
 
void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
void OnAIKilled (IEntity AIEntity, IEntity killerEntity, notnull Instigator killer)
 
void OnGameModeEnd ()
 
void InitModule ()
 
void OnControlledEntityChanged (IEntity from, IEntity to)
 

Static Public Attributes

static const int MIN_AUTO_BAN_DURATION = 300
 

Protected Member Functions

void CheckPlayer (int playerId)
 
void EvaluatePlayerCrimes (int playerId, bool evaluatePunishment=true)
 First decrease the score up until now by doing Time * DecreasePerMinute Second add to the score given the current crimes: PointsOfCrime * CRIME_ACCELERATION_FACTOR.
 
void KickPlayer (int playerId, notnull SCR_PlayerData playerData, SCR_PlayerManagerKickReason reason)
 
int RequestBanIfNecessary (int playerId, notnull SCR_PlayerData playerData, SCR_PlayerManagerKickReason reason)
 The difference between the types of kick or bans: heavy ban (requires backendapi ban), light ban or kick (duration difference).
 
float EvaluateHarmingFriendlies (notnull SCR_PlayerData playerData)
 
void ExecutePunishment (int playerId, SCR_PlayerManagerKickReason reason, int durationInSeconds)
 
void SendHints (int playerId, float harmingFriendliesScore)
 
void ProcessTemporalStats (notnull SCR_PlayerData playerData)
 
void UpdateCriminalScore (notnull SCR_PlayerData playerData, float addToScore, float decreaseFromScore)
 
void UpdateCriminalAcceleration (int playerId)
 
- Protected Member Functions inherited from SCR_DataCollectorModule
void AddInvokers (IEntity player)
 
void RemoveInvokers (IEntity player)
 

Protected Attributes

ref array< int > m_aPlayerIDs = {}
 List of IDs from DataCollector.
 
int m_iNextIndex
 Next index of player to evaluate.
 
float m_fLatestActionThreshold
 after LAST_ACTION_THRESHOLD have passed since last action, evaluate buffer
 
float m_fMaxTimeAccumulationThreshold
 after TIME_ACCUMULATING_THRESHOLD seconds have passed, evaluate buffer
 
ref array< int > m_aLightBanPunishments
 Duration of LightBan bans.
 
int m_iSecondsOfReincidencyLightBan
 How many minutes of playtime need to pass to consider this player not a reincident.
 
ref array< int > m_aHeavyBanPunishments
 Duration of HeavyBans.
 
int m_iSecondsOfReincidencyHeavyBan
 How many minutes of playtime need to pass to consider this player not a reincident.
 
bool m_bWarCrimesEnabled
 
bool m_bWarCrimesProportionalityPrincipleEnabled
 
float MODIFIER_PROPORTIONALITY_FRIENDLY_KILLS
 
float MODIFIER_PROPORTIONALITY_FRIENDLY_AI_KILLS
 
float MODIFIER_PROPORTIONALITY_AI_KILLS
 
float MODIFIER_PROPORTIONALITY_KILLS
 
- Protected Attributes inherited from SCR_DataCollectorModule
ref map< int, TextWidget > m_StatsVisualization
 
float m_fTimeSinceUpdate = 0
 

Additional Inherited Members

- Public Attributes inherited from SCR_DataCollectorModule
float m_fUpdatePeriod
 

Member Function Documentation

◆ CheckPlayer()

void SCR_DataCollectorCrimesModule.CheckPlayer ( int  playerId)
protected

◆ EvaluateHarmingFriendlies()

float SCR_DataCollectorCrimesModule.EvaluateHarmingFriendlies ( notnull SCR_PlayerData  playerData)
protected

◆ EvaluatePlayerCrimes()

void SCR_DataCollectorCrimesModule.EvaluatePlayerCrimes ( int  playerId,
bool  evaluatePunishment = true 
)
protected

First decrease the score up until now by doing Time * DecreasePerMinute Second add to the score given the current crimes: PointsOfCrime * CRIME_ACCELERATION_FACTOR.

◆ ExecutePunishment()

void SCR_DataCollectorCrimesModule.ExecutePunishment ( int  playerId,
SCR_PlayerManagerKickReason  reason,
int  durationInSeconds 
)
protected

◆ KickOrBanPlayer()

void SCR_DataCollectorCrimesModule.KickOrBanPlayer ( int  playerId,
SCR_PlayerManagerKickReason  reason,
int  minimmumDuration 
)

◆ KickPlayer()

void SCR_DataCollectorCrimesModule.KickPlayer ( int  playerId,
notnull SCR_PlayerData  playerData,
SCR_PlayerManagerKickReason  reason 
)
protected

◆ OnGameModeEnd()

override void SCR_DataCollectorCrimesModule.OnGameModeEnd ( )

◆ OnPlayerAuditSuccess()

override void SCR_DataCollectorCrimesModule.OnPlayerAuditSuccess ( int  playerID)

◆ OnPlayerDisconnected()

override void SCR_DataCollectorCrimesModule.OnPlayerDisconnected ( int  playerID,
IEntity  controlledEntity = null 
)

◆ ProcessTemporalStats()

void SCR_DataCollectorCrimesModule.ProcessTemporalStats ( notnull SCR_PlayerData  playerData)
protected

◆ RequestBanIfNecessary()

int SCR_DataCollectorCrimesModule.RequestBanIfNecessary ( int  playerId,
notnull SCR_PlayerData  playerData,
SCR_PlayerManagerKickReason  reason 
)
protected

The difference between the types of kick or bans: heavy ban (requires backendapi ban), light ban or kick (duration difference).

To choose the type of kick or ban:

  1. Compare the current acceleration against the (maxAcceleration * typeOfBanRate)
  2. Then store the current SessionDuration as the "previousPunishmentDuration" field in playerData
  3. Update the streak field
  4. Profit

◆ SendHints()

void SCR_DataCollectorCrimesModule.SendHints ( int  playerId,
float  harmingFriendliesScore 
)
protected

◆ Update()

override void SCR_DataCollectorCrimesModule.Update ( float  timeTick)

◆ UpdateCriminalAcceleration()

void SCR_DataCollectorCrimesModule.UpdateCriminalAcceleration ( int  playerId)
protected

◆ UpdateCriminalScore()

void SCR_DataCollectorCrimesModule.UpdateCriminalScore ( notnull SCR_PlayerData  playerData,
float  addToScore,
float  decreaseFromScore 
)
protected

◆ VoteForKickOrBan()

void SCR_DataCollectorCrimesModule.VoteForKickOrBan ( int  playerId,
SCR_PlayerManagerKickReason  reason,
int  minimmumDurationBackup 
)

Vote for kicking or banning a player.

Parameters
punishmentPunishment type
playerIdid of the player
reasonreason for the kick
minimmumDurationBackupminimmum duration for the ban. Used only if the voting fails

Member Data Documentation

◆ m_aHeavyBanPunishments

ref array<int> SCR_DataCollectorCrimesModule.m_aHeavyBanPunishments
protected

Duration of HeavyBans.

We use the index as the streak of heavyBans performed to this player

◆ m_aLightBanPunishments

ref array<int> SCR_DataCollectorCrimesModule.m_aLightBanPunishments
protected

Duration of LightBan bans.

We use the index as the streak of lightbans performed to this player

◆ m_aPlayerIDs

ref array<int> SCR_DataCollectorCrimesModule.m_aPlayerIDs = {}
protected

List of IDs from DataCollector.

◆ m_bWarCrimesEnabled

bool SCR_DataCollectorCrimesModule.m_bWarCrimesEnabled
protected

◆ m_bWarCrimesProportionalityPrincipleEnabled

bool SCR_DataCollectorCrimesModule.m_bWarCrimesProportionalityPrincipleEnabled
protected

◆ m_fLatestActionThreshold

float SCR_DataCollectorCrimesModule.m_fLatestActionThreshold
protected

after LAST_ACTION_THRESHOLD have passed since last action, evaluate buffer

◆ m_fMaxTimeAccumulationThreshold

float SCR_DataCollectorCrimesModule.m_fMaxTimeAccumulationThreshold
protected

after TIME_ACCUMULATING_THRESHOLD seconds have passed, evaluate buffer

◆ m_iNextIndex

int SCR_DataCollectorCrimesModule.m_iNextIndex
protected

Next index of player to evaluate.

We do them sequentially in order to split them in frames

◆ m_iSecondsOfReincidencyHeavyBan

int SCR_DataCollectorCrimesModule.m_iSecondsOfReincidencyHeavyBan
protected

How many minutes of playtime need to pass to consider this player not a reincident.

◆ m_iSecondsOfReincidencyLightBan

int SCR_DataCollectorCrimesModule.m_iSecondsOfReincidencyLightBan
protected

How many minutes of playtime need to pass to consider this player not a reincident.

◆ MIN_AUTO_BAN_DURATION

const int SCR_DataCollectorCrimesModule.MIN_AUTO_BAN_DURATION = 300
static

◆ MODIFIER_PROPORTIONALITY_AI_KILLS

float SCR_DataCollectorCrimesModule.MODIFIER_PROPORTIONALITY_AI_KILLS
protected

◆ MODIFIER_PROPORTIONALITY_FRIENDLY_AI_KILLS

float SCR_DataCollectorCrimesModule.MODIFIER_PROPORTIONALITY_FRIENDLY_AI_KILLS
protected

◆ MODIFIER_PROPORTIONALITY_FRIENDLY_KILLS

float SCR_DataCollectorCrimesModule.MODIFIER_PROPORTIONALITY_FRIENDLY_KILLS
protected

◆ MODIFIER_PROPORTIONALITY_KILLS

float SCR_DataCollectorCrimesModule.MODIFIER_PROPORTIONALITY_KILLS
protected

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