Jump to content
genesis92x

Vcom AI V2.0 - AI Overhaul

Recommended Posts

@Nicolai Lorenzen, if you place something with zeus, you 'own' them. That means you calculate their behavior. If you don't run Vcom,  these units won't either. 

 

 

Edit.: Might see some charlie foxtrot coming with Zombies_and_Demons. :P I would exclude them from VCOM... just to be safe.

Share this post


Link to post
Share on other sites

@Nicolai Lorenzen, if you place something with zeus, you 'own' them. That means you calculate their behavior. If you don't run Vcom,  these units won't either. 

 

 

Edit.: Might see some charlie foxtrot coming with Zombies_and_Demons. :P I would exclude them from VCOM... just to be safe.

 

Dayum, seems like I'm not skilled enough to go vcom with zeus. Too bad,  I think that the AI are pretty lackluster as is now. When my players attacked the garrisoned FoB, the AI didn't even return fire - just laid there like a bunch of retarded seals...

 

edit: I got vcom running both on the server and on my own client if that was what you meant though...

 

edit edit: Just made an altis map and set in some units via zeus - they all behaved vcom-like (is it a problem betrween my server and me, and the fact that the units cannot "see" zeus buildings and stuff? Anyone know?

Share this post


Link to post
Share on other sites

AI got way to accurate if their skill level was set above 0, is that still / was that ever the case?  

No, obviously not, as the skill has to be between 0 and 1, same for subskills.

 

Also is there a way for me as a mission maker to force a difficulty and override the skill level set by the host's settings?

At the first Page, there are predefined settings, Or you can make your own,  if you edit VCOMAI_DefaultSettings.

 

 

edit: I got vcom running both on the server and on my own client if that was what you meant though...

Strange, normally  your zeus placed units would be added to zeus after 0.25 seconds.

Share this post


Link to post
Share on other sites

No, obviously not, as the skill has to be between 0 and 1, same for subskills.

 

At the first Page, there are predefined settings, Or you can make your own,  if you edit VCOMAI_DefaultSettings.

 

 

Strange, normally  your zeus placed units would be added to zeus after 0.25 seconds.

 

Hmm ok I''ll try to make a vid of my setup, and what they do in the game... maybe you can see where I lost it...

Share this post


Link to post
Share on other sites

@crewt Thank you, Does this mean that the users have to add the "correct" difficulty script in their userconfig, or can I take one of the scripts from the first page (or make my own) and exec it in the init to override all other settings?

Share this post


Link to post
Share on other sites

@crewt Thank you, Does this mean that the users have to add the "correct" difficulty script in their userconfig, or can I take one of the scripts from the first page (or make my own) and exec it in the init to override all other settings?

 

No problem at all, happy to help.

Personally I ... don't like a userconfig. Its like... a huge security problem. 

If you call/ Execute one of the presets, you will overwrite the functions and the skill should be adjusted. 

But if you are using the Script version, I  would recommend to adjust the values in one of the scripts, play a little bit around with all the values to reach the best possible result. 

Share this post


Link to post
Share on other sites

So, if I want to make a coop-mission with your capable new AI, is it sufficient to do the following:

 

I use the script version, so I call your scripts in my missions init.sqf

 

Is that enough? It´s two player coop hosted via multiplayer -> host server.

 

I´m farely new to ARMA 3 editing, so please bear with me!

 

Greetings and thanks for any answers!

Share this post


Link to post
Share on other sites

I don't like the Userconfig either, so I'm happy to hear i can just ignore it and execVM the settings I like in the init instead, by doing this I don't have to copy any files to the userconfig folder right? as they don't get used?

 

I'm asking because I used the "insane" preset and the AI cant seem to hit anything, I killed 2 of my AI friends and the rest of the squad unloaded several mags at me before I got hit =/ Is it jsut the settings or did i do anything wrong?

 

this is my init:

[] execVM "AISettings_Insane.sqf";

You also mentioned on the last page that using the CBA event handler for disabling pilot AI could work, but Im getting a script "error in expression" when I try, do you see what I am doing wrong?

[{{Driver _x setvariable ["NOAI",true];} foreach (vehicles isKindOf 'air');}, 0, []] call CBA_fnc_addPerFrameHandler;

Share this post


Link to post
Share on other sites

@edelrost, yes for an easy setup, that should be enough. 

 

@taxen0  are you sure you called/executed "[] execVM "AISettings_Insane.sqf";" after the usual difficulty settings?

Overwriting the functions works for me.  even though,  I compile them final. 

 

 

Oh. Thats embarrassing -.-  :huh:

Seems like I pasted not working code again  :mellow:

[{{Driver _x setvariable ["NOAI",true];} foreach (vehicles select {_x isKindOf 'air'});}, 1, []] call CBA_fnc_addPerFrameHandler;

Share this post


Link to post
Share on other sites

will a PBO. version of the 2.8 test be released? i would love to test it i'm not sure how to use script version.

Share this post


Link to post
Share on other sites

thanks again! Haven't had the chance to test it yet but it looks like it should work =)

 

regarding the difficulty, I only used the insane script (from 1st page) in my init, I don't have anything else. so maybe some variables are missing in that one, I just assumed it had everything in it =)

 

So If I understand you right it should work if I first run the original settings and after that one of the presets?

like this:

//init.sqf
[] execVM "default_settings.sqf";
[] execVM "AISettings_Insane.sqf";

and this way I, or any one else playing the mission, don't have to care about the userconfig folder at all?

Share this post


Link to post
Share on other sites

It should. I honestly cant understand why it doesn't on your end.... I can only imagine  that if your scheduler is full, the execution of either one is .. well schdueled, but the order should still be the same.

 

additionaly you can/could do something like this: VCOMAI_Func = compileFinal preprocessFileLineNumber "AISettings_Insane.sqf";

Wait a secound. Why do you execute the default settings? No Need for that, VCOM does that itself. execute VCOM. overwrite the functions, or maybe even better, compileFinal the function above.

If this still doesn't work, I don't understand why, as It is currently working on my end. In this  case, just edit the Default settings.

Share this post


Link to post
Share on other sites

I started taking direct mortar fire when I was hundreds of meters away from any enemy AI and I was laying prone in a building.  This happened in the Takistan map.  It seemed to happen when a truck full of infantry ran over one of their own guys patrolling on the road; they went into a combat/aware state and some how discovered me a short while later (at least, the mortar did)

Share this post


Link to post
Share on other sites

It should. I honestly cant understand why it doesn't on your end.... I can only imagine  that if your scheduler is full, the execution of either one is .. well schdueled, but the order should still be the same.

As I said I haven't testet it yet, just wanted to confirm if it should work or not. Hopefully It will work if I run both scripts and not only the insane preset.

 

 

Why do you execute the default settings? No Need for that, VCOM does that itself. execute VCOM.

 

How does it do this? Do it always load the file from the "Userconfig" folder, or is it included elsewhere? I dont want to use the Userconfig folder if it can be avoided so it is empty (could have been the issue), thats why I thought that running it manually first might solve the issue. Again I haven't had the time to test it yet so I dont know but I will give it a go once I'm back home. *fingers crossed*

Share this post


Link to post
Share on other sites

How does it do this? Do it always load the file from the "Userconfig" folder, or is it included elsewhere? I dont want to use the Userconfig folder if it can be avoided so it is empty (could have been the issue), thats why I thought that running it manually first might solve the issue. Again I haven't had the time to test it yet so I dont know but I will give it a go once I'm back home. *fingers crossed*

Yes the defaultsettings are included in the functions folder. At the beginning Genesis checks if there is a userconfig, if this is not the case, he takes the defaultsettings included in his functions folder. 

 

I might have explained it to weird ...  :blink:  :wacko:

Share this post


Link to post
Share on other sites

Artillery works with all Assets that have an artillery computer. so yes, rhs assets work 

Share this post


Link to post
Share on other sites

Where do I put the following code? 

[{{Driver _x setvariable ["NOAI",true];} foreach (vehicles select {_x isKindOf 'air'});}, 1, []] call CBA_fnc_addPerFrameHandler;

Share this post


Link to post
Share on other sites

Really enjoying the new update. Watching the AI move from cover to cover as a squad is amazing.

Seeing them using mines etc is scary, but I did come across something you may need to check. I saw a friendly AI set up mortars and start shelling enemies which is cool, apart from the fact he set up the mortar in the second story of a house, firing the rounds into the ceiling.

Share this post


Link to post
Share on other sites

Hey I was using version 2.7 and I still had a friendly Ai get stuck in combat mode, nothing I tried would make him move and the immediate area was free of enemies. Closest enemies were probably on a small separate island about 700m away (if that helps)

Share this post


Link to post
Share on other sites

hello

I use ModuleCAS_F for a strafing support, but have a problem with VCOM (version 2.7 scripts)
When VCOM is active on mission, the aircraft have strange behavior and doesn't do his job correctly.

Steps to reproduce : in demo mission (VCOM AI Quick Showcase) or a new mission with only VCOM, and with a lot of enemy groups (infantries and vehicles), i call ModuleCAS in debug console :

_group = createGroup WEST;
_cas = _group createUnit ["ModuleCAS_F",(position player) , [], 0, ""];
_cas setVariable ["vehicle", "B_Plane_CAS_01_F", true];
_cas setVariable ["type", 0, true];


I tried with  _cas setvariable ["NOAI",true];  or (driver _cas) setvariable ["NOAI",true];  or { (driver _x) setvariable ["NOAI",true]; } foreach (vehicles isKindOf "air');  but doesn't work.

I search a solution :P

Share this post


Link to post
Share on other sites

That is no wonder. As far as I can see you  assign the Variable to the Module, not the vehicle or the driver of the module, witch is still the Module.

 

As far as I know VCOM is not doing anything with the Planes, so you could simply take them out.

 

Try something like mentioned a few pages back.

 

I think that, if your sheduler isn't full, you could try something like that:

_planes = vehicles select { _x isKindOf "Plane" };
for "_i" from 0 to count _planes -1 do {
	_item = _planes select _i;
	driver _item setVariable .....
	// Your code
};

BUT. As you spawn a Module and maybe the plane spawns after you call this code,   the plane will still be using VCOM. 

Share this post


Link to post
Share on other sites

(edit i'm pretty sure that...) Your quick showcase in the OP is broken and you should probably replace it

Share this post


Link to post
Share on other sites

Some questions that I tried to search itt but couldn't find a result for:

 

  • The pre-defined difficulty suggestions that are linked in the OP are sqf files and the instructions say to just paste/extract the sqf file I want into the [server's] appropriate userconfig folder.  I, however, am using the scripted version.  I saw a guy recommend changing the AI settings via putting the appropriate .sqf file into the mission folder and then using execVM on it after the initial execVM command that activates the AI scripting.  Is this how I should go about it?  Because you might want to update the readme.txt if that's the case because it's not very clear at all actually.
  • I noticed that the userconfig's .hpp file (as well as the .sqf files I mentioned a moment ago) seems to imply that if I change the rank of an AI soldier in the mission editor from private to Colonel or whatever then that AI will have much higher difficulty.  Is it really that simple to change the AI's difficulty?  If that's the case, then do I really need to bother with the .sqf stuff recommended in the thread or can I just up each unit's rank accordingly to the difficulty I want?  Because if all I need to do is just up the unit's rank in the mission editor then as a person just coming into this VCOM thing that really should have been made a lot more clear to me than it was.

Share this post


Link to post
Share on other sites

Hello everyone! Sorry about the spotty responses, being busy is always fun.

 

Here is the "official" release. Please let me know if any errors are found and I will fix them ASAP. I tried my best to catch and fix errors with minimal play testing. Also, thanks to everyone for reporting bugs and providing suggestions for many a thing!

 

Vcom AI 2.8 Release!

 

 

 

Vcom AI Changelog

*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!
 

 

VcomAI 2.8 Mod Download

 

VcomAI 2.8 Script Download

  • Like 8

Share this post


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

×