Jump to content
genesis92x

VCOM AI Driving Mod

Recommended Posts

Is it possible that it's affecting AI pilots? I mean real pilots like helicopter pilots. I gave the order to disembark from a Huron, and the AI pilots took off and went crazy all over the place. Reboot without this mod, and couldn't reproduce the problem. I'll do more testing tonight, but if it's affecting air vehicle "drivers", it really shoudn't.

Pretty sure it is... my transport chopper would NOT land and eventually circle strafed the position it was trying to land at... endlessly

if (driver) condition maybe ... haven't had time to look

Share this post


Link to post
Share on other sites
It's much worse, partly because BIS designed a terrain with lots of rocks and dry stone walls apparently by devs devoid of any foresight into how the AI would cope.

So true.

Share this post


Link to post
Share on other sites
Congrats on the release!

I just got this, pretty sure it was this mod related only:

Edit: Mod version.

Thanks! I will look into fixing it.

Goodness, are the days of ArmA's bad drivers nearly behind us? Like, seeing some parts of that video make me feel like I'm seeing footage of ArmA IV or something. Such a major jump forward, considering III's driving barely seems different than II's driving...

Haha thank you! I hope this can be improved on for sure.

Splendid work! I've always been yearning to do sth. like this but the velocity calculations were too annoying :D

Looking at the script, you seem to create a number of dummy objects. Any performance issues on a dedicated environment? You might want to disable Simulation on the dummy objects as there doesn't seem to be a need to broadcast them over the network.

Also:

[_objectsHouseArray] spawn {
     _objectsHouseArray = _this select 0;
     sleep 15;
     {
       deleteVehicle _x;
     } foreach _objectsHouseArray;
   };

seems wasteful (selecting array inside array). Why not just

_objectsHouseArray spawn {
     sleep 15;
     {
       deleteVehicle _x;
     } foreach _this;
   };

?

Furthermore, you could replace the staggered if clauses such as

if (!(_x isKindOf "Man")) then {
     if (!(_x isKindOf "Helper_Base_F")) then {
     if (!(_x isKindOf "Logic")) then {

with

if (!(_x isKindOf "Man") && {!(_x isKindOf "Helper_Base_F") && !(_x isKindOf "Logic")}) then {

That way you only have one if check with a lazy eval.

Thanks for the post! Sadly I can not disable the simulation on the objects otherwise the AI do not path around them. I do, however, make them only spawn locally so they are only spawned on the machine that called them.

Thanks for the improved code - I will definitely throw it in. One question though, the lazy evaluations always scared me.

Why would

 if (!(_x isKindOf "Man") && {!(_x isKindOf "Helper_Base_F") && !(_x isKindOf "Logic")}) then { 

be better than

if (!(_x isKindOf "Man") && {!(_x isKindOf "Helper_Base_F")} && {!(_x isKindOf "Logic")}) then {

I don't fully understand lazy evaluations, which is why I did the staggered if then statements.

This excellent! Will be testing this baby out for sure.

Thanks for the support!

@wolfenswan.... clever bugger you ! :-)

I'm constantly impressed by the level of skills members present here.

SJ

Me too :D!

The knowledge of SQF is less that of a scripting language and more like the shared oral history of a tribe. If it doesn't doesn't get passed on from member to member it will die ;)

Heehee, I agree Wolf.

^^ that is a great quote Wolfenswan!

Hope genesis92x can tweak some of his code now. I'm really interested in seeing IF the 'never stick it in reverse' can be addressed !

Could you explain the 'never stick it in reverse'? Maybe an mission to test?

Thanks for bein' awesome Kremator!

We've already seen tracked vehicles doing exactly that... I assumed it was a known feature ?

Infact I overheard several players commenting that it MUST be ZEUS driving that 'cos it's going backwards.

I was zeus and busy shooting down an L85 at the time, so I know it wasn't me ;-)

Ooooo so tanks don't reverse ever?

Is it possible that it's affecting AI pilots? I mean real pilots like helicopter pilots. I gave the order to disembark from a Huron, and the AI pilots took off and went crazy all over the place. Reboot without this mod, and couldn't reproduce the problem. I'll do more testing tonight, but if it's affecting air vehicle "drivers", it really shoudn't.

Ahhh yeah. This should be an easy fix. Thanks seba.

What? - IIRC someone told you it would be a massivehit (and not on the FPS, either :) )

Keep going mate. You can't solve everything - e.g., Hunters still get themselves stuck on rocks occasionally - but the improvement is already huge.

---------- Post added at 21:21 ---------- Previous post was at 21:18 ----------

Niot true. It's much worse, partly because BIS designed a terrain with lots of rocks and dry stone walls apparently by devs devoid of any foresight into how the AI would cope. And the AI drivers are even worse than in A2 for running over friendlies.

Yes :< I need to see if I can prevent them from running friendlies over...

Pretty sure it is... my transport chopper would NOT land and eventually circle strafed the position it was trying to land at... endlessly

if (driver) condition maybe ... haven't had time to look

Yes, sorry about that :< Pilots should be an easy fix. I did not think this mod would ever take off tbh...

Thanks to everyone for posting/supporting. I appreciate it. If you haven't edited the code yourself already, I will be posting an updated version soon.

I am currently pouring a little love into Degeneration.

Edited by Genesis92x

Share this post


Link to post
Share on other sites
Yes, sorry about that :< Pilots should be an easy fix. I did not think this mod would ever take off tbh...

Thanks to everyone for posting/supporting. I appreciate it. If you haven't edited the code yourself already, I will be posting an updated version soon.

I am currently pouring a little love into Degeneration.

Next is to fix the way pilots fly! If you can do this with the way AI drive I could only imagine what you could do with pilots in a CAS/transport mod. Its brilliant, if it hasn't been said enough.

Edit: TBH i think the infantry AI needs to learn to say away from a moving vehicle more so than you fixing the driving AI from running over people.

Share this post


Link to post
Share on other sites
I don't fully understand lazy evaluations, which is why I did the staggered if then statements.

Functionally it's the same to your if statement: If the code outside the braces is wrong (!kindOf Man) it ignores the inner scope. Only if it is true it evaluates the code inside the braces and if that code is true as well, it proceeds to the inner scope.

Perfomance-wise it might negligible but as you're dealing with AI every bit might count? I haven't run the perfomance function on it, might be interesting.

Share this post


Link to post
Share on other sites

Ooooo so tanks don't reverse ever?

Tank AI in this game is infuriating! Get into a tank as commander somewhere offroad and tell it to reverse. Most of the time it simply doesn´t work. Tank AI also doesn´t know that they should keep their front pointed towards their enemy, not the side or even the rear FPDR

Share this post


Link to post
Share on other sites

I'm SO excited by this mod.

I can't wait for it to be updated with the community's remarks.

In fact I can hardly believe that BIS left the AI with such bad driving skills.

Unless they meant to make the game more realistic...

After all, Stratis & Altis are in Greece ;)

Why do you think they have so many Kandylakia?

Share this post


Link to post
Share on other sites

Could it be that this also affects drones just like it affects helicopters?

Share this post


Link to post
Share on other sites
Could it be that this also affects drones just like it affects helicopters?

If there's no check to exclude specific (non-ground-bound) vehicles, then yes. Because in ARMA-verse even the tiniest drones have "human" pilots :D

Share this post


Link to post
Share on other sites
Tank AI in this game is infuriating! Get into a tank as commander somewhere offroad and tell it to reverse. Most of the time it simply doesn´t work. Tank AI also doesn´t know that they should keep their front pointed towards their enemy, not the side or even the rear FPDR

So true... Its always an adventure when tell the driver to drive back. Mostly the adventure ends with my death, AI didnt managed it to reverse for 30 seconds, seems legit!

Share this post


Link to post
Share on other sites

Pretty sure it may have been documented a few posts by now but while this mod appears to boost driving for vehicles, it totally borks aircraft that drive off before liftoff, like jets. I tested it earlier with having the AI try to get off of the runway, and every few meters the pilot would just stop. Turning off the mod instantly fixed it, so I think it's very likely pointed there.

Share this post


Link to post
Share on other sites
Pretty sure it may have been documented a few posts by now but while this mod appears to boost driving for vehicles, it totally borks aircraft that drive off before liftoff, like jets. I tested it earlier with having the AI try to get off of the runway, and every few meters the pilot would just stop. Turning off the mod instantly fixed it, so I think it's very likely pointed there.

Should be rather easy to fix, shouldn't it? Something right at the beginning like:

if (_unit isKindOf "aircraft") then exitWith {};

- or whatever the correct A3 config(s) are for planes, choppers, & drones.

Edited by Orcinus
Forgot parentheses :(

Share this post


Link to post
Share on other sites

UPDATE

VCOM_DRIVING V1.01

VCOM_DRIVING V1.01 Script Version

Hey guys - here is a small update for this mod, enjoy.

Patch Log:

Fixed Aircraft from executing the barrier checks
Made the barrier check calculation more precise - they should crash even less now.
Removed undefined variable errors (fingers crossed)
Optimized barrier check: 0.00698853 seconds to run down to 0.0019989 seconds. (Thanks Wolfenswan)

Share this post


Link to post
Share on other sites

i cant believe a modder fixed this. a whole company got owned by a modder LOL.

now i believe its a matter of time when modders fix the rest which BI cant fix :D

good job, BI should hire you !

Share this post


Link to post
Share on other sites
UPDATE

VCOM_DRIVING V1.01

VCOM_DRIVING V1.01 Script Version

Hey guys - here is a small update for this mod, enjoy.

Patch Log:

Fixed Aircraft from executing the barrier checks
Made the barrier check calculation more precise - they should crash even less now.
Removed undefined variable errors (fingers crossed)
Optimized barrier check: 0.00698853 seconds to run down to 0.0019989 seconds. (Thanks Wolfenswan)

Testing now mate. Good job !

Share this post


Link to post
Share on other sites
Guest

Updated version frontpaged on the Armaholic homepage.

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

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

This means soon 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

Is this going to work for all AIs, if I put the addon version on the server only? Or do clients need it, too?

Share this post


Link to post
Share on other sites
Tank AI in this game is infuriating! Get into a tank as commander somewhere offroad and tell it to reverse. Most of the time it simply doesn´t work. Tank AI also doesn´t know that they should keep their front pointed towards their enemy, not the side or even the rear FPDR

There is this little mod called Smarter Tanks that takes care of that problem.

Share this post


Link to post
Share on other sites

Going to do further testing today, but I have found that vehicles are still crashing into the side of structures. Also they prefer to not use the top bridge in Agia Marina but go into the river bed :(

Share this post


Link to post
Share on other sites
Going to do further testing today, but I have found that vehicles are still crashing into the side of structures. Also they prefer to not use the top bridge in Agia Marina but go into the river bed :(

Had that issue on the first release, hoping it will be resolved in a future release. No doubt in time it will, still love it though. Keeping an eye on this little beauty! :D

Share this post


Link to post
Share on other sites
There is this little mod called Smarter Tanks that takes care of that problem.

Sadly it seems to be broken since the last update....

Share this post


Link to post
Share on other sites
UPDATE

VCOM_DRIVING V1.01

VCOM_DRIVING V1.01 Script Version

Hey guys - here is a small update for this mod, enjoy.

Patch Log:

Fixed Aircraft from executing the barrier checks
Made the barrier check calculation more precise - they should crash even less now.
Removed undefined variable errors (fingers crossed)
Optimized barrier check: 0.00698853 seconds to run down to 0.0019989 seconds. (Thanks Wolfenswan)

Great, thank you :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×