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 08-11-06, 08:15 AM   #1
LoBlo
Subsim Diehard
 
Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
Default

Hi Luftwolf and Amizaur.

When playing through some self-made scenarios I've constantly noticed that subs are always avoiding torpedoes to the left and never right. I think its coded into their SubAvoidWep to evade left.

I've taken the liberty to randomize the torp evasion route a bit in the hope it provides less predictability.

Here are the changes that I've made to the SubAvoidWep Doctrine highlighted in orange. I think you'll like them.

__________________________________________________ ______________
; $Header: SubAvoidWeap.txt Thu Dec 30 16:55:05 EST 2004 mike $
; $Revision: 5 $
; $Copyrt1: Copyright (c) 2003, Sonalysts, Inc. All rights reserved. $
;
; SubAvoidWeap, modified by Amizaur, feet/meters miscalculation corrected
; AI behaviour when evading torpedo still needs improvements to avoid cavitation
; if torp below layer sub could run 5kts above layer and drop CMs, not run full speed cavitating
; Additional edits by LuftWolf, sub always drops active decoy and evades at 100-140 degrees
; Slight increase in recognition delay and decrease in max tgt evasion range
; Modded by LoBlo 8/6/2006 to randomize evasion routes a bit more.
var PreventingSnorkel
var PreventingComms
var LegTimer
var RecognitionDelay
var Snapshot
var LegCourse
var jammerIdx
var decoyIdx
var AvoidLeft
IF Init THEN {
PreventingSnorkel = false
PreventingComms = false
RecognitionDelay = ( Time + 15 + rnd 15 )
LegTimer = -1
Snapshot = false
jammerIdx = DBIdxFromRecNum 1414
decoyIdx = DBIdxFromRecNum 1412
If rnd 100 > 50 THEN {
AvoidLeft = True
DebugOut "Evading to the left"
} Else {
AvoidLeft = False
DebugOut "Evading to the right"
} ENDIF

} ELSEIF LegTimer == -1 THEN {
IF Time > RecognitionDelay THEN {
IF ( TgtRng < 12000 ) AND ( TgtSilos < 0 ) AND ( abs RelativeBearing TgtCrs ( TgtBrg + 180 mod 360 ) < 30 ) THEN {
DEBUGOUT "Sub Evading Torpedo!"
IF Not Snapshot THEN {
DEBUGOUT "Firing Back!"
FIREBEST
Snapshot = true
} ENDIF
IF NOT PreventingSnorkel THEN {
PreventingSnorkel = true
SetEntVar "TooBusyToSnorkel" ( GetEntVar "TooBusyToSnorkel" + 1 )
} ENDIF
IF NOT PreventingComms THEN {
PreventingComms = true
SetEntVar "TooBusyForComms" ( GetEntVar "TooBusyForComms" + 1 )
} ENDIF
LegTimer = ( 180 + RND 180 )
SetPriority 255
SetSpd MaxSpd
; LW Edit to 100 to 140
If AvoidLeft THEN {
LegCourse = ( TgtBrg + 100 + rnd 40 mod 360 )
} ELSE {
LegCourse = ( TgtBrg - 100 - rnd 40 mod 360 )
} ENDIF

; Set Depth Opposite Layer
IF TgtAlt < LAYER THEN {
SETALT ( -600 - RND 50 )
} ELSE {
SETALT ( LAYER - 400 )
; set depth to 400 ft below layer
} ENDIF
; Setalt ( ( MinAlt / 0.3048 ) + 100 )
; DebugOut "MinAlt + 100 feet set"
; Throw CM?
IF RND 10 > 0 THEN {
; Decoy or Jammer?
IF ( TgtSource $= "Active Intercept" ) OR ( rnd 100 > 65 ) THEN {
DEBUGOUT "CM Decoy"
CountermeasureIdx decoyIdx
} ELSE {
DEBUGOUT "CM Decoy II"
; LW always drop active CM
CountermeasureIdx decoyIdx
} ENDIF
} ELSE {
DEBUGOUT "Decoy failed random draw."
} ENDIF
LegTimer += Time
} ELSE {
IF PreventingSnorkel THEN {
PreventingSnorkel = false
SetEntVar "TooBusyToSnorkel" ( GetEntVar "TooBusyToSnorkel" - 1 )
} ENDIF
IF PreventingComms THEN {
PreventingComms = false
SetEntVar "TooBusyForComms" ( GetEntVar "TooBusyForComms" - 1 )
} ENDIF
} ENDIF
} ENDIF
} ELSEIF Time > LegTimer THEN {
LegTimer = -1
} ELSE {
SetPriority 255
SetCrs LegCourse
SetSpd MaxSpd
SETALT ( -600 - RND 50 )
} ENDIF
__________________________________________________ ________________

So far the initial test work great and subs avoid more unpredictably. In regards to surface avoidance, I've not run enough test to know if surface ships are also avoiding left as well. If so the above code may randomize there avoidance a bit as well.

Another approach rather than just avoiding left or right randomly is to code the subs to avoid in the direction that is most convient to where they are heading, though that makes weapon avoidance a little predictable...
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man

Last edited by LoBlo; 08-11-06 at 11:01 AM.
LoBlo is offline   Reply With Quote
Old 08-11-06, 07:05 PM   #2
TLAM Strike
Navy Seal
 
Join Date: Apr 2002
Location: Rochester, New York
Posts: 8,633
Downloads: 29
Uploads: 6


Default

LW I recomend looking at all the CIWS type guns and increasing the amount of rounds guideable or something. THey need to fire faster. Also Depth Charge launchers need looking at, they damage the launching ship. Sacramentos need 3 CH-46 Sea Knights. Natya (Russian) need RBUs (Once they work). Ivan Rugov need Elk Tail VDS. Thats all the problems I remember for now (Got a big list at home).
__________________


TLAM Strike is offline   Reply With Quote
Old 08-25-06, 06:16 AM   #3
Driftwood
Chief
 
Join Date: Apr 2004
Location: Western NC
Posts: 325
Downloads: 0
Uploads: 0
Default

Any updates on the status of Lwami 4.0?
__________________
Retired US Army Paratrooper
Virtual Sub Skipper
Driftwood is offline   Reply With Quote
Old 08-26-06, 09:54 PM   #4
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Regrettably, LWAMI 4.0 will not be released until SCS releases DW 1.04.

This is the case for a number of reasons, the most important of which is the complete lack of progress towards a new patch that addresses some important concerns that directly affect the mod.

No, this is not the same vaporware excuse used for DWX. LWAMI 4.00 will be released subsequent to a *successful* patching of DW.

Yes, I'm very dissappointed in the course DW development has gone.

I am going to release a patch for the most important issue in LWAMI 3.02, that is, the helo pinging under transit and acceleration related crashes following dipping.

Thanks guys. I wish things were better for us. DW is going to be around for a while, but I'm afraid that SCS's mismanagement or lack of attention or both has cost this community too much in terms of quality people who want to believe in what has been a fundamentally good product from 688i onward, but are given absolutely no reason to by the developers.

Cheers,
David
__________________
LW
LuftWolf is offline   Reply With Quote
Old 08-27-06, 07:18 AM   #5
goldorak
Admiral
 
Join Date: Apr 2005
Posts: 2,320
Downloads: 0
Uploads: 0
Default

Luftwolf,

I don't understand something.
You always said version 4.0 of lwami mod would come out when the official patch 1.04 by SCS was done.
So, what has happened in the meantime ?
Are SCS not developping anymore the 1.04 patch ?
And what do you consider a "succesful patch" ?
If 1.04 is not a succesful patch do we have to wait until maybe 1.05 to see your mod ?
Its all so disheartening.
goldorak is offline   Reply With Quote
Old 08-27-06, 02:38 PM   #6
Driftwood
Chief
 
Join Date: Apr 2004
Location: Western NC
Posts: 325
Downloads: 0
Uploads: 0
Default

Damn, this is NOT good news........ Without violating any NDA's can you give us any status as to the SCS 1.04 patch?
__________________
Retired US Army Paratrooper
Virtual Sub Skipper
Driftwood is offline   Reply With Quote
Old 08-27-06, 02:51 PM   #7
porphy
Commodore
 
Join Date: Nov 2002
Location: Sweden
Posts: 603
Downloads: 4
Uploads: 0
Default

Quote:
complete lack of progress
Seems to sum it up really. To bad, Luftwolf and Amizaur, your mod is what made Dw stay on my hdd. Hopefully things do change to the better and SCS get the 1.04 out.


Cheers Porphy
__________________
"The only remedy for madness is the innocence of facts."
O. Mirbeu

"A paranoid is simply someone in possession of all the facts."
W. B.
porphy is offline   Reply With Quote
Old 09-06-06, 10:02 AM   #8
Jamie
Sonalysts Inc.
 
Join Date: Jul 2002
Location: Middletown, CT (USA)
Posts: 204
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by LuftWolf
Thanks guys. I wish things were better for us. DW is going to be around for a while, but I'm afraid that SCS's mismanagement or lack of attention or both has cost this community too much in terms of quality people who want to believe in what has been a fundamentally good product from 688i onward, but are given absolutely no reason to by the developers.
Update on the SCS forums...
http://www.sonalystscombatsims.com/p...hp?p=5288#5288

Progress on patch v1.04 has not ceased, it is just moving at a snail's pace due to paying work from government customers. Take that as you will.

Thanks,
- Jamie
Jamie is offline   Reply With Quote
Old 09-07-06, 01:10 AM   #9
Bellman
Sea Lord
 
Join Date: Feb 2004
Posts: 1,945
Downloads: 220
Uploads: 0
Default

Was that a nod or a wink ?
__________________

Liberty, Equality, Fraternity
Bellman is offline   Reply With Quote
Old 09-07-06, 05:26 AM   #10
Molon Labe
Silent Hunter
 
Join Date: Jun 2004
Location: Along the Watchtower
Posts: 3,810
Downloads: 27
Uploads: 5
Default

More like a consoling pat on the back.
__________________
Molon Labe 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 09:46 PM.


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.