9 float m_fScoreThreshold;
10 float m_fScoreDecreasePerMinute;
11 float m_fScoreMultiplier;
12 float m_fAccelerationMin;
13 float m_fAccelerationMax;
14 float m_fBanEvaluationLight;
15 float m_fBanEvaluationHeavy;
16 float m_fCrimePtFriendKill;
17 float m_fCrimePtTeamKill;
18 float m_fQualityTimeTemp;
19 float m_bVotingSuggestionEnabled;
24 Print(
"m_fScoreThreshold: " + m_fScoreThreshold, lv);
25 Print(
"m_fScoreDecreasePerMinute: " + m_fScoreDecreasePerMinute, lv);
26 Print(
"m_fScoreMultiplier: " + m_fScoreMultiplier, lv);
27 Print(
"m_fAccelerationMin: " + m_fAccelerationMin, lv);
28 Print(
"m_fAccelerationMax: " + m_fAccelerationMax, lv);
29 Print(
"m_fBanEvaluationLight: " + m_fBanEvaluationLight, lv);
30 Print(
"m_fBanEvaluationHeavy: " + m_fBanEvaluationHeavy, lv);
31 Print(
"m_fCrimePtFriendKill: " + m_fCrimePtFriendKill, lv);
32 Print(
"m_fCrimePtTeamKill: " + m_fCrimePtTeamKill, lv);
33 Print(
"m_fQualityTimeTemp: " + m_fQualityTimeTemp, lv);
34 Print(
"m_bVotingSuggestionEnabled: " + m_bVotingSuggestionEnabled, lv);
40 m_fScoreThreshold = 10.0;
41 m_fScoreDecreasePerMinute = 0.2;
42 m_fScoreMultiplier = 0.2;
43 m_fAccelerationMin = 1.0;
44 m_fAccelerationMax = 6.0;
45 m_fBanEvaluationLight = 0.8;
46 m_fBanEvaluationHeavy = 1.0;
47 m_fCrimePtFriendKill = 1.0;
48 m_fCrimePtTeamKill = 0.7;
49 m_fQualityTimeTemp = 1.0;
50 m_bVotingSuggestionEnabled = 0.0;
63 protected string m_sDesc;
81 Print(
" -- Settings -- ", lv);
82 Print(
"m_sDesc: " + m_sDesc, lv);
83 m_BanSettings.Log(lv);
89 m_sDesc =
"Default params";
90 m_BanSettings.SetDefault();
97 RegV(
"m_BanSettings");
111 static const float MODIFIER_SPECIALIZATIONS = 0.2;
112 static const int XP_NEEDED_FOR_LEVEL = 10000;
113 static const int XP_NEEDED_FOR_LEVEL_DIVIDER = 0.0001;
114 static const int XP_NEEDED_FOR_RANK = 100000;
115 static const int XP_NEEDED_FOR_RANK_DIVIDER = 0.00001;
116 static const int MAX_EXP = 1000000;
122 int SPECIALIZATIONS_COUNT;
124 string SPECIALIZATION_0_NAME =
"#AR-CareerProfile_Specialization1";
125 string SPECIALIZATION_1_NAME =
"#AR-CareerProfile_Specialization2";
126 string SPECIALIZATION_2_NAME =
"#AR-CareerProfile_Specialization3";
128 int SPECIALIZATION_0_COUNT;
129 int SPECIALIZATION_1_COUNT;
130 int SPECIALIZATION_2_COUNT;
132 ref array<ref SCR_PlayerDataSpecializationDisplay> m_aSpecialization0 = {};
133 ref array<ref SCR_PlayerDataSpecializationDisplay> m_aSpecialization1 = {};
134 ref array<ref SCR_PlayerDataSpecializationDisplay> m_aSpecialization2 = {};
136 const int SPECIALIZATION_MAX = 1000000;
139 static const float MODIFIER_DISTANCE_WALKED = 1;
140 static const float MODIFIER_KILLS = 250;
141 static const float MODIFIER_AI_KILLS = 125;
142 static const float MODIFIER_PRECISION = 300;
145 static const float MODIFIER_DISTANCE_DRIVEN = 1;
146 static const float MODIFIER_DRIVER_OF_PLAYERS = 0.7;
147 static const float MODIFIER_TRAVEL_TIME_SUPPLY_VEHICLE = 1;
148 static const float MODIFIER_TRAVELED_DISTANCE_SUPPLY_VEHICLE = 5;
149 static const int MODIFIER_PLAYERS_DIED_IN_VEHICLE = 500;
150 static const int MAX_PLAYERS_DIED_IN_VEHICLE_PENALTY = MODIFIER_PLAYERS_DIED_IN_VEHICLE * 5;
153 static const float MODIFIER_BANDAGE_SELF = 150;
154 static const float MODIFIER_BANDAGE_FRIENDLIES = 300;
155 static const float MODIFIER_TOURNIQUET_SELF = 150;
156 static const float MODIFIER_TOURNIQUET_FRIENDLIES = 300;
157 static const float MODIFIER_SALINE_SELF = 150;
158 static const float MODIFIER_SALINE_FRIENDLIES = 300;
159 static const float MODIFIER_MORPHINE_SELF = 150;
160 static const float MODIFIER_MORPHINE_FRIENDLIES = 300;
163 static const int INTERVALS_COUNT = 5;
164 static ref
const array<int> INTERVALS_ORIGIN = {0, 160000, 600000, 750000, 900000};
165 static ref
const array<int> INTERVALS_END = {160000, 600000, 750000, 900000, 1000000};
166 static ref
const array<float> INTERVALS_C1 = {1.9449, 0.71, 8.1682, 6, 18};
167 static ref
const array<float> INTERVALS_C2 = {0.9254, 0.9908, 0.9517, 0.9559, 0.9425};
173 static const float WARCRIMES_PUNISHMENT = 0.25;
175 static const float MAX_WARCRIMES_VALUE = 250000;
176 static const float WARCRIMES_DECREASE_PER_HOUR = 25000;
178 static const float STD_POINTS_QUALITY_TIME = 10000;
190 static const float SPPOINTS_CONVERSIONPERCENTAGE = 0.0001;
196 static const float MetersToKilometersConversion = 0.001;
208 float GetScoreThreshold()
210 return m_BanSettings.GetBanSettings().m_fScoreThreshold;
214 float GetScoreDecreasePerMinute()
216 return m_BanSettings.GetBanSettings().m_fScoreDecreasePerMinute;
220 float GetScoreDecreasePerSecond()
222 return m_BanSettings.GetBanSettings().m_fScoreDecreasePerMinute / 60;
226 float GetScoreToAccelerationMultiplier()
228 return m_BanSettings.GetBanSettings().m_fScoreMultiplier;
232 float GetMinAcceleration()
234 return m_BanSettings.GetBanSettings().m_fAccelerationMin;
238 float GetMaxAcceleration()
240 return m_BanSettings.GetBanSettings().m_fAccelerationMax;
244 float GetBanEvaluationLight()
246 return m_BanSettings.GetBanSettings().m_fBanEvaluationLight;
250 float GetBanEvaluationHeavy()
252 return m_BanSettings.GetBanSettings().m_fBanEvaluationHeavy;
256 float GetCrimePointsFriendlyKill()
258 return m_BanSettings.GetBanSettings().m_fCrimePtFriendKill;
262 float GetCrimePointsFriendlyMultiKill()
264 return m_BanSettings.GetBanSettings().m_fCrimePtTeamKill;
268 float GetQualityTimeTemp()
270 return m_BanSettings.GetBanSettings().m_fQualityTimeTemp;
274 bool GetVotingSuggestionEnabled()
276 return m_BanSettings.GetBanSettings().m_bVotingSuggestionEnabled >= 1;
280 string GetBanSettingsDescription()
282 return m_BanSettings.GetDesc();
286 string GetSpecializationName(
int n)
290 case 0:
return SPECIALIZATION_0_NAME;
291 case 1:
return SPECIALIZATION_1_NAME;
292 case 2:
return SPECIALIZATION_2_NAME;
295 return "UNDEFINED_NAME";
299 int GetSpecializationStatsCount(
int n)
303 case 0:
return SPECIALIZATION_0_COUNT;
304 case 1:
return SPECIALIZATION_1_COUNT;
305 case 2:
return SPECIALIZATION_2_COUNT;
312 array<ref SCR_PlayerDataSpecializationDisplay> GetSpecializationArray(
int n)
316 case 0:
return m_aSpecialization0;
317 case 1:
return m_aSpecialization1;
318 case 2:
return m_aSpecialization2;
327 if (m_BanSettings.GetDesc().IsEmpty())
328 GetGame().GetBackendApi().SettingsData(
"BanSettings", m_BanSettings);
330 Print(m_BanSettings.GetDesc(), LogLevel.DEBUG);
332 if (m_BanSettings.GetDesc().IsEmpty())
334 Print(
"Ban Settings could not be loaded from BE Storage: Relying on default config", LogLevel.WARNING);
335 m_BanSettings.SetDefault();
338 m_BanSettings.Log(LogLevel.DEBUG);
363 SPECIALIZATIONS_COUNT = tEnum.GetVariableCount();
366 SPECIALIZATION_0_COUNT = tEnum.GetVariableCount();
369 SPECIALIZATION_1_COUNT = tEnum.GetVariableCount();
372 SPECIALIZATION_2_COUNT = tEnum.GetVariableCount();
374 if (m_aSpecialization0.Count() != SPECIALIZATION_0_COUNT)
375 Print(
"Error in PlayerDataConfigs: Weird size on specialization0 array", LogLevel.ERROR);
377 if (m_aSpecialization1.Count() != SPECIALIZATION_1_COUNT)
378 Print(
"Error in PlayerDataConfigs: Weird size on specialization1 array", LogLevel.ERROR);
380 if (m_aSpecialization2.Count() != SPECIALIZATION_2_COUNT)
381 Print(
"Error in PlayerDataConfigs: Weird size on specialization2 array", LogLevel.ERROR);