SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
Thread Tools | Search this Thread | Display Modes |
05-09-08, 05:38 AM | #1 |
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. |
05-09-08, 04:17 PM | #2 | |
Soundman
Join Date: Sep 2004
Location: Compartment № 5 /Silos/
Posts: 149
Downloads: 0
Uploads: 0
|
Quote:
__________________
-+= I the ocean hunter, and I am dangerous =+- *** Kalashnikov - the best *** |
|
05-11-08, 02:32 AM | #3 | |
Samurai Navy
Join Date: Sep 2006
Location: Germany
Posts: 597
Downloads: 36
Uploads: 0
|
[quote=GrayOwl]
Quote:
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. |
|
05-13-08, 03:22 PM | #4 | ||
Soundman
Join Date: Sep 2004
Location: Compartment № 5 /Silos/
Posts: 149
Downloads: 0
Uploads: 0
|
[quote=Hawk66]
Quote:
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 *** |
||
|
|