Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
cfggameplaydatajson.c
Go to the documentation of this file.
3{
4 int version = -1;
5
7 void InitServer()
8 {
9 }
10
11 //-------------------------------------------------------------------------------------------------
12
13
15 ref ITEM_GeneralData GeneralData = new ITEM_GeneralData;
16 ref ITEM_PlayerData PlayerData = new ITEM_PlayerData;
17 ref ITEM_WorldData WorldsData = new ITEM_WorldData;
18 ref ITEM_BaseBuildingData BaseBuildingData = new ITEM_BaseBuildingData;
19 ref ITEM_UIData UIData = new ITEM_UIData;
20 ref ITEM_MapData MapData = new ITEM_MapData;
21 ref ITEM_VehicleData VehicleData = new ITEM_VehicleData;
22
23};
24
25class ITEM_DataBase
26{
27 void ITEM_DataBase()
28 {
29 #ifdef SERVER
30 CfgGameplayHandler.RegisterItem(this);
31 #endif
32 }
33
34 bool ValidateServer()
35 {
36 return true;
37 }
38
39 void InitServer();
40}
41
42class ITEM_GeneralData : ITEM_DataBase
43{
44 override void InitServer()
45 {
46 disableBaseDamage = g_Game.ServerConfigGetInt( "disableBaseDamage" );
47 disableContainerDamage = g_Game.ServerConfigGetInt( "disableContainerDamage" );
48 disableRespawnDialog = g_Game.ServerConfigGetInt("disableRespawnDialog");
49 }
50
51 override bool ValidateServer()
52 {
53 return true;
54 }
55 //-------------------------------------------------------------------------------------------------
56
61
62};
63
64//--------------------------------------------------------------------------------------------------------------------------------------------------
65
66class ITEM_PlayerData : ITEM_DataBase
67{
68 ref ITEM_StaminaData StaminaData = new ITEM_StaminaData;
69 ref ITEM_ShockHandlingData ShockHandlingData = new ITEM_ShockHandlingData;
70 ref ITEM_MovementData MovementData = new ITEM_MovementData;
71 ref ITEM_DrowningData DrowningData = new ITEM_DrowningData;
72 ref ITEM_WeaponObstructionData WeaponObstructionData = new ITEM_WeaponObstructionData;
73
74 override void InitServer()
75 {
76 disablePersonalLight = g_Game.ServerConfigGetInt( "disablePersonalLight" );
77 }
78
79 override bool ValidateServer()
80 {
81 return true;
82 }
83
84 //-------------------------------------------------------------------------------------------------
86 bool disablePersonalLight;
87 bool disable2dMap;
88 ref TStringArray spawnGearPresetFiles;
89
90};
91
92//--------------------------------------------------------------------------------------------------------------------------------------------------
93
94class ITEM_ShockHandlingData : ITEM_DataBase
95{
96 override void InitServer()
97 {
98 }
99
100 override bool ValidateServer()
101 {
102 return true;
103 }
104
105 //-------------------------------------------------------------------------------------------------
107 float shockRefillSpeedConscious = PlayerConstants.SHOCK_REFILL_CONSCIOUS_SPEED;
108 float shockRefillSpeedUnconscious = PlayerConstants.SHOCK_REFILl_UNCONSCIOUS_SPEED;
109 bool allowRefillSpeedModifier = true;
110};
111
112//--------------------------------------------------------------------------------------------------------------------------------------------------
113
114class ITEM_StaminaData : ITEM_DataBase
115{
116 override void InitServer()
117 {
118 staminaMax = GameConstants.STAMINA_MAX;
119 }
120
121 override bool ValidateServer()
122 {
123 if (staminaMax == 0.0)
124 return false;
125
126 return true;
127 }
128
129 //-------------------------------------------------------------------------------------------------
131 float staminaWeightLimitThreshold = GameConstants.STAMINA_WEIGHT_LIMIT_THRESHOLD;
132 float staminaMax = GameConstants.STAMINA_MAX;
133 float staminaKgToStaminaPercentPenalty = GameConstants.STAMINA_KG_TO_STAMINAPERCENT_PENALTY;
134 float staminaMinCap = GameConstants.STAMINA_MIN_CAP;
135 float sprintStaminaModifierErc = 1;//consumption of stamina during standing sprint modification
136 float sprintStaminaModifierCro = 1;//consumption of stamina during crouched sprint modification
137 float sprintSwimmingStaminaModifier = 1;//consumption of stamina during swimming sprint modification
138 float sprintLadderStaminaModifier = 1;//consumption of stamina during climbing sprint modification
139 float meleeStaminaModifier = 1;//consumption of stamina during melee attacks and evasion modification
140 float obstacleTraversalStaminaModifier = 1;// vaulting and climbing stamina consumption modification
141 float holdBreathStaminaModifier = 1;// hold breath stamina consumption modification
142};
143
144//--------------------------------------------------------------------------------------------------------------------------------------------------
145
146class ITEM_MovementData : ITEM_DataBase
147{
148 override void InitServer()
149 {
150 }
151
152 override bool ValidateServer()
153 {
154 return true;
155 }
156
157 //-------------------------------------------------------------------------------------------------
159 float timeToStrafeJog = 0.1;
160 float rotationSpeedJog = 0.15;
161 float timeToSprint = 0.45;
162 float timeToStrafeSprint = 0.3;
163 float rotationSpeedSprint = 0.15;
164 bool allowStaminaAffectInertia = 1;
165}
166
167//--------------------------------------------------------------------------------------------------------------------------------------------------
168
169class ITEM_WorldData : ITEM_DataBase
170{
171 override void InitServer()
172 {
173 lightingConfig = g_Game.ServerConfigGetInt( "lightingConfig" );
174 wetnessWeightModifiers = {GameConstants.WEIGHT_DRY,GameConstants.WEIGHT_DAMP,GameConstants.WEIGHT_WET,GameConstants.WEIGHT_SOAKING_WET,GameConstants.WEIGHT_DRENCHED};
175 }
176
177 override bool ValidateServer()
178 {
180 {
181 return false;
182 }
184 return true;
187 //-------------------------------------------------------------------------------------------------
190
194 ref array<float> wetnessWeightModifiers = {GameConstants.WEIGHT_DRY,GameConstants.WEIGHT_DAMP,GameConstants.WEIGHT_WET,GameConstants.WEIGHT_SOAKING_WET,GameConstants.WEIGHT_DRENCHED};
196};
197
198//--------------------------------------------------------------------------------------------------------------------------------------------------
199
200class ITEM_BaseBuildingData : ITEM_DataBase
201{
202
203 override void InitServer()
204 {
205 }
206
207 override bool ValidateServer()
208 {
209 return true;
210 }
211
212 //-------------------------------------------------------------------------------------------------
214 ref ITEM_HologramData HologramData = new ITEM_HologramData;
215 ref ITEM_ConstructionData ConstructionData = new ITEM_ConstructionData;
216};
217
218//--------------------------------------------------------------------------------------------------------------------------------------------------
219
220class ITEM_HologramData : ITEM_DataBase
221{
222
223 override void InitServer()
224 {
225 disallowedTypesInUnderground = new TStringSet();
226 disallowedTypesInUnderground.Insert("FenceKit");
227 disallowedTypesInUnderground.Insert("TerritoryFlagKit");
228 disallowedTypesInUnderground.Insert("WatchtowerKit");
229 }
230
231 override bool ValidateServer()
232 {
233 return true;
234 }
235
236 //-------------------------------------------------------------------------------------------------
238 bool disableIsCollidingBBoxCheck;
239 bool disableIsCollidingPlayerCheck;
240 bool disableIsClippingRoofCheck;
241 bool disableIsBaseViableCheck;
242 bool disableIsCollidingGPlotCheck;
243 bool disableIsCollidingAngleCheck;
244 bool disableIsPlacementPermittedCheck;
245 bool disableHeightPlacementCheck;
246 bool disableIsUnderwaterCheck;
247 bool disableIsInTerrainCheck;
248 bool disableColdAreaPlacementCheck;
249 ref TStringSet disallowedTypesInUnderground;
250};
251
252//--------------------------------------------------------------------------------------------------------------------------------------------------
253
254class ITEM_ConstructionData : ITEM_DataBase
255{
256
257 override void InitServer()
258 {
259 }
260
261 override bool ValidateServer()
262 {
263 return true;
264 }
265
266 //-------------------------------------------------------------------------------------------------
268 bool disablePerformRoofCheck;
269 bool disableIsCollidingCheck;
270 bool disableDistanceCheck;
271};
272
273//--------------------------------------------------------------------------------------------------------------------------------------------------
274
276class ITEM_UIData : ITEM_DataBase
277{
278 override void InitServer()
279 {
280 HitIndicationData.InitServer();
281 }
282
283 override bool ValidateServer()
284 {
285 return true;
286 }
287
288 //-------------------------------------------------------------------------------------------------
290 ref ITEM_HitIndicationData HitIndicationData = new ITEM_HitIndicationData;
291 bool use3DMap = false;
292};
293
294//--------------------------------------------------------------------------------------------------------------------------------------------------
295
296class ITEM_HitIndicationData : ITEM_DataBase
297{
298 override void InitServer()
299 {
300 hitDirectionOverrideEnabled = false;
301 hitIndicationPostProcessEnabled = false;
302 }
303
304 override bool ValidateServer()
305 {
306 return true;
307 }
308
309 //-------------------------------------------------------------------------------------------------
312 bool hitDirectionOverrideEnabled = false;
313 int hitDirectionBehaviour = HitDirectionModes.STATIC;
314 int hitDirectionStyle = HitIndicatorType.SPLASH;
315 string hitDirectionIndicatorColorStr;
316 float hitDirectionMaxDuration = HitDirectionConstants.DURATION_BASE;
317 float hitDirectionBreakPointRelative = HitDirectionConstants.BREAKPOINT_BASE;
318 float hitDirectionScatter = HitDirectionConstants.SCATTER;
319 bool hitIndicationPostProcessEnabled = false;
320};
321
322//--------------------------------------------------------------------------------------------------------------------------------------------------
323
324class ITEM_MapData : ITEM_DataBase
325{
326 override void InitServer()
327 {
328 }
329
330 override bool ValidateServer()
331 {
332 return true;
333 }
334
335 //-------------------------------------------------------------------------------------------------
337 bool ignoreMapOwnership = false;
338 bool ignoreNavItemsOwnership = false;
339 bool displayPlayerPosition = false;
340 bool displayNavInfo = true;
341}
342
343//--------------------------------------------------------------------------------------------------------------------------------------------------
344
345class ITEM_DrowningData : ITEM_DataBase
346{
347 override void InitServer()
348 {
349 }
350
351 override bool ValidateServer()
352 {
353 return true;
354 }
355
356 //-------------------------------------------------------------------------------------------------
363//--------------------------------------------------------------------------------------------------------------------------------------------------
365{
366 DISABLED = 0, // Obstruction disallowed. Weapon doesn't obstruct, but still lifts.
367 ENABLED = 1, // Obstruction allowed. Weapon first obstructs and then lifts.
368 ALWAYS = 2, // Obstruction always. Weapon obstructs and never lifts.
369}
370
371class ITEM_WeaponObstructionData : ITEM_DataBase
372{
373 override void InitServer()
377 override bool ValidateServer()
378 {
379 return true;
380 }
381
382 //-------------------------------------------------------------------------------------------------
386}
387
388//--------------------------------------------------------------------------------------------------------------------------------------------------
389
390class ITEM_VehicleData : ITEM_DataBase
391{
392 override void InitServer()
393 {
394 }
395
396 override bool ValidateServer()
397 {
398 return true;
399 }
400
401 //-------------------------------------------------------------------------------------------------
403 float boatDecayMultiplier = 1;
404};
bool ValidateServer()
EWeaponObstructionMode
ref array< float > environmentMaxTemps
ref array< string > objectSpawnersArr
ref array< float > wetnessWeightModifiers
bool disableRespawnDialog
ref array< float > environmentMinTemps
EWeaponObstructionMode staticMode
!! all member variables must correspond with the cfggameplay.json file contents !!...
float healthDepletionSpeed
ITEM_PlayerData InitServer
bool disableRespawnInUnconsciousness
float staminaDepletionSpeed
!! all member variables must correspond with the cfggameplay.json file contents !!...
int lightingConfig
!! all member variables must correspond with the cfggameplay.json file contents !!...
EWeaponObstructionMode dynamicMode
void ITEM_DataBase()
bool disableBaseDamage
!! all member variables must correspond with the cfggameplay.json file contents !!...
ref TStringArray playerRestrictedAreaFiles
bool disableContainerDamage
float shockDepletionSpeed
contents of this class will be transfered to client upon connecting, with the variables in either ini...
data for UI, in-game HUD, and similar
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZGame g_Game
Definition dayzgame.c:3942
HitDirectionModes
Definition constants.c:98
array< string > TStringArray
Definition enscript.c:712
set< string > TStringSet
Definition enscript.c:802
@ DISABLED
Definition enwidgets.c:79