Jump to content
genesis92x

Vcom AI V2.0 - AI Overhaul

Recommended Posts

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Thanks for the update, should the addon version provide a better performance (generally) then using the script directly in a mission folder ?

Share this post


Link to post
Share on other sites

Is a good addon, i like the comunication between diferents AI units, but need some improvements in my opinion.

- The suppresion AI react is very limited, in my test, i shoot 2 magazines of 200 bullets from 500m to the AI, and this never stop of shooting me. Normally when you have this wall of iron, you search cover, you down the head. You need improve the suppresion system.

- I actually use TPW_Mods+WW_AICover for the AI reaction. In this, the units works together. But in you VCOMAI addon, i see every time, broked units. For exemple, i shoot to the enemy unit composed by 12 soldiers. And i see one guys going away from his unit, other two the some to the other direction, and after 1 minut, all squad is broked, 2 soldiers here, 1 soldier 200 meter away, other 1 soldier 150m away, etc...

I think that you need to correct this, a scattered unit is dead unit.

- Units when to enter and move through a city or town, keep formation, instead of changing to a column formation or compact double column.

The addon is very good, is a good job, but in my opinion need these improvements.

Share this post


Link to post
Share on other sites
Is a good addon, i like the comunication between diferents AI units, but need some improvements in my opinion.

- The suppresion AI react is very limited, in my test, i shoot 2 magazines of 200 bullets from 500m to the AI, and this never stop of shooting me. Normally when you have this wall of iron, you search cover, you down the head. You need improve the suppresion system.

- I actually use TPW_Mods+WW_AICover for the AI reaction. In this, the units works together. But in you VCOMAI addon, i see every time, broked units. For exemple, i shoot to the enemy unit composed by 12 soldiers. And i see one guys going away from his unit, other two the some to the other direction, and after 1 minut, all squad is broked, 2 soldiers here, 1 soldier 200 meter away, other 1 soldier 150m away, etc...

I think that you need to correct this, a scattered unit is dead unit.

- Units when to enter and move through a city or town, keep formation, instead of changing to a column formation or compact double column.

The addon is very good, is a good job, but in my opinion need these improvements.

I am glad you added "in your opinion" as by the squad breaking up as it does it allows them to start flanking you as they do and "in my opinion" their flanking manoeuvers are one of the best parts this script and the real game changer for me. Once a squad is contacted breaking up and laying fire on you from different directions to me seems like a great tactic rather than all sitting in a bunch waiting for my grenade or artillery.

As far as suppression many times if I do not exactly where enemy are exactly I lay down suppressive fire in the general direction which usually results in them ceasing fire. Maybe there could be improvement in that area but don't really see too much of an issue.

We all have the right of our opinion and I just felt I had to offer mine as well as I would hate to see this script change dramatically from its path, as much as there could always be improvements I love it the way it is.

Share this post


Link to post
Share on other sites

thanks for the updates, could you be more specific on how this is used with Headless client. Currently, I can lay down units, save mission, use A2MC to convert file from sqm to sqf, call file in mission init.sqf, I assume, I have folders in mission folder, is that pretty much it?

Thanks.

Share this post


Link to post
Share on other sites
I am glad you added "in your opinion" as by the squad breaking up as it does it allows them to start flanking you as they do and "in my opinion" their flanking manoeuvers are one of the best parts this script and the real game changer for me. Once a squad is contacted breaking up and laying fire on you from different directions to me seems like a great tactic rather than all sitting in a bunch waiting for my grenade or artillery.

As far as suppression many times if I do not exactly where enemy are exactly I lay down suppressive fire in the general direction which usually results in them ceasing fire. Maybe there could be improvement in that area but don't really see too much of an issue.

We all have the right of our opinion and I just felt I had to offer mine as well as I would hate to see this script change dramatically from its path, as much as there could always be improvements I love it the way it is.

It's good to try to outflank, but not good to do so alone. The smallest unit is the binomial send a single soldier, especially in urban areas, away from the group, is put at unnecessary risk at the same soldier and the whole unit. If the AI wants flank, which is the most basic tactic, you must at least in pairs.

I however do not see the one flanking AI, I see rather a scattered unit, which does not quite know what to do, since the lone soldier goes back and forth, instead of flanking.

I know the AI ArmA 3 does not give much, but really see how the AI ​​sends soldiers in all directions and sometimes alone, I do not think a military tactic, where the most important thing is survival, it seems more of a showcase for players can hunt ducks.

Just to send the soldiers at least in pairs, and have much more sense.

Share this post


Link to post
Share on other sites

When using the script or addon version together with Zeus, it seems that not all units are using your scripts. When I run a mission that spawns infantry groups (e.g. Invade&Annex, Patrol Ops) those units won't use the downing system, smoke grenades, etc. and behave like "normal" AI units. However, when I place groups as Zeus on the same map your scripts will work fine for those units. I can imagine that this could be a problem caused by the scripts used by the mission but I would be really happy if there was a fix for this.

Share this post


Link to post
Share on other sites

Hi, I'm testing this at the moment compared to the other popular AI mods and so far it's looking pretty awesome. One issue I've noticed is that everytime anyone is shot their helmets disappear, regardless of headshots. Also, do you think it would be possible to add a userconfig for the addon version so we could enable/disable certain features? Thanks.

Share this post


Link to post
Share on other sites
When using the script or addon version together with Zeus, it seems that not all units are using your scripts. When I run a mission that spawns infantry groups (e.g. Invade&Annex, Patrol Ops) those units won't use the downing system, smoke grenades, etc. and behave like "normal" AI units. However, when I place groups as Zeus on the same map your scripts will work fine for those units. I can imagine that this could be a problem caused by the scripts used by the mission but I would be really happy if there was a fix for this.

I have seen and used this with I&A and it works fine, patrol ops is a different animal, PO3 has its own AI behavior scripts, I am not 100% sure, BUT you may have to "turn off" the PO scripts to use VCOM AI correctly.

Has anyone used this "updated" folder as headless client yet? Plz post steps you are using to have this work in HC. Thanks again.

Share this post


Link to post
Share on other sites

Im getting a script error since the update, something with animstate or animcompleted...will try to take a screenshot next time it happens !

Share this post


Link to post
Share on other sites

this completely and utterly breaks setcaptive and there is no way to reconcile it aside from deleting the mod

Edited by rxnxr23

Share this post


Link to post
Share on other sites
One issue I've noticed is that everytime anyone is shot their helmets disappear, regardless of headshots.

I can confirm this.

Share this post


Link to post
Share on other sites
Im getting a script error since the update, something with animstate or animcompleted...will try to take a screenshot next time it happens !

I am receiving the same error, screenshot attached.

error.jpg

Share this post


Link to post
Share on other sites

I think the whole header gets shot off stuff and the downed system is not needed at all, it only makes the mod/script more bloated, @Genesis92x please keep it slim and to go to far, there are already so many other AI scripts/mods that go "too far"...

All i want is a better AI behavior (communication between groups, use of smokegrenades, using buildings better) and a reduced accuracy. I dont care about headgear getting shot off or a moral system, maybe you could release a "light" version, that would be great !

Share this post


Link to post
Share on other sites

Genesis92x you could always parameterize options,

helmet shot off on/off

moral system on/off

Setcaptive on/off

revive able on/off

etc etc..

Share this post


Link to post
Share on other sites

This latest update seems that I do not see AI popping smoke any more, what are others seeing? also they appear to be acting quite differently ie: seemed to be taking a little more time to react on contact, I am yet to decide if it is a better different or not.

Share this post


Link to post
Share on other sites

AI in kill and check seem to retreat and hold position?

Also with AI set to move in combat, they will contact, firefight, withdraw and then form a line facing away from the enemy approx 100m away.

Otherwise the features are awesome, especially garrison.

Share this post


Link to post
Share on other sites
I think the whole header gets shot off stuff and the downed system is not needed at all, it only makes the mod/script more bloated, @Genesis92x please keep it slim and to go to far, there are already so many other AI scripts/mods that go "too far"...

All i want is a better AI behavior (communication between groups, use of smokegrenades, using buildings better) and a reduced accuracy. I dont care about headgear getting shot off or a moral system, maybe you could release a "light" version, that would be great !

I don't plan on making anything too heavy at all :> Any new features I do add will have a toggle switch so player can disable as much as they want.

Thanks for the post!

Genesis92x you could always parameterize options,

helmet shot off on/off

moral system on/off

Setcaptive on/off

revive able on/off

etc etc..

Yes! This will be in the userconfig file soon.

Thank you

This latest update seems that I do not see AI popping smoke any more, what are others seeing? also they appear to be acting quite differently ie: seemed to be taking a little more time to react on contact, I am yet to decide if it is a better different or not.

Hopefully this is fixed! Thank you

AI in kill and check seem to retreat and hold position?

Also with AI set to move in combat, they will contact, firefight, withdraw and then form a line facing away from the enemy approx 100m away.

Otherwise the features are awesome, especially garrison.

AI will sometimes retreat, sometimes flank, it's kind of up to the AI...You will have to mess with the settings to get the AI where you want them.

AI Pack Download UPDATE

- Version 1.07

- Version 1.07 ADDON

Changelog

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

Commands that can put into mission init.sqf: These are defaults

//The distance AI squads will communicate to each other.
VCOM_AIWarnDistance = 1000;
//Prevent helmets from coming off. 1 is on.
VCOM_AIHelmet = 0;
//AI have a chance to get knocked down when shot. 1 is on.
VCOM_AIKnockingOut = 1;
//AI using smoke. 1 is on.
VCOM_USESMOKE = 1;
//Will AI use new downing system?
VCOM_PermaDown = 1;

Please let me know about any bugs

Share this post


Link to post
Share on other sites
I don't plan on making anything too heavy at all :> Any new features I do add will have a toggle switch so player can disable as much as they want.

Please let me know about any bugs

Not really a bug but I'm having issues with some sections of your script making any other scripts I use have a half second delay on them

It's just a bit annoying because the night vision script I made takes a second to turn on and off if I have this script as well, and my script adds general blur, edge blur, static and contrast changes so it's pretty noticeable

Removing the code below fixes it

//Below is loop to check for new AI spawning in to be added to the list
[] spawn {
waitUntil {!isNil "BIS_fnc_init"};
waitUntil {!(isnull (findDisplay 46))};


while {true} do {
sleep 0.25;
{
if (local _x) then {
_CheckVariable = _x getVariable "FSMRunning";
if (isNil ("_CheckVariable")) then {_CheckVariable = 0;};
if (!(isplayer _x) && (_CheckVariable == 0)) then {null = [_x] execFSM "AIBEHAVIOR1.fsm";};
if ((isPlayer _x)  && (_CheckVariable == 0)) then {
player setVariable ["FiredTime", 0];
player setVariable ["PLAYERCOMMANDER", 1];
player addEventHandler ["Fired",{null = [_this] call FiredAtTarget;}];
player setVariable ["FSMRunning",1,true];
};
};
} forEach allUnits;
sleep 5;
};
};

Now the hint says that this is used to check for NEW spawning ai to be added to the list. Does this include the AI that are placed in the editor and "spawn" when the mission loads or are they already in the list? Because I would love to have this mod in my missions but I think the other people playing would get annoyed with the weird effects it gives my night vision script and probably most other time sensitive scripts as well.Removing this bit really helps but I don't know if the mod is even working anymore if I do remove it, or if it just gets rid of spawned AI being affected

Share this post


Link to post
Share on other sites
Not really a bug but I'm having issues with some sections of your script making any other scripts I use have a half second delay on them

It's just a bit annoying because the night vision script I made takes a second to turn on and off if I have this script as well, and my script adds general blur, edge blur, static and contrast changes so it's pretty noticeable

Removing the code below fixes it

//Below is loop to check for new AI spawning in to be added to the list
[] spawn {
waitUntil {!isNil "BIS_fnc_init"};
waitUntil {!(isnull (findDisplay 46))};


while {true} do {
sleep 0.25;
{
if (local _x) then {
_CheckVariable = _x getVariable "FSMRunning";
if (isNil ("_CheckVariable")) then {_CheckVariable = 0;};
if (!(isplayer _x) && (_CheckVariable == 0)) then {null = [_x] execFSM "AIBEHAVIOR1.fsm";};
if ((isPlayer _x)  && (_CheckVariable == 0)) then {
player setVariable ["FiredTime", 0];
player setVariable ["PLAYERCOMMANDER", 1];
player addEventHandler ["Fired",{null = [_this] call FiredAtTarget;}];
player setVariable ["FSMRunning",1,true];
};
};
} forEach allUnits;
sleep 5;
};
};

Now the hint says that this is used to check for NEW spawning ai to be added to the list. Does this include the AI that are placed in the editor and "spawn" when the mission loads or are they already in the list? Because I would love to have this mod in my missions but I think the other people playing would get annoyed with the weird effects it gives my night vision script and probably most other time sensitive scripts as well.Removing this bit really helps but I don't know if the mod is even working anymore if I do remove it, or if it just gets rid of spawned AI being affected

For your first issue. The best advice is to not use the scripts - I have not run into this issue with the thousands of addons I have played with, so I'm not sure. That's why it sleeps every 5 seconds so it doesn't hog anything.

New spawned in AI are all taken into account - it takes roughly 5 seconds or so (because of the sleep 5).

The code you listed above is required for the addon to work at all. I haven't had the mod break any time sensitive scripts so I'm not sure what to do about that, it's even more strange because it only gets executed every 5 seconds. That's not very frequent.

I can see where it would cause delays at mission starts. But not throughout the entire mission :|

It is also possible that a mission with large amounts of AI causes massive script lag.

I will see what I can do about this issue- but in the mean time, don't use the addon

Edited by Genesis92x

Share this post


Link to post
Share on other sites

here's the script I'm using for the night vision

if (isDedicated) exitWith {};
if (player != player) then {waitUntil {player == player};};

// Figures out how zoomed in you are (KillzoneKid is Awesome)
KK_fnc_getZoom = {
   (
       [0.5,0.5] 
       distance 
       worldToScreen 
       positionCameraToWorld 
       [0,1.05,1]
   ) * (
       getResolution 
       select 
       5
   )
};

   while {true} do {
   waitUntil {

   // Adds Effects When NV Enabled
   ((vehicle player) == player) && ((currentVisionMode player) == 1)};

   // Effects below. If you wanna know what this stuff means so you can change the effects, go to [url]https://community.bistudio.com/wiki/Post_process_effects[/url]

   // Dynamic Blur
   ppBlur = ppEffectCreate ["dynamicBlur", 500]; 
   ppBlur ppEffectEnable true;    
   500 ppEffectForceInNVG true;


   // Edge Blur
   ppRim = ppEffectCreate ["RadialBlur", 501]; 
   ppRim ppEffectEnable true;   
   ppRim ppEffectAdjust [0.02, 0.02, 0.22, 0.3];
   ppRim ppEffectCommit 0;  
   501 ppEffectForceInNVG true;


   // Color and Contrast
   ppColor = ppEffectCreate ["ColorCorrections", 1500];  ppColor ppEffectEnable true;
   ppColor
   ppEffectForceInNVG true;


   // Film Grain
   ppFilm = ppEffectCreate ["FilmGrain", 2501]; 
   ppFilm ppEffectEnable true;   
   2501 ppEffectForceInNVG true;

   waitUntil {
   // Scaling effects during Zooming

   _zoomintensity = (call kk_fnc_getZoom * 10) /30;

   ppColor ppEffectAdjust [0.6, 1.4 - (_zoomintensity * 0.003), -0.02 + (_zoomintensity * - 0.003) , [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 0, 0]]; 
   ppColor ppEffectCommit 0;


   ppBlur ppEffectAdjust [0.22 + (_zoomIntensity * 0.45)]; 
   ppBlur ppEffectCommit 0; 


   ppFilm ppEffectAdjust [0.22, 1, _zoomIntensity, 0.4, 0.2, false];
   ppFilm ppEffectCommit 0;  

   //Removes Effects When NV Disabled
   ((vehicle player) != player) || ((currentVisionMode player) != 1)   
   };

   ppEffectDestroy ppBlur; 
   ppEffectDestroy ppRim; 
   ppEffectDestroy ppColor;
   ppEffectDestroy ppFilm;
   };

It wouldn't be too much of an issue (a bit of lag between turning the NVGs on and off isn't too bad) but the problem is that it also lags the dynamic blur and film grain changes when you change zoom levels (the effects don't scale themselves because they're just added to the screen and aren't based on distance) so every time you stop looking down your scope the effects still look 10X and blurry and the film grain is 10X as big for another half second until it goes back to normal size :/

Would having just the AI warn distance portion lag it just as much? because that's really the main feature I want to use for the mission

Share this post


Link to post
Share on other sites

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Thanks for the update. Sounds like the AI will continue to kick our @#$% more efficiently. Love it!

I will have to try this, but has anyone set mortar/artillery units and had them call fire on your position?

anyone use this for headless client yet?

Share this post


Link to post
Share on other sites
here's the script I'm using for the night vision

if (isDedicated) exitWith {};
if (player != player) then {waitUntil {player == player};};

// Figures out how zoomed in you are (KillzoneKid is Awesome)
KK_fnc_getZoom = {
   (
       [0.5,0.5] 
       distance 
       worldToScreen 
       positionCameraToWorld 
       [0,1.05,1]
   ) * (
       getResolution 
       select 
       5
   )
};

   while {true} do {
   waitUntil {

   // Adds Effects When NV Enabled
   ((vehicle player) == player) && ((currentVisionMode player) == 1)};

   // Effects below. If you wanna know what this stuff means so you can change the effects, go to [url]https://community.bistudio.com/wiki/Post_process_effects[/url]

   // Dynamic Blur
   ppBlur = ppEffectCreate ["dynamicBlur", 500]; 
   ppBlur ppEffectEnable true;    
   500 ppEffectForceInNVG true;


   // Edge Blur
   ppRim = ppEffectCreate ["RadialBlur", 501]; 
   ppRim ppEffectEnable true;   
   ppRim ppEffectAdjust [0.02, 0.02, 0.22, 0.3];
   ppRim ppEffectCommit 0;  
   501 ppEffectForceInNVG true;


   // Color and Contrast
   ppColor = ppEffectCreate ["ColorCorrections", 1500];  ppColor ppEffectEnable true;
   ppColor
   ppEffectForceInNVG true;


   // Film Grain
   ppFilm = ppEffectCreate ["FilmGrain", 2501]; 
   ppFilm ppEffectEnable true;   
   2501 ppEffectForceInNVG true;

   waitUntil {
   // Scaling effects during Zooming

   _zoomintensity = (call kk_fnc_getZoom * 10) /30;

   ppColor ppEffectAdjust [0.6, 1.4 - (_zoomintensity * 0.003), -0.02 + (_zoomintensity * - 0.003) , [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 0, 0]]; 
   ppColor ppEffectCommit 0;


   ppBlur ppEffectAdjust [0.22 + (_zoomIntensity * 0.45)]; 
   ppBlur ppEffectCommit 0; 


   ppFilm ppEffectAdjust [0.22, 1, _zoomIntensity, 0.4, 0.2, false];
   ppFilm ppEffectCommit 0;  

   //Removes Effects When NV Disabled
   ((vehicle player) != player) || ((currentVisionMode player) != 1)   
   };

   ppEffectDestroy ppBlur; 
   ppEffectDestroy ppRim; 
   ppEffectDestroy ppColor;
   ppEffectDestroy ppFilm;
   };

It wouldn't be too much of an issue (a bit of lag between turning the NVGs on and off isn't too bad) but the problem is that it also lags the dynamic blur and film grain changes when you change zoom levels (the effects don't scale themselves because they're just added to the screen and aren't based on distance) so every time you stop looking down your scope the effects still look 10X and blurry and the film grain is 10X as big for another half second until it goes back to normal size :/

Would having just the AI warn distance portion lag it just as much? because that's really the main feature I want to use for the mission

Hmm thanks for this. I will test it as soon as I can. This is definitely an issue that requires some research. Hopefully we can squash this bug by helping each other - I appreciate the time you took to help out :>!

And the warn distance *shouldn't* cause anything to happen. It simply does a distance check - although you can test turning down the distance to 0. You can just put the variable in the init.sqf of a mission and it should take effect.

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Thank you FoxHound!

Thanks for the update. Sounds like the AI will continue to kick our @#$% more efficiently. Love it!

I will have to try this, but has anyone set mortar/artillery units and had them call fire on your position?

anyone use this for headless client yet?

You will have to let me know about any bugs you come across - the next update will include AI using mortars and artillery effectively IF the param is set. *It will be off by default

Share this post


Link to post
Share on other sites

I was just curious as to if this would work with Bcombat as well or if I should keep them separate from each other.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×