Sarge AI Installation question (server_cleanup.fsm)

Snakeyes

Member
I was watching some YouTube videos of Sarge AI. I like that there are friendly NPCs as well as bandit. I would like to try it out on my server, but I'm stymied by the following code and I'm not sure what to do to proceed.

I got stuck on this part from the quick installation guide at GitHub. I don't find these lines of code at all in my server_cleanup.fsm file. There may be similar code, but not in a conditional statement like those. If I can get beyond that, the rest is pretty straight forward.

[excerpt]

A2) Adjust your server_cleanup.fsm file for group cleanups

Check out the server_cleanup.fsm file that is part of this repository. Take it as an EXAMPLE (might differ based on server package that you use)how to adjust yours.

Look for (around line 290)

" if ((count units _x==0) ) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
and change the FIRST line to to:

" if ((count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
A2) Adjust your server_cleanup.fsm file for "Killed a hacker" fix

Depends which DayZ version you are running.

The line you are looking for is either:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") ) then {" \n
Change to / add as shown:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") && (vehicle _x getVariable [""Sarge"",0] != 1) ) then {" \n


Or the line looks like

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n


Change that to

if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (ty
 
I was watching some YouTube videos of Sarge AI. I like that there are friendly NPCs as well as bandit. I would like to try it out on my server, but I'm stymied by the following code and I'm not sure what to do to proceed.

I got stuck on this part from the quick installation guide at GitHub. I don't find these lines of code at all in my server_cleanup.fsm file. There may be similar code, but not in a conditional statement like those. If I can get beyond that, the rest is pretty straight forward.

[excerpt]

A2) Adjust your server_cleanup.fsm file for group cleanups

Check out the server_cleanup.fsm file that is part of this repository. Take it as an EXAMPLE (might differ based on server package that you use)how to adjust yours.

Look for (around line 290)

" if ((count units _x==0) ) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
and change the FIRST line to to:

" if ((count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
A2) Adjust your server_cleanup.fsm file for "Killed a hacker" fix

Depends which DayZ version you are running.

The line you are looking for is either:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") ) then {" \n
Change to / add as shown:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") && (vehicle _x getVariable [""Sarge"",0] != 1) ) then {" \n


Or the line looks like

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n


Change that to

if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (ty


The portion below is now located in your server_functions.sqf file.
The line you are looking for is either:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") ) then {" \n
Change to / add as shown:

" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"") && (vehicle _x getVariable [""Sarge"",0] != 1) ) then {" \n


Or the line looks like

if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n


Change that to

if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (ty
[/QUOTE]

As for the below portion, I am still waiting on an answer for this myself. Can anyone answer this please so that I may get SARGE back up and working correctly? Where is the code located at now as it is no longer in server_cleanup.fsm?

Check out the server_cleanup.fsm file that is part of this repository. Take it as an EXAMPLE (might differ based on server package that you use)how to adjust yours.

Look for (around line 290)

" if ((count units _x==0) ) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
and change the FIRST line to to:

" if ((count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
 
I think both bits of code are located in the server_functions.sqf. The second part is directly below the first in my file. I did some testing and I had SARGE AI running with Battleye disabled. It sounded like a war zone outside my base. It definitely adds some flavor to the game! I checked my RPT and it was loaded with errors.

I wonder if the cleanup/hacker code being in a different file name will cause problems?
 
I think both bits of code are located in the server_functions.sqf. The second part is directly below the first in my file. I did some testing and I had SARGE AI running with Battleye disabled. It sounded like a war zone outside my base. It definitely adds some flavor to the game! I checked my RPT and it was loaded with errors.

I wonder if the cleanup/hacker code being in a different file name will cause problems?

I have nothing like the below code in my server functions file.

" if ((count units _x==0) ) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
and change the FIRST line to to:

" if ((count units _x==0) && !(_x getVariable[""SAR_protect"",false])) then {" \n
" diag_log (""CLEANUP: DELETING A GROUP: "" + str(_x));" \n
 
Back
Top