Author: Leopard20 & WindWalking
Author Website:

Requirements: Community Base addons A3, WW AIMenu

Version: 1.0.0
Signed: No

Short description: This is a really simple mod that adds a few needed commands for otherwise either buggy or incomplete behavior for friendly AI units in group.

Date: 2017-12-07 09:28


Comments: (0)
Rating:



 



All-In-One AI Command Menu - A "WW AI Menu" Patch

by
Leopard20 (A.K.A ColonelKernel) & WindWalking


Description:
As you know, the WW AI Menu was one of the first and best AI mods released in the early days of ARMA 3 release. It addressed a lot of issues and shortcomings with the vanilla ARMA commanding system, and packed a lot of handy features including:
- Infantry commands such as healing, garrisoning & clearing building, rearming, ....
- Vehicle commands such as engine on and off, horn and eject with parachute.
- Waypoint system with the ability to assign multiple waypoints to your squad members.
- Weapon accessories (silencers, flashlights, ...)
- Unsticking units.
and ....
Read more about the mod:
https://forums.bistudio.com/forums/topic/153621-ww-aimenu-complimentary-commands/

Unfortunately, when Windwalking left the community some of the features ended up broken, and due to the community rule forbidding people from taking over and/or changing an author's work without their permission, nobody has stepped up to bring this mod back to life. Until now.
I decided to bring this mod back to life in a way that respects the community rule and the author's work. Namely, "patching" the original mod by adding features and fixing broken ones. As a result, you will need the original mod installed for the my mod to work.
You can activate the menu by pressing Y .If you use the "Y" key for Zeus or anything else you can either map those commands to another key (I personally use "Ctrl+Y" for Zeus) or change the keybinding for the menu by navigating to: "OPTIONS > CONTROLS > CONFIGURE ADDONS > (dropdown menu) All-In-One Command Menu".

I've also included a userconfig file where you can add support for your mods (if they are not supported already). Currently you can add support for: Resupply vehicles, AT soldiers (used in the rearming script) and the Handgun suppressors.
Note that you might need to enable "file patching" for the config file to work (either add the -filepatching commandline or enable it in the launcher parameters).

This mod is compatible with other commanding mods (such as C2). Although I don't recommend using both for issuing the same command at the same time (e.g when you use C2 to order your units to mount a vehicle, don't use the same command in this mod, as it may cause conflicts and unforeseen consequences)
I also recommend this mod as it makes issuing regular and frequent commands a lot easier: (you may need to change the default keys used by the mod, keys 1, 2, 3 , 4, as these keys are used for switching weapons)
Advanced Command System (ACS)

All features were tested using the vanilla ARMA vehicles/weapons (including all DLCs up to the time of release), and work as intended. However some features (the most important of which being weapon accessories) may not work in other mods (such as RHS or CUP).
Edit: As of version 0.50 Beta most features should work with other mods without issues. If they don't please post your feedback in this thread.

Here's a quick overview of what is changed:

Unchanged:
- Waypoint system.
- Garrisoning and clearing buildings.
- Rearming and Inventory.
- Vehicle Controls.
- Unstuck unit.
- Fly around area.
- Fly in height.


Fixed/Modified/Removed:
- Changed arrangement of items in the menu (obviously!)
- Fixed weapon accessories (almost each item in the menu didn't work)
- Modified landing (added aircraft landing as well)
- Modified healing (including new features such as taking cover as well)
- Fixed "Follow Target"
- Removed attributes (replaced with Set ROE - see below)


Added:
. Infantry Commands:
. Set R.O.E - Careless (now supports individual units instead of entire group), Fire on my lead (now supports individual units instead of entire group), No launcher and Unit targeting (enabled or disabled) - see the "notes" section for further description.
- Defense: Choose between three defense modes:
Take Cover : Units will take cover behind nearby objects.
360 Formation: You can arrange units into a 360-degree formation. Simply navigate to "Infantry Commands>Defense" and then either 1. Point at a position, then select "360 Formation". Or 2. Open your map, then select "360 Formation" and then click on any desired location. Next you are prompted about the radius of the circle formed by the units. Select a radius and units will move into position! This feature only works for units that are on foot.
Fortify Position (WIP): This feature works similar to the above feature - you select a position and a radius- and is useful when you want your units to defend a position. This is what happens when you select this option: 1. Vehicles move to the desired position, then everyone except the gunner disembarks 2. Remaining units will mount all static weapons inside the defense radius. 3. Remaining units will try to move inside houses that are close to the perimeter of the defense circle. 4. Remaining units will take cover behind nearby objects 5. If anyone is still remaining, they will form a 360-degree formation with a smaller radius at the position. The steps for selecting this option is the same as the above feature.
- Limit Unit Speed: Force your units to move at a specific speed. This option is located in "Infantry Commands" sub-menu.
. Vehicle Commands:
- Switch seats : Only is shown when you select a single unit and he's in a vehicle. I assume the name is self explanatory.

- Mount : A replacement for the incomplete vanilla mount menu (key 4) by sorting out the vehicles according to their class (car, armor, helicopter, boat, plane, static weapon) and the option to choose the vehicle role. Only vehicles that are on your side and within 200 meters of you or your "distant" group members are shown. You can also pick the vehicle from the map (within 1000 meters).
Edit: As of version 0.70 Beta you can also choose the cursor target (can be used to mount enemy vehicles). You can also choose multiple positions without closing the menu (you need to wait a couple of seconds between two consecutive selections for it to work properly)

- Vehicle Controls: Turn on/off vehicle lights without changing the unit's combat mode! This feature may not be compatible with all vehicles, and for it to work, the vehicle must have well-defined hit points (because I destroy their headlights! Don't worry though, because it doesn't count as vehicle damage!) There's another catch to this feature: The only way you can turn the headlights back on is through this menu! There's no other way.
Headlights can be turned off regardless of combat mode, but whether they turn on or not still depends on combat mode. Unfortunately there's nothing I can do about this.

- Resupply - refuel, rearm and repair at the specified vehicle within a 2000 meter radius of the unit's vehicle (objects are not supported at this moment).
They will let you know in the group chat when their action is complete.
There's only one known issue at the moment: sometimes if the vehicle is almost out of ammo, you might see that all of its ammo is removed first during the rearming process, which only means you might have to wait a few seconds longer. That's all!

- Taxi Aircraft (WIP): You can now order your units to Taxi their aircraft to the desired location. There are two modes: 1.Automatic: Simply select a position from the map and the plane will automatically taxi there! 2.Select Positions: Select multiple positions from the map and the plane will pass through those positions! Close the map when done to execute the command.
This feature is now incorporated into the "Resupply" script!
Note: This feature is not complete yet, and the plane motion may look a bit weird! Also, you need to make sure the path is obstacle-free, otherwise the plane will be blown up as it tries to pass right through the object! (I'll add a quick obstacle-check in the next release) Added
The only way to stop the process is by selecting "Cancel" from this menu!

. Weapon Management:
-Switching weapons between handgun and rifle.

- NVG: Turn unit's night vision on and off. (this option used to exist in the original mod, but I removed it because I thought the units remove their NVG automatically, while it was because of ASR AI! Thanks to @ineptaphid for reporting)
Note that AI enhancement mods such as ASR AI may override this feature.

. Actions:
- Sling Loading : Load and Unload cargo.
As you know, the vanilla ARMA has no option in the actions menu for sling loading. You have to point at the object you want your units to slingload and select the corresponding option, and even then, you sometimes see the AI piloted chopper circling around the object for minutes before getting the job done.
I've written a new script for sling loading. In my tests I found it to be way more reliable (and sometimes even more accurate!) than vanilla sling loading. Note that you can only slingload compatible objects (e.g you can't slingload a car with the Hummingbird!).
This option allows you to select the object you want for sling loading from the menu - or pick the object from the map. You can also select unload cargo to drop the cargo at the player's aiming position (or if the map is open, the clicked position on the map*). If at any point during the slingloading process an issue occurs (e.g the object is destroyed), sling loading will be aborted, and your unit will let you know in group chat. I recommend that you sling load stationary objects (e.g not a moving vehicle!).

- Disassembling static weapons :
If you select one or all of your units, this is basically the same as the vanilla version of disassembling (one unit dismantles the weapon).
However, if you select two units, both units will move up to the weapon, dismantle it and take the backpacks! (they drop their own backpacks near the static weapon)
Edit: As of version 0.70 Beta you can also choose the cursor target (can be used to dismantle enemy static weapons).

- Assembling static weapons :
If you select 1 unit, the unit will "attempt" to assemble a static weapon with his backpack at the nearest backpack on the ground in the direction that the player is facing. You can either point at a position or select it from the map.*
If you select 2 units, one unit will place his backpack at the cursor position (or selected map position) and the other one "attempts" to assemble the weapon with his backpack in the direction the player is facing.*

- Take Weapons :
Same as the vanilla version except weapons are sorted out according to their type (rifle, handgun, launcher). You can order them to pick up weapons that are on the ground or in a nearby ammobox (within 200 meters of the selected unit)

- Rearm:
Rearming has been improved in many ways. Selected units take primary weapons from nearby ammoboxes and vehicles if they don't have one and AT soldiers take launchers. Next they rearm their weapons. There are three rearming modes:
1. Automatic: Units will take weapons and rearm at ammoboxes and vehicles within a 100 meter radius. They automatically find the ammobox that contains what they need (Rifle, launcher and their mags).
2. At cursor: If the cursor is pointing at an object, the selected units will take whatever they can from the object; otherwise the script tries to find the closest applicable object within a 20 meter radius of the cursor position.
3. List of Objects: You can also pick the object you want the units to rearm at from the menu (withing 100 meter radius of the player and distant units).
There's also an "Open Inventory" feature. It's somewhat similar to the "Inventory" feature, except when the player gets close to the unit they can exchange their inventory items. It only works if you have selected 1 unit.
You can also access the rearm feature from the "Infantry Commands" sub-menu.
To see how this feature works, you can place a couple of AT soldiers in the editor, then remove their AT launchers and primary weapons, and then place a Basic ammo Box and Basic Weapons Box near the soliders (you may need to add the launcher to the weapons box in "Attributes").

I've also added an option for making all units in your squad playable.


Installation:
To install All-In-One AI Command Menu - A "WW AI Menu" Patch you should use modfolders to keep it seperate from the official game content to prevent issues.
With Arma 3 you can use different ways to set up your modfolders to use custom content you have downloaded.
Please visit the Arma 3 Mod install instructions page for more information about using custom mods and addons in Arma 3.


Included files:
AIO_AIMENU.pbo


Future plans:
- Bug fixing and optimization.✔
- Adding CBA keybinding instead of a config file.✔
- RHS support.✔
- Improving "Fly around area" (i.e loiter).
- Re-adding "Set Explosives".
- Adding support for ACE Medical.


Notes:
Objects in the menu (such as vehicles, slingloading objects and weapons) are sorted by their distance from the player.
In the lines marked with asterisk (*), note that you must open the map first before selecting the respective option if you want to select a position on the map (for example, to drop cargo open the map, then navigate to Actions > Sling Loading > Unload Cargo and then click on a position on the map)
When you want to assemble a static weapon, you don't have to keep looking in a direction for your unit to assemble the weapon - only the direction you're looking when you select Assemble matters. You can look anywhere you want afterwards!
By "attempt" in the above section, I mean I haven't added any command that checks whether the unit has a static weapon part on him, or there's a weapon part on the ground. So the script continues its job regardless. You should be the one that selects the appropriate unit(s).
I've written the "No Launcher" command for "ASR AI". If you have used this mod, you probably have noticed that as soon as your squad units spot a vehicle they take out their launchers - which means they may stand up or crouch when you're sneaking past the enemy and ruin everything! (this may be the case with other AI enhancement mods as well, such as Vcom AI) This option works only when your units' combat mode is set to "Stealth", and will remove the launchers from the selected units' inventory! To give them their launcher back (!) all you have to do is switch to another combat mode (like "Aware" or "Combat"). I also tested it to make sure saving and loading doesn't cause any problems, and it checks out.
"Unit Targeting" is useful when you want to sneak past the enemy as quickly as possible, and disables the AI targeting. It works in all combat modes except "Combat". When you've disabled a unit's targeting, do one of the following to re-enable it: 1. Change their combat mode to something else (note that their combat mode may change automatically if you set their combat mode to "Aware" or "Combat", as these two are dynamic combat modes and adapt to the situation). 2. Simply select enable from the menu (Infantry Commands > Set R.O.E > Unit Targeting > Enable)
As you know, the AI have a habit of taking off as soon as they get in a plane (or are already in one). Which is why they always take off as soon as they land! To fix this, in my script I "empty" the planes fuel tanks once they land! In order to give them their fuel back, you can do one of the following: 1. Order them to move to a new position or regroup. 2. Order them to disembark. Same thing goes for aircraft refueling, rearming and repairing (they use the same landing script).
"Safe" healing mode means it's safe for the units to heal each other! Safe mode makes units stop even before the medic reaches them to make sure the medic does his job quickly without units running around all the time! (although I think it's better to make them move towards the medic instead of making them wait). Stopping units makes them vulnerable, so it should indeed be used when you're safe!
"Combat" healing mode mode only slows them down to make sure they can still move around, but also do not cause the medic too much trouble by moving around. If their combat mode is also "Combat", they will try to take cover.
Units that take cover change their stance according to the type of cover (for example they crouch near houses, cars and tanks but go prone near bushes and trees). If you change their stance or order them to move out of cover (regroup or move) they will reset their stance.
In the "Mount" menu, you may see that some of the vehicle positions are greyed out. This might be because the position is already taken. If you're sure the position is empty, you can select "Any" for the vehicle role. Here's the order in which units fill the positions when you select "Any": 1.Driver. 2.Gunner and Turret (generally being FFV & co-pilot) . 3.Commander. 4.Cargo (passenger). Also, you may see that the commander position is available in some vehicles that have no commander positions! This is because the commander option also counts the first "turret" position, which is either an FFV position (as in HEMTT Transport) or a co-pilot seat.
If you see that some menu items are greyed out, it might be because the "requirements" are not met (e.g you need to select 1 unit for "Take Weapons", "Open Inventory", "Inventory" and "Sling Loading", and "Sling loading" requires the unit to be in a helicopter)
If the vehicle moves while resupplying or gets too far away from the resupply vehicle the process will be canceled.
Aircraft can resupply as far as 150 80 meters away from the resupply vehicle (as long as they don't start flying again!). The reason I did this is because as I said I empty the aircraft fuel tank so they usually stop at the start of the runway, which means they generally will be far away from the resupply vehicles. Also, I don't know how to make the aircraft taxi. If you know how to make AI taxi their aircraft, please post your solution here. I would really appreciate it. Added
To abort sling loading, use the designated "Abort" option in the menu. Because sometimes ordering them to return to formation or moving to a new position doesn't work.
When using the defense features, order your units to regroup or move to return to "AUTO" stance or stop watching a direction (you can also disable unit's targeting)
If you see your squad don't change their stance, you can use the "Refresh" command I have designated in the "Set R.O.E" sub-menu (it used to be called "Set Behavior", that's why it's still there!) Other things it does: 1. If some part of AI behavior is disabled (I use it in some parts of my scripts), it re-enables them. 2. It also restores the player's "current command" to nothing. "Current Command" is what you see below the unit's icon in the bottom left corner (e.g when you order them to move, it says "MOVE") If it's anything other than empty for the player, your squad won't listen to you anymore! 3. Another thing it does is remove the "fire on my lead" event-handler, in case you change your mind!


Credits & Thanks:
- @Windwalking for his awesome mod.
- @Muzzleflash for helping me with showing objects on the map and also teaching me a lot about scripting. He's one of the best guys on this forum.
- @mad_cheese for allowing me to use the "Bounding Box" function used in his legendary mod, C2.
- and everyone else who kindly answered all my questions on the forum.


License / Disclaimer:
This is an alpha release and therefore not signed (not online-MP compatible). Also I can't guarantee this mod is completely harmless. Please back up your ARMA 3 directory located in the "Documents" folder (C:\Users\YOUR_PC_NAME\Documents\) prior to using this mod (especially the file *.vars.Arma3Profile and the "saved" folder because they are the only files that may be affected).


Changelog:
v1.0.0:
First signed version of the mod!
Replaced "Flight Height" for land vehicles by "Driving mode" in the "Driver Settings" sub-menu. There are two driving modes: a. Urban b. Country. The only difference between the two modes is that the urban mode sets the driver destination to a shorter distance to help him drive through urban areas better.
Added new keybindings for toggling Copy My Stance on and off.
Added option to the CBA settings for becoming the team leader on team switch. It's turned off by default.
Added some radio reports for a few commands.
Fixed units returning to formation when the player used "Fire on my lead". (thanks to @pokemon77 for reporting)
Fixed some silencers not working correctly when ordering units to remove/attach silencers. In addition, all handgun suppressors work as well.

v0.99 (Beta) (11/2/2017, 7:05 PM, UTC):
Altered the Driver feature: Now you can use it without assigning your driver to another group. Navigate to "OPTIONS>GAME>CONFIGURE ADDONS> (dropdown menu) All-In-One Command Menu" and uncheck "Use High Command Driver". Also, if you want the player to remain quite, make sure you check "Use doMove and moveTo instead of CommandMove for Driver". Note that the option "Use doMove and moveTo instead of CommandMove for Driver" is not applicable if you have checked "Use High Command Driver".
Fixed driver not stopping if you pressed the back key for the third time.
Fixed not being able to use Arsenal and Remote Controls Modules in Zeus.
Improved parts of the mod that used "onMapSingleClick". Now the I use Stacked Event Handlers for compatibility with other mods that use map click.

v0.98 (Beta) (11/2/2017, 8:29 AM, UTC):
Added CBA Settings! You can now tweak the mod settings by navigating to: (in-game settings menu) "OPTIONS>GAME>CONFIGURE ADDONS> (dropdown menu) All-In-One Command Menu" or simply "OPTIONS>ADDON OPTIONS>(dropdown menu) All-In-One Command Menu".
Added feature : Create HC Driver: This feature is designed for vehicles that you can't command even if you're the gunner or turret (e.g Helicopters, Prowler, Qilin, etc) and works similar to commanding tanks and APCs.
Monitor Squad Units: You can now switch the camera to your squad units! (you can't control them though) To exit, press the menu key (default "Y") again.
Fixed Infantry Squad group forcing the player and/or other units to disembark.

v0.97 (Beta) (10/27/2017, 1:59 PM, UTC):
Reduced the number of errors when creating the high command module. The parameter "AIO_High_Command_Enabled" is safe to use now.
Small fixes to the Zeus and Support modules.

v0.96 (Beta) (10/27/2017, 2:12 AM UTC):
Fixed units disembarking from vehicles when you created support groups. (thanks to @mrstregatto for reporting)
Added a new parameter to the the userconfig file: "AIO_High_Command_Enabled". If you change its value to 1, in case you don't have a high command module in your mission, one will be synced to you. It's necessary for being able to command other squads in high command mode. It shows a lot of errors right now and is not recommended. I'll probably fix it later. (thanks to @mrstregatto for his help). Note that you don't need this variable if you use some sort of high command mod (e.g AIC or HCC).

v0.95 (Beta) (10/26/2017, 7:36 PM UTC):
Added High Command Mode. Manage your squad on a High Command level! When you switch to high command (default "Ctrl+Space"), this menu is shown instead of the regular squad-level menu (needless to say both use the same keybinding - default "Y"). You can dismiss units, recruit units, create support groups (5 types: Artillery, CAS (Helicopter Attack), CAS (Bombing Run), Transport and Infantry), and also restore dismissed/recruited units in case you make a mistake! See the BI Forums post for more detail.

V0.88 (Beta) (10/24/2017, 8:54 PM UTC):
Added new option to the main menu: Add/Refresh Zeus. You can now make yourself the game master! This option is invisible by default. To make it visible, in your ARMA 3 installation folder go to userconfig>AIO_AIMENU>AIO_AIMENU.hpp and change "AIO_Zeus_Enabled = 0" to "AIO_Zeus_Enabled = 1". You can only edit/add units from your side, plus empty objects and modules.
Fixed the "Take Weapon" sub-menu not spawning correctly.

V0.85 (Beta) (10/22/2017, 2:12 AM UTC):
Added an obstacle-check to the taxi function. Now the aircraft "skip" the obstacles.
Added option to the resupply sub-menu: Select From Map.
Aircraft now taxi to the nearest hangar when they land (thanks to @mad_cheese for his help!)
Fixed a bug in the resupply script where the aircraft wouldn't get their emptied-fuel back when the process was canceled.
Fixes to Fire On My Lead: The player doesn't use the radio now to make units fire instantly. Also, only the units that were ordered to fire on your lead open fire; the rest remain unchanged.
Slight Improvement to the aircraft path finding when they taxi.

V0.80 (Beta) (10/12/2017, 11:10 PM, UTC):
Added Taxi Aircraft (WIP): You can now order your units to Taxi their aircraft to the desired location. There are two modes: :Automatic and Select Positions. See the BI Forums post for more detail.
Aircraft now taxi to the resupply vehicle.
Cursor icon now changes for every item in the menu that requires you to aim at a location.
Small fixes to the Fortify Position feature.

V0.70 (Beta) (10/6/2017, 10:21 AM, UTC):
Added two new defense modes: 360 Formation and Fortify Position. See the "Added" features section on BI Forums for more detail.
Added: Option for turning headlights on and off without changing the unit's combat mode. This feature may not be compatible with all vehicles, and for it to work, the vehicle must have well-defined hit points. The only way you can turn the headlights back on is through this menu.
Added option for NVG. You can turn unit's night vision on and off. (this option used to exist in the original mod, but I removed it because I thought the units remove their NVG automatically, while it was because of ASR AI! Thanks to @ineptaphid for reporting)
Added Limit Unit Speed: Force your units to move at a specific speed. This option is located in "Infantry Commands" sub-menu.
Added feature: Now the mount menu doesn't close automatically, so you can select multiple positions (you need to wait a couple of seconds between two consecutive selections for it to work properly)
Added feature: Mount and Disassemble cursor target. You can now mount enemy vehicles and disassemble their static weapons using these options.
Fixed units not being able to mount static weapons using the menu.
Fixed some menus not showing properly or disappearing instantly when the game engine was under heavy load.
Fixed units' assigned team color changing after using "Set R.O.E" and "Heal Up!" options.
Added support for many resupply vehicles by checking for their class names. If a vehicle is named properly, you can see it in the "Resupply" Menu.

v0.54 (Beta): (9/30/17, 11:04 PM, GMT)
Fixed units getting into commander and gunner positions of the vehicle of another group, thus making it their own! They now board either the Turrets or Cargo positions.

v0.53 (Beta): (9/30/17, 9:34 PM, GMT)
Fixed a small issue in the sling loading script.

v0.52 (Beta): (9/30/17, 8:02 PM, GMT)
Improvements to the mount script: Units now move slightly closer to vehicles when they want to mount them.
Improvements to the sling loading script: 1. Helicopters now follow moving targets! 2. They position themselves more accurately above the slingloading target. 3. They put the cargo down more slowly now to minimize the damage to the cargo.
Fixed a bug in selecting vehicles from the map where the cursor icon wouldn't return to normal when you closed the map while cursor was on a vehicle.

v0.50 (Beta): (9/28/17, 1:39 AM, GMT)
Development phase advanced to Beta.
Added CBA keybinding! You can change the keybinding in "OPTIONS > CONTROLS > CONFIGURE ADDONS > (dropdown menu) All-In-One Command Menu".
"Weapon accessories" now supports all mods (or at least it should).
The userconfig file has changed purpose. Now you can manually add support for your mods by editing its parameters.
Completed the "Mount" feature. It should work without problems now.
Completed the "Resupply" feature.
Some code optimization and bug fixes.

v0.21 (alpha)
Fixed cursor position changing in the Rearm script, which made units rearm at different objects.

v0.2 (alpha):
Overhauled Rearm: Added three rearm modes - automatic, at cursor, list of objects. Units now rearm completely (they also take weapons if they don't have any - see the "Added" section).
Fixed AI returning to formation after setting R.O.E. (thanks to @scimitar for reporting the issue). They now continue their previously assigned task.
Some improvements to the healing script.
Fixed units not switching weapons when they were watching a target.
Fixed a small issue where the "Commander" position was always available.

v0.11 (alpha):
- Fixed a small issue where you saw the message "AIO Initialized" even when WW AI Menu wasn't active. (9/16/17, 10:44 AM, GMT)

v0.10 (alpha):
- Initial Release (9/15/17, 9:46 PM, GMT)



- Community Base addons A3
- WW AIMenu


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: Miscellaneous,   Ai,   Commands,   Friendly