SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-02-06, 05:14 PM   #1
XabbaRus
Navy Seal
 
Join Date: Sep 2001
Posts: 5,330
Downloads: 5
Uploads: 0


Default

Good luck, hope you can figure this out. AI aircraft performance has always bugged me.
__________________
XabbaRus is offline   Reply With Quote
Old 06-02-06, 09:55 PM   #2
LoBlo
Subsim Diehard
 
Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
Default

EDIT: Corrections made
Ok, here's what I'm testing so far and its shown some marginal improvement over current behavior. First is a modification to the FighterEvade doctrine that will call upon a "AirIntercept" Doctrine when an enemy plane is detected.


Code:
 
; $Header: FighterEvade.txt   Wed Apr 23 16:04:39 EDT 2003    $
; $Revision: 1 $
; $Copyrt1: Copyright (c) 2003, Sonalysts, Inc.  All rights reserved. $
;
; FighterEvade
; LoBlo attempted Edits,June 2006
; attempting to script better anti-air behavior from interceptors to make them better protectors
; currently untested
; Set Tactic
IF NEWTRACK THEN {
 ; AAM or SAM Missile?
 IF TgtClass $= "MISSILE" AND ( TgtMissileClass "AAM" OR TgtMissileClass "SAM" ) THEN {
  SETTACTIC "AirEvadeMissile"
 } ENDIF
  ; Enemy fighter?
 IF TgtClass $= "AIR" AND ( TgtID $= "HOSTILE" OR ( TgtID $= "UAE" ) OR ( TgtID $= "UPD" ) ) THEN {
  SETTACTIC "AirIntercept"  
 } ENDIF
 ; SSM or ASM Missile?
 IF TgtClass $= "MISSILE" AND ( TgtMissileClass "ASM" OR TgtMissileClass "SSM" ) THEN {
  SETTACTIC "AirIntercept"
 } ENDIF
} ENDIF
The AirIntercept Doctrine is then called (if an enemy plane is detected) and hopefully the AirIntercept will act in the following ways
3. A intercept course to the enemy plane is plotted and engines are revs to 85% trottle.
4. When within attack range missiles are released
5. After missile release, a evasion route is plotted.

Code:
 
; By LoBlo, attempt to script better intercept and attack behavior from fighters
; Intercept incoming aircraft
IF NOT LostTrack THEN {
 IF TgtClass $= "AIR" AND ( TgtID $= "HOSTILE" OR ( TgtID $= "UAE" ) OR ( TgtID $= "UPD" ) ) THEN {
  SetSpd Maxspd / 1.15
  Intercept
  IF ( TgtRng <= AttackRng ) THEN {
   ATTACKBEST
  } ENDIF
 } ENDIF 
} ENDIF
; Evasion after firing
IF WeaponAway THEN {
 SteerAway
 SetSpd Maxspd / 1.1
  } ENDIF
That's the theory anyway, it accomplishes it with moderate consistency on the small scale battles that I've been testing, though there are some problems. The main one being that the evasion route after engaging the target, are not taken most of the time and the planes will still close on the target after their weapons have been released, where they should better evade to avoid return fire... WIP:hmm:

If anyone would like to give it a try themselves feedback would be appreciated.

lb
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man

Last edited by LoBlo; 06-03-06 at 07:30 AM.
LoBlo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.