The following tutorial applies to all sUDE mods, namely sVisual and sGunplay at the moment.
First server launch
Make sure you launch the server at least once with the mod of which you wish to constrain the user settings, and that at least player has joined once; this will ensure the needed files will be automatically generated.
Now you have to locate your server profile folder which by default can be found in your server installation directory. If you're using a dayz server provider, refer to its documentation.
Navigate to the folder sUDE/config
, in which you'll find the constraints file.
They should be of the format [NAME OF THE MOD]_constraints.json
;
it's a json
file.
By default the constraints are disabled. Proceed to the next step to enable them.
Edit the constraints
Open the file with your favorite text editor and edit the constraints as needed
If you're unfamiliar with editing JSON files, you can use the sConstraint editor tool
Make sure that the syntax of the file is correct, or the server will refuse to load the file and will override it with the default values
How a constraint work
A constraint is made of mainly three fields:
-
constrain
: a boolean value.
If set tofalse
the user will be able to freely change the setting without any constraint
If set totrue
the user will be able to change the setting based on the constrain you define. -
message
: A string containing a message that will be shown to the players when trying to edit a constrained option.A message also supports some basic markup and strings of different localizations from
stringtables.csv
(e.g. "#MY_LOCALIZED_STRING") -
The actual constrained value: this may depends on the option you want to constrain.
-
If the option is a "checkbox" you'll see a
value
field: a boolean value.
If set tofalse
the user setting will be forced to be turned off
If set totrue
the user setting will always be turned on -
If the option is a "slider" you'll see two field
min
andmax
: they will respecitevly constrain the minimum and maximum value.If you don't want the player to change the setting at all, you can set constrain both
min
andmax
at the same value
-
If the option is a "checkbox" you'll see a
Save and restart
Once you finished editing the file, save it and restart the server to make sure the changes take effect
Additional info
- Make sure your .json syntax is correct, otherwise the file will be regenerated with the default values
- Since the .json will be regenerated when incorrect, corrupt or can't be read from the server, it's advised to keep a backup, so you won't loose your edits
- The DayZ JSON parser is not capable of handling comments, so refrain from adding them in the .json
- The JSON parser accepts both 0 or false and 1 or true for boolean values
- If you're having issues with constraints not working, delete the constraint file and let the server regenerate it
Sample constraints configuration
sVisual constraints file
{
"effectsIntensity": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0.5,
"max": 2
},
"ddofIntensity": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0,
"max": 1
},
"ddofEnabledIn3PP": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": false
},
"ddofEnabledInVehicle": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": true
},
"headbobIntensity": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0,
"max": 1
},
"headbobEnabledIn3PP": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": true
},
"motionBlurIntensity": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0,
"max": 1
},
"bloomIntensity": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0,
"max": 1
},
"headLeanAngle": {
"constrain": true,
"message": "Hello! <p>I've decided to block this settings</p> <i>Why?</i><br/> I don't know <b>LOL</b> <br/><font>This is a very cool font</font><br/><font>-----------------------</font>",
"min": 0,
"max": 15.83
}
}
sGunplay constraints file
{
"adsFOVMultiplier": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0.75,
"max": 1.0
},
"adsFOVMagnOpticsMultiplier": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0.6,
"max": 0.6
},
"adsDOFIntensity": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0.0,
"max": 1.0
},
"hideWeaponBarrelInOptic": {
"constrain": false,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": false
},
"hideClothingInOptic": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": true
},
"lensZoomStrength": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": 0.75,
"max": 0.75
},
"deadzoneLimits": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": [
0.0,
0.0,
0.0,
0.0
],
"max": [
0.5,
0.5,
0.5,
0.5
]
},
"resetDeadzoneOnFocus": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": true
},
"showDynamicCrosshair": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": true
},
"dynamicCrosshairType": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"value": 4
},
"dynamicCrosshairRGBA": {
"constrain": true,
"message": "#STR_SUDE_LAYOUT_OPTIONS_CONSTRAINED",
"min": [
0.0,
0.0,
0.0,
10.0
],
"max": [
255.0,
255.0,
255.0,
130.0
]
}
}