Jump to content

spunfin

Member
  • Content Count

    89
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by spunfin

  1. AI Spawn Script Pack v1.15 What? Script pack that makes it fast and easy to add dynamic AI in your mission. AI group transported with chopper, paradrop group, militarized area, buildings filled with soldiers, and ambient combat! It has also caching functionality and lots of stuff to be customized. Download: AISSP 1.15.zip Online documentation and setup tools for all the scripts: v1.15 Documentation and setup tools How to install? Extract LV folder into your mission folder. Use setup tools in documentation or example missions to set it up on your mission. NOTE: All the classnames for AI comes from LV\config_aissp.hpp. Therefore you must include this into your missions description.ext: class aissp_configs { #include "LV\config_aissp.hpp" }; If you don't have description.ext in your mission, you can use the one I included in the zip. v1.15 Changelog Added Added new main script: AmbientExplosions. Added LV\LV_functions\LV_fnc_findPosition.sqf to handle position searching between distances from defined center(s) while avoiding defined areas and/or objects. Fixed Fixed a bug where ReinforcementChopper choppers dropped dead right after spawning (reason was UAV config entries in classname arrays where the script selected a chopper). Improved heli spawning in ReinforcementChopper. Changed ReinforcementChopper: parsing off chopper classnames which includes 'UAV' or 'Light'. ReinforcementChopper: using now bis_fnc_spawncrew instead of manually creating pilot (now chopper also has a crew instead of lonely pilot). Main scripts Ambient Combat Spawns random groups and vehicles around player/object and makes them patrol around it. You can define how many groups there is at the same time, how far they spawn, spawning delay, AI skill levels, do AI groups communicate, how far from "defined center" they dissapear, and other stuff. Every vehicle is counted as one group, so if 'groups' argument is set to 2, there might spawn only 2 vehicles, eventhough vehicles spawns with 30% probability. Once group is dead or distance between group and center object is more than defined max distance, group will be deleted and new one is created. Groups will spawn equally for all teams. You can also define markers where AmbientCombat wont spawn units and which it tries to avoid when patrolling. AmbientCombat can also be deleted with external script, which has it's own features to offer you different solutions. Ambient Explosions Creates explosions all around, avoiding units and areas you want it to avoid. Can be brought to scene by planes or artillery. Militarize Fills area with units. You can define the area size, units side, does soldiers or ground vehicles or both spawn, will they stay still or patrol inside area, how much there will spawn units, AI skill levels, and other stuff. FillHouse Fills nearest building, OR all buildings in defined range, with soldiers. You can define side of soldiers, will they patrol or not, how will they patrol (only inside of building or also outside), spawning percentage, area radius, AI skill levels, and other stuff. ReinforcementChopper Spawns chopper which transports infantry group where ever you like and leaves after that. You can define side, does the chopper land exactly on target or will it find more suitable drop zone, how far it comes from, from what direction it comes from, will it unload infantry group straight away or will it react against possible threats before that, etc. And for infantry group you can choose its target, which can either be a single marker, array of markers (if so, you can set it also to cycle these markers), or unit/object, group size, AI skill levels, and other stuff. HeliParadrop Creates AI paratrooper group which will dropped from the sky by a chopper. Various options, for example distance, direction, flyheight, drop distance, parachute open altitude, target, and many more! FAQ
  2. spunfin

    AI Spawn Script Pack

    Heys! o/ I've been once again super busy, but I'll try to check this issue out this weekend. Probably some very stupid and small logic error somewhere.
  3. spunfin

    AI Spawn Script Pack

    Thanks brother, Merry Christmas! o/ Hmm, sounds weird. I'll double-check that and will DM you a simple demo mission once I get home (maybe after Christmas, but we'll see).
  4. spunfin

    AI Spawn Script Pack

    Hey Ben, thanks! 🍻 Glad to hear you enjoy it
  5. spunfin

    AI Spawn Script Pack

    @KokayneKrayzie I couldn't test with actual dedicated server yet, but atleast in normal internet server (via Arma3) it seemed to work - does it work for you when you self host the server? If you have the same issue when self-hosting, I can maybe checkout your mission if I can spot something there. But if this is happening only in dedicated server, I'll have to set one up to test things a bit.
  6. spunfin

    AI Spawn Script Pack

    @baton1990 Good catch! In that situation, you actually need to use this format: _classModuleFilters = "['OPF_F']"; Also, current version patrol-vF.sqf might raise errors here, so here's a fixed version for it: https://kaartomedia.com/AISSP/files/patrol-vF.sqf @KokayneKrayzie I'll test that soon and get back to it. o/
  7. spunfin

    AI Spawn Script Pack

    Hmm, that is weird. Did you have LV -folder and description.ext in your test missions folder? (Just to be sure 😅) Here's a demo with it by using that very same script, check if that works for you: https://drive.google.com/file/d/1tds-p2nv2CGgz0Ar9ZarOeApcl9tFS3F/view?usp=sharing
  8. spunfin

    AI Spawn Script Pack

    Seems to work nicely - here's a very minimal example (just quickly copy-pasted the script from another thread); For example in init.sqf: map_enabled = false; map_click_handler = [ "reinforcementCall", "onMapSingleClick", { if (map_enabled) then { nul = [_pos, true, 1, 0, false, true, player, "random", 1500, true, false, 8, "default", [true, false, false, false], nil, nil, nil, false, true, ["ALL"]] execVM "LV\reinforcementChopper.sqf"; systemChat format ["Reinforcements requested to position; %1", _pos]; map_enabled = false; openMap false; }; }, nil ] call BIS_fnc_addStackedEventHandler; _id = player addAction [ "Call reinforcements", { map_enabled = true; if (!visibleMap) then { // will probably need to check if player has map, and use forceMap if he doesn't openMap true; waitUntil {visibleMap}; }; mapCenterOnCamera ((findDisplay 12) displayCtrl 51); waitUntil {!visibleMap}; if (map_enabled) then { systemChat "Reinforcements cancelled."; }; map_enabled = false; }, nil, 0.5, false, true ]; Additional ideas for this approach; you could add also marker to map when reinforcements are being called, and perhaps remove it once chopper leaves the LZ. addAction could be tied to somekind of device or radio, and limited by some interval or resources etc. This almost makes me want to create a SP scenario 😅
  9. spunfin

    AI Spawn Script Pack

    Glad to hear that! 🙂 Yes, that should work if you use AddAction to call it, perhaps via simple script that sets the desired position on to that first parameter. I'll try this some day this week, it would in fact make my own debugging also easier.
  10. spunfin

    AI Spawn Script Pack

    Thanks for the heads up! I'll have to check different FFV choppers and see how it goes with bis_fnc_spawncrew and probably update my cargo spot calculations - I just noticed I still have _cfg >> "Turrets" in it, instead of just "transportSoldier".
  11. spunfin

    AI Spawn Script Pack

    v1.15 Update New script and bunch of minor fixes. Download: https://kaartomedia.com/AISSP/files/AISSP_1.15.zip Docs and setup apps: https://kaartomedia.com/AISSP/ Changelog Added Added new main script: AmbientExplosions. Added LV\LV_functions\LV_fnc_findPosition.sqf to handle position searching between distances from defined center(s) while avoiding defined areas and/or objects. Fixed Fixed a bug where ReinforcementChopper choppers dropped dead right after spawning (reason was UAV config entries in classname arrays where the script selected a chopper). Improved heli spawning in ReinforcementChopper. Changed ReinforcementChopper: parsing off chopper classnames which includes 'UAV' or 'Light'. ReinforcementChopper: using now bis_fnc_spawncrew instead of manually creating pilot (now chopper also has a crew instead of lonely pilot).
  12. spunfin

    AI Spawn Script Pack

    v1.11 Update Download: https://kaartomedia.com/AISSP/files/AISSP_1.11.zip Docs and setup apps: https://kaartomedia.com/AISSP/ Changelog Added Added LV\LV_functions\LV_fnc_removeClasses.sqf which is now being used to remove unwanted classnames from classname arrays & nested classname arrays. This means there should be no crewmen and pilots anymore in normal infantry groups or in vehicle cargos. Changed All building related scripts will now skip roof positions, so for example FillHouse shouldn't spawn AI to roofs anymore, and AI shouldn't go to roofs while patrolling.
  13. spunfin

    AI Spawn Script Pack

    That's a nice idea, it makes no sense to have vehicles full of crewmen. Not even sure what I did that in the first place..
  14. spunfin

    AI Spawn Script Pack

    Haha, thanks! Good to hear! 😊 Yeah, sadly (or luckily?) Flash was banned from most browsers, so the old GUI wouldn't even work for normal users anymore. But my new documentation has kinda similar implementation, having more possibilities and functionalities. Been wandering in Insurgency Sandstorm, Squad, Tarkov, etc, but decided finally to reinstall Arma3. SQF feels reeally annoying after doing other languages for a few years, but hopefully I get to push myself forward with it and find motivation to come up with new stuff.
  15. spunfin

    AI Spawn Script Pack

    Long time no see! v1.1 Update Download: https://kaartomedia.com/AISSP/files/AISSP_1.1.zip I finally had some time, so I made a simple web app to setup all the scripts easily. It's integrated to new documentation here: https://kaartomedia.com/AISSP/ While testing everything, I fixed all the bugs I found and made some basic optimizations... eh, 7 years after Na_palm suggested me to do it. I also included his awesome SimpleCacheV2 script with minor tweaks (documentation has also a simple setup tool for it). Let me know if you face any errors or find bugs! Changelog Added Added SimpleCacheV2 (by Na_Palm) which wont require you to initialize FillHouse & Militarize instances separately. Added a few fairly simple extra scripts and possibility to set them to Custom init parameter via the setup tools in this documentation. Fixed Fixed a bug where HeliParadrop was spawning only parachutes (reason was parachute config entries in classname arrays where the script selected a chopper). Fixed multiple bugs in RandomSectors mission template script (custom init handling was causing few of them). Fixed a typo in Militarize (might have caused issues when combining SimpleCache scripts to Custom init). Changed Added global center variables so that all the scripts aren't adding new center's all the time. Added minimal sleeps to all loops. This will slow things down barely marginally, yet it improves performance.
  16. spunfin

    AI Spawn Script Pack

    @Fritz Le @Lloyd Dawkins I'm actually just playing around with RHS units, so here's a minimized example: class customClass2 { side = 3; //0 = CIV, 1 = BLU, 2 = OPF, 3 = IND men[] = {"rhsgref_ins_base","rhsgref_cdf_ngd_rifleman","rhsgref_cdf_ngd_rifleman_m92","rhsgref_cdf_ngd_rifleman_lite","rhsgref_cdf_ngd_grenadier"}; men2[] = {""}; men3[] = {""}; menSF[] = {""}; divers[] = {""}; cars[] = {""}; tanks[] = {""}; helicopters[] = {""}; planes[] = {""}; ships[] = {""}; }; And you would use ["customClass2"] as a parameter. And simple playaround to dig up some classnames (not the best possible one I'm sure): _all = "getText (_x >> 'author') == 'Red Hammer Studios'" configClasses (configFile >> "CfgVehicles"); _count = (count _all) - 1; _array = []; for "_i" from 0 to _count do{ if(getText((_all select _i) >> 'textPlural') == 'infantry' && getNumber((_all select _i) >> 'side') == 2)then{ _array = _array + [configName (_all select _i)]; }; }; copyToClipboard (str _array); Dig into config viewer and find values you can identify the modded units from, like here with Zombies and Demons: Experience is pretty fun once you have one enemy side filled with RHS units, one with Zombies, and random loot everywhere. :)
  17. spunfin

    AI Spawn Script Pack

    @mikepetunia Haha, yeah it sounds like they just hates each others. Can't see what is messing it, it sounds like they'd have a wrong side value, but I'm sure you have already tried everything simple related to sides etc. @majogl In that scenario it would surely have all 40 groups arount the 4 players. Thanks for pointing this out, it must be taken account of when I bring the player amount related AI options into the script. Now you can actually pick factions, or even custom classes for all the scripts. The last parameter in all of these scripts in version 1.0 is "classes parameter", and it's basicly an array of strings, that are classes from "LV\config_aissp.hpp". So if you open up this .hpp file, you can see that there's classes for all fanctions including all their classnames. As default, the classes parameter for scripts is ["ALL"], which uses all those default classes from the .hpp. But if you change it for example to ["OPF_T_F"], the script will pick classnames only from that class. Just remember to pick a class or classes of the same side you're going to spawn. The very first class is empty, so that you can for example fill it with classnames that comes from a mod. Then in script init line you'd just use ["customClass1","customClass2","customClass3"], or whatever you name your custom classes. Just remember to keep custom classes divided per sides so that you don't end up having west unit with east classname. Another very important usage for this .hpp file would be when you use reinforcementChopper, since if you just randomize the chopper it uses, it might be one of those support choppers with no room for reinforcement group. So you could make custom classes for actual troop transportation choppers, or just check a index number of one to be used in the script init line. (Note that it doesn't matter which "men"-array you use for infantry classnames. There's that many of them only becouse some factions has special groups, and I needed to divide them into separated arrays so that scripts can pick one random infantry array for a group instead of having mixed groups.)
  18. spunfin

    AI Spawn Script Pack

    Here's now also the updated Flash app for version 1.0. I hope it makes things easier for you guys. @supergruntsb78 Nice, I hope you enjoy! :) @mikepetunia That sure sounds odd. Must be something with zen occupy mixed with fillHouse, I'll try to see if I can spot the reason for this. Is it still happening? @majogl Yes it should notice all players when MP-parameter is set to true, and spawn & move ambientCombat related to all alive non-captive players. So basicly the player array means nothing when you set that parameter to true as the script then occupies the array with all alive players. Group amount is fixed total amount, so it's not related to player amount in any way. It's a good idea though, I should consider allowing that functionality. +I added a parameter to prevent water units to be spawn! :) @B00Ts-SA AIRS was just a tiny brain fart, aiming to build quickly the same feeling you had when you played Battlefield 2 back in the day. I haven't updated it for a long time, so I'm not completely sure if it's working or not. @Royal Eagles That's a good idea! Currently you can't, without modifying the scripts. But this will certainly be added to next update! @Gianluca Mombelli I'm not 100% sure what you mean, but if you're using fillHouse and militarize, you can achieve this with combination of triggers and "LV_fnc_removeGroup.sqf" (see example from documentation, right on bottom part of militarize or fillHouse). So basicly you would have global variable, f.ex. "mil1spawned" as 1 condition for a trigger, and you'd set it to true when you initialize militarize via trigger. (Remember to also use unique ID-number for militarize.) Then, when you use removeGroup, or when you check if militarize goup is dead, set "mil1spawned" back to false to allow reactivation of the trigger. Check also my randomSectors1.sqf for scripted approach. @pd3 Thanks for your input! You seem to have very good ideas, I'll definitely include those to next update!
  19. spunfin

    AI Spawn Script Pack

    Okay, time to update! Version 1.0 http://kaartomedia.com/ARMA/AI%20Spawn%20Script%20Pack%201.0.rar Online documentation (Note that the Flash app wont work yet as it has old parameters!) This one is the .sqf versions with many changes and fixes. Package includes fairly simple example missions and documentation. Flash app for the init lines is also coming soon! I tried my best to also update all comments in the scripts. There's some new parameters allowing some more customization that people have requested. Also one major change is that all the classnames for AI comes now from LV\config_aissp.hpp. Therefore you must include this into your missions description.ext: class aissp_configs { #include "LV\config_aissp.hpp" }; Scripts has a "classes"-parameter, which is an array of classes from config_aissp.hpp (with the exception of "ALL", which includes all default classes to the array). By using classes-parameter you can filter classnames, for example: ["BLU_CTRG","IND_C_F","OPF_T_F"] Or even use custom units by creating custom classes into the .hpp file. I included an empty example that you can fill with any classnames you want. You may have as many custom classes as you wish, and you can use them the same way as default classes, via classes-parameter. I have tested these new versions only in SP mode (also simpleCache seems to be working), so test everything out before you hit it to your server! Cheers! I'll fix the flash app asap and write some better changelog once I get some time for it.
  20. spunfin

    AI Spawn Script Pack

    Yes that's correct, randomly 50% of all buildingPos' in range of 500m (as in 500m from center point to every direction, so the area is actually 1000m circle) will be used as spawn points. Your line seems to have first parameter twice tho, but it's probably just that you've tested with "marker" and also with player and just forgotten both of them there.
  21. spunfin

    AI Spawn Script Pack

    AVIBIRD 1, Yeah that sounds pretty reasonable, I hope it now works. :) If you still encounter issues and odd behaviour, you can send files to me straight via this page: http://kaartomedia.com/ShowMe/ drsubo, lines 191 & 192 will decide if infantry group or vehicle group is being spawned. Infantry amount: line 207: _grp = [_spawnPos, _side, [10,3]] call LV_menGroup; - number 10 is max number for random command, and 3 is fixed amount = group size will be 3-13. So you could try something like [2,2] to get group sizes down to 2-4 units. (Actually, I can't remember anymore if random command rounded numbers up or down, but anyways, it will be 2-4 or 2-3 units)
  22. spunfin

    AI Spawn Script Pack

    Ah okay, what kind of trigger is it? You could first try setting those script into some GL or object init, since triggers might surely mess up simpleCache, as it works somehow like this: 1. fillHouse / militarize spawns units 2. simpleCache checks distances etc and decides if it removes those units or not, and starts looping to check these things again and again, and reacts if distances changes to valid or non-valid So there's need to run fillHouse & militarize instances only once.
  23. spunfin

    AI Spawn Script Pack

    AVIBIRD 1, Can you set up a small mission where this happens or share your current mission files with MCC & DAC disables so I can take a look what's happening? Does this happen in singleplayer or multiplayer? csk222, 1. You could disable their movement via custom init with something like "this disableAI 'MOVE';", then they should stick where they spawned but still turn, aim & shoot. I've not tried this, but it should do, eventho it's not pretty. :P For more realistic results you would probably want to call external script from custom init which for example enables movement once player is near enought or something. There's also other commands related to this, like this forceSpeed 0; and doStop this; 2. & 3. Instead of player you could try referring to a group or array of groups (of player units), then these scripts uses LV_fnc_follow.sqf to target the nearest unit from the group(s) you defined there. Documentation -> target -> group and group array MP is my weak spot especially with dedicated server, but I know people have successfully done these things your trying to do.
  24. spunfin

    AI Spawn Script Pack

    Hey JAndrews1, You can disable those scripts inside main script files and add there something else if you prefer, but they are being used as default: militarize - vE, vH, vD fillHouse - vF, vG heliParadrop - vD (if set in parameters) reinformentChopper - vD (if set in parameters) The errors you got indicates that somehow your "target" unit/object could be faultly defined. Could you paste which scripts are you using, how you use them and where? FdgeKake, Sounds odd for sure, could you possibly share your mission files?
×