AI firing accuracy

Place to get help with not working mods / modding interface.
Post Reply
Mr.YaR
Inserter
Inserter
Posts: 26
Joined: Fri Jan 22, 2016 9:17 am
Contact:

AI firing accuracy

Post by Mr.YaR »

Hello ‡]

Reconfigured some shells to have low accuracy and when i fire myself the vehicule - it works, but when the AI fires the shell tends to follow it's target as if it was self-guided...

Not sure, but seems when the AI fires at buildings[less sure about static biters] - it starts to miss[normal behavior].

I'm using AAI, maybe AAI code does something with accuracy? Didn' find myself tho


Thanks for your attention!

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: AI firing accuracy

Post by Adil »

Game AI for turrets and units, which AAI utilizes, does not allow for misses. That is hardcoded part of the game. At least that was the case some time back. Flamethrower turrets don't seem to follow those limitations, but I don't remember devs saying anything about that changing.

AAI implements automotive vehicles as as units and turrets, generating needed entities during the data loading stage. If there is anything to fix, that won't be a simple fix, you'd have to know, what exactly is the generation script doing.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Mr.YaR
Inserter
Inserter
Posts: 26
Joined: Fri Jan 22, 2016 9:17 am
Contact:

Re: AI firing accuracy

Post by Mr.YaR »

Oh, hardcode - this bad word((

There is the Rempant mod that made flamethrower based projectiles. Works well(some hours in MP).
But it's far from being noob friendly code wise)

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: AI firing accuracy

Post by Ranakastrasz »

grenade or shotgun can miss and dont home. Shotgun needs collision sata and grenade uses aoe on point.

Its possible but not worth the effort.


Rampant probably uses grenade mechanics from what ive seen. It doesnt lead the target after all.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Mr.YaR
Inserter
Inserter
Posts: 26
Joined: Fri Jan 22, 2016 9:17 am
Contact:

Re: AI firing accuracy

Post by Mr.YaR »

Played today usig the shells i remade and was surprised to see(will test that in test mode to be sure 100%)
a mg turret miss... AAI tanks fired projectiles are still homing.

The ammo is redone this way(shells and bullets)
- target type: position
- projectile: bullet (custom one)

- no collision = no friendly fire (0.0000somthething1)
- Area damage instead of target applied (1.3-1.6 area and the vanilla damage inserted)

Didn't test ureet with the modified ammo as most of changes done are vehicule oriented.

PS: and when it missed it wasn't only visual - looked at the damage where it was applied (was during combat involving 10s of entities and the turret was alone - testing will show)

Mr.YaR
Inserter
Inserter
Posts: 26
Joined: Fri Jan 22, 2016 9:17 am
Contact:

Re: AI firing accuracy

Post by Mr.YaR »

Pardons for double posting - confirmed MG turrets and Cannon turrets(VTK cannon turret mod with custom ammo) don't home!

Trying to understand how AAI interacts with aiming to disable the "homing" =) Any help would be awesome!

Post Reply

Return to “Modding help”