Gameplay Settings – DayZ

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 123: Line 123:
|File names of the JSON files containing spawner data (see [https://community.bistudio.com/wiki/DayZ:Object_Spawner DayZ: Object Spawner] )
|File names of the JSON files containing spawner data (see [https://community.bistudio.com/wiki/DayZ:Object_Spawner DayZ: Object Spawner] )
|-
|-
 
}
=== Hit Direction Indicators ===
=== Hit Direction Indicators ===



Revision as of 14:17, 11 November 2021

What are gameplay settings?

Modding and customizing mission file (init.c) are very potent tools for server admins, however neither is very user friendly nor are they accessible to everyone.

Gameplay settings provide a way for server admins to tweak the game's behavior by simply modifying values inside the gameplay settings' JSON file.

Initial set-up:

The gameplay settings are located in DZ\worlds\chernarusplus\ce\cfggameplay.json, before you can start using it, you need to copy this file to your mission folder.

Once there, you can freely modify any of the values inside. To enable the usage of the file, you also need to add a new parameter "enableCfgGameplayFile = 1;" to your server.cfg file.

From that point on, whenever you run the server, the cfggameplay.json will be loaded and used by the game.

Parameters

}

Hit Direction Indicators

To adjust the Hit direction indicators, this excerpt is needed in the cfgGameplay.json file:

"UIData":
{
    "HitIndicationData":
    {
        "hitDirectionOverrideEnabled": 1, //Decides whether the values get used or not. Since anything undefined in the 'HitIndicationData' class (or any class in json file) is considered zero, allows us to determine that some valid data had been loaded.
        "hitDirectionBehaviour": 1, //Dictates general behaviour of the hit indicator. 0 == Disabled, 1 == Static, 2 == Dynamic (moving when displayed, WIP)
        "hitDirectionStyle": 0, //Dictates which type of indicator gets used. Set of images and position calculations. 0 == 'splash', 1 == 'spike', 2 == 'arrow'
        "hitDirectionIndicatorColorStr": "0xff00ff00", //Color of the indicator widget, in ARGB format. The color is written in string form (""). For more info on the ARGB format, see section below.
        "hitDirectionMaxDuration": 2.0, //Maximal duration of the hit indicator. Actual duration is between 0.6..1.0 of the defined value, depending on the severity of the hit (which generally means heavier hits == longer indication)
        "hitDirectionBreakPointRelative": 0.2, //Fraction of the actual duration, after which the indicator begins to recede (currently fade-out only), 0.0 = fades from the beginning, 0.5 == fades after 50% duration has elapsed, 1.0 == no fading
        "hitDirectionScatter": 10.0, //Amount of scatter to induce inaccuracy to the indication. Actual scatter is randomized by the amount of degrees in both directions (+- value, so value od 10 gives a potential scatter of 20 DEG)
        "hitIndicationPostProcessEnabled": 1 //allows for disabling of the old hit effect (red flash)
    }
}

ARGB Format

ARGB used in the cfgGameplay.json is read as a string due to inherent file format limitations. It consists of:

  • Hexadecimal notation: 0x
  • Alpha value in hexadecimal format: 00 – FF
  • Red color value in hexadecimal format: 00 – FF
  • Green color value in hexadecimal format: 00 – FF
  • Blue color value in hexadecimal format: 00-FF

Result string looks like "0xFFFF0000" (red).

The value is not case sensitive, so it could be written in any case, or combination thereof.

Type Parameter Details
int version Internal parameter to keep track of the version of the file
bool disableBaseDamage Damage from structures built through base-building
bool disableContainerDamage Disable damage from items such as tents and barrels
bool disableRespawnDialog Disable a UI dialogue window in which the player selects the type of respawn they wish to perform after pressing the respawn button
bool disablePersonalLight Disables the omnipresent personal light lighting up objects close to player during night-time
float staminaWeightLimitThreshold This amount of stamina points (divided by 1000) will not count towards stamina weight deduction
float staminaMax Maximum stamina (setting to 0 may produce unexpected results)
float staminaKgToStaminaPercentPenalty Multiplier used when calculating stamina points deducted from max stamina given the player load
float staminaMinCap Minimum size of stamina cap (setting to 0 may produce unexpected results)
float sprintStaminaModifierErc Modifies the rate at which the stamina is being consumed during erected sprint
float sprintStaminaModifierCro Modifies the rate at which the stamina is being consumed during crouched sprint
int lightingConfig What type of lighting will be used during night time (0 = bright, 1 = dark)
bool disableIsCollidingBBoxCheck Allows placement when the hologram is colliding with objects in the world
bool disableIsCollidingPlayerCheck Allows placement when the hologram is colliding with player
bool disableIsClippingRoofCheck Allows placement where placing would cause clipping with the roof
bool disableIsBaseViableCheck Allows placement on dynamic objects and other otherwise incompatible base
bool disableIsCollidingGPlotCheck Allows placement of garden plots despite incompatible surface type
bool disableIsCollidingAngleCheck Allows placement despite exceeding roll/pitch/yaw limits
bool disableIsPlacementPermittedCheck Allows placement event when not permitted by rudimentary checks
bool disableHeightPlacementCheck Allows placement with limited height space
bool disableIsUnderwaterCheck Allows placement under water
bool disableIsInTerrainCheck Allows placement when clipping with terrain
bool disablePerformRoofCheck Allows construction when clipping with the roof
bool disableIsCollidingCheck Allows construction when colliding with objects in the world
bool disableDistanceCheck Prevents construction when player gets bellow specified range
string array objectSpawnersArr File names of the JSON files containing spawner data (see DayZ: Object Spawner )