Jump to content

spunfin

Member
  • Content Count

    89
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by spunfin


  1. On 4/14/2022 at 11:33 AM, saopig40 said:

    I don't know why, using Fillhouse and percentage to generate AI is always easy to generate count buildings error, is there any way to fix it

     

    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.


  2. 6 hours ago, Blackheart_Six said:

    Merry Christmas, Spunfin! Enjoy the beer.

    Thanks brother, Merry Christmas! o/

     

    On 12/8/2021 at 4:54 AM, h34dup said:

    Hi there, this looks like a really useful set of scripts and the website documentation and tools make it super easy to customize. However, I cannot get Ambient Combat to work - nothing is happening. I have installed the script correctly - I seem to be able to get ambient explosions to run in some form as I can see slow-movers flying around, and I am seeing errors referencing code inside the ambient combat script when I intentionally cause an error in the parameters (eg. adding a unit name as the first parameter for Ambient Combat, which doesn't work that way). Even when using the default, no units will spawn, even after 30-120 seconds. I've tried running it from the inits of units in game, in triggers, and in the equivalent of my init.sqf, on Altis with just the scripts, the description.ext and a player, etc. 

    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).


  3. @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.

    • Like 1

  4. 37 minutes ago, KokayneKrayzie said:


    So I was finally able to get some time to test everything out! Just wanted to test the simple script first before doing anything too complex. I have everything popping up correctly, the map and add action. However, once I click, nothing happens (I don't get the Reinfoments requested to position system chat). When I get out of the map, I do get the reinforcements canceled though.

    Am I missing something?

    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


  5. On 6/14/2021 at 6:01 AM, KokayneKrayzie said:

    Wow...after a very LONG search for a proper script, I believe you have the solution. Im going to use the reinforcement script but I have one question...I see the following on the description:

    Parameter 1 - Spot: "Landing spot (object/unit/marker/position array, remember to use "quotes" with marker)"

     

    Can this also be done with a map click? Im also assuming I could call the script with an AddAction

    Nice work, and REALLY great stuff with the documentation 😊 🙌

     

    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 😅


  6. On 6/14/2021 at 6:01 AM, KokayneKrayzie said:

    Wow...after a very LONG search for a proper script, I believe you have the solution. Im going to use the reinforcement script but I have one question...I see the following on the description:

    Parameter 1 - Spot: "Landing spot (object/unit/marker/position array, remember to use "quotes" with marker)"

     

    Can this also be done with a map click? Im also assuming I could call the script with an AddAction

    Nice work, and REALLY great stuff with the documentation 😊 🙌

    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.


  7. 6 minutes ago, redarmy said:

    I havent tested your script yet but a heads up.If your reinforcement chopper is a FFV aircraft such as the Huron,it might not disembark FFV pasengers.Currently creating a scenario and using a reinforcement method via the "gaurd" WP is causing this.FFV units act like crew.

     

    For me,i used 6 crew in the huron to get around this,as first 4 take up crew then next 2 take up FFV spots.

    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".


  8. 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).
    • Like 1

  9. 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.
    • Like 1

  10. 1 hour ago, damsous said:

    Hey nice update, just a suggestion it can be cool if the script can grab randomly used faction classname (men[]) to fill vehicle for ambient combat cause actually the vehicle are filled with crewman for armored veh and helicrew for heli.

     

    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..


  11. 2 hours ago, redarmy said:

    Oh my lord.Spunfin welcome back! This was the first ever script i used.I remember the helpful GUI u put together to set it up(was needed as i was new to Arma3 and had no idea how to call a script etc) Great to see this back.That GUI was lost now that Armaholic site was taken down.Anyway this takes me back thanks for updating

    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.

    • Like 2

  12. 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.
    • Like 1
    • Thanks 2

  13. @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:

    Spoiler
    
    _all = "getText (_x >> 'author') == 'Ryan'" configClasses (configFile >> "CfgVehicles");
    _count = (count _all) - 1;
    _array = [];
    for "_i" from 0 to _count do{
    	if(getText((_all select _i) >> '_generalMacro') == 'CAManBase' && getNumber((_all select _i) >> 'side') == 2)then{
    		_array = _array + [configName (_all select _i)];
    	};
    };
    copyToClipboard (str _array);

     

    Experience is pretty fun once you have one enemy side filled with RHS units, one with Zombies, and random loot everywhere. :)


  14. @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.)


  15. 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!


  16. 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.

    • Like 2

  17. Should I presume that the radius for the below is 500/500? Could you explain more into this?

    Also, the spawn %, default is 50, is that 50 % of positions will be filled in that radius of 500/500?

    nul = ["marker",player,2,true,2,50,500,"default",nil,"hint 'careful of rebel patrols';",nil] execVM "LV\fillHouse.sqf";

    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.


  18. 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)


  19. In MP yes I will still trying to ID what happens. Let me ask you a question I am using trigger not GL to call in script. I am calling the fillhosue & militarize at the same time. If I call one at a time no real issue but still testing I will let you know and gave you an example mission. How do I post a mission to this thread I never did that lol.

    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.


  20. 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.


  21. 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?

×