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-01-06, 07:56 PM   #1
LoBlo
Subsim Diehard
 
Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
Default

EDIT: The doctrine below isn't working right yet. Don't use it yet.

Thanks for the tips. Yeah, I've noticed that sometimes fighters engage surface ships with HARMS and sometimes they don't. Sometimes they actively engage a target and sometimes they loiter. Its all really aimless without any discernable logic to why and when.

Thanks for the doctrine tips. I'm not really a programmer. How about this then, per your suggestions

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
 ; SSM or ASM Missile?
 IF TgtClass $= "MISSILE" AND ( TgtMissileClass "ASM" OR TgtMissileClass "SSM" ) THEN {
  ATTACKBEST
 } ENDIF
 
 ;What about enemy fighter response?
 IF TgtClass $= "AIR" AND ( TgtID $= "HOSTILE" OR ( TgtID $= "UAE" ) OR ( TgtID $= "UPD" ) ) THEN {
  Intercept
  IF (tgtrng <= AttackRng) THEN {
  ATTACKBEST
 } ENDIF
} ENDIF
Also...
Quote:
PPS I'd also use the default platform doctrine to reference a target doctrine for these features, and create a priority structure for all the commands
Is that a better method then just creating all behavior in one .txt file without SETTATICS?

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

Last edited by LoBlo; 06-01-06 at 08:21 PM.
LoBlo is offline   Reply With Quote
Old 06-01-06, 08:01 PM   #2
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

The problem is, if you don't use that method, than the all of the target referencing commands become non-functional or problematic, because the platform doctrine often can be refering to many different targets. In general, its best to only use the platform doctrine in DW to reference the NEWTRACK variable and then assign a target doctrine using some conditions to decide the appropriate assignment. Then, using the priority structure, you can allow the platform to intelligently manage multiple contacts.

So, in other words, you have to start over somewhat if you want it to work.

Also, make sure you watch your whitespace and spacing.

Cheers,
David
__________________
LW
LuftWolf is offline   Reply With Quote
Old 06-01-06, 08:16 PM   #3
LoBlo
Subsim Diehard
 
Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
Default

I'll see what I can come up with then. Definately WIP.

thx.
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man
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 12:34 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.