Kosmo_ 36 Posted November 12 HIVE AI V4 Arma 3 version: https://forums.bohemia.net/forums/topic/290922-hive-ai-a3/ Overview HIVE is an strategic AI self commanding script. Map locations are objectives. Groups are automatically sorted into types and receive waypoints to objectives. Units such as artillery, aerial and supports are also handled. Forces ratio consideration, defensive stance when outnumbered. Infantry can garrison and be transported when needed. Usage Initialize with execVM "HIVE.sqf". Requires "HIVE_AO" marker present. Marker size "b" is radius of included locations. Requires "Functions" module. In HIVE.sqf are following configurations: HIVE_ACTIVE - Pause/unpause looping. HIVE_WEST/EAST/GUER - Can suspend side control. HIVE_DEBUG - Debug markers and messages. HIVE_ICONS - Icons for spawning. HIVE_GROUP_BLACKLIST - Remove groups from HIVE control. HIVE_LARGE/MEDIUM/SMALL - Location types to be used as objectives. HIVE_SIZE - Location sizes Files https://drive.google.com/drive/folders/1D59AmyaK4PlIWtLCcHPiBqv7P_6PTzFG?usp=drive_link Battle generator https://forums.bohemia.net/forums/topic/291063-sp-hive-battle-generator/ 3 Share this post Link to post Share on other sites
dalber24 165 Posted November 13 I was trying it, I liked it a lot, it's very good, thanks for sharing it 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 14 17 hours ago, dalber24 said: I was trying it, I liked it a lot, it's very good, thanks for sharing it Thanks for trying! I am currently cooking another version of this, here's a little sneak peek /// ARTILLERY { _group = createGroup sideLogic; _battery = _group createUnit ["BIS_ARTY_LOGIC",[0,0,0], [], 0, ""]; _battery synchronizeObjectsAdd [vehicle leader _x]; vehicle leader _x synchronizeObjectsAdd [_battery]; if (side _x == WEST ) then {_x setVariable ["MARTA_customicon", ["b_art"]] }; if (side _x == EAST ) then {_x setVariable ["MARTA_customicon", ["o_art"]] }; if (side _x == RESISTANCE ) then {_x setVariable ["MARTA_customicon", ["n_art"]] }; }forEach HIVE_ART; /// _handle = [HIVE_ART select 0, TARGET, "HE", 2] call HIVE_FIREMISSION; HIVE_FIREMISSION = { _battery = (synchronizedObjects (vehicle leader (_this select 0)) select 0); _target = getPosATL (_this select 1); _type = _this select 2; _rounds = _this select 3; [_battery, _target, ["IMMEDIATE", _type, 0, _rounds]] call BIS_ARTY_F_ExecuteTemplateMission; }; 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 14 6 hours ago, Kosmo_ said: Thanks for trying! I am currently cooking another version of this, here's a little sneak peek Hey I liked that! 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 15 Hey @Kosmo_, I have a question, can the AI use artillery too or is it just for the player? It's not that it's super important... but, it wouldn't be bad if the AI could also blow your ass off. Cheers 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 15 53 minutes ago, dalber24 said: Hey @Kosmo_, I have a question, can the AI use artillery too or is it just for the player? It's not that it's super important... but, it wouldn't be bad if the AI could also blow your ass off. Cheers Yes, the AI does use artillery in v2. More specifically "recon" type units call it in with good effect 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 15 3 hours ago, Kosmo_ said: Yes, the AI does use artillery in v2. More specifically "recon" type units call it in with good effect Nice! Thx! 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 18 Did a test of the script with ridiculous amount of 1 unit groups... https://imgur.com/a/gGF0ZPn and it seemed to perform very well ... how??? 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 21 Hey I just realized you had updated it... I was waiting for the new version, but since you hadn't said anything, I was waiting for the announcement message... I hadn't looked at the first post... I just saw it... In your last message you had not mentioned the update, you should do it, because it is usually rare when there are several messages, to see the first one. 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 21 2 hours ago, dalber24 said: Hey I just realized you had updated it... I was waiting for the new version, but since you hadn't said anything, I was waiting for the announcement message... I hadn't looked at the first post... I just saw it... In your last message you had not mentioned the update, you should do it, because it is usually rare when there are several messages, to see the first one. Oh yeah I basically rewrote the thing 3 times since first posting xd. But yeah I'll probably take a little bit of a break now since stalker 2 came out. All of the versions are in drive folders, I'll maybe look into making some kind of battle generator type mission utilizing the script in future. 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 21 1 hour ago, Kosmo_ said: Oh yeah I basically rewrote the thing 3 times since first posting xd. But yeah I'll probably take a little bit of a break now since stalker 2 came out. All of the versions are in drive folders, I'll maybe look into making some kind of battle generator type mission utilizing the script in future. Okay, you have a well-deserved break, and a very good excuse, Stalker 2! Good thing it's already been released... I also have to play Metro Awakening which I haven't even installed yet, and now that you mention it I'm going to go for Stalker 2 too. Thanks for the update, and I look forward to your return for your new scripting beauties. Cheers 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 23 Version 3.2 Added transportation handling. Vehicles without gunners, eg. trucks will be assigned to "logistics" category. All vehicles that have more free cargo seats than units in group will be available for transportation missions. Infantry that gets a waypoint that is far away (> 1000m) will be added to cargo array. Transportation missions will be assigned from this cargo pool, depending if they can fit the infantry group in question. Changed forces comparison, now counts individual units and vehicles instead of group types. 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 23 It seems that Metro Awakening will wait a little longer... Edit: @Kosmo_ wait a minute, you're kidding me... you didn't update the files Cheers 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 23 50 minutes ago, dalber24 said: It seems that Metro Awakening will wait a little longer... Edit: @Kosmo_ wait a minute, you're kidding me... you didn't update the files Cheers I did update the files, however I didn't update the link 🤦♂️ (fixed now) 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 23 2 hours ago, Kosmo_ said: I did update the files, however I didn't update the link 🤦♂️ (fixed now) Excellent, thank you very much, I didn't want to have to use force... 🤣 🤣 Cheers, have a nice weekend! 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 24 Version 3.3 Added "danger close" check for artillery. Artillery will not fire at targets which have friendly units close ( <200m). Changed known enemies array, now accounts individual units instead of groups. Closest know enemies are now checked from waypoint, not squad leader position. Fixed transportation, infantry groups that stay too long in a vehicle (when strategic cycle is triggered) will now dismount instead of staying in cargo forever. Transportation missions capacity is now counted >= instead of >, eg. if there are 8 cargo seats vehicle will transport squads of max 8 instead of 7. Slowed down script looping a little, is now 120s, 240s and 360s. Infantry when side is in defensive mode will seek a building nearby (<250m) waypoint. If building is found they will receive a "HOLD" waypoint on it Time to update A3 one too I guess 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 24 39 minutes ago, Kosmo_ said: Version 3.3 Incredible, thank you very much, I was just trying out 3.2 and now I have 3.3! Nobody can stop you! Cheers, have a nice weekend! 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 25 V 3.4 Transports unit categorization changed, (no gunner, group > 2 units and seats > 1) Single seater planes/helos should be correctly categorized into air units now. Fixed typo in forces comparison, specifically _airwest was incorrectly _airswest. Removed cyclical (strategic) reset of busy array, should prevent transport waypoint never completing. Attempt at stuck prevention, every tactical cycle the radius of current wp is exponentiated. In tactical separated INF into their own section. 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 25 Wow @Kosmo_ you are Unstoppable <---= 😎 Thanks for the update, I have a silly question, when you enter HIGH COMMAND mode, do you see yourself on the opposite side, for example, on the map if you are on the red side you see yourself blue, is that correct? I mean that's just visual if I'm not mistaken, you don't change sides or do you? Anyway, it's nothing important, just curious. Cheers Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 25 15 minutes ago, dalber24 said: Wow @Kosmo_ you are Unstoppable <---= 😎 Thanks for the update, I have a silly question, when you enter HIGH COMMAND mode, do you see yourself on the opposite side, for example, on the map if you are on the red side you see yourself blue, is that correct? I mean that's just visual if I'm not mistaken, you don't change sides or do you? Anyway, it's nothing important, just curious. Cheers No you don't change sides. I think the resistance faction being colored blue in the demo is because they're aligned to be west friendly, but not sure. Here is more info on the high command module https://community.bistudio.com/wiki/High_Command 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 26 V 3.5 Vehicle and armored units have their normal waypoints at "Limited" speed, making infantry keep up a little better. Made settings variables execute unscheduled, can now be changed by init fields in units etc at game start. Added transport to artillery exclusion list. Added HIVE_SUPERBUSY array. Every strategic cycle (groups in HIVE_SUPERBUSY) waypoints get placed on unit position. This should prevent transports from getting stuck. HIVE_TACTICAL now excludes units in HIVE_GROUP_BLACKLIST, exclusion should happen faster this way. Changed formation array to 6 with wedge being most likely. Added check for vehicle commander in HIVE_BUSY array, also excludes blacklisted units. 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 26 1 hour ago, Kosmo_ said: V 3.5 Someone call the fire department!!! You're on fire!!! Very good update, I like the detail of limiting speed to maintain troop cohesion. Thanks for the update Cheers 1 Share this post Link to post Share on other sites
Kosmo_ 36 Posted November 28 (edited) V 3.6 New HIVE_SPAWNING.sqf Groups can be spawned with editor placed markers. Marker name has to be from HIVE_1 to HIVE_15. Markers are "b_inf", "b_motor_inf", "b_mech_inf", "b_armor" and "b_air". Markers with b_ prefix are for west units while o_ is east and n_ is for resistance. See : https://community.bistudio.com/wiki/Arma_2:_CfgMarkers Group types to spawn correlates with marker type. Possible group types are "Infantry", "Motorized", "Mechanized", "Armor" and "Air". See : https://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_CfgGroups The text field in marker dictates which faction to spawn, for example of you want OA Takistan military, you type in marker text field BIS_TK. See previous link. Marker size "a" is how many groups should be spawned, multiplied by 10. For 7 groups you would set marker size "a" to 0.7. Marker size "b" is how large spawn radius should be, multiplied by 500. So if you want groups to spawn in a radius of 1000m, you set marker size "b" to 2. If you disable HIVE_ICONS in HIVE.sqf these markers will be removed after spawning. There should be an unit of an side in editor for which spawning is done. This unit can be a dummy with Probability of presence 0. Removed cyclical waypoint reset, may the AI pathfinding be merciful. 29/11 small patch for spawning script, makes "variant 1" from cfg groups more likely than others, also fixed spawning of ghost (yes very spooky) groups Edited November 29 by Kosmo_ 1 Share this post Link to post Share on other sites
dalber24 165 Posted November 28 6 hours ago, Kosmo_ said: V 3.6 New HIVE_SPAWNING.sqf Spoiler Marker name has to be from HIVE_1 to HIVE_15. Markers are "b_inf", "b_motor_inf", "b_mech_inf", "b_armor" and "b_air". Markers with b_ prefix are for west units while o_ is east and n_ is for resistance. See : https://community.bistudio.com/wiki/Arma_2:_CfgMarkers Group types to spawn correlates with marker type. Possible group types are "Infantry", "Motorized", "Mechanized", "Armor" and "Air". See : https://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_CfgGroups The text field in marker dictates which faction to spawn, for example of you want OA Takistan military, you type in marker text field BIS_TK. See previous link. Marker size "a" is how many groups should be spawned, multiplied by 10. For 7 groups you would set marker size "a" to 0.7. Marker size "b" is how large spawn radius should be, multiplied by 500. So if you want groups to spawn in a radius of 1000m, you set marker size "b" to 2. If you disable HIVE_ICONS in HIVE.sqf these markers will be removed after spawning. There should be an unit of an side in editor for which spawning is done. This unit can be a dummy with Probability of presence 0. Removed cyclical waypoint reset, may the AI pathfinding be merciful. Awesome!!! Very good update! Thanks! I'm going to try it right away. PD: This time I'm going to try without GL4, last time I did the test and things got really crazy... 🤪🤣🤣 it seems that all the GL4 + HIVE AI scripts together do crazy things. Cheers! 1 Share this post Link to post Share on other sites
zwobot 22 Posted November 30 Nice work. I put a company worth of Blufor onto I44's Omaha v2 and a reinforced platoon of Opfor into an area of 3 villages and had an instant battle ready in not more than 5 minutes. Is it possible to influence how the hive positions waypoints around the locations? For example decide whether objectives are approached in a frontal assult, flanking or envelopment? 1 Share this post Link to post Share on other sites