SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-06-13, 06:25 PM   #1
DannikJerriko
Swabbie
 
Join Date: May 2012
Posts: 7
Downloads: 34
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
The compass won't pop-up. IIRC once you open it it will stay on screen until you click again on the heading bar
Guess i should try out the Enhanced Mode if i got the time. For now i'm happy that the game runs as expected. The Brits had a few days to recover since i wasn't on patrol. Time to even that out...
DannikJerriko is offline   Reply With Quote
Old 10-07-13, 04:40 AM   #2
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
Maybe you are right, but I am sure that there is a key combinaion to convert it into rudder



The compass won't pop-up. IIRC once you open it it will stay on screen until you click again on the heading bar
Shift + C will show the compass and hide it again. Right clicking it changes the looks to a secondary mode. Shift + C will hide again.
plj is offline   Reply With Quote
Old 10-07-13, 07:27 AM   #3
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,448
Downloads: 166
Uploads: 28


Default

Post a picture and all will become clear
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 10-07-13, 09:24 AM   #4
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by DannikJerriko View Post
The Brits had a few days to recover since i wasn't on patrol. Time to even that out...


I hope the OP won't mind your zeal...
gap is offline   Reply With Quote
Old 10-07-13, 04:11 PM   #5
tscharlii
Watch
 
Join Date: Dec 2011
Posts: 26
Downloads: 17
Uploads: 0
Default

I was trying to tell the sonarman to follow a contact. I went to the hydrophone station, moved the needle towards a reasonable close contact, but that deaf guy kept telling me, there is no near contact to follow.

I think, due to a small bug in TDC_NewUI (I use 7.1.0, but it's still present in 7.5.0 test version), the sonarman looks for the contact at bearing "sub heading plus hydrophone needle bearing" instead of just "hydrophone needle bearing". So it only works, if my sub's heading happens to be zero degrees.

After I changed the function HydrophoneFollowNearestContact in /data/Scripts/Stations/Hydrophone.py as follows, my follow contact orders are no longer ignored.

Code:
def getHydroBearing ( contact, sub ):
    contactbearing = sub.HeadingDEGToContact(contact) - sub.HeadingDEG
    while contactbearing > 360.0:
        contactbearing -= 360.0
    while contactbearing < 0.0:
        contactbearing += 360.0
    return contactbearing

# Modified by TheDarkWraith
def HydrophoneFollowNearestContact():
    if GetHydroFollowContact() != None:
        return
    hydroangle = Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.HYDROPHONE )
    sweeprange = GetHydroFollowNearestContactSweepRange()
    maxrange = GetHydroFollowNearestContactMaxRange()
    try:
        from PageDefaultHud import PageDefaultHud_MapGroup_Mapcontrol
        sub = PageDefaultHud_MapGroup_Mapcontrol.SubmarineContact
        contacts = PageDefaultHud_MapGroup_Mapcontrol.AllContacts
        hydrocontact = None
        for contact in contacts:
            if getHydroBearing( contact, sub ) >= ( hydroangle - sweeprange ) and getHydroBearing( contact, sub ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if getHydroBearing( contact, sub ) <= getHydroBearing( hydrocontact, sub ) and sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
        if hydrocontact == None:
            from PageDefaultHud import Game_NewPlayerLogMessageOutside
            Game_NewPlayerLogMessageOutside( [ Menu.GetLocalizedText( IDSTR_HydroFollowTargetNoNearContact ), False ] )
            return
        SetHydroFollowContact( hydrocontact )
        from Pageinterior import Pageinterior_Blocnotes_FollowTarget
        Pageinterior_Blocnotes_FollowTarget.SetCheck( True, False )
        from PageDefaultHud import Game_NewPlayerLogMessageOutside
        Game_NewPlayerLogMessageOutside( [ Menu.GetLocalizedText( IDSTR_HydroFollowTargetNearest ), False ] )
    except:
        pass
tscharlii is offline   Reply With Quote
Old 10-07-13, 04:33 PM   #6
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,448
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by tscharlii View Post
So it only works, if my sub's heading happens to be zero degrees.

After I changed the function HydrophoneFollowNearestContact in /data/Scripts/Stations/Hydrophone.py as follows, my follow contact orders are no longer ignored.
Good find
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 10-07-13, 04:41 PM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by tscharlii View Post
I think, due to a small bug in TDC_NewUI (I use 7.1.0, but it's still present in 7.5.0 test version), the sonarman looks for the contact at bearing "sub heading plus hydrophone needle bearing" instead of just "hydrophone needle bearing". So it only works, if my sub's heading happens to be zero degrees.
It could be, but it is strange that you are the first person noticing this bug. Have you enabled TDW's hydrophone patch? No one complained about the effectiveness of the hydrophone after its release.

No saying that your discovery is only junk: I am just try to understand
gap is offline   Reply With Quote
Old 10-07-13, 04:47 PM   #8
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Benno has no issues on my sub with following contacts, as long as they are within reasonable range and he reported them himself. I can spot contacts by hand much better then if I let him take care of it. I cant let him follow contacts that I pick out by hand.

I thought this was by design and due to him being a rookie, like me :p
plj is offline   Reply With Quote
Old 10-07-13, 05:56 PM   #9
tscharlii
Watch
 
Join Date: Dec 2011
Posts: 26
Downloads: 17
Uploads: 0
Default

Alright. Here are the steps to reproduce.

Mods:
Generic Mod Enabler - v2.6.0.157
[C:\Ubisoft\Silent Hunter 5\MODS]

NewUIs_TDC_7_1_0_ByTheDarkWraith
NewUIs_TDC_7_1_0_Real_Navigation
Manos Scopes-patch for 16x9

Also have the TDW hydrophone exe fixes activated.

1. Load up the historical mission TDW Torp Tutorial.
2. Make sure, your sub is NOT heading North. Turn to heading 320 degrees by making a 40 degrees turn to port/left.
3. The contact should be at around 106 degrees. Go to the sonarman, activate the hydrophone station and point the needle to 106 degrees.
4. Ask the sonar man to follow the selected target (see picture). He responds: "Sonarman: no near contact to follow"
5. You can, however, make him pick up the contact by pointing the needle to 66 degrees

The aforementioned changes to /data/Scripts/Stations/Hydrophone.py fix this issue.

tscharlii is offline   Reply With Quote
Old 10-09-13, 10:18 AM   #10
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by tscharlii View Post
I was trying to tell the sonarman to follow a contact. I went to the hydrophone station, moved the needle towards a reasonable close contact, but that deaf guy kept telling me, there is no near contact to follow.

I think, due to a small bug in TDC_NewUI (I use 7.1.0, but it's still present in 7.5.0 test version), the sonarman looks for the contact at bearing "sub heading plus hydrophone needle bearing" instead of just "hydrophone needle bearing". So it only works, if my sub's heading happens to be zero degrees.

After I changed the function HydrophoneFollowNearestContact in /data/Scripts/Stations/Hydrophone.py as follows, my follow contact orders are no longer ignored.

Code:
def getHydroBearing ( contact, sub ):
    contactbearing = sub.HeadingDEGToContact(contact) - sub.HeadingDEG
    while contactbearing > 360.0:
        contactbearing -= 360.0
    while contactbearing < 0.0:
        contactbearing += 360.0
    return contactbearing

# Modified by TheDarkWraith
def HydrophoneFollowNearestContact():
    if GetHydroFollowContact() != None:
        return
    hydroangle = Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.HYDROPHONE )
    sweeprange = GetHydroFollowNearestContactSweepRange()
    maxrange = GetHydroFollowNearestContactMaxRange()
    try:
        from PageDefaultHud import PageDefaultHud_MapGroup_Mapcontrol
        sub = PageDefaultHud_MapGroup_Mapcontrol.SubmarineContact
        contacts = PageDefaultHud_MapGroup_Mapcontrol.AllContacts
        hydrocontact = None
        for contact in contacts:
            if getHydroBearing( contact, sub ) >= ( hydroangle - sweeprange ) and getHydroBearing( contact, sub ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if getHydroBearing( contact, sub ) <= getHydroBearing( hydrocontact, sub ) and sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
        if hydrocontact == None:
            from PageDefaultHud import Game_NewPlayerLogMessageOutside
            Game_NewPlayerLogMessageOutside( [ Menu.GetLocalizedText( IDSTR_HydroFollowTargetNoNearContact ), False ] )
            return
        SetHydroFollowContact( hydrocontact )
        from Pageinterior import Pageinterior_Blocnotes_FollowTarget
        Pageinterior_Blocnotes_FollowTarget.SetCheck( True, False )
        from PageDefaultHud import Game_NewPlayerLogMessageOutside
        Game_NewPlayerLogMessageOutside( [ Menu.GetLocalizedText( IDSTR_HydroFollowTargetNearest ), False ] )
    except:
        pass
If I use that code, I get this message ...
Attached Images
File Type: jpg code error.jpg (49.3 KB, 10 views)

Last edited by plj; 10-09-13 at 02:50 PM.
plj is offline   Reply With Quote
Old 10-10-13, 05:46 AM   #11
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by tscharlii View Post
I was trying to tell the sonarman to follow a contact. I went to the hydrophone station, moved the needle towards a reasonable close contact, but that deaf guy kept telling me, there is no near contact to follow.

I think, due to a small bug in TDC_NewUI (I use 7.1.0, but it's still present in 7.5.0 test version), the sonarman looks for the contact at bearing "sub heading plus hydrophone needle bearing" instead of just "hydrophone needle bearing". So it only works, if my sub's heading happens to be zero degrees.

After I changed the function HydrophoneFollowNearestContact in /data/Scripts/Stations/Hydrophone.py as follows, my follow contact orders are no longer ignored.

Code:
code
So, I looked into this, and I think all is working as intended, and you just messed up the script there.

Define 'reasonable close' ?
Attached Images
File Type: jpg hydrofollowtargetmaxrange.jpg (90.3 KB, 27 views)
plj is offline   Reply With Quote
Reply

Tags
dbrn, favorite, new ui

Thread Tools
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:31 AM.


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