Jump to content
genesis92x

Vcom AI V2.0 - AI Overhaul

Recommended Posts

I have mixed results, some units patrol in SAFE Mode but some with their weapons up (although all should be in SAFE Mode).

Share this post


Link to post
Share on other sites
this about using hold waypoints for your units to garrison buildings AND place the correct commands in the patrols you don't want to be affected by this script and just use normal waypoints. This also works well with UPSMON.

Right now its bugged man. I tried all the suggested INIT commands and AI still support firefights by scripts. Cant wait for the updates!

Share this post


Link to post
Share on other sites
Hi !

Im a bit confused about the script version:

init.sqf:

[] execVM "VCOMAI\init.sqf";

Now the whole thing runs on all clients + server, i cant see a isServer check inside the VCOMAI\init.sqf.

I could use:

if (isServer) then {
[] execVM "VCOMAI\init.sqf";
};

but in the VCOMAI\init.sqf i saw this:

player setVariable[...]

So it looks like it needs to run on all clients.

But isnt this bad for the performance if all of the VCOMAI scripts run on server and all clients ?

The script version automatically runs on every client. It automatically filters out the uncessary scripts for both server or client. The server will only control units local to it, and a player will only control units local to the player. The downside to a player not running the scripts is that the player's AI will not have any the AI changes. The server should only control the server's units.

I hope this helps :>

I transition between Vcomai and ASR_AI on my dedicated server. Vcom works just fine, but it's only good for missions that do not involve units walking on patrol (this setBehaviour "Safe") because Vcom will force them to go into formation and walk with their weapons ready, like they are hunting. I know Genesis is aware of this issue and working on a fix, so I'm patiently waiting for the day I can replace ASR_AI.

Thank you for your patience! I am re-doing how the AI work so hopefully I can get more control of how they move. It should be a much better "deal" then.

I've been having a blast with Alive and this script package.

Thank you!! I hope to keep improving it.

this about using hold waypoints for your units to garrison buildings AND place the correct commands in the patrols you don't want to be affected by this script and just use normal waypoints. This also works well with UPSMON.

The creator of UPSMON is also a sweetheart - Little known fact:

we were going to work together to combine both our scripts. Unfortunately with our different time zones and language barriers it was rather difficult and I do not think it will happen :<

I have mixed results, some units patrol in SAFE Mode but some with their weapons up (although all should be in SAFE Mode).
Right now its bugged man. I tried all the suggested INIT commands and AI still support firefights by scripts. Cant wait for the updates!

Yeahhhh this is a strange issue I thought I fixed with the latest version. You are on the latest version right? I haven't had a chance to sit down and really debug this stuff yet :<

Thank you all for your support and patience!

Little update:

I am planning on re-creating my AI scripts and improving what can be improved. I will not just be throwing all my code away because it will take too long to write from scratch again...but I will be going through and re-designing a lot of the inner working of the mod. I want mission makers to have more control over AI movement and etc. This will hopefully also fix the FPS issues on some servers.

Thanks guys!

Share this post


Link to post
Share on other sites
The script version automatically runs on every client. It automatically filters out the uncessary scripts for both server or client. The server will only control units local to it, and a player will only control units local to the player. The downside to a player not running the scripts is that the player's AI will not have any the AI changes. The server should only control the server's units.

I hope this helps :>

Mhhh,

so you would recommend to just use:

[] execVM "VCOMAI\init.sqf";

in the init.sqf and everything should work, even for JIP players ?

Share this post


Link to post
Share on other sites
Mhhh,

so you would recommend to just use:

in the init.sqf and everything should work, even for JIP players ?

That is correct. I will have to explain this/expand this in the next version :)

Share this post


Link to post
Share on other sites

Thanks for the continued support of these wonderful scripts. Yes i am using the latest. It works great (some limitations) for insurgency style ALIVE missions, but def causes issues for user designed missions from what i can see if not able to use the INIT codes. Thanks

Share this post


Link to post
Share on other sites

Nice Script, we use it to enhance our ARMA experience a lot. However I have the following issue: whenever a unit get's attacked by a player all units in a 1000m radius start running towards that point. I used a silence and the other units did not have any direct line of sight since they were behind the next ridgeline.

I tried the "VCOM_AIWarnDistance = 400;" command in the init.sqf and it didn't change a thing. Next I put the "this setVariable ["NOPATHING",1,false];" command in the init lines of every unit on the map...still no change.

Any suggestions on how to prevent the whole server hunting us down?

Share this post


Link to post
Share on other sites
Might found a bug with setFriend. Wanted to make a mission in which the allegiance with the independent side will turn sour during the mission, noticed that units running the AI who already saw the Players while they were still friends will not attack the Players once setFriend is used.

EG:

West and Independence are friendly, player moves up to the AI.

Set friend is used right in front of the AI like this:

independent setFriend [WEST, 0];WEST setFriend [independent, 0]

AI will react like it has seen an enemy, take cover, flank and all that. But they will not shoot.

Otherwise really digging this AI, great work.

Very late reply, I know.

This is vanilla behaviour, AI doesnt react wih shooting (but flanking and all other stuff) to currently known units when using setfriend.

To guarantee instant attack, simply joingroupsilent into a group having been enemy before, then delete that new leader to regain same setting- but AI will now shoot. Actually reaction is so fast, a sleep delay could come handy.

Same if you want to setCaptive false btw.

Sent from mobile

Share this post


Link to post
Share on other sites
Nice Script, we use it to enhance our ARMA experience a lot. However I have the following issue: whenever a unit get's attacked by a player all units in a 1000m radius start running towards that point. I used a silence and the other units did not have any direct line of sight since they were behind the next ridgeline.

I tried the "VCOM_AIWarnDistance = 400;" command in the init.sqf and it didn't change a thing. Next I put the "this setVariable ["NOPATHING",1,false];" command in the init lines of every unit on the map...still no change.

Any suggestions on how to prevent the whole server hunting us down?

Its bugged man. Read the past couple posts....seems the commmands are being ignored. The modder is planning on doing some major work soon. I'll let him chime

Share this post


Link to post
Share on other sites

Hi Genesis92x.

I was trying VCOM AI last night for the very first time and had units spawned by Alive and others manually placed in the mission editor (no waypoints, just guarding an area as far as I was concerned).

When I previewed it, the Alive units did kick in nicely with VCOM AI but also did the guarding units. I tried 'this setVariable ["NOAI",1,false]; ' also 'this setVariable ["NOPATHING",1,false];' and even disableai "move" but each time the guarding units would leave their post to join the firefight. I checked with my guarding units profiled and not profiled to Alive and still got the same issue (apparently). I must be doing something wrong but can't seem to find the solution.

Also I noticed when killing AI with the new downing system, I seem to have a game delay/lag of 1s approx.

Have others seen this too?

Please can you help me out?

VCOM AI is making AI units so much more believable and dangerous.

Really love your work.

Share this post


Link to post
Share on other sites
Hi Genesis92x.

I was trying VCOM AI last night for the very first time and had units spawned by Alive and others manually placed in the mission editor (no waypoints, just guarding an area as far as I was concerned).

When I previewed it, the Alive units did kick in nicely with VCOM AI but also did the guarding units. I tried 'this setVariable ["NOAI",1,false]; ' also 'this setVariable ["NOPATHING",1,false];' and even disableai "move" but each time the guarding units would leave their post to join the firefight. I checked with my guarding units profiled and not profiled to Alive and still got the same issue (apparently). I must be doing something wrong but can't seem to find the solution.

Also I noticed when killing AI with the new downing system, I seem to have a game delay/lag of 1s approx.

Have others seen this too?

Please can you help me out?

VCOM AI is making AI units so much more believable and dangerous.

Really love your work.

I think previous posts are pointing towards a possible bug? I have tried it on a much simpler mission editing file (only 2 units) and with Alive Profile and it seemed to work (if not profiled).

Share this post


Link to post
Share on other sites

That's interesting Spartan - Thank you for posting about this, I will be taking a look soon. Like I mentioned before I am going to be reworking this mod to be more efficient and etc. This was the first mod I used FSM's and was not fully aware of their capability - so now I am going to go back and re-write the framework of the mod to make it better for everyone.

I plan on being more transparent with what is going on once I begin work again.

Thank you.

Share this post


Link to post
Share on other sites

Hi Genesis92x !

Today i looked a bit deeper into your scripts and fsm's and now i know why the AI_WARNDISTANCE was ignored and why NOPATHING/NOAI did not work correctly.

There was much inconsistency throughout your script suite and i would advice you to rework it completly from ground up (which you already want to do as i see :) ).

I really dont remember what i changed but i fiddled around with your scripts for a few hours today and got a nice working version...but i really dont remember what i changed exactly and some thing work although i can not explain why... ;)

If you rework it i would advice you:

- Make your script only run on the server.You could use BIS_fnc_listPlayers to check for human players.

- Build a lightweight version first with just the core functions (no downing and animation stuff, no helmets, no moral, no artillery), if those core functions work 100% solid in MP coop you can add those later.

Thanks for your work !

Edited by Wiggum

Share this post


Link to post
Share on other sites

Wiggum, that sounds exciting. Mind sharing as a temp solution until Genesis has time to release the rework? I used this a lot for SP mission and would love to see the NOAI working again

Share this post


Link to post
Share on other sites

Hey,

I noticed a very starge behavior that i could not fix and gave up.

Many have noted before that groups seem to split up in a very extrem way and i noticed that in a two man group, the group leader if alarmed would just get into the nearest cover (building) and his subordinate would rush to the location where the player was spotted.

The Group leader, at least sometimes joined the assault but they acted more like two separate units, running around hundreds of meters away from each other.

Because i could not fix this i gave up, i hope Genesis92x will rework the script, the idea behind it is great but to be honest, the script suite is kind of a mess currently.

As i said he needs to focus on the basics, get them 100% working and then start adding stuff like a downing system or a moral system.

EDIT:

Ok, this is a ArmA thing and has nothing to do with this script.

Edited by Wiggum

Share this post


Link to post
Share on other sites

Okay guys, I am actively working on VCOM AI again. I am going to be creating it from the ground up. I will still utilize a lot of the old code - but it will be mostly rewritten and re-organized for better control and efficiency now.

In the first post I will keep the following image up-to-date, it will list my current task and the % completed.

Progress.jpg

Current Task: FSM Creation

The first step is to create a more efficient FSM system that will handle the units more specifically so I don't have to do so many checks and redundant script calling.

FSM 15%

Progress1.PNG

Thank you for all your support!!

Edited by Genesis92x

Share this post


Link to post
Share on other sites

Great that you work on it again !:)

Just by looking at the fsm, it looks like it will still run on clients & server, is this correct ?

And it looks like you check for rank, I think that's not a good idea, most people don't care about those and just place units as privates.

Share this post


Link to post
Share on other sites
Great that you work on it again !:)

Just by looking at the fsm, it looks like it will still run on clients & server, is this correct ?

And it looks like you check for rank, I think that's not a good idea, most people don't care about those and just place units as privates.

Thanks!

The FSM just runs on any unit that has the FSM executed on it. So it runs anywhere that specific unit is local to. So if an AI is owned by a player's machine, the players machine will run this FSM on that unit because the server does not have full control over that unit. Most of the code will run server side only, there will be a constant check for player owned units however.

The "rank" is a new way of handling AI accuracy and uses skillFinal and skill to determine things like accuracy and etc up to 6 varying levels

Share this post


Link to post
Share on other sites

Hi, Genesis92x , this is so far my favourite script addon, i love to put it in my every mission, very low performance hit and very good ai skills, but sometimes the AI will throw smokes to expose their own location, before a player shooting at them

Share this post


Link to post
Share on other sites
Hi, Genesis92x , this is so far my favourite script addon, i love to put it in my every mission, very low performance hit and very good ai skills, but sometimes the AI will throw smokes to expose their own location, before a player shooting at them

Yeah :> I plan on changing the way AI handle grenades with the next version

Share this post


Link to post
Share on other sites
And it looks like you check for rank, I think that's not a good idea, most people don't care about those and just place units as privates.

I'm confused by that statement Wiggum. I know you have some skill with coding, so I don't understand why the fsm checking for rank would be bad, such as in consideration of a group's hierarchy. One of the features I really like about Robalo's ASR_AI is it bases skill from the unit's rank and provides a randomized threshold, so every unit can have a different tier of skill with some scale of randomness. I tend to place groups, which by default, have the leader as Sargent, followed by corporals and privates. I hate having to micromanage the skill of each individual unit in a group, or even as single units, I would rather just make a quick drop down of the unit's rank and be done with it. Am I missing something?

Share this post


Link to post
Share on other sites
I'm confused by that statement Wiggum. I know you have some skill with coding, so I don't understand why the fsm checking for rank would be bad, such as in consideration of a group's hierarchy. One of the features I really like about Robalo's ASR_AI is it bases skill from the unit's rank and provides a randomized threshold, so every unit can have a different tier of skill with some scale of randomness. I tend to place groups, which by default, have the leader as Sargent, followed by corporals and privates. I hate having to micromanage the skill of each individual unit in a group, or even as single units, I would rather just make a quick drop down of the unit's rank and be done with it. Am I missing something?

I suppose it comes down to individual preference. I think it makes sense to have privates be less accurate, more likely to accidently discharge, take longer to plan, and etc. However, the way I coded it does take into account their rank, but with the randomness it is possible to have a private be better than people a rank or two above them. Each AI kind of receives their own personality now.

These kinds of debates are good for the creation of the mod because it allows creative discussion in how things should work. Things that I never would have thought about are now in the mod because of you guys.

Wahoo!

Haha thanks! Keep checking those updates ;) Anyone can influence the build by asking questions.

Share this post


Link to post
Share on other sites

I just think it does not make sense to give lower rank soldiers less skill in accuracy or endurance.

The only thing where that would make sense is with the commanding skill but i doubt a human player will notice that at all.

Giving each soldier some kind of randomized skill (0.3 + random 0.2) is ok but even with this im sure player will not notice that, its most likely some kind of placebo effect...

What would make sense is to use a Variable for the mission designer to determine if the enemy's are untrained militia/highly trained militia/3rd world regular army/1st world regular army/special forces or something similar and just make all units generally higher or lower skilled.

And Genesis92x, i still dont understand why the script needs to run on clients and server, i think in a mp coop mission all enemy AI's are always local to the server and you can get (and add eventhandler) to players via BIS_fnc_listPlayers for example.

Share this post


Link to post
Share on other sites

Genesis92x, love that you are working on this again and are looking for input. I've always wanted a script that tries to model the behavior of a unit based on the type of weapon they carry. An FSM for MG, snipers, assault weapons, AT, AA, Medics, Static MG, pistol as primary weapon, etc from the ground up.

The scope upfront will be something like...in most situation,

If a sniper rifle wielding, unit will likely do:

1. If x, y, then z, etc

2. If a, b then c, etc

Etc..

I would think a unit's behavior, depends heavily on what firepower they poses.

So unit use elevation, windows, covers, overwatch, etc all differently based on what heat they are packing?

What do you think?

Share this post


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

×