Jump to content
Sign in to follow this  
isemii

Set AI accuracy with a script or init command

Recommended Posts

Hello!

I'm currently working on an armoured mission with the WGL mod and I've noticed that the initial engagement is over in about thirty seconds as the rest of my tank troop knocks out each of the enemy vehicles with a single shot before I've even acquired a target. What I'm asking is if there is a script or init command that will reduce their pinpoint accuracy to something a bit less sniper-like. I found a few scripts by searching around but they were all for ARMA or ARMA 2, and the ones I tried didn't work, nor did the skill slider.

Thanks!

Share this post


Link to post
Share on other sites
Hello!

I'm currently working on an armoured mission with the WGL mod and I've noticed that the initial engagement is over in about thirty seconds as the rest of my tank troop knocks out each of the enemy vehicles with a single shot before I've even acquired a target. What I'm asking is if there is a script or init command that will reduce their pinpoint accuracy to something a bit less sniper-like. I found a few scripts by searching around but they were all for ARMA or ARMA 2, and the ones I tried didn't work, nor did the skill slider.

Thanks!

Hi,

I don't believe that is possible in OFP through use of a script. The term "Accuracy" in OFP is really the abililty to identify units, which could help slow things down. They won't fire unless a unit is indetified as enemy. This and other settings to reduce the AI ability can only be changed in the config.bin (cpp). The only thing you can change mission wise is the skill and rank of the units.

Private, skill .1 = dumb less reactive

Major, skill 1 = smart, reactive, evasive..etc.

Share this post


Link to post
Share on other sites

You could try it with a dispersion script, to fake some inaccuracy. I don't have any on my mind right now, but there was at least one, I remember.

Share this post


Link to post
Share on other sites

Hm, that's a bummer. I'll have a look for a dispersion script and see if that helps. Thanks!

Share this post


Link to post
Share on other sites

I can't remember all the implications on vehicles, but you could removeMagazine the Armour-Piercing ammunition from your tanks. Then they'd be forced to use High Explosive, and hopefully get fewer one-shot kills.

Share this post


Link to post
Share on other sites

Put this in the tank's init field:

this addEventHandler ["Fired", {_bullet = (nearestObject [(_this select 0), (_this select 4)]); _bullet setVelocity [(velocity _bullet select 0) + random 10 - random 10, (velocity _bullet select 1) + random 10 - random 10, (velocity _bullet select 2) + random 10 - random 10]}]

The bolded parts define the amount of dispersion; the higher the number, the more inaccurate they are. You can get the best results by playing around with it, but the value of 10 already gives them considerable dispersion. You can also use this for infantry if you're not using JAM HD for example.

Share this post


Link to post
Share on other sites
Put this in the tank's init field:

The bolded parts define the amount of dispersion; the higher the number, the more inaccurate they are. You can get the best results by playing around with it, but the value of 10 already gives them considerable dispersion. You can also use this for infantry if you're not using JAM HD for example.

Brilliant, cheers.

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  

×