Jump to content
Sign in to follow this  
bardosy

Suppression, inaccurate weapons

Recommended Posts

What I really like in Invasion1944 MOD is the suppression effect: if the enemy AI saw me (the player) they start to shoot at me, but their burst are not so deadly as in vanilla ArmA. I know, I know, it's an old problem, how could an ironsight AK-47 cause headshot from 300m in hand of AI.... but yes I start thinking it again:

Is it possible to change accuracy of weapons by script and not MOD?

The accuracy is from configs as far as I know, but is it possible to override it by scripts? Or it's impossible and I have to use inaccurate weapon MOD?

Share this post


Link to post
Share on other sites

Thank you guys for the answers!!! I will check both.

Share this post


Link to post
Share on other sites

Problem is, that setSkill options are not documented, but...

I like to test that things with remote control mode, where I'm looking through AI's eyes. This makes some things clear... and strange (shows, how in fact AI behaviour with firing itself during firefight can be unrealistic). For last test (on 1.62) used this mission:

Test

It is messy, sorry, but still can be handy. If you want to try, pay attention only on init.sqf for now.

Lines 27-29 will be changed during test. Also line 20, but later about that.

Try mission with current settings.

Now change aimingAccuracy to 0 and watch again. Similar? In my case - yes.

So let's go to the line 20. What is it? Some custom function, using fireAt, that makes AI far more aggresive with fire, than default behavior, that we just saw with all this not realisitic delayed fire (aim is good, but there is no fire long time).

Un-comment line 20. Set back aimingaccuracy to 1 and watch again. Difference in my case is huge, ammo consumption high, but AI is very accurate too.

So now lower accuracy to 0 again. And this way we have dense, very inaccurate fire. Even too much inaccurate, so perhaps 0.2-0.3 would be better. If you now will lower aimingshake to 0, you'll see funny weapon handling. I'm not quite sure, that set by aiming accuracy dispersion is somehow independent to the aim point marked by green mark. Do not saw any difference with aimingspeed change though.

There is also suppressFor command, but just tried and seems, that this makes nothing at all.

So for me only way to have inaccurate fire without modified weaponry is certain setSkill setting with forced via script fireAt command fire.

Frankly, IMHO, there is need for quite new and made with different approach firing behavior for AI, that is more similar to human firing behaviour in firefight situation. I doubt, if current code can be tuned/adapted for that. Not saw that code though, so there are only my suspitions. I know, that I'm not alone here, but in fact haven't much hope for such improvement.

Edited by Rydygier

Share this post


Link to post
Share on other sites

SuppressFor only works if the AI has a location or a target in theirs knowsabout, so it's only useful if you are scripting AI directly, since you need to get if the AI knows about an enemy before using it.

Share this post


Link to post
Share on other sites

Hi Bardosy

Robalo would be a good person to ask, he wrote the definitive addon for changing AI skills.

Cheers

Orc

PS thanks for the AFRF version of Pirog :D

PPS I believe I remember reading a post in the last few weeks that it isn't possible to change a config by scripting. OTOH, if so how would putting a cfgClass Patches in the mission (description.ext IIRC) work?

Edited by Orcinus

Share this post


Link to post
Share on other sites
Problem is, that setSkill options are not documented, but...

I like to test that things with remote control mode, where I'm looking through AI's eyes. This makes some things clear... and strange (shows, how in fact AI behaviour with firing itself during firefight can be unrealistic). For last test (on 1.62) used this mission:

Test

It is messy, sorry, but still can be handy. If you want to try, pay attention only on init.sqf for now.

Lines 27-29 will be changed during test. Also line 20, but later about that.

Try mission with current settings.

Now change aimingAccuracy to 0 and watch again. Similar? In my case - yes.

So let's go to the line 20. What is it? Some custom function, using fireAt, that makes AI far more aggresive with fire, than default behavior, that we just saw with all this not realisitic delayed fire (aim is good, but there is no fire long time).

Un-comment line 20. Set back aimingaccuracy to 1 and watch again. Difference in my case is huge, ammo consumption high, but AI is very accurate too.

So now lower accuracy to 0 again. And this way we have dense, very inaccurate fire. Even too much inaccurate, so perhaps 0.2-0.3 would be better. If you now will lower aimingshake to 0, you'll see funny weapon handling. I'm not quite sure, that set by aiming accuracy dispersion is somehow independent to the aim point marked by green mark. Do not saw any difference with aimingspeed change though.

There is also suppressFor command, but just tried and seems, that this makes nothing at all.

So for me only way to have inaccurate fire without modified weaponry is certain setSkill setting with forced via script fireAt command fire.

Frankly, IMHO, there is need for quite new and made with different approach firing behavior for AI, that is more similar to human firing behaviour in firefight situation. I doubt, if current code can be tuned/adapted for that. Not saw that code though, so there are only my suspitions. I know, that I'm not alone here, but in fact haven't much hope for such improvement.

I can't find the fireAt on line 20 or anywhere else in your scripts for this mission.

Does anyone have any info on the fireAt command?

Share this post


Link to post
Share on other sites

My mistake. This is about doFire, used in RI.sqf in line 536. In 20 line of init is called function, that uses it. But RI file is very messy.

Share this post


Link to post
Share on other sites

Thanks Rydygier, I should have noticed that.

Thanks for posting the example mission.

I agree, firefights could be simulated better. Maybe they will be in ARMA 3.

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  

×