Jump to content
genesis92x

Vcom AI V2.0 - AI Overhaul

Recommended Posts

What is actually the difference between the mod version and script version?

Share this post


Link to post
Share on other sites

Hmm I will test this with the newest version. For the newest version below I added a check for the NOAI command at the source - should prevent the AI from executing even the debug code.

 

Okay, I tested it with the Test 3 Mod  Version. It still does not work. I'm gonna go into more detail though. The Problem is: I want to exclude the ALiVE Combat Support from VCOM because it breaks the Combat Support. For that purpose ALiVE has a "Code" Line build in. This "Code" will be run on the Vehicle that is spawned for Combat Support. 

When the Vehicle spawns nothing strange happens. As it is supposed to be, it just stands on its spot. But when I call for Combat Support the following happens:

VCOM_Test.jpg

 

As you can see I marked several things. First I marked the two CAS Support I call. A Attack Helicopter and a Plane. After the Lift of they fly where the red line is pointing to (the Green Circled Marker). The things on the Green Circled Marker are three HQ - Blufor, Opfor and Indfor. No object is spawned there...just these markings...or whatever it is. 

Anyway, as you can see the Chopper was flying over there and actually landed o.O keeping it destroyed.

What they where supposed to do (and what they do without VCOM enabled) is flying along the Blue line. 

 

I use this Code on each unit:

this setVariable ["NOAI",true,false]; this setVariable ["VCOM_NOPATHING_Unit",true,false]; 

 

but I'm very sure the same happens with just:

this setVariable ["NOAI",true,false];

 

This is driving me insane. I really want to use VCOM because it works SO good T^T

Also my second question is still unanswered (for me ^^): When using VCOM AI, should I still install VCOM Driving or is it build into VCOM as well?

Share this post


Link to post
Share on other sites

What is actually the difference between the mod version and script version?

Nothing really. The only significant difference is the mod version will automatically run on whatever mission you are playing.

 

The script version has to be implemented manually into the mission, and also makes it so other players don't need to download anything extra to utilize VCOM AI

 

 

 

Okay, I tested it with the Test 3 Mod  Version. It still does not work. I'm gonna go into more detail though. The Problem is: I want to exclude the ALiVE Combat Support from VCOM because it breaks the Combat Support. For that purpose ALiVE has a "Code" Line build in. This "Code" will be run on the Vehicle that is spawned for Combat Support. 

When the Vehicle spawns nothing strange happens. As it is supposed to be, it just stands on its spot. But when I call for Combat Support the following happens:

VCOM_Test.jpg

 

As you can see I marked several things. First I marked the two CAS Support I call. A Attack Helicopter and a Plane. After the Lift of they fly where the red line is pointing to (the Green Circled Marker). The things on the Green Circled Marker are three HQ - Blufor, Opfor and Indfor. No object is spawned there...just these markings...or whatever it is. 

Anyway, as you can see the Chopper was flying over there and actually landed o.O keeping it destroyed.

What they where supposed to do (and what they do without VCOM enabled) is flying along the Blue line. 

 

I use this Code on each unit:

this setVariable ["NOAI",true,false]; this setVariable ["VCOM_NOPATHING_Unit",true,false]; 

 

but I'm very sure the same happens with just:

this setVariable ["NOAI",true,false];

 

This is driving me insane. I really want to use VCOM because it works SO good T^T

Also my second question is still unanswered (for me ^^): When using VCOM AI, should I still install VCOM Driving or is it build into VCOM as well?

Ahhh, this helps a lot.

 

Instead of

this setVariable ["NOAI",true,false];

try

{
   _x setVariable ["NOAI",true,false];
} ForEach crew this;

And if that doesn't work try this

 

 

{
   _x setVariable ["NOAI",true,false];
} ForEach crew this;
{
   _x setVariable ["NOAI",true,false];
} ForEach assignedCargo this;

And if that doesnt work - I will have to take a deeper look into Alive and Vcom. Something is going wrong.

 

Share this post


Link to post
Share on other sites

 

Ahhh, this helps a lot.

 

Instead of

this setVariable ["NOAI",true,false];

try

{
   _x setVariable ["NOAI",true,false];
} ForEach crew this;

And if that doesn't work try this

 

 

{
   _x setVariable ["NOAI",true,false];
} ForEach crew this;
{
   _x setVariable ["NOAI",true,false];
} ForEach assignedCargo this;

And if that doesnt work - I will have to take a deeper look into Alive and Vcom. Something is going wrong.

 

 

 

Gonna make some more Tests tomorrow but first testing doesn't look that promising! T^T

Share this post


Link to post
Share on other sites

{     _x setVariable ["NOAI",true,false];  } ForEach crew this;

 

or

 

{
   _x setVariable ["NOAI",true,false];
} ForEach crew this;
{
   _x setVariable ["NOAI",true,false];
} ForEach assignedCargo this;

 

 

This does not work in the ALiVE cas and transport modules :(

Share this post


Link to post
Share on other sites

I understand the  desire to have VCOMAI run with mods like ALIVE etc....

 

however since he just released 3.0 may be we help him with any bugs related to its vanilla format initially and not start overwhelming him with its not working with this mod or that mod. just some thoughts. it is his personal time. not sure about you but i bet he doesn't want to be spending a ton of time on top of what he is spending on vcomai 3.0 already for other mod fixes etc... YET!

  • Like 1

Share this post


Link to post
Share on other sites

{     _x setVariable ["NOAI",true,false];  } ForEach crew this;

 

or

 

{

   _x setVariable ["NOAI",true,false];

} ForEach crew this;

{

   _x setVariable ["NOAI",true,false];

} ForEach assignedCargo this;

 

 

This does not work in the ALiVE cas and transport modules :(

try using a different type of support like BIS support modules or may be just placing units down and syncing them to a player. there are

ways around that 

Share this post


Link to post
Share on other sites

Well for ALIVE actually you can use a light vehicle for transport while waiting for the mod to mature. With Vcom AI anebled, i call AAF Striders or trucks. They drive me around without problems \o/

Share this post


Link to post
Share on other sites

So I tested a bit. 
When using this:

 

{_x setVariable ["NOAI",true,false];} ForEach crew this;

I get: 

Error in expression <} ForEach crew _this select 0>
Error position: <} ForEach crew _this select 0>
Error Missing {
 

Thats probably why the script is not applied at all!

Share this post


Link to post
Share on other sites

when i activate this for some reason any AI i place with a waypoint just walk in circles

This is fixed with the test version :) Try that one and let me know how it goes.

Share this post


Link to post
Share on other sites

{ _x setVariable ["NOAI",true,false]; } ForEach crew this;

or

{ _x setVariable ["NOAI",true,false];} ForEach crew this;{ _x setVariable ["NOAI",true,false];} ForEach assignedCargo this;

This does not work in the ALiVE cas and transport modules :(

Okay, I tested it with the Test 3 Mod Version. It still does not work. I'm gonna go into more detail though. The Problem is: I want to exclude the ALiVE Combat Support from VCOM because it breaks the Combat Support. For that purpose ALiVE has a "Code" Line build in. This "Code" will be run on the Vehicle that is spawned for Combat Support.

When the Vehicle spawns nothing strange happens. As it is supposed to be, it just stands on its spot. But when I call for Combat Support the following happens:

As you can see I marked several things. First I marked the two CAS Support I call. A Attack Helicopter and a Plane. After the Lift of they fly where the red line is pointing to (the Green Circled Marker). The things on the Green Circled Marker are three HQ - Blufor, Opfor and Indfor. No object is spawned there...just these markings...or whatever it is.

Anyway, as you can see the Chopper was flying over there and actually landed o.O keeping it destroyed.

What they where supposed to do (and what they do without VCOM enabled) is flying along the Blue line.

I use this Code on each unit:

this setVariable ["NOAI",true,false]; this setVariable ["VCOM_NOPATHING_Unit",true,false];

but I'm very sure the same happens with just:

this setVariable ["NOAI",true,false];

This is driving me insane. I really want to use VCOM because it works SO good T^T

Also my second question is still unanswered (for me ^^): When using VCOM AI, should I still install VCOM Driving or is it build into VCOM as well?

Are you using only the modules? Try placing a unit in the editor, then adding it to Alive with this setVariable ["CS_TYPE", "TRANSPORT"] (or "CAS" depending), then also add the VCOM NOAI command. I'm away from my computer right now, but I'll test this out and update.

Share this post


Link to post
Share on other sites

So little input here. Got some help from TeTeT today. 

Looks like he solved the mystery behind that VCOM and ALiVE Combat Support.
Instead of this:

{_x setVariable ["NOAI",true];} ForEach crew this;

you need to use this:

{_x setVariable ["NOAI",true];} ForEach crew (this);

(I've been told that the false is not needed because its default anyway)
 
That is the explanation by SpyderBlack:
 

Additional information for the future, the reason you were seeing _this select 0 in the error is because the code performs a replacement of all references to this in the code with _this select 0
So that () fix makes perfect sense as it equates to (_this select 0) after the replacement
(Good catch TeTeT)(bearbeitet)
Will change that so the module does it automatically


For now that worked with the Test3 Version of VCOM and the Combat Support is finally obeying! 
Now I can die in peace!
 
Many Greetings
Moony

 

Edit: Now I hope that I and the rest can finally stop bothering "genesis92x". Thanks for the patience, help and VCOM overall!

Share this post


Link to post
Share on other sites

That's good to hear Moon! I'm glad you were able to find a fix -I will remember that for the future.

 

Okay, so I think Vcom AI is getting close enough to release. Barring any scary issues that may pop up.

 

Edit:

 

Here we go!

 

Mod Release V2.20

 

Script Release V2.20

 

Changelog

 

 

Vcom AI Changelog
-These are in no particular order because I am doing this last second. Don't do what I do.

*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.
  • Like 3

Share this post


Link to post
Share on other sites

@Moon_chilD

Where do you put that in the modules and which ones do you put them in? My artillery refuses to fire but I don't see any issues yet with transport or CAS

Share this post


Link to post
Share on other sites

@bolbies: That is the problem. The Artillery does not have the "Code" field. Was talking to SpyderBlack yesterday and he said:

 

 

I was actually just looking at why that was not a thing , will ask

 

So yeah. In general you put that code in the "Code" field of the Transport and CAS Module. 
The Problem was, that the Combat Support was acting a bit...off. 
They just flew to the bottom left of the map and then landed/die...(for me) The code excluded the combat support from VCOM which made them finally be handled by ALiVE again.

@Everyone: I hope nobody overlooked that the new version of VCOM is out! ^^

Share this post


Link to post
Share on other sites

Tested the new version... love it. Waypoints are working again and it is just so nice to watch the AI conquer a town  :) Saw most of the features being effectively used.
Although 1 important feature seemed not to work - support call. 10 man squad guarding town, 20 man attacking. A 3rd squad with no waypoints does not ever come for help (~600m away) although they are even aware of the enemy. 
edit: also gunshot hearing over the 800m setting does not bring a reaction

Share this post


Link to post
Share on other sites

That's good to hear Moon! I'm glad you were able to find a fix -I will remember that for the future.

 

Okay, so I think Vcom AI is getting close enough to release. Barring any scary issues that may pop up.

 

Edit:

 

Here we go!

 

Mod Release V2.20

 

Script Release V2.20

 

Changelog

 

Warning Message: Script VCOMAI\Functions\VCOMAI_DefaultSettings.sqf not found

Share this post


Link to post
Share on other sites

I quickly tested the latest version. It's really promising.

May be you should tone down the "mining" reflex of AI. I spawned 5 CSAT explosive specialists and some bluefor. In not time I had more than 20 mines on the ground and they blowed 3 buidlings, 2 which were empty of any units ! :) 

Share this post


Link to post
Share on other sites

Error message displayed immediately when there's no more enemy AI on map.

 

_coverObjectspos>
20:39:29 Error getpos: Type Array, expected Object,Location
20:39:29 File \VCOMAI\Functions\VCOMAI_FindCoverPos.sqf, line 62
20:39:30 Error in expression <tCover") exitWith {};
_GuessLocation = getpos _NearestEnemy;

_coverObjectspos>
20:39:30 Error position: <getpos _NearestEnemy;

_coverObjectspos>
20:39:30 Error getpos: Type Array, expected Object,Location
20:39:30 File \VCOMAI\Functions\VCOMAI_FindCoverPos.sqf, line 62

Share this post


Link to post
Share on other sites

Yeah I've noticed that AI explosive specialists lay a mine as soon as they see enemy or get shot at. Any way a disable option could be added to the user config settings?

Share this post


Link to post
Share on other sites

Okay here are some more updates - thanks guy. Fixed a few bugs reported here - however not all of them.

 

Vcom AI Scripts V2.20 (Revision 2)

 

Vcom AI Mod V2.20 (Revision 2)

 

 

Vcom AI Changelog

-These are in no particular order because I am doing this last second. Don't do what I do.
 
*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.
 
Can someone from ArmAholic update it there too? I am getting questions about it :) Thank you!
  • Like 1

Share this post


Link to post
Share on other sites

I don't know why it seems like Vcom in mine isn't working, there is not much movement at all unlike the past ones where they go to cover immediately when fired upon. when the leader is unconscious they stay in the same position. And the ai doesnt call backup on the 10 times I tried.

Share this post


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

×