Jump to content
Sign in to follow this  
VictorFarbau

VFAI - AI Extension

Recommended Posts

Hello,

Quote[/b] ] refuse to stay in the building possition I order them to stay

Yes, that's inherent to the addon up until now. AI will search their surroundings and act accordingly. I will refine the addon in that respect.

Quote[/b] ]truck and they jumped right of it again

Now THAT should not happen, there's a mount detection and in my testing it worked. Whenever a unit is mounted the script will be paused. Will test.

Quote[/b] ]I got a "missing ;" error in second-suppression_1.sqs or somesuch.

Ehrm, wrong number smile_o.gif I don't have such a script in my addon. Sounds like a simple syntax error though.

Regards,

VictorFarbau

Share this post


Link to post
Share on other sites
Quote[/b] ]I got a "missing ;" error in second-suppression_1.sqs or somesuch.

Ehrm, wrong number smile_o.gif I don't have such a script in my addon. Sounds like a simple syntax error though.

Regards,

VictorFarbau

LOL yeah it does sound weird biggrin_o.gif but I suspected this addon as it appeared after adding only this addon. Here's what I found:

Change this line in the config in MY addon:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredAddons[] = {"Extended_Init_EventHandlers"};

to this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredAddons[] = {};

No error.

Likewise, if I take this line from YOUR config:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredAddons[] = {"Extended_Init_EventHandlers"};

and change it to this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">requiredAddons[] = {};

No error. Looking at other addons that use Extended_Init_EventHandlers, they don't have this value in that line. It's bizarre that this combination gives an error in 2ndSuppression addon, but there you go biggrin_o.gif

I think the problem is Extended_Init_EventHandlers, but until it's fixed I suggest removing the config reference from yours. There seems to be no ill effects without it, even though it kind of goes against normal addon dependency protocol. (I've removed it from mine.)

Share this post


Link to post
Share on other sites

What the heck - I was just about to release the final version and now this. But ok, if removing the required addons declaration doesn't break the functionality - fine with me.

Thanks,

VictorFarbau

Share this post


Link to post
Share on other sites
I got a "missing ;" error in second-suppression_1.sqs or somesuch.

This is due to adding two commands in the init line of the unit, separated by a ";", which is not present for Second suppression.

I added a ";" at the end of the init line for Second's Suppression config, and it solved the error.

I haven't checked arma.rpt, though...

Malick

Share this post


Link to post
Share on other sites

Addon updated to V1.3 - the (almost) final version. All details in 1st post as usual.

Revisions

=========

1.0 Initial release

1.1 Corrected MP bug, increased scan range, improved speed, added "Smokeshell" version

1.2 Included secondary weapons (M136, RPG, Stinger, Strela, Javelin)

1.3 Included pistols (M9 and Makarov class)

Resolved bugs

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

- Unit stays mounted in vehicles

- Units respects move and stop commands

Improvements:

===========

- AI script less aggressive and interfering

Share this post


Link to post
Share on other sites
Improvements:

===========

- AI script less aggressive and interfering

Yeah, excellent !

Does it mean you reduced the CPU load due to your script ?

Keep up your excellent work, I love it smile_o.gif

Malick

Share this post


Link to post
Share on other sites

Malick did you post the update? ie is the version 1.5 include this fix??

Share this post


Link to post
Share on other sites

great work! I am having a problem with adding a Javelin to some AT units, it seems they will drop the launcher and not bother with it. But with the original i had no problem with them.

Share this post


Link to post
Share on other sites

@Legislator: it is the same indeed, sorry for the confusion. I have updated the original post now in case anybody linked this for updates.

@snoops: Units will drop Equipment if no suitable ammo is found. It was an tough choice whether to implement this. I didn't want to see units running around with useless LAWs when no ammo is present. Rather steal a LAW or RPG including ammo from a unit when there's one present. I guess I will introduce paramters again to control some features of this extension.

Nonetheless I have seen equipment lying around in awkward places (including ammo). I suspect something is wrong with the human player detection - the script should not run at all but seems to malfunction at times. Will look into this.

Regards,

VictorFarbau

Share this post


Link to post
Share on other sites

hello, well it seems to only be the Javelin, and no matter how i add the weapon ie though config or init line the will always drop the launcher even when thry have ammo, other than that its great fun!

Ok if i switch to the unit that dropped the javelin and pick it up then the AI wont drop it again until a while after its been fired. All im trying to figure out is why it drops it immediately apon loading a mission?

Share this post


Link to post
Share on other sites

Yupp and except for the fact that the AI is quitting formation at every corpse they discover to pick up ammo although they have enough, it is really a great pleasure to use that script smile_o.gif It's great to see unarmed captives taking the weapons from their former guards inlove.gif

Share this post


Link to post
Share on other sites

2 bugs confirmed, thanks folks! Bug 1 causes a wrong ammo count when "Strela" is selected (hence dropping the weapon), bug 2 will prevent the unit from taking OPFOR RPGs. Both bugs will be corrected tomorrow, a new revision will be released and uploaded. Keep your eyes open, bug reports always welcome xmas_o.gif

Cheers,

VictorFarbau

Share this post


Link to post
Share on other sites

Hi. With the last two versions I see, in the beginning of a play, some units drop their weapons and remaining only with handguns.

This happen e.g. with MarpatMarines and LLWGuerrilla addons.

What's the problem?

Best regards

Share this post


Link to post
Share on other sites

The problem is this (quote readme):

Quote[/b] ]If the unit looses its weapon or does not find ammo in a given time the unit will focus on getting a new weapon as quick as possible. In that case the unit will drop the empty weapon.

Since 3rd party addons often add their own weapon and ammo class names Equipment.AI won't know about them, henceforward the units will drop these unknown weapons rightaway.

In theory there's no big issue adding custom class names to the script but I haven't spent time on running after all these. This is sth for the future.

Regards,

VictorFarbau

Share this post


Link to post
Share on other sites

Thanks for another update Victor smile_o.gif

I see a problem though that is still present. On an empty map, place two units, yourself and another. In preview, send that unit to a location. After getting there, he just turns around and comes straight back.

Share this post


Link to post
Share on other sites

Tested this addon for the first time, it's great.

But I can also conform the "soldier comes back" problem.

I'm sure you can fix it.

Thank you for this nice feature!

MfG Lee smile_o.gif

Share this post


Link to post
Share on other sites

Current bugs:

1. "Unit always returns" bug as described above

2. Units taking launcher weapons loosing their machine guns

Two things so far to fix for the next release.

Regards,

VictorFarbau

Share this post


Link to post
Share on other sites

Bugs resolved, updated to version 1.5. Details on the front page as usual. I hope I am approaching the final state with this update.

VictorFarbau

Share this post


Link to post
Share on other sites

Btw - I believe you still need to "stop" a unit if you want them to stay where they are. In case any order such as this is issued they will not move away.

This limitation is inherent to the whole addon logic; units will need to use time when no commands are issued to get equipment. After that they will "return to formation". This is a kind of tradeoff - if I wouldn't do so you would "lose" your units when moving. They would pick stuff here and there but stay there until you manually ask them to return to formation. This can get really ugly when you don't pay attention.

So the current behaviour is the best compromise I could find. If any orders are given they will be followed. But once locations are reached, equipment is needed and bodys are lying around you won't be able to stop'em, like little kids tounge2.gif

Next on the agenda is an improvement to detect foreign weapons and ammo (3rd party addons) and handle them correctly,

Cheers,

VictorFarbau

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
Sign in to follow this  

×