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-21-13, 08:39 AM   #10846
tscharlii
Watch
 
Join Date: Dec 2011
Posts: 26
Downloads: 17
Uploads: 0
Default

Quote:
Originally Posted by plj View Post
I can confirm the bugreport as a valid one. TDW used true bearing where he should have used relative bearing.
Good thing you asked in the other thread, how confident I am with the fix proposal. I looked at it again, and I think the code that selects the hydrophone contact to follow deserves even more reviewing.

TDWs original Code in HydrophoneFollowNearestContact(): (/data/Scripts/Stations/Hydrophone.py)
Code:
        for contact in contacts:
            if sub.HeadingDEGToContact( contact ) >= ( hydroangle - sweeprange ) and sub.HeadingDEGToContact( contact ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if sub.HeadingDEGToContact( contact ) <= sub.HeadingDEGToContact( hydrocontact ) and sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
In my opinion it should read (Be careful, if you copy paste from here, the indentation has to be done using tabs, not spaces. Python is quite picky about this. Better download the mod below):
Code:
        for contact in contacts:
            if TDWUtils.GetContactHeading( sub.HeadingDEGToContact( contact ) - sub.HeadingDEG ) >= ( hydroangle - sweeprange ) and TDWUtils.GetContactHeading( sub.HeadingDEGToContact( contact ) - sub.HeadingDEG ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
The semantics of this is: Follow the nearest contact within maxrange on hydrophone needle bearing plus-minus sweeprange

The change in the second line ensures the code deals with bearings relative to the sub's course instead of true, north-aligned bearings.
The change in the sixth line ommits a bogus if-condition. Why only select the nearest contact, if it also happens to be at a lesser bearing than other contacts in that area, and otherwise follow a contact further away. The command is called "Hydrophone follow nearest contact", after all.

This fix is available as a mod, activate it via JSGME after TDWs NewUIs:
http://www.deguero.de/jel/Hydrophone..._0_To_7_5_0.7z
tscharlii is offline   Reply With Quote
Old 10-21-13, 09:05 AM   #10847
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Much appreciated, will test and report back!
plj is offline   Reply With Quote
Old 10-21-13, 10:04 AM   #10848
V13dweller
Grey Wolf
 
Join Date: Dec 2012
Location: Perth, Western Australia
Posts: 768
Downloads: 101
Uploads: 2
Default

Quote:
Originally Posted by gap View Post
My data lines have been on the fritz due to what I think are site-works going on near by, but Western Australia is renowned for poor internet.

I was able to get a working version tonight though, thankfully.

I blame poor maintenance, I have heard reports of rotted wiring being changed in my area recently, so that could be the cause.
V13dweller is offline   Reply With Quote
Old 10-21-13, 10:11 AM   #10849
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by V13dweller View Post
My data lines have been on the fritz due to what I think are site-works going on near by, but Western Australia is renowned for poor internet.

I was able to get a working version tonight though, thankfully.

I blame poor maintenance, I have heard reports of rotted wiring being changed in my area recently, so that could be the cause.
Okay, what matters is that you have got back a working installation of the game
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 10-22-13, 11:43 PM   #10850
porabotitel
Bilge Rat
 
Join Date: Oct 2013
Posts: 1
Downloads: 11
Uploads: 0
Default

Is there a Russification of this mod?
porabotitel is offline   Reply With Quote
Old 10-23-13, 12:01 AM   #10851
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by porabotitel View Post
Is there a Russification of this mod?
Welcome aboard

You can find it inside the mod.. folder Text..
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 10-24-13, 05:03 AM   #10852
xSmithyx
Watch
 
Join Date: Mar 2013
Location: London, England.
Posts: 21
Downloads: 406
Uploads: 0
Default

Hi there,

Having an issue with the game/mod at the moment. Every time I go to load a save game or load a new game I get the following error:

Error PythonImportErrorException:
Cannot import name Game_NewPlayerLogMessageCSharp in Data/Scripts/Menu/TheDarkWraithUserOptions.py

Traceback:
File ScriptManagerWrapper , line unknown, in CheckForStartGame
File , line 0 , in <string> ##2181
File , line 0, in StartGame

Script disabled!

I have tried everything from reinstalling the game to the mods. I have ran the SHValidator tool too many times to count. Any advice would be MUCHO appreciated.
__________________
xSmithyx is offline   Reply With Quote
Old 10-24-13, 05:19 AM   #10853
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by xSmithyx View Post
Hi there,

Having an issue with the game/mod at the moment. Every time I go to load a save game or load a new game I get the following error:

Error PythonImportErrorException:
Cannot import name Game_NewPlayerLogMessageCSharp in Data/Scripts/Menu/TheDarkWraithUserOptions.py

Traceback:
File ScriptManagerWrapper , line unknown, in CheckForStartGame
File , line 0 , in <string> ##2181
File , line 0, in StartGame

Script disabled!

I have tried everything from reinstalling the game to the mods. I have ran the SHValidator tool too many times to count. Any advice would be MUCHO appreciated.
I had that as well . Reinstalling the game was the only thing that fixed it .
THE_MASK is offline   Reply With Quote
Old 10-24-13, 05:51 AM   #10854
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by xSmithyx View Post
Hi there,

Having an issue with the game/mod at the moment. Every time I go to load a save game or load a new game I get the following error:

Error PythonImportErrorException:
Cannot import name Game_NewPlayerLogMessageCSharp in Data/Scripts/Menu/TheDarkWraithUserOptions.py

Traceback:
File ScriptManagerWrapper , line unknown, in CheckForStartGame
File , line 0 , in <string> ##2181
File , line 0, in StartGame

Script disabled!

I have tried everything from reinstalling the game to the mods. I have ran the SHValidator tool too many times to count. Any advice would be MUCHO appreciated.
Try re-downloading NewUI's and using a fresh copy ... maybe it's corrupted.
plj is offline   Reply With Quote
Old 10-28-13, 04:51 PM   #10855
Oleander
Machinist's Mate
 
Join Date: Sep 2013
Posts: 126
Downloads: 475
Uploads: 0
Default

I'm getting that same error now, a new reinstall of SH5 didn't fix it.
Oleander is offline   Reply With Quote
Old 10-28-13, 07:44 PM   #10856
Oleander
Machinist's Mate
 
Join Date: Sep 2013
Posts: 126
Downloads: 475
Uploads: 0
Default

I went back and deleted everything, including stuff in My Documents, and then reinstalled and that seems to have worked. Any ideas on what causes the python error?
Oleander is offline   Reply With Quote
Old 10-28-13, 10:56 PM   #10857
Mikemike47
Grey Wolf
 
Join Date: Sep 2006
Location: NY
Posts: 994
Downloads: 1078
Uploads: 6
Default

Quote:
Originally Posted by Oleander View Post
I went back and deleted everything, including stuff in My Documents, and then reinstalled and that seems to have worked. Any ideas on what causes the python error?
Yes, JSGME leftovers. Click on my signature link Post #6, 8 talk about python errors. Post #3 has common JSGME problems and solutions.
Mikemike47 is offline   Reply With Quote
Old 10-30-13, 11:11 AM   #10858
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quick question!

Do people still get the "unit destroyed" radio messages from sunk ships and destroyed planes? For some reason I haven't seen them in my megamod testing... I have activated this feature from options editor, but still nothing. I'm using TDW's NewUI version 7.4.2.

Really need them back!
Rongel is offline   Reply With Quote
Old 11-02-13, 12:32 PM   #10859
vdr1981
Navy Seal
 
Join Date: May 2010
Location: Србија
Posts: 6,078
Downloads: 581
Uploads: 13


Default

Quote:
Originally Posted by Rongel View Post
Quick question!

Do people still get the "unit destroyed" radio messages from sunk ships and destroyed planes? For some reason I haven't seen them in my megamod testing... I have activated this feature from options editor, but still nothing. I'm using TDW's NewUI version 7.4.2.

Really need them back!
Did you try to set radioman intercept chance to 100% via options file editor? If your radioman can't intercept message even than, than something is wrong...

Just to confirm, electric engines on surface option is only available with v7.5.0, right ?
vdr1981 is offline   Reply With Quote
Old 11-02-13, 01:49 PM   #10860
Rongel
Grey Wolf
 
Join Date: Jan 2009
Location: Finland
Posts: 859
Downloads: 174
Uploads: 0
Default

Quote:
Originally Posted by vdr1981 View Post
Did you try to set radioman intercept chance to 100% via options file editor? If your radioman can't intercept message even than, than something is wrong...

Just to confirm, electric engines on surface option is only available with v7.5.0, right ?
Yes, I have the radioman intercepting messages at 100% but still nothing... Electric engines on surface is probably only in v.7.5. but still have it in the patcher, haven't activated it though. So is everything working for you?
Rongel is offline   Reply With Quote
Reply

Tags
dbrn, favorite, new ui


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:05 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.