Jump to content
genesis92x

Vcom AI V2.0 - AI Overhaul

Recommended Posts

We've tested this, small scale, on dedicated and it is awesome! Now all we need is a grass view blocker like the one in ACE2 for A2. This AI mod makes it super fun to battle against AI. But since they see you right away, the view block would be great. Not sure how ACE did this, also this is not the thread for that :P

Thanks for this great AI Mod!

Share this post


Link to post
Share on other sites

Had a problem with the demo mission, in that on my 3rd play through everything went a bit... Breaking Bad.

breakingbad1.jpg

Myself and BluFor had killed all OpFor AI except 1, but when searching for him BluFor guys all ended up crawling on their stomachs.

Even out in the fields.

Kinda killed the immersion.

Might want to re-consider the code for AI's propensity of staying prone while moving.

Other than that, definitely a step in the right direction.

Good Job.

Share this post


Link to post
Share on other sites
We've tested this, small scale, on dedicated and it is awesome! Now all we need is a grass view blocker like the one in ACE2 for A2. This AI mod makes it super fun to battle against AI. But since they see you right away, the view block would be great. Not sure how ACE did this, also this is not the thread for that :P

Thanks for this great AI Mod!

Thank you, and keep in mind you can edit the AI skills in the init.sqf file underneath the VCOMAI folder.

Had a problem with the demo mission, in that on my 3rd play through everything went a bit... Breaking Bad.

http://indiescent.files.wordpress.com/2010/03/breakingbad1.jpg

Myself and BluFor had killed all OpFor AI except 1, but when searching for him BluFor guys all ended up crawling on their stomachs.

Even out in the fields.

Kinda killed the immersion.

Might want to re-consider the code for AI's propensity of staying prone while moving.

Other than that, definitely a step in the right direction.

Good Job.

Yeah, default AI behavior here unfortunately. Once the AI get suppressed they are just told to go into a weak prone stance - apparently the vanilla AI are not smart enough to not prone in an empty field (or rather that they should run, not crawl, into cover). I can work in a fix for this, thanks for the support/report

I appreciate it all :>

Share this post


Link to post
Share on other sites

Ah , alright so its not a bug :), thanks for clarification. My only problem with that is that i cannot throroughly position my men during combat (they wont return into aware in combat) so they kind of have minds of their own. I ll experiment with it a bit more

Share this post


Link to post
Share on other sites
Ah , alright so its not a bug :), thanks for clarification. My only problem with that is that i cannot throroughly position my men during combat (they wont return into aware in combat) so they kind of have minds of their own. I ll experiment with it a bit more

Currently, controlling them in combat stance is going to be difficult. If you tell them to go back into AWARE they will begin to follow you IF there is no combat. Otherwise you will have to put the NOAI command in their init lines to prevent this from happening right now :<

These scripts aren't really made for player controlled groups and they need to accommodated for it eventually.

For now though...here's something you guys might like.

Upcoming Update

I am just fixing a lot of bugs and adding two major things that I'd like to show off right now.

AI Pathing/Flanking

Below you can see I am working on how the AI flank/search for players. The AI will automatically *guess* where the enemy group is going. If the AI believes the enemy is retreating, it will try to guess where the enemy is going and follow it.

https://dl.dropboxusercontent.com/u/38334795/AIFOLDER/AI2.png (2438 kB)

https://dl.dropboxusercontent.com/u/38334795/AIFOLDER/Attempt1.png (4278 kB)

More AI Behavior tweaks

I don't want to ruin everything...but just watch this video and watch for anything different...I mean, it is just 2 minutes long. Skip to 1:30 if you are hard pressed for time.

Edited by Genesis92x

Share this post


Link to post
Share on other sites

Yeah, I wouldn't say this is a bug per se. Pressing ~, 0, 7 (I think) will put them back into aware and give you normal control again. You can disable the scripts on specific AI by putting

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

in their init lines. I think I will work on a cute little dialog that allows for greater control over AI squads soon.

It doesn't seem to matter what you press, it's impossible to regain any control over your team once the scripts have kicked in. I just hear myself, as team/squad leader, endlessly give obscure commands to my men, which means, as someone noted above, zero tactics.

Unfortunately, due to this 'bug' I'm leaning towards not using this mod for the time being, because it gets pretty frustrating having no control, and annoying hearing 'myself' giving endless commands.

It's a real shame, because apart from this problem I really like your scripts. I'll keep an eye on this thread and if you manage to come up with a fix I'll certainly start using them again.

Thanks for all the work you're doing to improve the horrible Arma AI :-)

Edited by Gattobuono

Share this post


Link to post
Share on other sites

I tried getting them into aware mode, but even in aware mod, (no combat situation) my avatar keeps giving some commands to selected Ai soldiers. Its not supposed to happen in aware mode, right? Im using DEV branch, so perhaps thats causing some trouble. Btw nice video, i love AI advancements like this, gj :)

Share this post


Link to post
Share on other sites

If i was watching that video correctly they threw smoke so they could lay an explosive charge in order to kill you!? nice :)

Share this post


Link to post
Share on other sites
It doesn't seem to matter what you press, it's impossible to regain any control over your team once the scripts have kicked in. I just hear myself, as team/squad leader, endlessly given obscure commands to my men, which means, as someone noted above, zero tactics.

Unfortunately, due to this 'bug' I'm leaning towards not using this mod for the time being, because it gets pretty frustrating having no control, and annoying hearing 'myself' giving endless commands.

It's a real shame, because apart from this problem I really like your scripts. I'll keep an idea on this thread and if you manage to come up with a fix I'll certainly start using them again.

Thanks for all the work you're doing to improve the horrible Arma AI :-)

I tried getting them into aware mode, but even in aware mod, (no combat situation) my avatar keeps giving some commands to selected Ai soldiers. Its not supposed to happen in aware mode, right? Im using DEV branch, so perhaps thats causing some trouble. Btw nice video, i love AI advancements like this, gj :)

If you want the enemy AI to still use the improvements just place " this setVariable ["NOAI",1,false]; " in the init of your soldiers. This will resolve it temporarily ;)

EDIT:

AI Pack Download UPDATE

- Version 1.02

- 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

Edited by Genesis92x

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

When You say AI commUnicate with each other do you mean they request support from friendly units? Is there any limitations of this feature, like distance etc, or could you give a little explanation of this feature.

Thanks for the update looking forward to testing it.

Share this post


Link to post
Share on other sites

Considering how the standard AI behaves during combat, I'd say this is a proper step in the right direction. Cheers for making the AI fight more properly!

I've noticed it's not preferable to use with Zeus as your script does what it does in combat mode. But since the nature of the script is control of AI and forcing them to act intelligently, that's something I would expect. The waypoints tend to shift and control for Zeus is fairly tough. However I understand that's not the point of it. Just an observation. Other than that, for it's purpose. It's definitely a great script.

Is there a "best" way to use the script? As in best situation for the AI to behave correctly according to your script. If there's no preference then I'm going to go ahead and play more with it! :)

First round of playing around:

I found that AI accuracy dropped quite substantially at 200 meters. I wanted to test the HMG function which is lovely btw. And after 2-3 minutes of fighting at that point I could see bullet-holes 1-2 meters infront of the gun itself. Meaning the accuracy is so low that it fires straight into the ground from it's barrel. I had the same effect but tracers into the skies every now and then.

Another thing I tested was Mechanized and Motorized groups moving from point A - B. Contacts about 500 meters ahead was noticed and they went into Combat mode. Everyone got out of the vehicle about 500 meters away and stayed there whilst the vehicles themselves pushed on.

That's what I had time to play around with in Zeus + this script. Zeus were merely to edit it quickly and test spawning units. I noticed the variables to changes you can make and I noticed the AI tells other AI about combat so I guess that's why they failed to push up far enough to engage.

However if you use Mechanized Reinforcements that might be an issue, I might be doing it wrong though. Free to tell me if that's the case!

Cheers

Edited by Oksman

Share this post


Link to post
Share on other sites

Nice new update, now I can lead units without looking like having Schizephrenia :). One more thing i have noticed while playtesting. AI doesnt seem to maintain nearly any unit cohesion and there is lot of going back and forth (AI leading another AI's)

Share this post


Link to post
Share on other sites

^^ agree with the lack of cohesion. Units tend not to fight as as group. I do see lots of waypoints put on the map for groups, but they rarely go to them to flank, instead the group will massivley spread out (looking for cover) while one of them goes to one waypoint.

If you look at how MCC Gaia has done their commanding of far groups (based on 'value') that may also help further refine.

Good work so far however!

Share this post


Link to post
Share on other sites

hi Genesis92x, great script.

Is there a way that to disable the reinforcements, because i use MCC gaia and It appeared they conflict each other in this matter.

also im agree with regard to the lack of cohesion. but i think this has a great potential.

(i tested ia planting explosives funcion and its cool) ;)

Edited by Rapax

Share this post


Link to post
Share on other sites
Sounds like a great update ... off to test it out, thanks.

No, thank you for the support ;)

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!

Thanks Foxhound - your work never ceases to amaze me.

When You say AI commUnicate with each other do you mean they request support from friendly units? Is there any limitations of this feature, like distance etc, or could you give a little explanation of this feature.

Thanks for the update looking forward to testing it.

This is a feature that mission makers can define! In the VCOMAI init.sqf file look for this line

 VCOM_AIWarnDistance = 1000; 

This is the range. Setting this to 0 would disable the long distance communication all together (for the most part). So the feature works kinda like this.

Bluforgroup1 gets engaged 800 meters away from Bluforgroup2.

Bluforgroup2 has no prior engagements and decides to go into combat mode. From there the AI will most likely flank the enemy to support Bluforgroup1.

Considering how the standard AI behaves during combat, I'd say this is a proper step in the right direction. Cheers for making the AI fight more properly!

I've noticed it's not preferable to use with Zeus as your script does what it does in combat mode. But since the nature of the script is control of AI and forcing them to act intelligently, that's something I would expect. The waypoints tend to shift and control for Zeus is fairly tough. However I understand that's not the point of it. Just an observation. Other than that, for it's purpose. It's definitely a great script.

Is there a "best" way to use the script? As in best situation for the AI to behave correctly according to your script. If there's no preference then I'm going to go ahead and play more with it! :)

First round of playing around:

I found that AI accuracy dropped quite substantially at 200 meters. I wanted to test the HMG function which is lovely btw. And after 2-3 minutes of fighting at that point I could see bullet-holes 1-2 meters infront of the gun itself. Meaning the accuracy is so low that it fires straight into the ground from it's barrel. I had the same effect but tracers into the skies every now and then.

Another thing I tested was Mechanized and Motorized groups moving from point A - B. Contacts about 500 meters ahead was noticed and they went into Combat mode. Everyone got out of the vehicle about 500 meters away and stayed there whilst the vehicles themselves pushed on.

That's what I had time to play around with in Zeus + this script. Zeus were merely to edit it quickly and test spawning units. I noticed the variables to changes you can make and I noticed the AI tells other AI about combat so I guess that's why they failed to push up far enough to engage.

However if you use Mechanized Reinforcements that might be an issue, I might be doing it wrong though. Free to tell me if that's the case!

Cheers

The odd moving behavior you describe is something I am working on - check below for an "unofficial" test release and let me know if it works better, if you have time. I am trying to make the AI less crazy during combat, a forgot to tie up a few loose ends which resulted in the back and forth motion you see a lot during combat. You also mention the AI accuracy dropping off at 200 meters, try editing their accuracy variables in the init.sqf file. You will have to find settings that work for you (every server can be different :< )

I appreciate your support and the time you took to write this out!

The issues with the mechanized troops and etc should be fixed with the next release.

Nice new update, now I can lead units without looking like having Schizephrenia :). One more thing i have noticed while playtesting. AI doesnt seem to maintain nearly any unit cohesion and there is lot of going back and forth (AI leading another AI's)

Look below! Try that please :>

^^ agree with the lack of cohesion. Units tend not to fight as as group. I do see lots of waypoints put on the map for groups, but they rarely go to them to flank, instead the group will massivley spread out (looking for cover) while one of them goes to one waypoint.

If you look at how MCC Gaia has done their commanding of far groups (based on 'value') that may also help further refine.

Good work so far however!

Look below! Let me know if the unit cohesion is any better, or if it's even going in the right direction.

hi Genesis92x, great script.

Is there a way that to disable the reinforcements, because i use MCC gaia and It appeared they conflict each other in this matter.

also im agree with regard to the lack of cohesion. but i think this has a great potential.

(i tested ia planting explosives funcion and its cool) ;)

Yes! In the init.sqf file look for

 VCOM_AIWarnDistance = 1000; 

and change the 1000 to a 0.

And thank you for the compliment :D

Unofficial(?) release version

If anyone has some spare time, could someone try out this version and let me know if the units maintain cohesion more? My eyes don't catch what you guys do. Thank you for your time.

https://dl.dropboxusercontent.com/u/38334795/AIFOLDER/AI_TestUNOFFICAL.Altis.zip

This is NOT a version that should be used for the public. You have been warned :D

Share this post


Link to post
Share on other sites

Hey Genesis92x,

I hope you don't mind that I've been looking at your AI SetSkill values in init.sqf

Before I say anything, there seems to be a consensus of opinion amongst most A3 users that believes setting an AI skill of 1 for most of the setskill variables is a bit too unrealistic.

See this post from EGGBEAST. AI-Skill-Settings

See the full SetSkill arrays list here. setSkill_array

May I suggest that instead of giving ALL AI skill settings of 1, that you use a default setting of 0.3 and when you call your "Accuracyfunction" based on distance to target you add a random multiplier factor for each distance.

That way it makes each encounter and each units skills that much more random. For example in your init.sqf change

VCOM_FarTime = _Unit setSkill ["spotTime",1.0];

to

VCOM_ShortTime = _Unit setSkill ["spotTime",(0.5+random 0.3)];

Obviously change ALL the other SetSkill values to be base + random. It would make you code shorter as you only have to call the Accuracyfunction and specify the random multiplier.

If you do like this suggestion, may I further suggest to actually lower some AI skills, for example when range is 75m or less. This is to simulate fear and panic under close quarter combat conditions. i.e. seeing an enemy up close would induce fear and effect your ability to think and shoot straight. I would lower aiming skills, accuracy, reloadSpeed and and courage. (Not by much though, just enough to simulate CQC)

Take note that I offer my suggestions purely in a positive and supporting manner.

You can of course choose to completely ignore any of my suggestions. I will not be offended.

This is after all your project.

Keep up the good work.

*N.B. For info, your AI ACCURACY SETTINGS you don't have a value for reloadSpeed. You might want to add that too.

Edited by Beerkan

Share this post


Link to post
Share on other sites

When the script has been disabled, such as in the init, can it later be re-enabled?

I'm hoping

_this setVariable ["NOAI",1,true];

Share this post


Link to post
Share on other sites

So we played with the 1.01 version with about 25 players. 22 AI and the server is down to 7 FPS. Normally we have 40 FPS with that few players and more than 40 AI. Dedicated game.

This mod is awesome, but I think it steals to much FPS from the server.

This is what one (1) yes one unit creates in Waypoints :)

http://cloud-2.steampowered.com/ugc/3318334471717974510/2D2D19E1E762086928D88D44AAEEEB29DFA852F7/

//EDIT//

We just saw that the mission had a great bug in it, that spawned a bunch of stuff that should not be there. That could be the reason for a low FPS baseline from start.

Edited by Pellejones

Share this post


Link to post
Share on other sites
Hey Genesis92x,

I hope you don't mind that I've been looking at your AI SetSkill values in init.sqf

Before I say anything, there seems to be a consensus of opinion amongst most A3 users that believes setting an AI skill of 1 for most of the setskill variables is a bit too unrealistic.

See this post from EGGBEAST. AI-Skill-Settings

See the full SetSkill arrays list here. setSkill_array

May I suggest that instead of giving ALL AI skill settings of 1, that you use a default setting of 0.3 and when you call your "Accuracyfunction" based on distance to target you add a random multiplier factor for each distance.

That way it makes each encounter and each units skills that much more random. For example in your init.sqf change

VCOM_FarTime = _Unit setSkill ["spotTime",1.0];

to

VCOM_ShortTime = _Unit setSkill ["spotTime",(0.5+random 0.3)];

Obviously change ALL the other SetSkill values to be base + random. It would make you code shorter as you only have to call the Accuracyfunction and specify the random multiplier.

If you do like this suggestion, may I further suggest to actually lower some AI skills, for example when range is 75m or less. This is to simulate fear and panic under close quarter combat conditions. i.e. seeing an enemy up close would induce fear and effect your ability to think and shoot straight. I would lower aiming skills, accuracy, reloadSpeed and and courage. (Not by much though, just enough to simulate CQC)

Take note that I offer my suggestions purely in a positive and supporting manner.

You can of course choose to completely ignore any of my suggestions. I will not be offended.

This is after all your project.

Keep up the good work.

*N.B. For info, your AI ACCURACY SETTINGS you don't have a value for reloadSpeed. You might want to add that too.

Of course I don't mind! Please mod ANYTHING you want to! That's why it's all available, and just so were all on the same page - the init.sqf is there for you guys to tweak to your hearts content. I really appreciate that method of AI skill for sure - I think I will implement that to make it the default and people and tweak it from there. And noted about the reloadSpeed.

I really appreciate your work, I will consider these for the next update ;)

When the script has been disabled, such as in the init, can it later be re-enabled?

I'm hoping

_this setVariable ["NOAI",1,true];

Yes, you can re-enable the AI by doing this two commands -

 
_this setVariable ["NOAI",1,true];
[_this] execFSM "AIBEHAVIOR1.fsm";

So we played with the 1.01 version with about 25 players. 22 AI and the server is down to 7 FPS. Normally we have 40 FPS with that few players and more than 40 AI. Dedicated game.

This mod is awesome, but I think it steals to much FPS from the server.

This is what one (1) yes one unit creates in Waypoints :)

http://cloud-2.steampowered.com/ugc/3318334471717974510/2D2D19E1E762086928D88D44AAEEEB29DFA852F7/

//EDIT//

We just saw that the mission had a great bug in it, that spawned a bunch of stuff that should not be there. That could be the reason for a low FPS baseline from start.

Interesting, these are my tests. The scripts do drop frame rate - but not like you describe. I'm not sure about the waypoints - make sure you don't have anything else trying to control the AI or buggy scripts.

Here is a screen-shot with 64 AI currently engaging each other and the server frame rate

https://dl.dropboxusercontent.com/u/38334795/AIFOLDER/FrameRate.png (532 kB)

Share this post


Link to post
Share on other sites

Will test the 'test' version and get back to you. My test regime is to use a VTS - Zeus mashup (virtual training system) that allows me to track and view small to large scale battles, on a personal dedi server.

Will get back to you.

Share this post


Link to post
Share on other sites

Just checked the RPT! It was 152 000 MB big! It got spammed with this, 15 times / second:

Error position: <_GoingToCombat == 0;>

Error Undefined variable in expression: _goingtocombat

That might be the cause of the lag :)

/EDIT/

Also, we only spawned units using Zeus, no other AI mod was used.

Edited by Pellejones

Share this post


Link to post
Share on other sites
Just checked the RPT! It was 152 000 MB big! It got spammed with this, 15 times / second:

That might be the cause of the lag :)

/EDIT/

Also, we only spawned units using Zeus, no other AI mod was used.

Ah I see, try updating to the latest version!

Will test the 'test' version and get back to you. My test regime is to use a VTS - Zeus mashup (virtual training system) that allows me to track and view small to large scale battles, on a personal dedi server.

Will get back to you.

Thank you! I appreciate it

Share this post


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

×