Author Topic: AI weapon selection  (Read 1129 times)

0 Members and 1 Guest are viewing this topic.

Offline yomi

  • 25
I gave AI player 2 primary weapons. First is very weak but have 2000 range. Second is strong but its range is only 300. Now AI player will always try get to close range to fire with stronger weapon, and will never use first one.

Is it possible for AI to chose which primary weapon basing on range?
For example, it would use long range weapon  while approaching to target, and than stronger, while in range.
I tried using "smart primary weapon selection", but apparently it doesn't work that way(i really dunno, what it does).

 

Offline Kobrar44

  • On Suspended Sentence
  • 29
  • Let me tilerape it for you!
    • Steam
It is possible to set AI wepons via sexps at certain range, but I duuno if it is doable other way.
Oh guys, use that [ url ][ img ][ /img ][ /url ] :/

 

Offline Fury

  • The Curmudgeon
  • 213
AFAIK AI will try to pick the weapon that potentially does most damage to current target. If target has shields, it picks up the weapon with most shield damage. If no shields, it uses the weapon with most hull damage. I believe AI won't take into account weapon's range and velocity, just pure damage. I'm not even entirely sure if AI takes rate of fire into account when determining weapon damage.

In addition what Kobrar44 said, there is a sexp called good-secondary-time which instructs AI to use specific secondary weapon, I don't know if there is one for primaries yet. Can't check either as I don't have FSO installed.