superlube
Member
Anti Combat logging - DiscoBot help and discussion here
(Make sure you backup any files you edit prior to following these instructions)
To install the bots, you need to first unpack your dayz_server.pbo file. Then copy the following files into the 'compile' folder:
server_botDamage.sqf
server_botDied.sqf
server_botSetup.sqf
server_botSync.sqf
(Link to files are in the original post)
Inside the 'compile' folder, you will see a file called 'server_playerLogin.sqf' and 'server_onPlayerDisconnect.sqf'
Inside the 'server_playerLogin.sqf' add this just above where it says "//??? endLoadingScreen;":
Inside the 'server_onPlayerDisconnect.sqf', find where it says :
and edit it so it looks like this:
Lastly, find the "init" folder and edit the file called "server_functions.sqf". Add the following lines just below where it says
"server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";"
Save everything, pack your dayz_server back up and start your server. When testing, make sure your test subject is in combat (fire your gun) before he logs out. The bot wont appear if the player logs out legitimately.
Refer to "Manatee Hunter" files which he/she posted if you are still unsure where things go. I've had no complaints yet on my server in regards to this anti-combat logging feature - everything seems to work fine.
is there a readme on how to install this?
do i need to create a discobot.pbo and add all the files & folders from the github link in post #1 ?? Where would I put this discobot.pbo ??
Thanks
(Make sure you backup any files you edit prior to following these instructions)
To install the bots, you need to first unpack your dayz_server.pbo file. Then copy the following files into the 'compile' folder:
server_botDamage.sqf
server_botDied.sqf
server_botSetup.sqf
server_botSync.sqf
(Link to files are in the original post)
Inside the 'compile' folder, you will see a file called 'server_playerLogin.sqf' and 'server_onPlayerDisconnect.sqf'
Inside the 'server_playerLogin.sqf' add this just above where it says "//??? endLoadingScreen;":
Code:
if (_playerID in botPlayers) then {
botPlayers = botPlayers - [_playerID];
};
Inside the 'server_onPlayerDisconnect.sqf', find where it says :
Code:
if ((_timeout - time) > 0) then {
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
};
Code:
if ((_timeout - time) > 0) then {
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
if (alive _object) then {
[_playerID, _characterID, typeof _object, _object] spawn server_botSetup;
};
};
Lastly, find the "init" folder and edit the file called "server_functions.sqf". Add the following lines just below where it says
"server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";"
Code:
server_botSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botSetup.sqf";
server_botSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botSync.sqf";
server_botDamage = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botDamage.sqf";
server_botDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botDied.sqf";
//Get instance name (e.g. dayz_1.chernarus) (not sure if this line is needed tbh)
fnc_instanceName = {
"dayz_" + str(dayz_instance) + "." + worldName
};
if(isNil "botPlayers") then {
botPlayers = []
};
Save everything, pack your dayz_server back up and start your server. When testing, make sure your test subject is in combat (fire your gun) before he logs out. The bot wont appear if the player logs out legitimately.
Refer to "Manatee Hunter" files which he/she posted if you are still unsure where things go. I've had no complaints yet on my server in regards to this anti-combat logging feature - everything seems to work fine.