LancerSolurus Posted February 23, 2014 Report Share Posted February 23, 2014 I have been working on companions for the players in the Dayz & Epoch mods. Had a few in Fallout, made me want them on DayZ as well. It is nearly working perfectly, survivors can be be recruited and once recruited can not be taken over by another player. They will kill zeds and bandits. All spawning of the survivors is server side so they will be available even when the first player logs in. Currently they aren't saved to the database so all will be available to players at every restart. I may add purchasable AI in a later update but this version is to simply to get them working properly. Looking for some feedback as to what you would want from them. Remember these are regular DayZ AI so that limits it to what they can do by default. Once you recruit them you can use (~,Alt ~, Backspace & numpad .) to control them. Now for the release of this addon Version 0.1 DB Groups for Epoch by Digital Brilliance Software All of these instructions are for Epoch 1.0.3.1 only ************************************************************************************************************************************************************** You will find the dbgroups folder in the the same folder you opened this file in. Copy 'dbgroups' to your MPMissions\Dayz_Epoch_version.map folder, mine is DayZ_Epoch_17.Chernarus Edits to your init.sqf above this line startLoadingScreen ["","RscDisplayLoadCustom"]; add this DBGroupsStarted = false; DBMaxSurvivors = 50; // change this to the number of survivors you want, the more you add the lower your server and client FPS In this section before the };, this is to initialize the public variables... if (isServer) then { add this DBPV_SrvrUnits = []; publicVariable "DBPV_SrvrUnits"; DBCurSurvivors = 0; publicVariable "DBCurSurvivors"; DBSGroups = false; publicVariable "DBSGroups"; DBUpdClient = false; publicVariable "DBUpdClient"; And then after the }; add this so the server and client initialize it properly (between }; and if (!isDedicated) then {) [] execVM "dbgroups\init.sqf"; In this section before the }; if (!isDedicated) then { add this [] execVM "dbgroups\scripts\scp_srvractions.sqf"; [] execVM "dbgroups\scripts\scp_adjustrating.sqf"; DBUpdClient = true; // update survivor variables publicVariable "DBUpdClient"; Now if you want the zeds to be killed by the survivors you will need to create a custom zombie_generate.sqf file and add a single line to it near the very end of the script, there are plenty of examples of how to edit your compiles script to point to a new file This is the compiles.sqf line you need to make point to your new file zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; At the bottom of zombie_generate.sqf right above //Start behavior _id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm"; add this _agent addRating -1000000; Thats it, enjoy your new companions Lancer Solurus http://www.galaxyempire.com/ Add this to mission.sqm, needed for spawning, adjust the numbers if you already have additional markers class Item18 { position[]={8319.0,6.0942454,12763.0}; name="S1"; type="mil_box"; colorName="ColorBrown"; }; class Item19 { position[]={1000.0,5.8799777,2860.0}; name="S2"; type="mil_box"; colorName="ColorBrown"; }; class Item20 { position[]={4400.0,6.1736083,3960.0}; name="S3"; type="mil_box"; colorName="ColorBrown"; }; class Item21 { position[]={6500.0,6,4660.0}; name="S4"; type="mil_box"; colorName="ColorBrown"; }; class Item22 { position[]={8400.0,6.0013299,6660.0}; name="S5"; type="mil_box"; colorName="ColorBrown"; }; class Item23 { position[]={10400.0,5.8035483,8860.0}; name="S6"; type="mil_box"; colorName="ColorBrown"; }; class Item24 { position[]={10700.0,6.0,10860.0}; name="S7"; type="mil_box"; colorName="ColorBrown"; }; class Item25 { position[]={12900.0,5.66116,10160.0}; name="S8"; type="mil_box"; colorName="ColorBrown"; }; class Item26 { position[]={12300.0,5.990002,12560.0}; name="S9"; type="mil_box"; colorName="ColorBrown"; }; class Item27 { position[]={4900.0,5.9533463,9960.0}; name="S10"; type="mil_box"; colorName="ColorBrown"; }; class Item28 { position[]={1600.0,2.34526,7860.0}; name="S11"; type="mil_box"; colorName="ColorBrown"; }; class Item29 { position[]={2700.0,5.99689,5460.0}; name="S12"; type="mil_box"; colorName="ColorBrown"; }; Make sure your item count is correct, mine is class Markers { items=30; You can change the type to "empty" if you don't wan't it to show on the map. Download it from here http://galaxyempire.com/dl/epoch/DBGroups0_1.zip Additional notes... ************************************************************************************************************************ Sukkaed For battleye kicks add these in first line of publicvariable.txt !"DBUpdClient" !"DBPV_PubUnit" fr1nk type fix for hiding markers Snakeyes, TheVampire, DamianL and 2 others 5 Link to comment Share on other sites More sharing options...
XerxesIv Posted February 23, 2014 Report Share Posted February 23, 2014 I look forward to it Link to comment Share on other sites More sharing options...
skittles Posted February 23, 2014 Report Share Posted February 23, 2014 Now this is something we all want to see in SargeAI and DayzAI. Can not wait for the release :) Link to comment Share on other sites More sharing options...
prominentalex Posted February 23, 2014 Report Share Posted February 23, 2014 I am extremely excited, if you need me to test anything PM me! Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 24, 2014 Author Report Share Posted February 24, 2014 Won't be much longer, got most of the stuff working that I wanted in it. Seems to working good even for JIP players. They certainly hate the AI (custom WAI system) and zeds equally. It will require a few additions to the init.sqf and also to the zombie_generate.sqf (to make zeds change to enemy mode). Link to comment Share on other sites More sharing options...
Sukkaed Posted February 24, 2014 Report Share Posted February 24, 2014 Interesting indeed. I have option to spawn AI bodyguard for yourself with 1 briefcase. Problems are that these bodyguards are not saved to database, so they are gone after restart and they won't get inside vehicles. Also they shoot everything that moves, except the owner. It would be good feature to make it so that everyone you have tagged friendly would be safe. These AI's can also be very dumb. They will shoot 10 mags straight to wall if there is zombie behind it :) Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 24, 2014 Author Report Share Posted February 24, 2014 Well they were shooting into walls before I moved the spawning to server-side. They do still sometimes try to shoot through vehicles so it's usually a good idea to make the vehicle point away from the enemy then drive forward a little bit before getting out. You also have the option to have them cease fire. Since they have unlimited ammo doesn't matter how many shots they fire, they won't run out. BTW the only people not safe are bandits, I put in the comment's of the ranking adjustment file on how to make it so all are safe, unless they accidentally shot one of their companions, they don't like that at all. Currently it is set to the player's humanity, mine is currently at 108,563 on my server so I have no trouble recruiting them. BTW they aren't saved to the database either (probably later on they will be up for permanent hire), they also are replaced by a new companion if they are killed. Also it makes blood bags useful once more, that is what is used to heal them. Link to comment Share on other sites More sharing options...
thekaboobie Posted February 24, 2014 Report Share Posted February 24, 2014 Would be interesting to have some that you could use essentially as a pack mule. They would get no weapons or only a pistol and have no carry weight limit. Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 24, 2014 Author Report Share Posted February 24, 2014 Well since they aren't affected by the weight system that is easy to do. There is a backpack line but it's commented out since they have no need for it. In my server there is 200 slot backpacks so they could carry nearly as much as a MTVR for you. You can easily access their backpack when they have one, works exactly like accessing one another player has. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted February 25, 2014 Report Share Posted February 25, 2014 This is a very cool idea. I'll be watching for the release! Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 25, 2014 Author Report Share Posted February 25, 2014 Version 0.1 has been released, enjoy :) , original post edited, let me know of any problems with the scripts, this project took about 1 week to create so there is most likely a problem somewhere, rpt errors with the line number are most helpful Link to comment Share on other sites More sharing options...
Sukkaed Posted February 25, 2014 Report Share Posted February 25, 2014 How this actually works? AI's spawn to random positions on map and you go and recruit them free? Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 25, 2014 Author Report Share Posted February 25, 2014 You run up on them, 'Recruit unit' appears, you recruit them. Typically requires you to be with within a few meters of them. Once you recruit them they are locked to you and no other players can take them from you. If you dismiss them then another player can take them. I do that if I'm taking a survivor to another player on my server so they can grab them. When I dismiss them they have to chase the survivor to make it their own, they create all new waypoints when released and will head to them as fast as possible unless zeds are present. Yes, they spawn at 12 spawn locations at a random distance. They are spawned when the server starts up, dead units respawn at those 12 locations at a random distance. For free, yes, it's all for free atm, you recruit, it's yours only, you dismiss, it's anyones survivor, there are 50 of them in the default setting.... Link to comment Share on other sites More sharing options...
Sukkaed Posted February 25, 2014 Report Share Posted February 25, 2014 AI's are the best server performance destroyers. Spawning any unnecessary AI units might not be the best idea imo. Maybe vendor system could be better, so AI's are spawned only when needed, not 50 on every restart. Just my can of beans.. I'll give it a try today. Nice work. malau 1 Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 25, 2014 Author Report Share Posted February 25, 2014 Yes they are, that is why I made it configurable. I do want to get it to the point that they are bought only and only come online when the player does. This first release is about a weeks worth of coding and testing to see if was possible to do in Epoch. I don't know if it cause any BE kicks though since I run a passworded server with the BE pretty much neutered. Link to comment Share on other sites More sharing options...
Akelorian Posted February 25, 2014 Report Share Posted February 25, 2014 Yes they are, that is why I made it configurable. I do want to get it to the point that they are bought only and only come online when the player does. This first release is about a weeks worth of coding and testing to see if was possible to do in Epoch. I don't know if it cause any BE kicks though since I run a passworded server with the BE pretty much neutered. This works great on 1.0.4.2, though they don't seem to get into vehicles when you do. Also I get no Kicks from BE while they are in use ;) Link to comment Share on other sites More sharing options...
Sukkaed Posted February 25, 2014 Report Share Posted February 25, 2014 For battleye kicks add these in first line of publicvariable.txt !"DBUpdClient" !"DBPV_PubUnit" LancerSolurus 1 Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 25, 2014 Author Report Share Posted February 25, 2014 Hit the ~ key and tell them to get in. They will drive vehicles for you but they aren't very good drivers for the larger vehicles. If you get in as driver first it easier to make them get in the vehicle you are in. It's also a good idea if you are at your base to tell them to hold fire. They don't care if your vehicles are in the way. Akelorian 1 Link to comment Share on other sites More sharing options...
boyd Posted February 26, 2014 Report Share Posted February 26, 2014 Hey great stuff i love it, but is there a way to disable the command mode when you press the (Numpad .)?? Link to comment Share on other sites More sharing options...
skittles Posted February 26, 2014 Report Share Posted February 26, 2014 Works DayzEpoch 1.0.4.2a server. Just add in your notes to install DayzAI. Nice work and will happily using it. Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 26, 2014 Author Report Share Posted February 26, 2014 @ boyd, will take a look into it and see, may be able to override it in dayz_spaceinterrupt.sqf, been thinking of making a custom menu item to replace all of the AI functions anyways @ Sukkaed, info added to OP, thanks Link to comment Share on other sites More sharing options...
fr1nk Posted February 26, 2014 Report Share Posted February 26, 2014 Is there anything in this log that indicates an issue? Don't see any of the AI. http://pastebin.com/AMr0Uc9B Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 26, 2014 Author Report Share Posted February 26, 2014 I don't see any issue in that pastebin log, they do have a 500m roaming range from the spawn point. A lot of the time I just sit near the spawn point and they will come near enough for me to grab them. They create a new waypoint after they reach their last waypoint, it's always within 250m of the spawn location. New waypoints aren't logged so I can't tell where they head next. I tried to pick an open area for every spawn point so you could see them easily, the one near the bandit trader and the one near the lower left hand trader (wholesaler) in #17 are the most open ones I used. If you leave the markers turned on, just sit and wait for them, they will cycle back to near the markers. I've had no trouble picking up 10 or more companions in a single play through. Link to comment Share on other sites More sharing options...
LancerSolurus Posted February 26, 2014 Author Report Share Posted February 26, 2014 Also you can look at your server RPT log and see if they were actually spawned, it will show in there the unit created and where they were spawned at. I am a big fan of logging just about anything script related I create. Link to comment Share on other sites More sharing options...
fr1nk Posted February 26, 2014 Report Share Posted February 26, 2014 Also you can look at your server RPT log and see if they were actually spawned, it will show in there the unit created and where they were spawned at. I am a big fan of logging just about anything script related I create. Thanks. I did end up parking myself at a spawn marker for a few minutes but had to log before I saw anything. Will need to give this another go when I get home later today. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now