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 05-09-08, 05:38 AM   #1
Hawk66
Samurai Navy
 
Join Date: Sep 2006
Location: Germany
Posts: 597
Downloads: 36
Uploads: 0
Doctrine: AI-Sub / SAM

Hi,

has anybody tried to alter the doctrine for SAM-equipped ( maybe with change of the DB) subs so that they can fire SAMs?

Or does the NavalSimEngine prevent this?

Thanks.
Hawk66 is offline   Reply With Quote
Old 05-09-08, 04:17 PM   #2
GrayOwl
Soundman
 
Join Date: Sep 2004
Location: Compartment № 5 /Silos/
Posts: 149
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Hawk66
Hi,

has anybody tried to alter the doctrine for SAM-equipped ( maybe with change of the DB) subs so that they can fire SAMs?

Or does the NavalSimEngine prevent this?

Thanks.
When the aircraft is found out, the doctrine SubAvoidAir orders AI Sub to be dive deep. On shallow water, if it will impossible to dive a AI Sub shoot SAM missile. Change the doctrine. In her there is a mistake - such variable as "FRIENDLY" no. Correctly - $= "FRIEND".
__________________
-+= I the ocean hunter, and I am dangerous =+-
*** Kalashnikov - the best ***
GrayOwl is offline   Reply With Quote
Old 05-11-08, 02:32 AM   #3
Hawk66
Samurai Navy
 
Join Date: Sep 2006
Location: Germany
Posts: 597
Downloads: 36
Uploads: 0
Default

[quote=GrayOwl]
Quote:
Originally Posted by Hawk66
Hi,

When the aircraft is found out, the doctrine SubAvoidAir orders AI Sub to be dive deep. On shallow water, if it will impossible to dive a AI Sub shoot SAM missile. Change the doctrine. In her there is a mistake - such variable as "FRIENDLY" no. Correctly - $= "FRIEND".
Thanks GrayOwl.
I've started to change the doctrine.

Actually, it seems possible...AI sub fires SAM but it never hits, but probably due to insufficient targeting.

When I have one first working version I'll post it here.
Hawk66 is offline   Reply With Quote
Old 05-13-08, 03:22 PM   #4
GrayOwl
Soundman
 
Join Date: Sep 2004
Location: Compartment № 5 /Silos/
Posts: 149
Downloads: 0
Uploads: 0
Default

[quote=Hawk66]
Quote:
Originally Posted by GrayOwl
Quote:
Originally Posted by Hawk66
Hi,

When the aircraft is found out, the doctrine SubAvoidAir orders AI Sub to be dive deep. On shallow water, if it will impossible to dive a AI Sub shoot SAM missile. Change the doctrine. In her there is a mistake - such variable as "FRIENDLY" no. Correctly - $= "FRIEND".
Thanks GrayOwl.
I've started to change the doctrine.

Actually, it seems possible...AI sub fires SAM but it never hits, but probably due to insufficient targeting.

When I have one first working version I'll post it here.


True So For SubAvoidAir:

; ---------------------------------------------------------------
var Unknown
var PreventingSnorkel
var PreventingComms
var LegTimer
VAR TEMP
var TC
var MaxFiringRng
var TypSub
var ShotOK
var SolFire
var Dive
var DepthAirAtk
var MaxDpt
func AvoidTgt {
IF TIME > LegTimer AND ( TgtRng < 11112 ) THEN {
DEBUGOUT "Sub Avoiding Air"
LegTimer = ( 900 + RND 900 )
SetPersist LegTimer
SetPriority 255
SetAlt MaxDpt
If ( MaxDpt <= TerrainAlt ) Then {
MaxDpt = TerrainAlt + 30 } Endif
SteerEvasive
LegTimer += TIME
IF ( OwnSpd < LoiterSpd ) THEN {
SetPersist LegTimer
SetPriority 255
SetSpd LoiterSpd
} ENDIF
} ENDIF
}
IF Init THEN {
TypSub = GetEntVar "TypSub" ; Subs With Portable SAM
MaxFiringRng = ATTACKRNG
MaxDpt = ( MinAlt * 3.28 )
DepthAirAtk = ( PeriDepth - 35 )
Unknown = true
PreventingSnorkel = true
PreventingComms = true
TEMP = GetEntVar "TooBusyForComms"
SetEntVar "TooBusyForComms" ( TEMP + 1 )
TEMP = GetEntVar "TooBusyToSnorkel"
SetEntVar "TooBusyToSnorkel" ( TEMP + 1 )
} ELSE {
IF TgtID $= "HOSTILE" THEN {
IF Unknown THEN {
TC = 1
Unknown = false
} ENDIF
} ELSE {
IF TgtID $= "NEUTRAL" THEN {
IF Unknown THEN {
Unknown = false
PreventingSnorkel = false
PreventingComms = false
TEMP = GetEntVar "TooBusyForComms"
SetEntVar "TooBusyForComms" ( TEMP - 1 )
TEMP = GetEntVar "TooBusyToSnorkel"
SetEntVar "TooBusyToSnorkel" ( TEMP - 1 )
AvoidTgt
} ENDIF
} ENDIF
} ENDIF
} ENDIF
If TC And Not ShotOK Then {
If TypSub == 8 Then {
If TgtSilos < 0 Then {
If ( ( OwnAlt >= DepthAirAtk ) AND ( TgtRng < ( MaxFiringRng + 3000 ) ) ) Then {
SolFire = 1
SetPriority 255
FIREBEST
} ENDIF
} ENDIF
} ENDIF
IF Not SolFire Then {
DEBUGOUT "Not Air Attack Conditions"
Dive = 1
} ENDIF
} ENDIF
IF ( ( WeaponAway ) And ( Not ShotOk ) ) Or Dive Then {
DEBUGOUT "Dive"
AvoidTgt
ShotOk = 1
Dive = 0
Setpersist ( 120 + ( RND 120 ) )
SetPriority 242
SetSpd OwnSpd
IF ( OwnAlt > -2 ) Then {
DEBUGOUT "Emergency Dive"
SetPersist 120
SetPriority 255
SetAlt MaxDpt
Setpersist ( 120 + ( RND 120 ) )
SetPriority 255
SetSpd MaxSpd
} ENDIF
} ENDIF

; -------------------------------------------------------------

__________________
-+= I the ocean hunter, and I am dangerous =+-
*** Kalashnikov - the best ***
GrayOwl is offline   Reply With Quote
Reply


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 10:37 AM.


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