blckeagls Posted December 17, 2014 Report Share Posted December 17, 2014 (edited) I have compiled some code from multiple authors and edited them. Most of this being from Arma 2, since I have been running this script for over a year, I don't remember the authors. Thanks to GhostRider for taking this and improving it. You can see his improvements on his GitHub: https://github.com/G...v-2.0.2-updated Current Version Number: 2.0.2 AI Features: 4 AI Missions (Each Different Color) Each mission individually configurable New Improved AI setOwner to enable JIP and new spawn damage 4 Crates at each mission (You can edit each one individually) Variable amount of AI at each location, you can choose the range. (Default 5-15) If anyone has any other cool ideas they would like me to make.. Personal Message me... I'll work on them and post them on forum when completed if I like them... NOTE: DO NOT USE CUSTOM @MOD FOLDERS, WILL PREVENT SERVER FROM SHOWING ON LAUNCHERS(Like A3LAUNCHER) Instructions: 1. Download the attached files. 2. Add custom_server.pbo in your @EpochHive/Addons/ folder. 3. In your Mission Folder or PBO , if you have an init.sqf go to step 5. 4. Create a file called "init.sqf" in your mission folder or PBO (init.sqf provided in .zip) 5. Add the following Lines: //If server execute this script if (isServer) then { execVM "\q\addons\custom_server\init.sqf"; //If anything but server execute this script } else { [] spawn { //This is to spawn the markers when players enter after server has started [] execVM "debug\addmarkers.sqf"; [] execVM "debug\addmarkers2.sqf"; [] execVM "debug\addmarkers75.sqf"; [] execVM "debug\addmarkers752.sqf"; //Event handler to show messages to players // this can be used for other scripts to send messages to players -- see AIM.sqf "blck_Message" addPublicVariableEventHandler {titleText[format["%1",_this select 1],"PLAIN DOWN",1];}; }; }; 6. Unzip the mission.zip file and add the debug folder into your mission folder or PBO. (init.sqf is provided only needed if step 6 was not completed) You are complete! Enjoy! ATTACHED IN THE ZIP ARE THE BE FILTERS THAT I AM USING.. IF THEY DON'T WORK FOR YOU, NOT SURE WHY. Due to too many people having different BE Filters issues, I will not provide BE Filter Support. Use mine if you have issues (make a backup of your old ones in case of further issues) AI Damaging players was configured by the following code added to the end of the AI.sqf and AI1.sqf files. //Prevents players from having AI God Mode while {true} do { _players = []; _nearEntities = count (_ai1 nearEntities [["MAN"],1000]); //diag_log format["_nearEntities: %1",_nearEntities]; //Used for testing { if (isPlayer _x) then { _players = _players + [_x]; }; } foreach (_ai1 nearEntities [["MAN"],1000]); //diag_log format["Nearplayers: %1",_players]; //Used for testing if ((count _players) > 0) then { _owner = _players call BIS_fnc_selectRandom; _ai1 setOwner (owner _owner); }; //diag_log format["_ai1 %2 Owner: %1",owner _ai1, _ai1]; //Used for testing waitUntil{_nearEntities != count (_ai1 nearEntities [["MAN"],1000])}; }; AI Cleanup was completed by adding the following: _ai1 spawn { waitUntil{!alive _this}; _this setOwner 1; sleep blck_aiCleanUpTimer; deleteVehicle _this; }; FILES CAN BE EDITTED. to edit the server files, you need to unpack the custom_server.pbo with PBOMANAGER... then once your done editting repack the PBO. To edit I would suggest using Notepad++ and the SQF Addon from Armaholics The PBOManager can be downloaded from Armaholics as well Change Notes: 2.0.1 > 2.0.2 Minor Fixes 2.0.0 > 2.0.1 Fixed the issue with the AI not getting inside vehicles 1.3.4 > 2.0.0 You can customize the look, number of AI, AI Weapons at each mission individually (see init.sqf in the server files). Provided my BE Filters.. Changed the way the AI get weapons and magazines (Now specifed in server init.sqf as ["Weapon","Magazine"] ) Changed how the AI get their owner to provide player damage. Removed all items from AI before adding new items to prevent providing items you dont want.. Added a section to add FirstAid Packs and other items... Added function to make sure AI Missions are a certain distance from each other (Default in init.sqf: MinDistanceFromMission = 500;) 1.3.3 > 1.3.4 Added setOwner script to the AI in spawnvehicles.sqf 1.3.2 > 1.3.3 Commented code to help understand what is happening better Removes some Headless Client testing code 1.3.1 > 1.3.2 Fixed issue where Minor/SM1.sqf wouldn't remove marker (Thanks to ilganna) Removed unnecessary code from spawnvehicles.sqf 1.3.0 > 1.3.1 Added the debug folder to zip file 1.2.0 > 1.3.0 Updated code for setOwner Added removeBackpackGlobal for AI (Some would spawn with unwanted items) to remove the backpacks Fixed issue where specified weapons wouldn't be given to AI, rather default weapons. blck AI Mission v2.0.2.zip Edited February 12, 2015 by blckeagls RundeEcke, tynmanz, VAKE and 3 others 6 Link to comment Share on other sites More sharing options...
Scorpi Posted December 26, 2014 Report Share Posted December 26, 2014 no player damage! Link to comment Share on other sites More sharing options...
horbin Posted December 26, 2014 Report Share Posted December 26, 2014 Great work! I was able to utilize vehicle spawn code to get persistent vehicles for my headless client AI encounters. This has been kicking my butt for weeks. Thanks again! Link to comment Share on other sites More sharing options...
blckeagls Posted December 26, 2014 Author Report Share Posted December 26, 2014 I've been looking into no player damage.. Still can't figure it out.. It seems to work after a player has died or has been in the server for a little while.. Link to comment Share on other sites More sharing options...
KiloSwiss Posted December 26, 2014 Report Share Posted December 26, 2014 You have to move ownership of the AI from the server to the client(s) in order to make the AI lethal to all players (including fresh spawned/JIP players).Greez KiloSwiss Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 You have to move ownership of the AI from the server to the client(s) in order to make the AI lethal to all players (including fresh spawned/JIP players). Greez KiloSwiss What is the method for doing this? Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 What is the method for doing this? Like this: _someObject setOwner (owner _playerObject); ? Link to comment Share on other sites More sharing options...
Talib Posted December 27, 2014 Report Share Posted December 27, 2014 hi, or I must put this line in that file ??? merci Link to comment Share on other sites More sharing options...
Talib Posted December 27, 2014 Report Share Posted December 27, 2014 :( Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 :( I updated files... see first post Link to comment Share on other sites More sharing options...
Riggs888 Posted December 27, 2014 Report Share Posted December 27, 2014 Getting kicked. What to do?? BattlEye Server: Script Log: #0 Riggs (0c90c3bd86f5c20cb4ad63754fc487c8) - #20 " "mpmissions\__CUR_MP.Altis\init.sqf" 12:34:10 if (isDedicated) then { 12:34:10 execVM "\q\addons\custom_server\init.sqf"; 12:34:10 } else { 12:34:10 [] spawn { 12:34:10 [] " 12:34:10 Player Riggs kicked off by BattlEye: Script Restriction #20 12:34:10 Player Riggs disconnected. Link to comment Share on other sites More sharing options...
pr0dukt Posted December 27, 2014 Report Share Posted December 27, 2014 adjust battle eye filters with exception !="mpmissions\__CUR_MP.Altis\init.sqf" Link to comment Share on other sites More sharing options...
Fyz1kz Posted December 27, 2014 Report Share Posted December 27, 2014 13:54:42 Error position: <_owner in _players)) then {_ownerOnline>3:54:42 Error Undefined variable in expression: _owner13:54:42 File q\addons\custom_server\AIMission\AI1.sqf, line 4013:54:42 Error in expression < + [_x];} foreach playableunits;if (!(_owner in _players)) then {_ownerOnline> This is the result i get on rpt, any ideas? Link to comment Share on other sites More sharing options...
Riggs888 Posted December 27, 2014 Report Share Posted December 27, 2014 adjust battle eye filters with exception !="mpmissions\__CUR_MP.Altis\init.sqf" Can someone plz help me? I`m new to Arma3 Servers. Where in scripts.txt i have to put this? thx Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 13:54:42 Error position: <_owner in _players)) then {_ownerOnline>3:54:42 Error Undefined variable in expression: _owner13:54:42 File q\addons\custom_server\AIMission\AI1.sqf, line 4013:54:42 Error in expression < + [_x];} foreach playableunits;if (!(_owner in _players)) then {_ownerOnline> This is the result i get on rpt, any ideas? Did you use the newest PBO? or use my code in another script? make sure the variables are listed in the private ["_var1","_var2"] etc... Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 Can someone plz help me? I`m new to Arma3 Servers. Where in scripts.txt i have to put this? thx You should be able to add it to the bottom of your scripts.txt I believe it should be: 7 !="mpmissions\__CUR_MP.Altis\init.sqf" For some reason I dont get kicks for this and I didnt update BE filters Link to comment Share on other sites More sharing options...
piyrez Posted December 27, 2014 Report Share Posted December 27, 2014 Is this configured for the Altis Map only? Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 Is this configured for the Altis Map only? It is... To fix it for Chernarus or other maps change this in the SM1 of the Major and Minor missions _coords = [[6322,7801,0],300,12000,30,0,10,0] call BIS_fnc_findSafePos; to: Center Pos Range _coords = [[6322,7801,0],300,12000,30,0,10,0] call BIS_fnc_findSafePos; For Chernarus this should work: _coords = [[6322,7801,0],300,5000,30,0,10,0] call BIS_fnc_findSafePos; In ver 1.2+ i added support to define these in the server init.sqf file.. piyrez 1 Link to comment Share on other sites More sharing options...
piyrez Posted December 27, 2014 Report Share Posted December 27, 2014 Also, calling "execVM "\x\addons\a3_ai_missions\AIMission\AIM.sqf";" is super annoying so I removed it. So far so good though, rather enjoying. Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 Also, calling "execVM "\x\addons\a3_ai_missions\AIMission\AIM.sqf";" is super annoying so I removed it. So far so good though, rather enjoying. There will be no acknowledgments of AI missions spawn being completed or spawned if you do that... Link to comment Share on other sites More sharing options...
piyrez Posted December 27, 2014 Report Share Posted December 27, 2014 Yeah, I prefer not to announce when someone has completed something. I wasn't annoyed by your credits, they are more than deserving. Link to comment Share on other sites More sharing options...
Zalizzar Posted December 27, 2014 Report Share Posted December 27, 2014 AI aren't being cleaned up for me. Is there a fix for this? Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 See first post Link to comment Share on other sites More sharing options...
ilganna Posted December 27, 2014 Report Share Posted December 27, 2014 Hi blckeagls, thanks for the mission system, it's working good; however I have a little issue: when I complete a mission the marker isn't cleared up... Any fix I can apply? Thanks! - Michel Link to comment Share on other sites More sharing options...
blckeagls Posted December 27, 2014 Author Report Share Posted December 27, 2014 Hi blckeagls, thanks for the mission system, it's working good; however I have a little issue: when I complete a mission the marker isn't cleared up... Any fix I can apply? Thanks! - Michel Do you have the Debug folder in your mission files? I'll put the cleanup in script and re-upload files.. Wait for an update in the first post... 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