Thread: DW Mod question
View Single Post
Old 06-10-14, 04:19 AM   #4
banryu79
Samurai Navy
 
Join Date: Feb 2014
Location: Italy
Posts: 554
Downloads: 82
Uploads: 2
Default

Quote:
Originally Posted by in_vino_vomitus View Post
Well - I used subguru's dipping sonar doctrine file and it's working like a charm now. There's no actual report from the chopper but the sub shows up as a green symbol, and if you click on it it gives the source of the info as link [helo ID] often you'll get a positive ID from the chopper even if you haven't got one from narrowband etc - and it seems like the MAD is modelled too. My chopper flew over at 200 or so feet and instantly the sub he was searching for was ID'd. Happy days - It makes a huge difference.
I stil can't understand if it is a bug in the LWAMI doctrine file or not, but I'm happy you found a solution.

Out of curiosity, I downloaded the doctrine file from subguru to see for myself the difference with the relevant doctrine file of LWAMI.
I have highlithed the parts missing from the Subguru doctrine file...

HeloDipping.txt -- LWAMI
Code:
...
; Assign Dipping Tactic
IF NEWTRACK THEN {
    ; Sub?
    IF ( TgtClass $= "SUB" ) AND ( ( TgtSource $= "MAD" ) OR ( TgtSource $= "Visual" ) ) THEN {
        SETTACTIC "MadDrop"
    } ELSEIF ( TgtClass $= "SUB" ) AND NOT ( ORDER $= "TRANSIT" ) THEN {
        DEBUGOUT "Assigning Dipping Tactic\n"
        TACTICCENTER
        SETTACTIC "DippingSonar"
        Enable
        SensorEnable "AI Dip Active" OFF
        SensorEnable "AI Dip PassiveS" OFF
        SensorEnable "AI Dip PassiveD" OFF
        Pinging = 0
        WaypointReached = 0
        DipTimer = -1
        TargetCount += 1
    } ENDIF
...
HeloDipping.txt -- Subguru
Code:
...
; Assign Dipping Tactic
IF NEWTRACK THEN {
    ; Sub?
;    IF ( TgtClass $= "SUB" AND ( ORDER $= "SEARCH" ) ) THEN {
    IF ( TgtClass $= "SUB" AND NOT ( ORDER $= "TRANSIT" ) ) THEN {
        DEBUGOUT "Assigning Dipping Tactic\n"

        TACTICCENTER
        SETTACTIC "DippingSonar"
        Enable
        ; SensorEnable "Active Sonar" OFF
        Pinging = 0
        WaypointReached = 0
        DipTimer = -1
        TargetCount += 1
    } ENDIF
...
I wonder if somebody here on the DW section of the forum, that knows about the doctrine file scripts and/or the LWAMI doctrine file, could rule out if in fact the LWAMI HeloDipping.txt snippet posted above contains a bug?

It looks like that, for some reason, the Subguru version commented out the use of the "SetSensorEnable" fuction:
 

Code:
; Search only
IF ( NOT TargetCount AND NOT ( ORDER $= "Transit" ) ) THEN {
    ; Dip
    IF WaypointReached THEN {
        ; game has just clued us we've reached a waypoint
        DEBUGOUT "Starting Search Dip"
        SETPRIORITY 249
        SETPERSIST 90
        SETSPD 0
        SETALT 45
        Pinging = 0
        WaypointReached = 0
        Dipping = True
    } ENDIF

    ; Start pinging
    IF ( NOT Pinging AND Dipping AND ( OwnAlt < 50 ) ) THEN {
        DEBUGOUT "Starting Dip Timer"
        SETPRIORITY 249
        SETPERSIST 90
        SETSPD 0
        SETALT 45
        SensorEnable "AI Dip Active" ON
        SensorEnable "AI Dip PassiveS" ON
        SensorEnable "AI Dip PassiveD" ON
        Pinging = 1
        DipTimer = ( TIME + 90 )
    } ENDIF

    ; Stop Dip
    IF ( DipTimer != -1 AND ( TIME > DipTimer ) ) THEN {
        DEBUGOUT "Stopping Search Dip"
        SETPRIORITY 249
        SETSPD MAXSPD
        SETALT 300
        SensorEnable "AI Dip Active" OFF
        SensorEnable "AI Dip PassiveS" OFF
        SensorEnable "AI Dip PassiveD" OFF
        Pinging = 0
        DipTimer = -1
        Dipping = False
    } ENDIF

} ENDIF

 

Code:
; Search only
IF ( NOT TargetCount AND NOT ( ORDER $= "Transit" ) ) THEN {
    ; Dip
    IF WaypointReached THEN {
        ; game has just clued us we've reached a waypoint
        DEBUGOUT "Starting Search Dip"
        SETPRIORITY 249
        SETPERSIST 180
        SETSPD 0
        SETALT 45
        Pinging = 0
        WaypointReached = 0
        Dipping = True
    } ENDIF

    ; Start pinging
    IF ( NOT Pinging AND Dipping AND ( OwnAlt < 50 ) ) THEN {
        DEBUGOUT "Starting Dip Timer"
        SETPRIORITY 249
        SETPERSIST 180
        SETSPD 0
        SETALT 45
        ; SensorEnable "Active Sonar" ON
        Pinging = 1
        DipTimer = ( TIME + 180 )
    } ENDIF

    ; Stop Dip
    IF ( DipTimer != -1 AND ( TIME > DipTimer ) ) THEN {
        DEBUGOUT "Stopping Search Dip"
        SETPRIORITY 249
        SetSpd MAXSPD
        SETALT 300
        ; SensorEnable "Active Sonar" OFF
        Pinging = 0
        DipTimer = -1
        Dipping = False
    } ENDIF

 } ENDIF

Last edited by banryu79; 06-10-14 at 04:29 AM.
banryu79 is offline   Reply With Quote