Author Topic: AI priorities  (Read 1372 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
I asked about this in #scp, but seemed like nobody had a clue. This might need confirmation from the code, so I'm posting here.

Priorities from 90-100 are supposed to be reserved for player orders, highest priority in sexp or initial orders is 89. If you use priority of 89, how big of a chance there is for AI to use dynamic goals? None at all since there's no priority slot available for any, right? Does dynamic goals have a set priority, or do they use whatever room is left between 1-88? How many priority slots AI needs to use most of the dynamic goals there are, while still trying to carry out its orders set in initial orders or via sexp?

What I'm after is that I'd like to know for certain how exactly do dynamic goals work and what priority range fredders should use in orders if they want AI to properly react to aggressors.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Highest priority in SEXP or Ship/Wing Orders is actually 200 now as it was bumped a while back. Anything over 89 may indeed be the same priority as player orders. Setting something over 100 means that the AI won't be countermanded by player orders. Use this with care as nothing is more frustrating than having your wingmen ignore your orders only to get themselves all killed. :p

As for dynamic goals, Sushi and Wanderer have been further into that code than I have IIRC.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Fury

  • The Curmudgeon
  • 213
Wanderer seems to claim that priorities do not affect dynamic goals at all. So I guess some testing is in order whether this is true or not.

I've been wondering this quite a while now, but what does $AI Behavior do? The flag can be seen when you open a mission in text editor.

Edit: Seems like Wanderer was correct, priorities didn't affect how AI reacts to aggressors while under orders. :( What I found interesting is that bombers wouldn't even turn at aggressor and fire at it unless said bomber was fired upon by secondary weapons. Which makes me wonder all the more, under what conditions do which dynamic goal kick in?

Edit 2: Discussion in #scp
Code: [Select]
<Wanderer>: 1) if ship is not with dynamic orders (DO) then guard (acting as an escort?) mode is pointless
<Wanderer>: 2) if DO is not in use ship wont try to evade missiles
<Wanderer>: 3) if DO is on and big ship hits the big ship strafed/attacked (one of the things why bombers should not be with DO)
<Wanderer>: with 'not big ships' the action is determined from the current ai mode
<Fury`>: 3) doesn't make any sense no matter how many times I read it
<Wanderer>: 4) without DO ship wont try to go to evade mode after being hit
<Wanderer>: 3... say you have a bomber which is targeting a destroyer escorted by a cruiser... if a cruiser happens by some dumb luck hit the bomber the bomber (usually the whole damn wing) will select their the cruiser as their target and happily ignore the intended target
<Wanderer>: which is sorta annoying
<Fury`>: that's the thing really, 3) doesn't seem to happen anymore
<Wanderer>: ai will also try to recover from dynamic mode to previous mode should the previous mode be guard mode or evade weapon mode
<Wanderer>: 3) used to happen regardless of the DO.. now it requires DO to be allowed for it to happen
<Fury`>: They evade a bit, but that's it. They don't do sharp evasive maneuvers and rarely turn to attack their attacker
<Wanderer>: the code related to the AI_ACTIVE_GOAL_DYNAMIC and AIF_NO_DYNAMIC is several thousands of lines long.. its tad difficult go in the details
<Fury`>: one could imagine there would be a bit more aggressive behavior involved in dynamic goals if it is several thousand lines long >_>
<Wanderer>: there is.. but as said its at times handled case by case against current ai modes..
« Last Edit: December 03, 2009, 09:40:48 am by Fury »

  

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
I've also noticed that friendly A.I doing a waypoint will dodge and restart doing the waypoint if you fire at it with a secondary.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them