Date: 2020-08-18 08:33
AI Modification: Faster, Smarter, and Deadlier AI.
Vcom AI 3.0 is an AI overhaul modification (Script or Mod) that aims to change the feel of combat in a PvE environment.
What does Vcom AI 3.0 offer?
For starters, Vcom AI 3.0 offers a noticeable increase of performance over its older counter-part, Vcom AI 2.81.
Functions on a group based FSM system, instead of an individual AI system. Allowing for better FPS, control, and cohesion with AI.
Removed fluff and unnecessary code from Vcom AI 2.81, making the mod/script much more focused.
Use the Userconfig file to modify Vcom AI to your liking, or if CBA is running you can modify the settings in-game and on the fly.
Advanced AI Direction and Threats
-AI will clear garrisoned buildings
-AI will automatically generate waypoints for more interesting and varied combat (AI will not do this if they have certain pre-placed waypoints or more than 1 move waypoint)
-AI move dynamically from cover to cover while following waypoints
-AI will call for on-map artillery for support
-AI will call for reinforcements proportional to the enemy threat
-AI will garrison structures temporarily in combat, if able
-AI will look for nearby static weapons to man
-AI will automatically deploy/pack static weapons
-AI will use satchels to drop buildings, or setup traps for enemies
-AI will use mines to on roads, in buildings, or wherever, to stop enemy movement
-AI will change formations depending on the environment
-AI will attempt to heal themselves or others when out of combat
-AI will attempt to rearm themselves from dead bodies, vehicles, and etc when low
-AI will steal empty or unlocked vehicles
-AI have a chance to ragdoll when shot, causing them to fall over briefly
-AI have an enhanced ability to hear and respond to gunfire from a distance
-AI will respond differently from a weapon that is suppressed or not
-AI on a hold waypoint will garrison a structure indefinitely, or until provided another order
-AI, with NVGs, will be able to see your IR laser and respond accordingly. Be careful where you point that thing!
-AI can have side based/classname based skill settings.
Ease of use
Vcom AI is easy to use. Install it, throw some units down, and go. It supports AI being spawned in dynamically, so there is no worry about needing to execute the code on every freshly spawned AI.
To manage specific AI group behaviors, simply use these commands listed below.
(group this) setVariable ["VCM_NOFLANK",true]; //This command will stop the AI squad from executing advanced movement maneuvers.
(group this) setVariable ["VCM_NORESCUE",true]; //This command will stop the AI squad from responding to calls for backup.
(group this) setVariable ["VCM_TOUGHSQUAD",true]; //This command will stop the AI squad from calling for backup.
(group this) setVariable ["Vcm_Disable",true]; //This command will disable Vcom AI on a group entirely.
(group this) setVariable ["VCM_DisableForm",true]; //This command will disable AI group from changing formations.
(group this) setVariable ["VCM_Skilldisable",true]; //This command will disable an AI group from being impacted by Vcom AI skill changes.
To install the Vcom AI - Mod 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.
Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel
For usage instructions and information of how to use the Vcom AI - Mod please refer to the included documentation.
How to install script and addon of VCOM AI:
-AI's with mortars will still attempt to deploy the mortar INSIDE a structure.
-You must enable -filepatching on your server/machine if you want the userconfig folder to work. Not doing this may result in an error message.
Please let me know about any bugs.
I do appreciate people pointing out areas that could be improved and telling me how. Anything to make the experience better for the community is always good.
Credits & Thanks:
My friends who helped me test this multiple times - thank you for your patience. It may seem like a small thing but it matters to me <3 stay awesome guys, you know who you are.
Dog-Company for helping me test these scripts. They run an awesome group over there and are extremely helpful with these kinds of things. Check em' out! /end shameless plug.
License / Disclaimer:
Coding for ArmA is not my job, it is my hobby. I am a Psychology student going for his masters and have 0 scripting knowledge outside of ArmA. I do this as a hobby and as a result my code may not be up to "professional" standards in terms of beautification. As long as my code works and does not destroy a server I am happy. I will constantly work to improve the scripts but please keep in mind I actually know very little when it comes to coding :> If you are looking for some beautiful eloquent script suite you are in the wrong place!
Due to me being lazy I will list a few of the improvements here
- Addressed many of the reported bugs
- New AI suppression system (AI will suppress players more)
- New sniper AI system (Snipers will engage further out and more accurately, their skill changes dynamically based on distance - keep in mind AI will not typically engage past serverside viewdistance settings in the server.cfg)
- Implemented Vcom Driving into Vcom AI (Turned off by default, A highly experimental feature that is still being worked on)
- New settings for player AI skill settings for each side
- AI received better hearing aids
- AI should no longer mass heal themselves
- Player should (hopefully) not receive random waypoints.
- Better Zeus control of squads in combat
- More stuff I forgot.
-Fixed a few errors regarding to radios and unit cohesion
I am sure there will be more bugs. But here is your Hotfix for now :)
-CBA integration fixes
-Artillery error fixes
-Added Vcom Driving (experimental)
-Vcom AI will ignore squads with players in them
-AI movement during combat tweaked
-AI healing improved
-AI unique animations
-Other things I forgot about
Fix for CBA error
Rydigiers "Fire For Effect" artillery system
CBA settings support for "Fire For Effect" artillery system
Parameter for forcing speedMode "FULL"
Descriptive header for all Vcom functions
VCOM is now licensed under the ArmA Public License - Share Alike
Zeus to mission.sqm
Vcom will not give flanking orders to AI with a commander
Suppressors are now dynamically checked
Mines are now handled differently (Placed mines are added to an array)
AI will no longer ragdoll when prone, will instead perform animations
AI will not ragdoll when within a certain distance of a player
VCom functions have been moved to Vcom\Functions\VCM_Functions
Hold waypoints now define what building to garrison
AI will not generate flanking waypoints targetting unknown units
VCom artillery (Replaced by "Fire For Effect")
VCM_SKILLCHANGE had no effect
AI taking control when player incapacitated
AI attempting to flank aircraft
Building clearing behaviour did not check distance to target
Civilians being affected by VCOM
VCM_SIDEENABLED had no effect
VCM_ARTYENABLE had no effect
Whitelisted remote execution for VCOM
And much more that I forgot....
-Fixed issue with CBA and VCOM compatability
-Fixed tanks and vehicles being too scary to be in for AI.
-Many other bug fixes.
-Removed in-game editing menu as it was causing too many issues with other mods.
-AI squads will now properly disembark vehicles and helicraft
-Improved AI vehicle behavior (Drivers/gunners will no longer jump out of vehicles unless the vehicle is severely damaged)
-AI cover system improved, AI will now take more chances in trying to reach cover.
-AI will be more aggressive.
Vcom AI Changelog 9/11/2017
*Fixed* AI will properly disembark vehicles, most of the time.
*Changed* AI will now only call in an appropriate amount of reinforcements.
*Changed* AI have a cooldown to how often they can call in reinforcements (per-region basis)
*Fixed* AI will no longer hug the ground for the rest of their lives after combat. PTSD is a serious thing and proper therapy needs more funding.
*Fixed* Aircraft transporting AI will now attempt to unload the troops, even if under fire. They used to wait until it was perfectly safe before.
*Fixed* Config errors
*Changed* VCOM In-game options dialog now only shows if you are an admin. It is now, by default, in the top right corner of the screen and will appear only if the player mouses over that area.
*Optimized* Checkbag function improved in terms of speed
*Optimized* Deploy static and disassemble static speed improved
*Optimized* FSM system has been optimized for faster performance.
*Optimized* Placing mines and satchels on structures has been optimized. The AI no longer need to leave the group either.
*Optimized* Changed several functions from 'spawn' to 'call' to decrease possible script-lag.
*Added* VCOM_FPSFreeze in userconfig file for disabling Vcom on units when server FPS drops below a certain level
*Added* VCOM_LeaderExecuteLimit variable in userconfig file to limit the # of leaders executing commands at once.
*Added* VCOM_BasicCheckLimit variable in userconfig file to limit the # of units executing basic commands at once.
*Added* VCOM_DisableDistance variable in userconfig file to disable Vcom AI on units when the enemy is over this distance.
*Added* Side based skill settings in userconfig file.
*Added* Classname specific skill settings in userconfig file.
*Added* Artillery cooldown timer in userconfig file.
*Added* Artillery dispersion range in userconfig file.
*Added* VCOM_WaypointDistance variable in userconfig file. This variable controls how far AI commanders can set waypoints from their targeted area.
*Added* AI will go prone when struck by a projectile.
*Added* Dynamic static weapon support for mods
*Added* In-game options menu when pressing ESC to change VCOM on the fly.
*Changed* AI Artillery will now take into account the size of the squad when determining how many rounds to fire.
*Changed* AI Garrison consider range increased to 50 meters.
*Changed* AI will patrol inside garrisoned structures now while on a HOLD waypoint.
*Changed* Slightly improved behavior of AI in vehicles
*Changed* this setvariable ["NOAI",true]; changed to this setvariable ["VCOM_NOAI",true]; !!!!!!!!!!!!!!!!
*ADDED* AI have a better time following waypoints in combat.
*ADDED* AI will more aggressively clear out buildings now.
*ADDED* New settings in the userconfig file and VCOMAI_defaultsettings.sqf file for fine-tuning the queue system.
*FIXED* AI assaulting a point sometimes would get stuck when AI deemed no cover was findable.
*FIXED* Zeus controlled AI should now handle even better.
*OPTIMIZED* Many functions and scripts heavily optimized.
*OPTIMIZED* New queue system for AI taking cover and other HEAVY functions.
*NEW* Added new suppression mechanics for both players and AI. This reduces ability to accurately return fire while under fire. Due to the experimental nature of this change this mechanic can be disabled or modified easily via the config.
*NEW* Added a new 'adrenaline' mechanic for both players and AI. This slightly speeds up units when under fire for a short time, allowing units to seek cover and positon more effectively. Due to the experimental nature of this change this mechanic can be disabled or modified easily via the config.
*NEW* Ability to disable weather effects to accuracy.
*NEW* Ability to select percentage impact of weather effects.
*NEW* Further implemented AI debug code to give a more accurate picture of what the AI are thinking and doing.
*FIXED* AI no longer have godly-insta detect when entering combat mode. Vanilla AI seem to have a boost to their detecting abilities in the last few patches.
*FIXED* AI will not run miles and miles to rearm now. (Thanks to burneddi and crewt)
*FIXED* AI will no longer magically know when a grenade has been thrown or a mine placed. Thanks to Dancorg!
*FIXED* VCOM_AIMagLimit actually impacts the AI decision making now.
*FIXED* AI in vehicle types of "Planes" will no longer use VcomAI.
*FIXED* AI carrying mortars will not deploy and attempt to shoot said mortar indoors.
*OPTIMIZATION* VcomAI_RearmSelf script has been optimized thanks to Crewt!
*NEW* The first revision of AI rearming is now in. AI will attempt to grab nearby ammo when low.
*NEW* Added "VCOM_AIMagLimit" to the config. When the AI reach this number of mags left, they will begin searching for ammo.
*NEW* VCOM_AIDEBUG = 1, now makes the AI talk about what is going on. Although this is funny/cute, it is purely for debug purposes to see what is going on during combat or to see how the AI are. THIS IS MESSY. Large numbers of AI will cause problems.
*NEW* When entering combat, AI now wait 30-120 seconds before calling for help. If the group is destroyed before this timer, no help is called for.
*NEW* Added Vcom_ActivateAI variable. When set to false (Vcom_ActivateAI = false) no AI new AI will be processed by VCOMAI. This variable can be toggled on/off dynamically.
*FIXED* AI getting stuck when exiting combat and refusing to move. (Thanks hyzoran!)
*FIXED* AI getting stuck when Enemy is too far away. (Thanks hyzoran!)
*FIXED* AI getting stuck when no enemy's present on the map. (Thanks hyzoran!)
*FIXED* AI friendly factions firing upon friendlies. (Thansk autigergrad! Thanks S.Crowe for a fix!)
*FIXED* Dismiss waypoints are improved.
*FIXED* AI will not properly call for help when coming under fire.
*FIXED* AI should be less willing to jump from helicopters to end their lives sooner.
*CHANGED* AI will not instantly know the where-abouts of a unit when coming under fire. They will always know the *general* direction of fire, but not the exact position of the unit. So they will still be able to return suppresive fire after they re-collect themselves.
*CHANGED* Civilian AI's removed from VCOM's interactions by default. (Thanks Vasily!)
*CHANGED* AI should prefer sticking close to their squadmates in most situations, but still willing to spread out to flank and get into cover. (Thanks hyzoran!)
*CHANGED* AI call for help ranged increased from 800 to 1000 by default.
*CHANGED* AI hearing gunshots reduced from 800 to 500 by default.
*OPTIMIZATION* VCOM AI is now less demanding on resources. However, most tests show an average impact of ~6-10 FPS with 215 AI present on a map.
*OPTIMIZATION* Replaced MANY getvariable and setvariable commands and replacing with local variables where necessary/possible.
*OPTIMIZATION* Optimized the check AI leaders would do for enemies being inside buildings. It is less accurate overall, but should yield much better performance.
*OPTIMIZATION* Artillery firing function slightly optimized.
*CHANGED* HOLD waypoint will prevent AI from being pulled around by VCOM AI. AI will still notice fire/proceed to combat mode. AI will still take cover and move to better cover locations.
*CHANGED* HOLD waypoint will only make AI garrison if the waypoint is within 15 meters of a building.
*CHANGED* AI will surpress enemies better.
*CHANGED* AI will respect Zeus waypoints even better now. (Make sure to use "FULL" movement if you want them to move NOW)
*NEW* AI will not leave their cover if they have shot recently.
*NEW* AI will do much better with CQB. The amount of times enemy AI will run right by each other should be drastically reduced.
*NEW* AI can not see through smoke grenades
*NEW* AI set on "FULL" speed will charge their enemies and disregard cover unless under direct fire.
*NEW* AI's accuracy/vision is impact my rain intensity.
*NEW* AI defined as medics (by default, or by using the setUnitTrait command, will automatically heal hurt squad members when THEY deem is safe enough)
*NEW* AI that wander too far from their group will attempt to re-group if possible.
*FIXED* New vanilla units for Tanoa will deploy static weapons
*FIXED* Artillery units will now fire properly.
*FIXED* AI will ignore high flying aircraft for movement commands. This prevents AI trying to capture planes and rainbows.
*FIXED* AI's increasing accuracy system now works properly. The AI's accuracy will slowly increase as their enemies stick in one spot. Their accuracy is reset when target moves a short distance.
*FIXED* Fixed FSM hangup where AI would get stuck in a certain function - causing them to respond less to threats.
*FIXED* AI helicopters no longer attempt to fly into space with VCOM_AIDEBUG = 1 command.
*FIXED* Fixed AI squads getting stuck in certain cases and not advancing to a target.
*FIXED* Fixed AI squad leaders from charging off into the distance in most cases.
- uploaded correct version
v2.20 revision 2
*CHANGED* AI will no longer plant mines if they are far from the enemy
*CHANGED* AI will no longer arm/place statics if they are far from the enemy
*OPTIMIZATION* Shifted a lot more code to be executed just by squad leaders where it makes sense in the AIBEHAVIORNEW.fsm
*OPTIMIZATION* DangerIdentify.fsm - Squad leader is only one who checks for danger sources. The rest just check if they are in combat or not. This is not ideal - but saves a lot of FPS.
*NEW* AI will advance from cover to cover toward generated waypoint. AI will stay at the location for awhile and wait until they don't see any enemies anymore to move.
*CHANGED* AI will use smokes less but in better situations
*CHANGED* AI hopefully will stop blowing up their butts with grenades
*CHANGED* AI with waypoints placed in editor will no longer show off their awesome dance skills by walking back and forth
*NEW* AI inside vehicles will respond better to combat - disembarking when more appropriate and won't constantly get back inside the vehicle
*NEW* Mixed squads, (I.E. Infantry with vehicles) will work together better. Vehicle *should* not leave the troops behind and will slowly advance with infantry
*CHANGED* If the AI get too far from squad leader they will regroup
*CHANGED* Reworked cover finding code. More efficient and works better overall
*OPTIMIZATION* Optimized line-of-sight check code
*CHANGED* AI with pre-created waypoints will NOT generate extra waypoints. (Has to be more than 1 waypoint)
*CHANGED* Better Zeus implementation.
*CHANGED* Aircraft with waypoints should behave much better
*NEW* Further improved headless client support. It is still best practice to have the HC spawn the units instead of moving them over fromt he server.
*NEW* Reduced/randomized time it takes for AI to put mines.
*NEW* Added configurable random chance for a mine to be placed.
*NEW* Added config option to disable mine placement for AI.
*WARNING* Placing waypoints in editor with COMBAT behavior as their first waypoint will cause AI to break - this is due to new Eden update and enabling/disabling "FSM" on AI. No workaround found yet.
- Added configurable grenade chance use in userconfig
- Reduced chance AI will throw smoke
- AI will attempt to utilize smoke if they cannot run for cover
- Improved vehicles supporting in combat – this still needs some work, will happen next patch.
- Fixed weird file location issues
- Fixed a possible error when no enemies could be found
- Added functionality for AI clearing buildings
- While clearing a building – AI will crouch appropriately when friendlies are behind them
- AI that start spawned into buildings will not navigate outside of the building by means of VCOM AI
- AI will now return to starting combat behavior after identifying no current threats nearby. This is variable depending on the environment. AI in a war-torn area will most likely take longer to relax than AI who just heard a gunshot or saw someone.
- AI will react to enemies more reliably.
- Hold waypoint will now put units into buildings more reliably. Optimized script to reduce FPS impact.
- AI will attack more directly with a force that they 2:1 outnumber.
- Removed all AI pacifists that could be found (AI will actually shoot each other more reliably).
- Added VCOM_SideBasedMovement param in the param sqf file
Remove sides from the array below to force that specific AI side to not execute any advance movement code. (I.E. Moving to reinforce allies, being alerted by distant gunshots and etc). AI with this will still react normally in combat
- Added VCOM_SideBasedExecution param in the param sqf file
Remove sides from the array to remove that specific AI side from executing any of the VCOMAI scripts at all.
- Fixed several .rpt errors
- Fixed userconfig file missing
- Commented userconfig sqf file
- Fixed showcase files missing
- Vehicles: Make vehicles support infantry more reliably. Still needs some more love.
- Code: Fix error message about returning parents of a class. (Check if isNil then exitwith...)
- Players: Players will no longer utilize AI scripts.
- Code: Better Zeus integration. Still needs some love.
- Groups: AI will garrison nearby statics if possible.
- Groups: Double check GUARD waypoints and garrisoning.
- Players: Sometimes players swapping to control AI will not fully take over the AI and have to fight the unit for control...
- Vehicles: Improved AI driving skills...made them avoid simple obstacles.
- Groups: AI will now consider the threat level of enemy groups. If a groups "Nerves" are too much, and they are heavily out numbered, they may choose to retreat (rout) for some time.
- Code: Optimize AI suppression code.
- Groups: AI will actually use statics on their backs now.
- Groups: Make AI flank/follow waypoints better.
- Groups:AI will not execute most VCOM AI code when their leader is a player.
- Code:Userconfig folder implemented. It's implemented in such a way that it will not crash if it isn't defined...it will simply fall back on default variables.
- Reconstructed the scripts completely. I know have a much better system that allows for easier changes to individual AI.
- AI units no longer try to control their leader.
- Fixed the scripts executing on players sometimes
- AI personality framework is beginning now. AI can get "Surprised" when ambushed. An AI with low control/low rank may accidently discharge their weapon and etc.
- New cover system. AI will now consider slopes as cover if possible
- New debug system to allow easier bug fixing
- Much more that I'm too tired to remember
- Added new artillery function, AI will call artillery for support if enabled and is present on the map.
- Individual units can now have their own response ranges and other settings configured independently of others. The settings in the init.sqf act as only defaults now. See 1st post for new variable settings
- Fixed bug where scripts would not even run on dedicated server.
- Fixed a few error message popping up
- Reworked HOLD waypoints. AI will no longer leave the area they are in. AI will garrison more effectively or spread out if all of the group can't fit in a single building. AI are forced to either crouch or stand inside buildings to prevent AI shooting through walls
- AI are more aggressive with planting explosives on occupied buildings
- Added debug option to track AI movement in map. *BE CAREFUL WITH THIS. IT SPAMS MARKERS AND CAN CAUSE EXTREME LAG WITH LOTS OF AI. See 1st post for new variable settings.
- Suppression effects updated to be more efficient with less FPS drain. I no longer track bullets or "#craters". It was getting too complex and laggy :|. I now use worldToScreen and cursortarget. Which has it's own issues - but it's super fast!
- Changed AI waypoints to consider locations where they can fire upon the enemy (using overwatch systems)
- Fixed AI creating 50 waypoints instead of the default 3
- AI will now remove waypoints once their target enemy group is fully destroyed
- AI should trip over themselves much less
- Lessened time between supression
- AI will now suppress enemies more
- Fix animation errors (thanks)
- Addon version now available
- Changed bullet hit detection. It's not perfect but should help cut down on desync
- Implemented backbone for morale system. It currently doesn't do anything because I don't know how to implement it yet.
- Fixed units not using static weapons
- Added actual headless client/zeus support. AI script will run on any client and not just AI that belong to the server.
- Implemented the downing system a bit more full
AI can actually be killed while down
AI will call for help from other AI while down. The AI just needs a FAK or medikit to revive the AI
- AI will more aggressively plant satchels on buildings to kill players now
- Backbone for AI using mines on roads implemented now. Not functional yet - but it's coming.
- More optimizations and etc
- Removed annoying error (hopefully) about BIS_fnc_selectrandom spam. It should be gone now. Let me know if it isn't
- Redid some background scripts, getting ready for more complex animation system and additional features (AI will soon be counting the # of known enemies and responding accordingly)
- AI should act in a more cohesive manner. Still spreading out but staying as a group. The groups are still a lot more loose than default AI
- Fixed bug where AI would stop engaging and stare up at the stars
- AI will now delete their engagement waypoints after their opposition has been killed
- AI accuracy settings are randomized. Some AI soldiers will be better than others.
- AI vehicles should behave a lot better inside vehicles now.
- Optimizations: 164 AI engagement had a low of 30 FPS for ~30 seconds on the test server.
- AI will use explosives (if available) on enemies that are garrisoning buildings a bit too long.
- Improved AI flanking behaviors and movements, they should move around a bit more now
- AI will not execute any complicated/over controlling commands when their leader is a human player. I will put in ways to control this in the future.
- A few bug fixes
- accidently deleted a bit of code that affected the AI and their cover taking abilities (thanks VRCRaptor)
- fixed the players not being able to suppress the AI properly
- first release
- BI forums