Jump to content
Sign in to follow this  
ViktorReznov

[WIP][REVIVAL]SargeAI Genesys

Recommended Posts

So here I am going to post what I have been working on for quite a while now, well started some 4 months ago, and have nearly completely working. I am hoping that posting this here will inspire the community to assist in bringing back this absolute badass ai script to life.

This is the stock 1.5.2 SargeAI Framework that you can still download. Right out of the box it does "function" in Epoch 1.0.6.1 but with an extreme amount of errors. I have already modified this version to eliminate most errors, however, most of the Urban Patrol Script is broken. Here is where we begin to demolish the myth that Sarge is dead!

https://github.com/Arstan13/SargeAI-Genesys

for install...

Spoiler

in init.sqf

within the (isServer) block, underneath the execVM "\z\addons\dayz_server\traders\chernarus11.sqf"; //Add trader agents add call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf";

at the bottom add execVM "addons\UPSMON\scripts\Init_UPSMON.sqf"; [] execVM "addons\SARGE\SAR_AI_init.sqf";

in server.pbo\system\scheduler\sched_safetyVehicle.sqf line 4 add && (vehicle _x getVariable ["Sarge",0] != 1) to if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && !((typeOf vehicle _x) in DZE_safeVehicle)) then { so it looks like if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["EAT_Veh",0] !=1) && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_safeStatic)) then {

in server.pbo\system\scheduler\sched_corpses.sqf line 45 add && !(_x getVariable ["SAR_protect",false]) to if (_x getVariable["bodyName",""] != "") then { so it looks like if ((_x getVariable["bodyName",""] != "") && !(_x getVariable ["SAR_protect",false])) then {

this is nearly fully working. Ive had very limited number of errors to include

Spoiler

Error in expression <c getVariable ["UPSMON_grpid","0"]); if(_grpid==0) then{ KRON_UPS_Instances = KR> 1:01:48 Error position: <_grpid==0) then{ KRON_UPS_Instances = KR> 1:01:48 Error Undefined variable in expression: _grpid 1:01:48 File mpmissions\DayZ_Epoch_11.Chernarus\addons\UPSMON\scripts\upsmon.sqf, line 184

1:01:49 "Leader is still alive: SAR_leader_14" 1:01:50 "Assigned new leader: " Error in expression <R_AI_debug; };

_npc setVehicleVarname _leadername; _npc setVariable ["SAR_lea> 1:01:50 Error position: <_leadername; _npc setVariable ["SAR_lea> 1:01:50 Error Undefined variable in expression: _leadername 1:01:50 File mpmissions\DayZ_Epoch_11.Chernarus\addons\UPSMON\scripts\UPSMON\common\MON_functions.sqf, line 2071

Error in expression <,2] call MON_nearestSoldiers; if (count _vehicles>0) then { _npc = [_vehicles se> 1:01:54 Error position: <_vehicles>0) then { _npc = [_vehicles se> 1:01:54 Error Undefined variable in expression: _vehicles 1:01:54 File mpmissions\DayZ_Epoch_11.Chernarus\addons\UPSMON\scripts\upsmon.sqf, line 298

 

 3:58:34 "SAR_AI: Static Spawning for vehicle patrols finished"
 3:58:34 "SAR_AI: Dynamic and static spawning finished"
 3:58:34 "SAR_AI: applying vehicle fix ..."
 3:58:34 "Leader is still alive: SAR_leader_4"
 3:58:34 "Leader is still alive: SAR_leader_4"
 3:58:34 "Leader is still alive: SAR_leader_4"
 3:58:38 "Leader is still alive: SAR_leader_11"
 3:58:39 "Leader is still alive: SAR_leader_9"
 3:58:39 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon_end.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon_end
 3:58:40 "Leader is still alive: SAR_leader_10"
 3:58:40 "Leader is still alive: SAR_leader_11"
 3:58:41 "Assigned new leader: SAR_leader_12"
 3:58:41 "Leader is still alive: SAR_leader_9"
 3:58:41 "Leader is still alive: SAR_leader_9"
 3:58:41 "Leader is still alive: R 1-1-I:2"
 3:58:41 "Leader is still alive: SAR_leader_5"
 3:58:41 Error in expression <KRON_UPS_CIV_SURRENDER>
 3:58:41   Error position: <KRON_UPS_CIV_SURRENDER>
 3:58:41   Error Undefined variable in expression: kron_ups_civ_surrender
 3:58:41 "Leader is still alive: SAR_leader_5"
 3:58:41 "Leader is still alive: SAR_leader_10"
 3:58:41 "Leader is still alive: SAR_leader_10"
 3:58:41 "Leader is still alive: SAR_leader_4"
 3:58:52 "Leader is still alive: SAR_leader_2"
 3:58:52 "Leader is still alive: SAR_leader_2"
 3:58:52 "Leader is still alive: R 1-1-I:2"
 3:58:52 "Leader is still alive: R 1-1-I:2"
 3:58:52 "Leader is still alive: SAR_leader_15"
 3:58:52 "Leader is still alive: SAR_leader_17"
 3:58:52 Error in expression <KRON_UPS_>
 3:58:52   Error position: <KRON_UPS_>
 3:58:52   Error Undefined variable in expression: kron_ups_
 3:58:53 "Leader is still alive: SAR_leader_8"
 3:58:53 "Leader is still alive: SAR_leader_18"
 3:58:53 "Leader is still alive: SAR_leader_15"
 3:58:53 "Leader is still alive: SAR_leader_2"
 3:58:53 "Leader is still alive: SAR_leader_15"

 

Share this post


Link to post
Share on other sites

I would be willing to share my working dayzmod version if you like. There are still some errors but nothing that breaks the server or affects performance. All of the items and weapons are vanilla dayz so it should just work.

Share this post


Link to post
Share on other sites
On 10/26/2017 at 2:46 PM, Dango said:

I would be willing to share my working dayzmod version if you like. There are still some errors but nothing that breaks the server or affects performance. All of the items and weapons are vanilla dayz so it should just work.

that would be awesome m8!

Share this post


Link to post
Share on other sites

Here it is. Note the folder tips as they both are named addons. I have not shared this before so it is not in any sort of order. I just made it work and left it alone lol. There will be spam in the rpt about UPSMON stuff but that is due to the scripts being abandoned and not having the time to resolve each issue. From what I could tell it is something to do with the array it stores groups in. The first object is always null no matter what I do :/ but it does work and our server has no noticeable performance drain with lots of players even.

@ViktorReznov

https://github.com/Teh-Dango/A2-SargeAI

Share this post


Link to post
Share on other sites

With the last two instructions, where it says add to the two schedulers. It's a bit vague. Should I just place that snip of code in front of the code that's already on line 4 and 45 respectively? Or should I replace the code that is already on line 4 and 45 respectively?

Share this post


Link to post
Share on other sites
On 11/6/2017 at 11:16 AM, Runewulv said:

With the last two instructions, where it says add to the two schedulers. It's a bit vague. Should I just place that snip of code in front of the code that's already on line 4 and 45 respectively? Or should I replace the code that is already on line 4 and 45 respectively?

sched safety line should like this if you have not modified it (ie epoch admin tools)

if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_safeStatic)) then {

and sched corpses

if ((_x getVariable["bodyName",""] != "") && !(_x getVariable ["SAR_protect",false])) then {

Share this post


Link to post
Share on other sites

ah OK, I did test it out. It worked very well from what I could tell. But was not compatible with WAI. The missions wouldnt spawn. I'm super disappointed in that as I was excited to use it. I like DZAI but Sarge was always a lot more crafty and more versatile. It also cut about 10 FPS right off the top of all my players LOL. I run mission systems too which is why and Sarge is taxing obviously. Just too bad, was hoping to swap out DZAI for Sarge.

Share this post


Link to post
Share on other sites

Anyone still working on SargeAI? Only just found this post after editing the original SargeAI to get it working on on DayZ mod 1.9.0 so far have it working ok but have trouble with some AI/groups of AI spawning with no leader so they do nothing but stand there unless fired upon etc, sometime can spawn lots before this happens other times can be in some of the first few spawned. From what i can tell it seems to be to do with an array or an error in the loop that happens sometimes where it cant find an AI to assign as a leader. I don't mind doing some sort of band-aid fix tho not ideal like use function try{ } cause i know every now and then it will throw an exception and then maybe have a script that looks for any AI or group without a leader and kills/removes them. But ideally would like to clean the code up and get it working right as I'm planning on slimming it down and removing some of the functions i don't need and maybe adding other player interaction functions to the survivor/solider factions I.E give supplies/help/directions to supplies etc. If anyone is still working on this and wants to share findings or if you are an exceptional script writer and want to be hired get in touch. Or maybe try convince me why i should use DZAI as a base and modify that (if possible) to get the same type of good and bad AI, just so far from what i have read/seen SargeAI is more inline with what i want.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Similar Content

    • By FG_Trap
      Made a quick static ai mission that spawns on restart. 
      12 ai patrol the compound 
      4 Static m2's
      1 Heli Patrolling the compound 
      Crate for who ever clears all the ai.
      Some screenshots of the compound 


       
      https://github.com/Trapxxgods/Wai-Static-Mission 
    • By victorks
      my first work in editin :) https://uploaddeimagens.com.br/imagens/20180307202515_1-jpg https://uploaddeimagens.com.br/imagens/20180307202245_1-jpg DOWNLOAD: https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0 AI M2 NEED WAI: https://pastebin.com/GJMnPvZP ON THE MAP: https://pastebin.com/cyqH9rNV  
       
      https://www.dropbox.com/s/oq97j7x59362kqe/CASTLEai.sqf?dl=0
       
       
       
       
       
       
       
       
       
    • By Thug
      UPDATED 2/20/2018
      Click here for files from Github
      Hello all
      I have been asked to post this so here goes. The island is surrounded by 20m high walls. Only 4 ways in, well you could try and land a heli,  There is two weapon creates and a lottery box behind the palace.
      M2s waiting to greet you.
      If you would like the files, please PM me and I will send them to you.  Don't forget to leave email in PM. I am looking to find a new way to post links since DropBox changed the way they share.
      You have to update the items in the crates to the new class names in Epoch 1.0.6.2  DONE
    • By Cyrus
      Does anyone have info or tutorials on how to add static AI to a custom base? Something like patrolling AI and respawn on server restart?
      Im currently on Arma 2 Dayz Epoch 1.0.6.2 Chernarus map.
       
    • By Cubitron
      Aloha all
      We start our new Epoch Cherno Redux Server (Funserver)
      ip:185.194.140.234:2302
      Features:
      -increased Atagonist Spawn
      -Vehicle Patrol
      -Npc Patrol
      -Missions
      -F4 Player Menu ( WIP) with craft bike and quad)
      -Igiload

      Mods:
      -RDS Civilian Pack (the good old A2 Vehicles)
      -No Strider and Ifrit
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...