Page MenuHomeFeedback Tracker

Linux Ubuntu 20.04 server cfggameplay.json Problem
Assigned, UrgentPublic

Description

Week ago did my Dayz server based on linux.
Server is very stable and runs without problems.

I did some changes in cfggameplay.json

 "PlayerData":
	{
		"disablePersonalLight": 0,
		"StaminaData":
		{
			"sprintStaminaModifierErc": 0.001,
			"sprintStaminaModifierCro": 0.001,
			"staminaWeightLimitThreshold": 6000.0,
			"staminaMax": 100.0,
			"staminaKgToStaminaPercentPenalty": 0.001,
			"staminaMinCap": 5.0
		},

Problem is that these changes won't take any effect in gameplay. Any solution ?
enableCfgGameplayFile = 1; is enabled in serverDZ.cfg

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Linux x64
Operating System Version
Ubuntu 20.04
Category
General

Event Timeline

Shal3R created this task.Jun 2 2022, 3:17 PM
Shal3R updated the task description. (Show Details)Jun 2 2022, 3:24 PM
Shal3R updated the task description. (Show Details)Jun 3 2022, 10:48 AM
Geez changed the task status from New to Assigned.Jun 8 2022, 11:02 AM
Geez assigned this task to dedmen.

After adding enableCfgGameplayFile = 1; to my serverDZ.cfg and making changes to cfggameplay.json, I also found that these setting never took effect. So I tried a few tests:

I deleted cfggameplay.json and the servert runs just fine.
I put garbage into it, e.g echo "asdasdasd" > cfggameplay.json, and the server still runs fine.

Tracing the openat() system call using strace during the execution of the server shows that the cfggameplay.json file isn't opened at all:

strace -o /tmp/dayz.log -e openat -f ./DayZServer -config=/profiles/serverDZ.cfg -port=2302 -freezecheck -BEpath=/profiles/battleye -profiles=/profiles -nologs

Let the server start up. Then:

grep json /tmp/dayz.log

The only json file that's opened is a different one:

1353 openat(AT_FDCWD, "/serverfiles/mpmissions/dayzOffline.chernarusplus/cfgundergroundtriggers.json", O_RDONLY) = 164

This comment was removed by KaMiKaZe6426.

Tracing the openat() system call using strace during the execution of the server shows that the cfggameplay.json file isn't opened at all:

strace -o /tmp/dayz.log -e openat -f ./DayZServer -config=/profiles/serverDZ.cfg -port=2302 -freezecheck -BEpath=/profiles/battleye -profiles=/profiles -nologs

Let the server start up. Then:

grep json /tmp/dayz.log

The only json file that's opened is a different one:

1353 openat(AT_FDCWD, "/serverfiles/mpmissions/dayzOffline.chernarusplus/cfgundergroundtriggers.json", O_RDONLY) = 164

This was actually a very helpful tip, thank you very much, because of this I was able to get it to work again on my server.

If run the strace for the stat systemcall instead of the openat one, you will find that stat for the file cfgGameplay.json is being done during startup:

...
20457 stat("/dayz_server_root_directory/mpmissions/dayzOffline.chernarusplus/cfgGameplay.json", {st_mode=S_IFREG|0755, st_size=2594, ...}) = 0
...

(this line may look a bit different for you, i only took this trace after finding and fixing my issue)

So it seems the reason that the file is not being opened is the spelling of its name (note the capital G in the syscall that is neither in the documentation nor in the directory tree you download: cfggameplay.json vs cfgGameplay.json).
For me, renaming this file to include the capital G in its filename has actually solved the issue, so here's to hoping that this is the case for you as well.

I suspect that this stems from development on windows (given the apparent focus on windows releases, i suspect that DayZ is developed on windows), as windows does not care about capitalization of filenames at all while linux very much does (i.e on windows 'cfggameplay.json' and 'cfgGameplay.json' are actually the same file, while on linux they're two different files).

In any case, good luck to you all having this issue, and I hope that my comment here can help others as well.

Tracing the openat() system call using strace during the execution of the server shows that the cfggameplay.json file isn't opened at all:

strace -o /tmp/dayz.log -e openat -f ./DayZServer -config=/profiles/serverDZ.cfg -port=2302 -freezecheck -BEpath=/profiles/battleye -profiles=/profiles -nologs

Let the server start up. Then:

grep json /tmp/dayz.log

The only json file that's opened is a different one:

1353 openat(AT_FDCWD, "/serverfiles/mpmissions/dayzOffline.chernarusplus/cfgundergroundtriggers.json", O_RDONLY) = 164

This was actually a very helpful tip, thank you very much, because of this I was able to get it to work again on my server.

If run the strace for the stat systemcall instead of the openat one, you will find that stat for the file cfgGameplay.json is being done during startup:

...
20457 stat("/dayz_server_root_directory/mpmissions/dayzOffline.chernarusplus/cfgGameplay.json", {st_mode=S_IFREG|0755, st_size=2594, ...}) = 0
...

(this line may look a bit different for you, i only took this trace after finding and fixing my issue)

So it seems the reason that the file is not being opened is the spelling of its name (note the capital G in the syscall that is neither in the documentation nor in the directory tree you download: cfggameplay.json vs cfgGameplay.json).
For me, renaming this file to include the capital G in its filename has actually solved the issue, so here's to hoping that this is the case for you as well.

I suspect that this stems from development on windows (given the apparent focus on windows releases, i suspect that DayZ is developed on windows), as windows does not care about capitalization of filenames at all while linux very much does (i.e on windows 'cfggameplay.json' and 'cfgGameplay.json' are actually the same file, while on linux they're two different files).

In any case, good luck to you all having this issue, and I hope that my comment here can help others as well.

Very helpful, and thanks to the op strace operator.

Confirm: cfgGameplay.json is working in 1042420 build 12758895 on Ubuntu 18.04

Next, cfgeffectarea.json [a new ticket?]

Dzizus added a subscriber: Dzizus.Dec 14 2023, 3:12 PM

Hey Astropos,

There is no need for a new ticket, we are aware of the issue and it will be fixed in future updates. For now, you can rename the file to cfgEffectArea.json

Regards,
Dzizus

Shal3R added a comment.EditedDec 14 2023, 3:47 PM

Yeah. I created this last year!!! 1.5 years ago and you guys reply only now ? 😄😄😄