Jump to content

ZyGHeliosProtocol

Member
  • Posts

    19
  • Joined

  • Last visited

Posts posted by ZyGHeliosProtocol

  1. Vampire -

     

    First of all, NICE WORK! Now, on to the real reason for the post. Lately my missions have been running smoothly, then dissappearing for days. No reason or clue as to why, but my players are starting to notice that they've gone and voice how they miss them terribly. I haven't seen anything in the logs to give a clue as to why they stop, but here and there they do, and they hang up for quite a while. Sometimes a couple manual restarts will jog them back online again, but can't put my finger on why the messages and ai stop

  2. Axe,

     

    Got an idea for you in the mod that might make everyone's life a little easier. Being that everyone and their brother is going to mod the crap out of the mod you and the epoch team made, is there any way to prepare for that and standardize the work arounds by adding something like an array to add "safe objects" to so that the server doesn't clean them up with the rest??

     

    For example, let's say that in the root directory we have a simple file called safe objects,  and inside the brackets and between the commas you insert the object that you do not want the server to clean up. This way the mod is still very easily updated and supportable, and all of the mods made by the community to work with epoch have the same thing in common when it comes to keeping objects. 

     

    Could you imagine that? A mod being released in the script section that provides awesome and creative content to the game, while coming with the simple install instruction like: copy folder to mission folder, add lines 1,2,3 to battleye scripts.txt, and copy the 7 lines in safe objects and add them to safe_objects.sqf in your root directory. RE-PBO, You're done!

     

    Just a thought, that's more like a prayer and a wish all in one lol

    Thanks for the awesome mod by the way!

  3. Hey!

     

    I tried what you are saying here but i cant say im finding any AI's.

     

     

    -I made a folder in my Epoch.Altis folder and called it custom, then i made a new folder within that folder and called it Roamers. Inside that folder i pasted the walk.sqf, init.sqf and generate_zone.sqf

     

    - init.sqf within the Roamers folder looks like this.

    if!(isserver) exitwith {};

     

    generate_zone = compile preprocessFile "custom\Roamers\Generate_Zone.sqf"; 

    walk = compile preprocessFile "custom\Roamers\walk.sqf";

     

    civilclass = ["I_Soldier_EPOCH","I_Soldier_EPOCH","I_Soldier_EPOCH","I_Soldier_EPOCH","I_Soldier_EPOCH","Epoch_Sapper_F"];

    DCLaltistownpositions = [[20875,6575],[20775,6675],[20875,6675],[20775,6775],[20875,6775],[21675,7575],[21775,7575],[20475,8875],[20575,8875],[3775,11075],[3875,11075],[5175,11075],[3875,11175],[5075,11175],[5175,11175],[5075,11275],[5175,11275],[4975,11375],[5075,11375],[9475,11575],[20175,11575],[4175,11675],[20175,11675],[20275,11675],[4075,11775],[4175,11775],[20175,11775],[20275,11775],[9075,11875],[9175,11875],[9275,11875],[9375,11875],[8975,11975],[9075,11975],[9175,11975],[8875,12075],[8975,12075],[9075,12075],[10675,12175],[10575,12275],[10675,12275],[16575,12475],[16675,12475],[16775,12475],[16775,12575],[16875,12575],[16975,12575],[3475,12675],[16775,12675],[16875,12675],[16975,12675],[3475,12775],[3575,12775],[3775,12775],[3875,12775],[16775,12775],[16875,12775],[3475,12875],[3575,12875],[3675,12875],[16775,12875],[16875,12875],[3275,12975],[3375,12975],[3475,12975],[3575,12975],[3675,12975],[3375,13075],[3475,13075],[3575,13075],[3675,13075],[3275,13175],[3375,13175],[3475,13175],[3575,13175],[17375,13175],[17475,13175],[3475,13275],[3575,13275],[3675,13275],[3775,13275],[19375,13275],[19475,13275],[3575,13375],[10975,13375],[11075,13375],[3675,13475],[3775,13475],[3575,13575],[3675,13575],[3775,13575],[3875,13575],[3775,13675],[3875,13675],[3975,13675],[11675,13675],[3675,13775],[3775,13775],[3875,13775],[3975,13775],[11775,13775],[3875,13875],[3575,13975],[12375,14175],[3375,14275],[12275,14275],[12375,14275],[12575,14275],[12675,14275],[12475,14375],[12575,14375],[12675,14375],[3575,14475],[12475,14475],[11075,14575],[11175,14575],[4275,15075],[9575,15075],[12875,15075],[12975,15075],[17975,15175],[18075,15175],[18175,15175],[17975,15275],[18075,15275],[18175,15275],[18275,15275],[7375,15375],[18175,15375],[12375,15575],[12475,15575],[20575,15675],[9075,15775],[9275,15775],[20775,15775],[9175,15875],[9275,15875],[9375,15875],[9375,15975],[9475,15975],[9575,15975],[9575,16075],[16675,16075],[4775,16175],[4875,16175],[15575,16175],[16675,16175],[6275,16275],[14175,16275],[15275,16275],[15975,16275],[21275,16375],[21375,16375],[21475,16375],[21575,16375],[7175,16475],[18775,16575],[18875,16575],[18775,16675],[18675,16775],[20875,16875],[20975,16875],[20875,16975],[20975,16975],[21075,16975],[15975,17075],[20875,17075],[20975,17075],[16475,17175],[20975,17175],[10475,17275],[16175,17275],[16275,17275],[16375,17275],[16475,17275],[14475,17575],[14575,17575],[14475,17675],[8575,18275],[8675,18275],[13975,18575],[14075,18575],[13875,18675],[13975,18675],[14075,18675],[13875,18775],[13975,18775],[14075,18775],[10275,19075],[10375,19075],[20975,19175],[9375,20275],[9475,20275],[25575,21275],[25675,21275],[25775,21275],[4575,21375],[25575,21375],[25675,21375],[25775,21375],[25775,21475],[26875,23175],[26975,23275],[27075,23275]];

     

    // civilian pop when players are at x meters

    DCLdistancepop = 100;

     

    // Civilians are in a group when they pop

    // Number max random of civilians in the group are x numbers

    DCLgroupsize = 6;

     

    // civilian can move in houses around x meters

    // of theirs initial position

    DCLdistancemove = 250;

     

    // civilian side

    DCLcivilianside = resistance;

     

    // HC client

    DCLusehclient = false;

     

    // HC client name

    DCLhclientname = "HC";

     

    {

    garbage = [_x] spawn generate_zone;

    sleep 0.01;

    }foreach DCLaltistownpositions;

     

    - generate_zone.sqf looks like  this:

    if(!(isserver) and !(DCLusehclient)) exitwith {};

    if(!(!hasInterface && !isServer && name player == DCLhclientname) and DCLusehclient) exitwith {};

     

    private [

    "_allunits",

    "_back",

    "_buildings",

    "_civil",

    "_civiltype",

    "_civilrole",

    "_index",

    "_group",

    "_number",

    "_position",

    "_positions",

    "_start",

    "_trigger"

    ];

     

    _position = _this select 0;

     

    if (isnil "_position") exitwith { hint "DCL: empty position";};

    if (count _position < 1) exitwith { hint "DCL: required a position ARRAY";};

    if (surfaceiswater _position) exitwith { hint "DCL: position is in the water";};

     

    _allunits = [];

    _back = [];

    _positions = [];

    _start = true;

     

    DCLcountplayer = {

    private ["_array", "_count"];

    _array = _this select 0;

    _count = 0;

    if (isnil "_array") exitwith {_count = 0; _count;};

    {

    if(isplayer _x) then {

    _count = _count + 1;

    };

    sleep 0.0001;

    }foreach _array;

    _count;

    };

     

    // List all units in Zone

    _trigger = createTrigger["EmptyDetector", _position];

    _trigger setTriggerArea[DCLdistancepop, DCLdistancepop, 0, false];

    _trigger setTriggerActivation["ANY", "PRESENT", TRUE];

    _trigger setTriggerStatements["", "", ""];

     

    while { ([(list _trigger)] call DCLcountplayer == 0) } do { sleep (random 5); };

     

    _buildings = nearestObjects[_position,["House_F"], 150];

    sleep 1;

    {

    _index = 0;

    while { format ["%1", _x buildingPos _index] != "[0,0,0]" } do {

    _positions = _positions + [(_x buildingPos _index)];

    _index = _index + 1;

    };

    }foreach _buildings;

     

    _number = 1 + round (random DCLgroupsize);

    _group = creategroup DCLcivilianside;

    for "_x" from 0 to _number do {

    _civiltype = civilclass call BIS_fnc_selectRandom;

    _position = _positions call BIS_fnc_selectRandom;

    _civilrole = "civil";

    _back = _back + [[_civiltype, _position, _civilrole]];

     

    };

     

    while { true } do {

    // restore civils

    if(([(list _trigger)] call DCLcountplayer == 0) or _start) then {

    _start = false;

    {

    if(alive _x) then {

    _civilrole = _x getvariable "civilrole";

    _back = _back + [[typeof _x, position _x, _civilrole]];

    _x removeAllEventHandlers "Killed";

    _x setdammage 1;

    deletevehicle _x;

    };

    sleep 0.1;

    }foreach (units _group);

    deletegroup _group;

    while { ([(list _trigger)] call DCLcountplayer == 0) } do { sleep (random 5); };

    _group = creategroup DCLcivilianside;

    {

    _civiltype = _x select 0;

    _civil = _group createUnit [_civiltype, (_x select 1), [], 0, "FORM"];

    _position = _positions call BIS_fnc_selectRandom;

    _civil setvariable ["civilrole", (_x select 2), true];

    _civil setvariable ["destination", _position, false];

    _civil setvariable ["wcprotected", true, false];

    sleep 0.1;

    }foreach _back;

    wcgarbage = [_group] spawn walk;

    _back = [];

    };

    sleep 5;

    };

     

    - walk.sqf looks like this:

    private [

    "_allunits",

    "_buildings",

    "_civil",

    "_index",

    "_group",

    "_position",

    "_positions"

    ];

     

    _allunits = [];

    _positions = [];

     

    _group = _this select 0;

     

    _group setcombatmode "RED";

    _group allowfleeing 0;

    _group setspeedmode "FULL";

     

    {

    _x setbehaviour "COMBAT";

    _x allowFleeing 0;

    _x setvariable ["lastpos", position _x, false];

    _x setvariable ["destination", position _x, false];

    _x setvariable ["moveretry", 0, false];

    _x setunitpos "UP";

    } foreach (units _group);

     

    _position = position (leader _group);

    _buildings = nearestObjects[_position,["House_F"], DCLdistancemove];

    sleep 1;

     

    {

    _index = 0;

    while { format ["%1", _x buildingPos _index] != "[0,0,0]" } do {

    _position = _x buildingPos _index;

    _positions = _positions + [_position];

    _index = _index + 1;

    };

    }foreach _buildings;

     

    while { count (units _group) > 0 } do {

    if(count _allunits == 0) then {

    _allunits = units _group;

    };

     

    _civil = _allunits select 0;

    _allunits = _allunits - [_civil];

     

    if(format["%1", _civil getvariable "lastpos"] == format["%1", position _civil]) then {

    _civil setvariable ["moveretry", (_civil getvariable "moveretry") + 1, false];

    };

     

    _civil setvariable ["lastpos", position _civil, false];

     

    if(_civil getvariable "moveretry" > 3) then {

    _position = _positions call BIS_fnc_selectRandom;

    _civil stop false;

    _civil setvariable ["destination", _position, false];

    _civil domove _position;

    _civil setvariable ["moveretry", 0, false];

    };

    sleep 5;

    };

     

    -After that i added this to my init.sqf located in my epoch.Altis folder:

     

     

    if (isServer) then {

    execVM "custom\Roamers\init.sqf";

    };

     

    -Backed out of the epoch.Altis folder and packed it to epoch.Altis.pbo.

     

    -Then i deleted my old epoch.Altis.pbo inside my MPMissions folder and uploaded the new one.

     

    What am i missing? =/

     

    GOD I HOPE MY SPOILERS WORK xD

     

    Can you post a copy of your server .rpt log, so that I can see what's going on in there? I have been using the exact same setup that I posted since day 1, without issue. I have used every different version of antihack and script out there testing them, and never once been without ai. 

     

    So if you could post that server .rpt inside one of those little spoiler things :) it would help me to understand what is missing.

     

    Currently I'm working on getting some custom AI roaming about, rather than using the stock uav AI and calling them. I'd like my players to be able to pick up better than a pdw for all their hard work, especially the new spawns (even though they are given starting gear, it's only 556, a 6.5 or 7.62 as a reward would probably make them quite happy AI killing machines). As soon as I have a solid working copy of that script I will post it.

  4. bingo.

     

     

    Ive had it working for awhile now. Really isn't that hard once you got that simple concept down.

     

    I do need to increase the crafting recipes for these though. they are far to easy to make by default, and if i could figure out how to run my own PricingCfg.hpp file without it being overwitten, id remove the ebike sell price so people can't exploit this script terribly.

     

    One thing that i have not been able to do without touching epoch code is add in my own prices. It will not overwrite the default for some reason.

     

    Logic. pure and simple. You can apply that concept to many things, so long as you have the understanding that you're the boss, and as long as epoch code doesn't lock it down (and remember, they can't compileFinal event handlers, even though some of them are, you can change them!), you can do anything you want, so long as you're dedicated and read english. Every answer that you would need besides the little tidbits I have provided you can find very easily with google, and the beauty of sqf is that it's plain english :)

     

    As for your prices problem, I may have a solution. Let me check a few things and try a couple more, and I will get back to you by mid-week. I work full time and then some, so time to sit at the machine and pursue my passion is in short quantity and high demand 

     

    -Helios

  5. Thanks alot for this info.

     

    you're welcome! I hope it helps you to imagine a way around your problems. The cool thing about ArmA 3 is that it's basically ArmA 2, with the only difference being the file breakdown and event handler changes. Anything that you used take out of Epoch code in A2 you can basically do in A3, you just have to mind the file system changes, and look out for that pesky compileFinal.

     

    As for this script, I haven't made a whole lot of headway there, but the foundation of the system used to work around that compileFinal problem is actually coming along pretty well. I think I will have it re-worked and available as a drop in by Feb. The reason that it is going to take a bit longer than predicted is because I want to get permission to package other mod author's addons along side of the aforementioned code, so as to have a great many things brought into A3 that will be useful to people who want things like bicycles & other A2 vehicles/items/features. It's going to be a rather large .pbo, and I'll have to have it signed, as well as available in the download list on A3Launcher, so that people who don't have the mod will be prompted to download it. It will be similar to what CBA is to Vanilla A3, but for Epoch.

     

    I'll keep posting on how it's coming in this thread until I put the first release into it's own thread (If Epochmod.com Moderators will approve the post). 

     

    -Helios

  6. The Files we need to "copy" "paste" are FSM ? are they usuable as Compiles ?

     

    You need to check the main epoch compiles, to see if it is compiled final. There are ways around this, but I am working on a different approach. Basically, when you need to do something like that, you will find your init.sqf in your MPmission folder, and put something like this is there: func_im_overiding_with_custom_compiles = call compile preprocessFileLineNumbers "filewhereimadechangestovariables.sqf"; What I'm doing is working out ways of changing this process by using something similar to Maca134's Emod, where he effectively compiles everything he wants to before any epoch code is run, therefore invalidating a compileFinal. Epoch dev's don't seem to have a problem with that, however this may become a custom @package, in order to facilitate not only scripts like this, but several addons and still comply with the epoch license agreement. 

     

    how do you take multiple of a item and more than one type of item

    You could probably use the addItem function to effectively take multiple items. for example, you could count the items, and then from _i to _x do and use the addItem to make the player take that many items

  7. I'll work on this script a little throughout this week and get it working. keep in mind it may be multiple files in a folder by the end of the week with a few additions you need to make if you changed so on and so forth, and more than likely some battleye changes, but I'll do my best to turn this into a drop in solution and share it with the community. If I can't do it in a manner where it is reasonably easy for everyone to implement, you'll hear back from me here that I couldn't pull it off. But my guess is that I can declare it a safe vehicle and make it work.

     

    Anywho, time will tell

     

    -helios

  8. i remember reading that CBA does much up epoch. can't figure why not working for you though.

     

    Inside the core files of epoch, you will find the compiles. Inside that compiles, you will notice that everything says compileFinal. It's a huge pain in the ass for everything, although it doesn't affect event handlers, and that's primarily what CBA is for to my understanding. So my guess would be that in CBA somewhere, it's pushing a variable that collides with an epoch compile, and by working around that I believe that you can get the desired result without all the headaches. 

     

    Just a thought

  9. I thought it would be a really cool idea to be able to control the AI from the epochconfig.hpp file. With all of the compileFinal in the core epoch code, I'm not entirely sure it would be possible to change the AI without altering epoch files and violating the license. Therefore, I'm asking that the devs maybe include and call the loadout from epochconfig.hpp to make it really easy for server admins to not only change the weapons, but to have maybe custom classes of AI that spawn from the UAV, and maybe a control over what classes are picked for the UAV to spawn.

     

    Something like this:

         UAV_AI_Class_0 = [

    UAV_AI_Primary = [[gun1, ammo1], [gun2, ammo2]]

    UAV_AI_Sidearm = [[pistol1, ammo1], [pistol2, ammo2]]

    UAV_AI_Pack = [backpack 1, backpack2, backpack3]

    UAV_AI_Vest = [vest1, vest2, vest3]

    UAV_AI_Uniform = [uniform1, uniform2, uniform3]

    ];

     

     UAV_AI_Class_1 = [

    UAV_AI_Primary = [[biggun1, ammo1], [biggun2, ammo2]]

    UAV_AI_Sidearm = [[bigpistol1, ammo1], [multigun, energypack]]

    UAV_AI_Pack = [backpack 1, backpack2, backpack3]

    UAV_AI_Vest = [vest1, vest2, vest3]

    UAV_AI_Uniform = [uniform1, uniform2, uniform3]

    ];

     

    //add custom classes below, starting with UAV_AI_class_2 in numerical order

     

     

    Maybe if it isn't possible to give us that many options, just being able to change the weapons that AI could carry would be really cool. We can control their skill level would be great too, as they seem a little aim-botty at times, but I guess that can be changed a little bit by changing the overall skill levels in the profiles options

     

    Just a thought, but I hope this makes it into the next patch, I'm sure the community at large would love to be able to manipulate the UAV AI

  10. The solution to the bike is quite simple. Work around the cleanup by adding it to the array with the parachute and uav in the same manner you did in arma 2. Create a custom compiles, and call it in your init.sqf. remember any array you over-ride there needs to be completely copied from epoch code, then you have to add the missing ingredient. You can custom compile yourself into trouble though. test carefully.

  11. Does anybody have this script working and care to share what you did? MisterT (the script author) mentions clientside files in a post to my question above. I have set up the script serverside only as per the OP. I'm using the Chernarus map and the spawn points provided by KingRaymond795. I don't see the script loading in my server rpt. I have visited multiple towns and ran through them and waited for awhile, but I never have any AI spawn. I have tried both versions of the generate_zone.sqf to no avail. I would like to get the Roaming AI script going to spice up the game for my players. Thanks for any help.

     

    :huh:   

    Try the way I did it, worked out great. 

     

    My server did not even start with this script... Gonna wait for either a better tut or script... xD

    Same advice as above

  12. I've also found a better way of getting this script in that makes it easier to install along side other mods, ah's, admin-tools, and whatnot. I'm going to share what I've done here, and it might become standard operating practice, as it makes it a lot easier, but it does add a little size to the Client Side receiving file. Currently with all the stuff I've added I'm at around 287k for my mission file, but it still loads really quickly. When I originally tried installing this script I saw a lot of the errors that everyone else was seeing, so I decided to re-work it in this manner:

     

    1. I made a folder inside my epoch.Altis.pbo named custom. Inside that folder I made another called Roamers. I then copied and pasted all of the files into that folder.

     

    2. I've taken away root level access to the script. It was easier for me to pack the whole thing in epoch.Altis.pbo for reasons of calling the file, and making it work right out of the box with the other mods/tools I'm using. I changed the file init.sqf by altering the file paths: 

    generate_zone = compile preprocessFile "custom\Roamers\Generate_Zone.sqf"; 
    walk = compile preprocessFile "custom\Roamers\walk.sqf";
    

    3. I used the randomized chance script, and dropped the percentage and amount of spawns per city to make it more realistic (like if my server was constantly running at capacity, so as to mimic a full server's amount of action). I won't post that here because it's still a long list of coordinates.

     

    4. If you don't already have an init.sqf inside your MPmissions epoch.Altis.pbo, you'll need to make one. inside that file add the following code: 

    if (isServer) then {
    	execVM "custom\Roamers\init.sqf";
    };
    

    MisterT - thank you for the awesome script, and I hope my explanation & changes help rather than hinder. If you like the changes, feel free to use them in release, and just maybe if it makes supporting it a little easier, we might get a few cooler AI than guys running around with glorified pistols?!? lol, thanks again.

    I'm attaching my files (Sorry for the outside link, but it's the best I can do) so you can look at what I've done, or just repackage it as a download, whatever :-)

     

    -Helios

     

    https://drive.google.com/open?id=0B-nSuqkXy8NzZ3d4VC05SHhkQlk&authuser=0

  13.  

    BattlEye: Script Restriction #20

    is there a fix for my problem?

    this is what is in my script

    20 7 allowDamage !="player allowDamage true;vehicle player allowDamage true;"

     

    if you're getting kicked for a restriction, there's an easy way to figure it out. In your Scripts.log file you will see the exact time the kick happened, and next to it you'll find the reason. So long as you put that script in there (the reason that you got kicked), and you want that script to execute on your server, go to the line where it says the kick originated (if the kick is BattlEye Script Restriction #20, that means it is Line 20, but I do believe the first line counts as 0 to battleye, so you have to edit Line 21 when you open it with Notepad++ or some other program that counts lines. You can try it both ways if you have to, but I would try counting line 1 as 0 first). So take that exact script name or variable or whatever it was from the .log file and make an exception for it like this !="THESCRIPTTHATKICKEDME". In your case, it appears you're being kicked for an allowDamage that hasn't been declared as ok, so try to compare the .log name and the file contents that it references to the line you're being kicked for.

     

    Once you are all jacked up on info and feeling like a super bad-arse admin for figuring it out, add it after the others like so: 7 allowDamage !="player allowDamage true;vehicle player allowDamage true;" !="THESCRIPTTHATKICKEDME"

  14. Please if anyone knows how to do this, I have googled everywhere I can, and I see severs doing it, but I cannot find a script or useful directions to change this. 

     

    Basically the community I have on my server is a mature community, all 25+ with jobs, and with the demands of work, it makes it really hard to protect your vehicles full time from being taken or used, even with bases.  Please if anyone knows how to make the locks persist after restart, the information would be greatly appreciated.

     

    So far I have only altered the seconds amount in epochconfig.hpp, and after restart anyone can get into any vehicle. 

  15. @f3cuk it appears as if I am using version 2.1.0

     

    @SadBoy1981 I am sorry for the spoiler thingamobob, I've never posted code anywhere, I see it sometimes when i get stuck, but never got stuck enough to need to use it lol. 

     

    Anywho, again any ideas are appreciated. Now that I see that I am using an older version, i will go ahead and update. I know how to copy and paste (sometimes the paste gets lost in the digestion process because eating it doesn't seem like a half bad idea), so I'll bring my custom classes into the latest version and let you know how that turns out tomorrow (roughly 11pm EST) when I get home from work.

     

    Thanks

     

    -Helios

  16. Thanks for the great work you did with WAI f3cuk, the mods and additions are really awesome!

     

    I just have one question though, I'm having an issue with adding custom weapon classes to WAI. What I would like to do is give the static mission AI a different variety/frequency of weapons than my standard mission AI, but for the life of me I cannot get this to work! 

     

    The goal is to create custom weapons classes for static WAI emplacements with the new local variables ai_wep_class_1, ai_wep_class_2, etc up to _5, with a custom class that is all .50/.338 or HE  -> ai_wep_aggressor

     

    below are snippets of config.sqf, heli_para.sqf, spawn_group.sqf, and spawn_static.sqf that contain the changes that I have made to try and make the custom wai weapons classes work. Aside from the changes that I have made to add these classes, these are the stock WAI files

     

     

    config.sqf

    ai_wep_assault				= [["M16A4_ACG","30Rnd_556x45_Stanag"],["Sa58V_RCO_EP1","30Rnd_762x39_AK47"],["SCAR_L_STD_Mk4CQT","30Rnd_556x45_Stanag"],["M8_sharpshooter","30Rnd_556x45_Stanag"],["M4A1_HWS_GL_camo","30Rnd_556x45_Stanag"],["SCAR_L_STD_HOLO","30Rnd_556x45_Stanag"],["M4A3_CCO_EP1","30Rnd_556x45_Stanag"],["vil_G36KSKdesES","30Rnd_556x45_G36"],["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"],["BAF_L85A2_RIS_Holo","30Rnd_556x45_Stanag"],["Sa58V_CCO_EP1","30Rnd_762x39_AK47"],["vil_AeK_3_K","30Rnd_762x39_AK47"],["AK_107_GL_pso","30Rnd_545x39_AK"],["RH_hk416sglacog","30Rnd_556x45_Stanag"],["RH_hk416sdglaim","30Rnd_556x45_StanagSD"],["RH_ctar21glacog","30Rnd_556x45_Stanag"],["RH_massdacog","30Rnd_556x45_StanagSD"],["RH_masbsdeotech","30Rnd_556x45_StanagSD"],["RH_acrbglacog","30Rnd_556x45_Stanag"],["FHQ_ACR_WDL_HAMR_GL","FHQ_rem_30Rnd_680x43_ACR"],["FHQ_ACR_BLK_RCO_SD","FHQ_rem_30Rnd_680x43_ACR_SD"],["FHQ_ACR_BLK_HAMR_SD","FHQ_rem_30Rnd_680x43_ACR_SD"],["FHQ_ACR_SNW_HAMR_F","FHQ_rem_30Rnd_680x43_ACR"]];	// Assault
    		ai_wep_machine				= [["RPK_74","75Rnd_545x39_RPK"],["MK_48_DZ","100Rnd_762x51_M240"],["M249_EP1_DZ","200Rnd_556x45_M249"],["Pecheneg_DZ","100Rnd_762x54_PK"],["M240_DZ","100Rnd_762x51_M240"]];	// Light machine guns
    		ai_wep_sniper				= [["M14_EP1","20Rnd_762x51_DMR"],["SCAR_H_LNG_Sniper_SD","20Rnd_762x51_SB_SCAR"],["M110_NVG_EP1","20rnd_762x51_B_SCAR"],["SVD_CAMO","10Rnd_762x54_SVD"],["VSS_Vintorez","20Rnd_9x39_SP5_VSS"],["DMR","20Rnd_762x51_DMR"],["vil_M21G","20Rnd_762x51_DMR"],["vil_SR25SD","20Rnd_762x51_DMR"],["vil_vsk94","vil_20Rnd_9x39_SP6_OC"],["RH_m14acog","20Rnd_762x51_DMR"],["RH_m21","20Rnd_762x51_DMR"],["RH_m1ssp","20Rnd_762x51_DMR"],["SCAR_H_LNG_Sniper","20rnd_762x51_B_SCAR"],["SCAR_H_CQC_CCO_SD","20rnd_762x51_SB_SCAR"],["FHQ_ACR_SNW_G33_GL_F","FHQ_rem_30Rnd_680x43_ACR"],["vil_SV_98_SD","vil_10Rnd_762x54_SV"],["vil_SVD_P21","10Rnd_762x54_SVD"],["vil_PSL1","vil_10Rnd_PSL"],["vil_SVDK","vil_10Rnd_SVDK"],["vil_AG3EOT","vil_20Rnd_762x51_G3"],["KSVK_DZE","5Rnd_127x108_KSVK"],["FHQ_MSR_BASE","FHQ_rem_7Rnd_338Lapua_MSR_NT"],["FHQ_MSR_SD_DESERT","FHQ_rem_7Rnd_338Lapua_MSR_NT_SD"],["FHQ_RSASS_TAN","FHQ_rem_20Rnd_762x51_PMAG_NT"],["FHQ_RSASS_SD_TAN","FHQ_rem_20Rnd_762x51_PMAG_NT_SD"],["M107_DZ","10Rnd_127x99_m107"]];	// Sniper rifles
    		// Added Weapon Classes for AI at Camps/Cities added and/or statically guarded
    		ai_wep_class_1				= [["M16A4_ACG","30Rnd_556x45_Stanag"],["SCAR_L_STD_Mk4CQT","30Rnd_556x45_Stanag"],["M8_sharpshooter","30Rnd_556x45_Stanag"],["M4A1_HWS_GL_camo","30Rnd_556x45_Stanag"],["SCAR_L_STD_HOLO","30Rnd_556x45_Stanag"],["M4A3_CCO_EP1","30Rnd_556x45_Stanag"],["vil_G36KSKdesES","30Rnd_556x45_G36"],["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"],["BAF_L85A2_RIS_Holo","30Rnd_556x45_Stanag"],["AK_107_GL_pso","30Rnd_545x39_AK"],["RH_hk416sglacog","30Rnd_556x45_Stanag"],["RH_hk416sdglaim","30Rnd_556x45_StanagSD"],["RH_ctar21glacog","30Rnd_556x45_Stanag"],["RH_massdacog","30Rnd_556x45_StanagSD"],["RH_masbsdeotech","30Rnd_556x45_StanagSD"],["RH_acrbglacog","30Rnd_556x45_Stanag"],["bizon_silenced","64Rnd_9x19_SD_Bizon"],["bizon","64Rnd_9x19_Bizon"],["Saiga12K","8Rnd_B_Saiga12_74Slug"],["m8_carbineGL","30Rnd_556x45_G36"],["Remington870_lamp","8Rnd_B_Beneli_74Slug"],["MG36_camo","100Rnd_556x45_BetaCMag"],["vil_SKS","vil_10Rnd_762x39_SKS"],["vil_MP5SD_EOTech","30Rnd_9x19_MP5SD"]];	// Lower end weapons for the easier to defeat ai
    		ai_wep_class_2				= [["RH_hk416sdglaim","30Rnd_556x45_StanagSD"],["RH_ctar21glacog","30Rnd_556x45_Stanag"],["RH_massdacog","30Rnd_556x45_StanagSD"],["RH_masbsdeotech","30Rnd_556x45_StanagSD"],["RH_acrbglacog","30Rnd_556x45_Stanag"],["MG36_camo","100Rnd_556x45_BetaCMag"],["FN_FAL","20Rnd_762x51_FNFAL"],["G36_C_SD_camo","30Rnd_556x45_G36SD"],["FHQ_ACR_SNW_RCO","FHQ_rem_30Rnd_680x43_ACR"],["FHQ_ACR_SNW_RCO_GL","FHQ_rem_30Rnd_680x43_ACR"],["FHQ_ACR_SNW_HAMR_GL_F","FHQ_rem_30Rnd_680x43_ACR"],["FHQ_ACR_BLK_HAMR_SD_F","FHQ_rem_30Rnd_680x43_ACR_SD"],["vil_vsk94","vil_20Rnd_9x39_SP6_OC"],["Sa58V_RCO_EP1","30Rnd_762x39_SA58"],["Sa58V_CCO_EP1","30Rnd_762x39_SA58"],["SCAR_H_CQC_CCO","20rnd_762x51_B_SCAR"],["vil_MP5SD_EOTech","30Rnd_9x19_MP5SD"]];	// A moderately well equipped ai class
    		ai_wep_class_3				= [["RPK_74","75Rnd_545x39_RPK"],["MK_48_DZ","100Rnd_762x51_M240"],["VSS_Vintorez","20Rnd_9x39_SP5_VSS"],["DMR_dz","20Rnd_762x51_DMR"],["M14_EP1","20Rnd_762x51_DMR"],["SCAR_L_CQC_CCO_SD","30Rnd_556x45_StanagSD"],["SCAR_H_LNG_Sniper_SD","20rnd_762x51_SB_SCAR"],["SCAR_H_CQC_CCO","20rnd_762x51_B_SCAR"],["SCAR_H_CQC_CCO_SD","20rnd_762x51_SB_SCAR"],["SVD_CAMO","10Rnd_762x54_SVD"],["FHQ_ACR_BLK_HAMR_GL_SD_F","FHQ_rem_30Rnd_680x43_ACR_SD"],["Vil_AKS_74_UN_kobra","30Rnd_545x39_AKSD"],["vil_SV_98_69","vil_10Rnd_762x54_SV"],["vil_AeK_3_K","30Rnd_762x39_AK47"],["vil_MP5SD_EOTech","30Rnd_9x19_MP5SD"],["vil_G3TGSb","vil_20Rnd_762x51_G3"],["RH_m21","20Rnd_762x51_DMR"],["RH_m14acog","20Rnd_762x51_DMR"]];	// AI with higher skill levels will carry this military weaponry
    		ai_wep_class_4				= [["FHQ_RSASS_TAN","FHQ_rem_20Rnd_762x51_PMAG_NT"],["Pecheneg_DZ","100Rnd_762x54_PK"],["FHQ_RSASS_SD_TAN","FHQ_rem_20Rnd_762x51_PMAG_NT_SD"],["DMR_dz","20Rnd_762x51_DMR"],["vil_G3TGSb","vil_20Rnd_762x51_G3"],["RH_m1stsp","20Rnd_762x51_DMR"],["RH_m21","20Rnd_762x51_DMR"],["RH_m14acog","20Rnd_762x51_DMR"],["vil_Groza_SD","vil_20Rnd_9x39_SP6_OC"],["M40A3","5Rnd_762x51_M24"],["M249_m145_EP1","100Rnd_556x45_M249"],["M110_NVG_EP1","20Rnd_762x51_B_SCAR"],["RH_hk417sdacog","RH_20Rnd_762x51_SD_hk417"],["RH_hk417sdsp","RH_20Rnd_762x51_SD_hk417"],["vil_SV_98_69","vil_10Rnd_762x54_SV"],["vil_AeK_3_K","30Rnd_762x39_AK47"],["RH_sc2aim","20Rnd_762x51_DMR"],["BAF_LRR_scoped_W","5Rnd_86x70_L115A1"],["m240_scoped_EP1","100Rnd_762x51_M240"],["SCAR_H_STD_EGLM_Spect","20rnd_762x51_B_SCAR"],["SCAR_H_LNG_Sniper","20rnd_762x51_B_SCAR"],["FN_FAL_ANPVS4","20Rnd_762x51_FNFAL"],["M107_DZ","10Rnd_127x99_m107"],["FHQ_MSR_BASE","FHQ_rem_7Rnd_338Lapua_MSR_NT"],["MK_48_DZ","100Rnd_762x51_M240"],["VSS_Vintorez","20Rnd_9x39_SP5_VSS"],["FHQ_ACR_BLK_HAMR_GL_SD_F","FHQ_rem_30Rnd_680x43_ACR_SD"],["Vil_AKS_74_UN_kobra","30Rnd_545x39_AKSD"],["SCAR_H_CQC_CCO","20rnd_762x51_B_SCAR"],["vil_MP5SD_EOTech","30Rnd_9x19_MP5SD"]];	// High end military large caliber or high fire rate weapons class
    		ai_wep_class_5				= [["M110_NVG_EP1","20rnd_762x51_B_SCAR"],["AA12_PMC","20Rnd_B_AA12_Pellets"],["SCAR_H_STD_TWS_SD","20Rnd_762x51_SB_SCAR"],["m8_tws_sd","30Rnd_556x45_G36SD"],["m8_tws","100Rnd_556x45_BetaCMag"],["FHQ_ACR_BLK_TWS","FHQ_rem_30Rnd_680x43_ACR"],["FHQ_RSASS_TWS_TAN","FHQ_rem_20Rnd_762x51_PMAG_NT"],["AA12_PMC","20Rnd_B_AA12_Pellets"],["AKS_74_GOSHAWK","30Rnd_545x39_AK"],["AKS_74_NSPU","30Rnd_545x39_AK"],["FN_FAL_ANPVS4","20Rnd_762x51_FNFAL"],["M107_DZ","10Rnd_127x99_m107"],["FHQ_MSR_BASE","FHQ_rem_7Rnd_338Lapua_MSR_NT"]];	// AA12 with shot Thermal and NVG rifles
    		ai_wep_aggressor			= [["FHQ_MSR_BASE","FHQ_rem_7Rnd_338Lapua_MSR_NT"],["FHQ_MSR_SD_DESERT","FHQ_rem_7Rnd_338Lapua_MSR_NT_SD"],["BAF_AS50_scoped","10Rnd_127x99_m107"],["KSVK_DZE","5Rnd_127x108_KSVK"],["M107_DZ","10Rnd_127x99_m107"],["AA12_PMC","20Rnd_B_AA12_HE"],["BAF_LRR_scoped_W","5Rnd_86x70_L115A1"]];	//.338 snipers .50 snipers aa12 HE
    		
    

    heli_para.sqf

    for "_x" from 1 to _paranumber do {
    
    				_helipos = getpos _helicopter;
    
    				call {
    					if (typeName(_gun) == "SCALAR") then {
    						if(_gun == 0) 			exitWith { _aiweapon = ai_wep_assault; };
    						if(_gun == 1) 			exitWith { _aiweapon = ai_wep_machine; };
    						if(_gun == 2) 			exitWith { _aiweapon = ai_wep_sniper; };
    						if(_gun == 3) 			exitWith { _aiweapon = ai_wep_class_1; };
    						if(_gun == 4) 			exitWith { _aiweapon = ai_wep_class_2; };
    						if(_gun == 5) 			exitWith { _aiweapon = ai_wep_class_3; };
    						if(_gun == 6) 			exitWith { _aiweapon = ai_wep_class_4; };
    						if(_gun == 7) 			exitWith { _aiweapon = ai_wep_class_5; };
    						if(_gun == 8) 			exitWith { _aiweapon = ai_wep_aggressor; };
    					} else {
    						if(_gun == "random") 	exitWith { _aiweapon = ai_wep_random call BIS_fnc_selectRandom; };
    					};
    				};
    

    spawn_group.sqf

    for "_x" from 1 to _unitnumber do {
    
    		call {
    			if(typeName(_gun) == "SCALAR") then {
    				if(_gun == 0) 			exitWith { _aiweapon = ai_wep_assault; };
    				if(_gun == 1) 			exitWith { _aiweapon = ai_wep_machine; };
    				if(_gun == 2) 			exitWith { _aiweapon = ai_wep_sniper; };
    				if(_gun == 3) 			exitWith { _aiweapon = ai_wep_class_1; };
    				if(_gun == 4) 			exitWith { _aiweapon = ai_wep_class_2; };
    				if(_gun == 5) 			exitWith { _aiweapon = ai_wep_class_3; };
    				if(_gun == 6) 			exitWith { _aiweapon = ai_wep_class_4; };
    				if(_gun == 7) 			exitWith { _aiweapon = ai_wep_class_5; };
    				if(_gun == 8) 			exitWith { _aiweapon = ai_wep_aggressor; };
    				
    			} else {
    				if(_gun == "random") 	exitWith { _aiweapon = ai_wep_random call BIS_fnc_selectRandom; };
    				if(_gun == "unarmed") 	exitWith { _unarmed = true; };
    			};
    		};
    

    spawn_static.sqf

    call {
    				if(typeName(_gun) == "SCALAR") then {
    					if(_gun == 0) 			exitWith { _aiweapon = ai_wep_assault; };
    					if(_gun == 1) 			exitWith { _aiweapon = ai_wep_machine; };
    					if(_gun == 2) 			exitWith { _aiweapon = ai_wep_sniper; };
    					if(_gun == 3) 			exitWith { _aiweapon = ai_wep_class_1; };
    					if(_gun == 4) 			exitWith { _aiweapon = ai_wep_class_2; };
    					if(_gun == 5) 			exitWith { _aiweapon = ai_wep_class_3; };
    					if(_gun == 6) 			exitWith { _aiweapon = ai_wep_class_4; };
    					if(_gun == 7) 			exitWith { _aiweapon = ai_wep_class_5; };
    					if(_gun == 8) 			exitWith { _aiweapon = ai_wep_aggressor; };
    				} else {
    					if(_gun == "random") 	exitWith { _aiweapon = ai_wep_random call BIS_fnc_selectRandom; };
    					if(_gun == "unarmed") 	exitWith { _unarmed = true; };
    				};
    			};
    

    Any input or tips/tricks/ideas/dreams/_bottled_genie is more than welcome, if someone could point me in the right direction it would be more than appreciated

     

    -Helios

×
×
  • Create New...