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 12-22-11, 09:52 AM   #1
Captain_AJ
Crusty
 
Join Date: Jun 2005
Location: USA
Posts: 648
Downloads: 334
Uploads: 0
Default SH5 patcher install?

Quote:
Originally Posted by TheDarkWraith View Post
I'm a little excited right now, no, I'm really excited! After months of searching and digging through the sh5.exe file I finally found the routine that controls the hydrophone's displaying of the contact. After some more time to partially figure out what the routine was doing (from viewing the assembly language via OllyDebug) I now have an alpha fix for the broken hydrophone station.
As you know the hydrophone station is basically useless in stock form because you get like 0.01 degrees of indicated range to 'find' your contact And when you do 'find' your contact you get maybe 1-3 seconds before it has changed in bearing and you lose it (no more indicated Unknown, Merchant, or Warship - just the -). What were the devs thinking
What I've done is enabled the window to go from 0.01 degrees for the contact to about 20 degrees of bearing (as indicated on the dial). Now the hydrophone station is a useful tool again
At the faintest sound of the contact the box above the hydrophone will now start displaying Merchant, Warship, or Unknown (It appears that sometimes the class of ship shown isn't correct - possibly due to this patch. I will continue looking into this but for now I'm happy to see SOMETHING pop up from the hydrophone even if it's incorrect than the fast blip of something you got with stock). As I continue to decipher the assembly and learn what it's exactly doing (this is very complicated and hard to do) I will update the patch accordingly.

As I dig deeper into this I hope to also fix the broken sound knob for the hydrophone station. This is another one of those what were the devs thinking??

The goal of these patches are:
- a quick and dirty way to get the hydrophone station working semi-correctly if not correctly
- reference new entries in menu.txt for warship, merchant, unknown, and submarine texts for the hydrophone box (this will allow users of real navigation to see what the contact is in the hydrophone box. Without this change you see nothing with real navigation!)
- be easy to implement (few byte changes)
- easy enough to do so that anyone can do it
These patches achieves all my goals mentioned above.

As I cannot release a modified SH5.exe file you have to patch your SH5.exe file yourself. This works only on unmodified, stock SH5.exe files!!


Link for app can be found at bottom of this post


v0.0.1: fixes broken hydrophone station
v0.0.2: references new entries in menu.txt for merchant, warship, submarine, and unknown texts for hydrophone box (for use with my real navigation add-on mod in UIs mod)
v0.0.3: user can define colors for: marks, ruler, compass, protractor, distance scales on Nav map and TAI map, and lattitude and longitude degrees on the sides and top and bottom of navigation map
v0.0.4: changes default volume of hydrophone station from 0.9 to 1.0 (10% increase in volume). This is still currently not able to be changed in-game

PATCHES ARE NOT CUMULATIVE! YOU APPLY THE PATCHES YOU WANT ENABLED. i.e.: if you want patch 1 and patch 2 then you need to apply both patches

For non-Steam versions of the SH5.exe:

How to patch your sh5.exe file for v0.0.1 (fixes broken hydrophone station):
- make a backup of your SH5.exe file
- open the SH5.exe file with a hex editor
- go to address 0x197A4A and change the byte from 75 to 74
- save the file
- run the game


How to patch your sh5.exe file for v0.0.2 (references new entries in menu.txt for merchant, warship, submarine, and unknown texts for hydrophone box [for use with my real navigation add-on mod in UIs mod]):
- make a backup of your sh5.exe file
- open the sh5.exe file with a hex editor
- go to address 0xA8C43 and change the byte from 34 to 3A
- go to address 0xA8C4F and change the byte from 35 to 3B
- go to address 0xA8C5B and change the byte from 36 to 3C
- save the file
NOTE: you must now edit your menu.txt file and add the following entries to it after entry 825 (comment out lines 820-825 by adding a leading ; if you don't want the tooltips for these to display on the nav map and TAI):
; sh5.exe patch by TDW - allows texts for units to display in hydrophone box when real navigation enabled
826=Unknown
827=Warship
828=Merchant
829=Submarine
NOTE2: the submarine text will not display for submarines (it will currently display warship IIRC).
- run the game


How to patch your sh5.exe file for v0.0.3 (can define colors for: marks, ruler, compass, protractor, distance scales on Nav map and TAI map, and lattitude and longitude degrees on the sides and top and bottom of navigation map):
NOTE: color is a hex color defined as AABBGGRR (when viewed in the hex editor) where AA = the alpha component, BB - the blue component, GG = the green component, and RR = the red component. Possible values for each is 0x00-0xFF.
NOTE2: stock values for the color (as seen in hex editor) are either 0xFF222222, 0x4B444444, 0xFE111188, or 0xEE000000
- make a backup of your sh5.exe file
- open the sh5.exe file with a hex editor
- go to address 0x2AE60 and change the 4 bytes to the color wanted for the TAI map distance scale
- go to address 0x2B369 and change the 4 bytes to the color wanted for the Navigation map distance scale
- go to address 0x30465 and change the 4 bytes to the color wanted for the longitude degrees located at top of nav map
- go to address 0x304C7 and change the 4 bytes to the color wanted for the longitude degrees located at bottom of nav map
- go to address 0x3060F and change the 4 bytes to the color wanted for the lattitude degrees located at left side of nav map
- go to address 0x30671 and change the 4 bytes to the color wanted for the lattitude degrees located at right side of nav map
- go to address 0x103F75 and change the 4 bytes to the color wanted. This color defines the color of all the instances of this tool when adding new instances of the tool. Makes these instances of these tools 'stand-out' compared to other tools
- go to address 0x103F95 and change the 4 bytes to the color wanted for the marks
- go to address 0x104489 and change the 4 bytes to the color wanted when placing a new mark
- go to address 0x104A84 and change the 4 bytes to the color wanted when placing new ruler line
- go to address 0x105095 and change the 4 bytes to the color wanted for the ruler
- go to address 0x1055FF and change the 4 bytes to the color wanted when placing new compass
- go to address 0x105945 and change the 4 bytes to the color wanted for the compass
- go to address 0x105DF5 and change the 4 bytes to the color wanted when placing new protractor
- go to address 0x1063E5 and change the 4 bytes to the color wanted for the protractor
- save the file
- run the game


How to patch your sh5.exe for v0.0.4 (change default hydrophone volume):
NOTE: stock value (as seen in hex editor) is 6666663F (which is 0.9)
- make a backup of your sh5.exe file
- open the sh5.exe file with a hex editor
- go to address 0x346690 and change the 4 bytes to the volume level wanted (0.0 to 1.0 where 0.0 is no volume, 1.0 is max volume)
- save the file
- run the game


For Steam versions of the SH5.exe:
Unable to provide solution to Steam users. The steam sh5.exe uses a form of self-modifying code copy protection that 'unpacks' the code when the executable is run. This form isn't impossible to read and decipher it just takes longer and quite frankly the reward to time relationship isn't worth it for me (not to mention that I can't run the .exe since I don't own the steam version of the game - I own the boxed version of the game). Sorry all. This is one reason why I never buy Steam based games unless I have to.


TheDarkWraith

The below screenshot will show you what patch v0.0.1 and v0.0.2 do. Notice the yellow arrows I drew on the hydrophone needle. This represents the range that the hydrophone box in the top left will show something for the ship class (the yellow circled):


The screenshot below will show you what you can do with patch v0.0.3. Notice that you can read the tools, the lattitude and longitude degrees, and the map scale much more easily now that you can set their colors!


There are still some colors I'm trying to track down....

SH5Patcher application written by moi:


Items in red text are double clickable. Thus if double clicked you active it. For the IsColor it will open a color dialog box allowing you to select the new color (and view the current color). The Enabled will either apply/remove the current Change x patch to the sh5.exe file.

SH5 Patcher v1.0.21.1 available here: http://www.gamefront.com/files/21015...r_1_0_21_1_zip

How to use the patcher app: http://www.subsim.com/radioroom/show...postcount=7773
CAn you tell me were to install this os it will work corectly .. II have done the sh5 exe paych all the way up yo version 3 , But would love the colored tolls and lines on the map since Iam a ojisan .. Old man that can see stuff to well thanks
__________________
Captain AJ

Captain_AJ is offline   Reply With Quote
Old 12-22-11, 03:37 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by kimuraijn View Post
CAn you tell me were to install this os it will work corectly .. II have done the sh5 exe paych all the way up yo version 3 , But would love the colored tolls and lines on the map since Iam a ojisan .. Old man that can see stuff to well thanks
Doesn't have to be installed anywhere in particular. Simply unzip and run the app. You'll have to point it to the patch file and your SH5.exe file
TheDarkWraith is offline   Reply With Quote
Old 01-31-12, 06:53 PM   #3
Michal788
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Is there any solution (hydro fix) for the steam users now?
The DRM is gone now in 2012.
  Reply With Quote
Old 01-31-12, 08:07 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Michal788 View Post
Is there any solution (hydro fix) for the steam users now?
The DRM is gone now in 2012.
The Steam version uses an 'unpacker' to unpack the exe because it has a form of self-modifying copy protection built into the exe. Not worth my time trying to figure it out. #1 reason I never buy Steam games
TheDarkWraith is offline   Reply With Quote
Old 02-16-12, 11:06 AM   #5
Charteris
Watch
 
Join Date: Feb 2012
Location: Oxford, UK
Posts: 16
Downloads: 25
Uploads: 0
Quote:
Originally Posted by TheDarkWraith View Post
Doesn't have to be installed anywhere in particular. Simply unzip and run the app. You'll have to point it to the patch file and your SH5.exe file
Hi TDW,

I hope this isn't a completely dumb question but I haven't seen a reference to it in the thread. The patcher...does it allow one to make the 01 02 03 assembly edits through its interface? Or do the edits have to be done in an editor...and the patcher is for something else?

Cheers,
Charteris
Charteris is offline   Reply With Quote
Old 02-16-12, 11:45 AM   #6
pedrobas
Seasoned Skipper
 
Join Date: Apr 2007
Location: Huelva, Spain
Posts: 664
Downloads: 301
Uploads: 0
Default

Quote:
Originally Posted by Charteris View Post
Hi TDW,

I hope this isn't a completely dumb question but I haven't seen a reference to it in the thread. The patcher...does it allow one to make the 01 02 03 assembly edits through its interface? Or do the edits have to be done in an editor...and the patcher is for something else?

Cheers,
Charteris
My goodness!!
Quote:
Originally Posted by TheDarkWraith View Post

SH5Patcher application written by moi:


Items in red text are double clickable. Thus if double clicked you active it. For the IsColor it will open a color dialog box allowing you to select the new color (and view the current color). The Enabled will either apply/remove the current Change x patch to the sh5.exe file.

SH5 Patcher v1.0.21.1 available here: http://www.gamefront.com/files/21015...r_1_0_21_1_zip

How to use the patcher app: http://www.subsim.com/radioroom/show...postcount=7773
pedrobas is offline   Reply With Quote
Old 02-17-12, 03:04 AM   #7
Charteris
Watch
 
Join Date: Feb 2012
Location: Oxford, UK
Posts: 16
Downloads: 25
Uploads: 0
Default

Ok, maybe that was too dumb to ask as it looks like it should do the business...but allow me that one!

Anyway, I used the patcher and it works beautifully. Godly thing to be able to do and thanks to TDW for all the many hours he must have toiled over this problem to make it work.

Cheers,
Charteris
Charteris is offline   Reply With Quote
Reply

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