![]() |
SUBSIM: The Web's #1 BBS for all submarine and naval simulations! |
03-16-2011, 11:03 PM
|
#1 |
|
Black Magic
![]() |
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. 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 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 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 some of the patches can 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). 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.... Generic patcher 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. starting with v1.0.22.0 adds support for fixing broken magnetic detonator and sub hull not taking damage. This change resides in it's own patch file (there are now 2 patch files included - one for SH5.exe and one for shcollisions.act) starting with v1.0.24.0 adds support for fixing CO2 bug. This change resides in 2 patch files - one for SH5 and one for SHSim. You have to enable both patches! starting with v1.0.27.0 adds support for magnetic detonator range defects starting with v1.0.37.0 adds support for sub on the bottom starting with v1.0.39.0 adds support for automatic closing/opening of sub's internal compartment doors when battlestations ability (key F7) is enabled/disabled - Note: There are 2 doors I haven't got working correctly yet but all the others work excellent. This version will also increase the file size of sh5.exe in order to accomodate needed code and future code starting with v1.0.43.0 removed sub on bottom patch until I can figure out why it causes slowdowns for some users. Added a new patch - Crew wakeup - that 'wakes up' the crew and makes them do their job (contact spotting/reporting) starting with v1.0.44.0 added patch that fixes the CTD in single missions that happens after some period of time. Revised the Crew wakeup patch. Remove the hydrophone volume patch. starting with v1.0.45.0 removed patch for CTD in single missions. Updated Crew wakeup patch to work in campaigns. starting with v1.0.46.0 crew will detect radar signals with crew wakeup patch starting with v1.0.47.0 a new version of sub on bottom patch is included (old one was removed in previous version). A new patch called Collateral Damage was added that adds the possibility of collateral damage to other zones (boxes) when a unit experiences a collision with something. Current % chance is set at 10%. starting with v1.0.48.0 a new patch for SHCollisions was made. This patch reduces the AP of the zone (box) when it receives damage. starting with v1.0.49.0 add a new patch for SH5.exe: ability to exclude certain items from ever being rendered in the game starting with v1.0.51.0 add a new patch for SH5.exe: ability to run decks awash (~7.5m) with crew on deck and using diesel engines starting with v1.0.52.0 added a new patch for SHCollisions.act: Crew AI Damage Control starting with v1.0.54.0 added a new patch for SH5.exe: No crew spotting when submerged. Revised sub on bottom patch starting with v1.0.55.0 revised the CO2 patch for SH5.exe. Now it ensures that CO2 is 0% when surfaced starting with v1.0.60.0 the patcher app itself has been revised to be more powerful and easier to use. Some of the patches were revised (code wise) starting with v1.0.62.0 added a fix for the error some users were getting when the app started. Now instead of throwing the error the app will disable the pretty icons used in the treeview. Error checking added for Updates to ensure no updates are defined for new sections. Added a new entry for Updates - Editable. If set to 1 then user is allowed to enable/disable (if ShowInUpdates=1) starting with v1.0.63.0 fixed problem some users were having when the patcher tried to apply updates starting with v1.0.64.0 added a new patch for SHSim and SH5: independent engine controls starting with v1.0.65.0 added a new command to the independent engine controls that let's the user select both shafts starting with v1.0.66.0 revised the independent engine controls patch. The bug of selecting new speed (not throttle) overriding the patch and selecting new throttle from keyboard (1,2,3, etc.) overriding the patch has been fixed starting with v1.0.67.0 added more icons to the app. These icons are for when not all changes of a patch are enabled. Added a new entry to each patch: AllChangesRequired (this entry will control which icon shows when not all changes are enabled) starting with v1.0.68.0 added a new patch to SH5.exe: there is a 10% chance that Bdu will vector subs (up to 4) to your position when you send in a contact report starting with v1.0.69.0 revised the Contact reports wolfpack patch starting with v1.0.70.0 revised the Contact reports wolfpack patch. When Bdu responds back it now uses the radio message window instead of the messagebox. There are 3 possible responses that Bdu can send back. Now using the game's function to determine if able to receive radio messages or not. starting with v1.0.72.0 revised the Contact reports wolfpack patch. Now when the dispatched subs spawn they will send a radio message to you. There are 5 possible responses. Bdu also has 5 possible responses. starting with v1.0.73.0 revised the Contact reports wolfpack patch. If Bdu can't dispatch subs to you they will send you a radio message (could take up to an hour to receive). Any unit sending out a radio message is checked to see if it's able to send out a radio message (currently only it's depth is checked to see if it's less than max depth game has for sending/receiving radio messages). Revised some code to prevent possible CTD. v1.0.74.0 fixes bug of two patches in SHSim.exe having the same change starting with v1.0.75.0 added a new patch to the SH5.exe that allows the camera on next and previous unit to be able to select air and land units. You also have the ability to select lifeboats starting with v1.0.76.0 added new patches to the SH5.exe that will disable the Orbit Listener and disable intro movies. There is also a new patch for the SH_NClient.dll that will disable the Orbit Listener completely. By enabling all patches related to Orbit Listener the game will no longer synch save games, no more CTDs because it couldn't reach the client, and the game will not quit because of any problems with Orbit Listener. starting with v1.0.78.0 added new patches to the SH5.exe that enable user to select color of the calculated torpedo impact time and added lots of new render patches (disable longitude lines, disable lattitude lines, disable view cone, disable torpedo line, disable torpedo line numbers, disable rendering of units (except player's sub) when at high zoom levels, disable rendering of units (except player's sub) when at low zoom levels, disable rendering of player's sub at high zoom levels and disable rendering of unit detection circles). All these new disables can be found under the Render patches. These new disables will override any game settings. Starting with v1.0.79.0 added two new patches to the SH5.exe: broken stadimeter fix and a patch that fixes the problem of the TDC AOB and Speed dials resetting when TDC is on and stadimeter is used Starting with v1.0.80.0 added a new patch to SHSim.act: AI subs no longer cause your crew to speak and or place messages in the messagebox when they are diving and/or recharging batteries Starting with v1.0.81.0 revised the SHCollisions AI Crew Damage Control patch. The patch now takes crew veterancy level, unit's HPs ratio, and unit's type into consideration. Most effects will stop when crew fixes damage to the zone (box) . I'm still looking for a few controllers so that I can stop them all.Starting with v1.0.83.0 added more support code to each patch file. Also added new torpedo failures to the SHSim.act file. Fixed bug in sh5.exe when writing DestroyedUnits.ini file. Added new entries to the DestroyedUnits.ini file. Starting with v1.0.85.0 added patch to SHSim.act and SHCollisions.act that stops destroyed ships and subs from falling through the sea floor and disappearing (1st draft of this patch - more work to do on it). Remove patch Rudder jam on initial turn from SHSim.act. Revised patch Fix circle runner chance in SHSim.act Starting with v1.0.86.0 revised all the torpedo failures in the game. The code will now follow what the torpedo's .sim file says. The code assumes all values in the torpedo's sim file whose comments say percent or percentage are in the range 0.0-1.0 (0% - 100%) Starting with v1.0.87.0 Fixed possible CTD that could happen with the AI crew voice patch. Added a new patch to the SHSim.act that prevents destroyed aircraft from being immediately removed from the game Starting with v1.0.88.0 Fixed CTD that happens when the Battlestations close/open doors patch is enabled and sub is near port Starting with v1.0.89.0 Fixed problem with the AOB and TDC dials patch. The problem was auto targeting could be messed up because of the patch. Starting with v1.0.90.0 Added a new patch - SHSound. It currently contains one patch to fix the bug of Python error being thrown when Menu.PlaySound() is called on an unrecognized (hard-coded) sound Starting with v1.0.91.0 Added a new patch to SH5.exe: Fixes torpedo room's ambient noise heard on hydrophone station. After enabling this patch the only sounds you will hear when manning the hydrophone station are: hydrophone ambient and any contacts Starting with v1.0.92.0 Added a new patch to the SH5.exe that randomizes the nearest visual contact's distance returned. This new patch will take your sub's crew veterency level into account. Starting with v1.0.93.0 Revised the randomize nearest visual contact patch. Now the patch takes weather into account (clouds, fog type, and precipitation type) Starting with v1.0.94.0 Revised the randomize nearest visual contact patch again. Now the patch remembers the last unit it used for the command. If the unit is the same unit as last time and difference between distance to contact now and before < 500m (a variable in the patch file) then it returns last randomized distance else returns new randomized distance. If the unit is different than last unit then it returns a new random distance. Starting with v1.0.100.0 Revised the Generic Patcher app to load all .s5p files found in the executable's path. Added tooltips to treenodes. Added new treenodes to Patches: Dependencies, Files, Pictures, and Notes. If any of these have entries in them be sure to double click them and read/copy them! The app now checks to ensure those Patches that are enabled and that have dependencies defined have the dependencies enabled. Starting with v1.0.102.0 You have the ability to create/restore snapshots. Snapshots are a snapshot of all the patch file's patches currently loaded. Starting with v1.0.105.0 Added the ability to define and use language packs Starting with v1.0.107.0 Added a new patch to the SH5.exe: New destroyed marks (required for my NewUIs mod v7.5.0 and greater). Fixed bug of clicking cancel after File-->Open was clicked caused treeview items not to show. Added Francais language pack (courtesy of Choum) Starting with v1.0.109.0 Added the ability to define help files. With each language pack folder there is a folder named Help. Simply placing help files in this folder will cause the app to display them in a listbox to the user when Help is pressed. Then when user clicks any entry in this listbox the user's OS will open the file using the application defined for the file's extension. Added 2 new entries to the existing language packs: 30 and 1513. Added a new entry to each Patch file's Patches: Group=. This new entry will allow patches to be placed into groups. All the torpedoe patches in SHSim have been placed in the Torpedoes group. Added Volodya61's help file to the Russian language pack's Help folder. Starting with v1.0.110.0 Fixed bug in Help menu item. Those language packs that are missing are set to English language pack. Starting with v1.0.111.0 Revised language pack entry 1506. Broke it into two stings. Added new language pack entry 1515 which is the second string. Starting with v1.0.112.0 Added a new patch to SH5.exe: All torpedo tubes set to impact detonation only at game start Starting with v1.0.113.0 Added a new patch to the SHSim.act: reloaded torpedoes magnetic detonator disabled (if applicable to the torpedo). Can be found under the Torpedoes group. App now supports the following languages: Spanish, French, German, and English. Updated the Russian help files with volodya61's updated manual. Generic Patcher v1.0.113.0 available here: http://www.mediafire.com/?k7ubf7u8j5l6urw NOTE: DISABLE ALL PATCHES WITH OLD PATCHER BEFORE APPLYING NEW PATCHES WITH NEW PATCHER! THIS APPLIES TO ALL PATCHES! Use the snapshot feature to take a snapshot that you can restore from when you have the new version installed! How to use the patcher app: http://www.subsim.com/radioroom/show...postcount=7773 and http://www.subsim.com/radioroom/showthread.php?t=197960 Last edited by TheDarkWraith; 06-06-2013 at 08:20 PM. |
|
|
03-17-2011, 12:53 AM
|
#2 |
|
Ocean Warrior
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 3,386
Downloads: 523
Uploads: 5
|
Thank you TDW
![]() testing it now! |
|
|
03-17-2011, 12:56 AM
|
#3 |
|
Sailor man
![]() Join Date: Jan 2010
Posts: 50
Downloads: 36
Uploads: 0
|
|
|
|
03-17-2011, 01:04 AM
|
#4 | |
|
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44ŽN 129°40ŽE
Posts: 655
Downloads: 122
Uploads: 6
|
Quote:
Maybe it 0x197A40 ? The fact that the last character in the address, only digital, there are no letters. And this digit only 0. Or am I not looking
__________________
Speed squadron is the slow speed of the ship ... but only so long as on the trail of the squadron did not sit submarines ...
Last edited by Obelix; 03-17-2011 at 02:13 AM. |
|
|
|
03-17-2011, 03:28 AM
|
#5 | ||
|
Ocean Warrior
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 3,386
Downloads: 523
Uploads: 5
|
Quote:
Quote:
http://www.chmaas.handshake.de/delph...vi32/xvi32.htm now some reports from my testing: it works! Finally it is nice to see the ship class on the notepad not flashing, but staying there until you change bearing. More, your sonarman is no longer prone to loose the contact, when requested to follow it, and active sonar is working as it should (accurate range comman never worked for me). There are some issues too: - Dunno if it is related with the exe patching, but after giving the command "follow closest target" my sonarman keeps reporting its bearing even when I use manually the sonar. Not really a big issue, but it is is kinda weird, especially because I'm able to change the sensor bearing, looking for another target, whilst he keeps reporting the first one. TDW, do you think it is possible to trigger the follow target script off when clicking on the sonar, or at least when changing its bearing? - I tested the patch with your torpedo tutorial mission. By using the sonar manually I could hear a ship on bearing 60, and see its class (a merchant), in the notepad on the top left corner (the one with the send to TDC button). That's ok: it was the armless merchant you wisely put in the mission for us Kaulen-to-be to learn how to manage TDC. The weird thing is that by looking in the notepad I could spot another merchant, located more or less at bearing 180, though I couldn't hear it. Did you put a phantom vessel too, in that mission, or what? This is my mods list: SH5.exe patch to fix broken hydrophone station NewUIs_TDC_6_4_0_t9_ByTheDarkWraith Hydro_mod SUB_hyd_fix_SH5 sobers realistic hydrophone operator SH5 U-boat Historical Specifications 1.4 FX_Update_0_0_15_ByTheDarkWraith FX_Update_0_0_15_BARF_1_3_Full_Fix FX_Update_0_0_15_UHS_Fix Depth_Keeping_Problem_UHS_patch_HB_1_0_0_TheDarkWr aith IRAI_0_0_30_ByTheDarkWraith IRAI_0_0_30_No_hydrophone_on_surface_No_Aircraft_s potting |
||
|
|
03-17-2011, 07:13 AM
|
#6 |
|
Black Magic
![]() |
The patch isn't perfect but it's a start. Everything has to start from somewhere. The hardest part of doing any .exe patching is finding a place to start from amid the mass of hex. The next hardest part is deciphering the assembly into semi-human readable form so you can get an idea what the programmer was thinking/implementing in the routine (take the assembly and write pseudo-program code out of it).
|
|
|
03-17-2011, 07:29 AM
|
#7 |
|
Ocean Warrior
![]() Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,758
Downloads: 803
Uploads: 11
|
wow ... just tested and yes ... it is working
![]() ![]() ... just amaising... thx TDWEDIT: as i say it is just amaising... now i can calculate very fast and very easy the range, speed, cource etc for an contact with the hydro only... somethink like when i use stadi ... and that is just amaising... i will drop for a whille Assassins Brotherhood and i start play sh5 again.... WONDERFUL |
|
|
03-17-2011, 08:14 AM
|
#8 |
|
Sea Lord
![]() Join Date: Mar 2010
Posts: 1,843
Downloads: 173
Uploads: 2
|
|
|
|
03-17-2011, 08:26 AM
|
#9 |
|
Commodore
![]() Join Date: Jan 2010
Posts: 606
Downloads: 155
Uploads: 0
|
|
|
|
03-17-2011, 08:53 AM
|
#10 |
|
Ocean Warrior
![]() Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,758
Downloads: 803
Uploads: 11
|
Here i made some tests with the sh5.exe patch by tdw ideea:
i used hydro and my sonar reported me: 1)an merchant contact at 61 degree and at 2980 range 2) i run cronometer for 5 minutes 3) the sonar guy reported me the same contact at 49 degrees at 2170 range 4) i made the ploting for 1 contact and mark1 and i made the ploting for second contact report (after 5 min) and i mark2 5) i draw a line between mark 1 and mark 2 and i measured the distance between mark 1 and mrark2 - the distance was 950 metters 6) i used the speed chart speed from tdw uis and i saw that for an distance of 950 metters in 5 minutes the speed is 6 knots so now i have all the data i need for that ship (wiothout to make an visual contact - only by hidro) 7) i go at periscope dept and i checke on map to see how acurate were my readings: look what i found: ![]() Just amaising... the cource and speed of ship is SO ACURATE... i never had such an acurate reading in my life (using the stady or any other methode) - so TDW thank you so much for this patch ideea Last edited by stoianm; 03-17-2011 at 09:07 AM. |
|
|
03-17-2011, 09:12 AM
|
#11 | |
|
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44ŽN 129°40ŽE
Posts: 655
Downloads: 122
Uploads: 6
|
Quote:
Here you are talking about what can be done attack without use of periscope! That is, this action is transplanted us into the XXI boats in the scin of VII, IMHO.
__________________
Speed squadron is the slow speed of the ship ... but only so long as on the trail of the squadron did not sit submarines ...
|
|
|
|
03-17-2011, 09:15 AM
|
#12 | |
|
Ocean Warrior
![]() Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,758
Downloads: 803
Uploads: 11
|
Quote:
|
|
|
|
03-17-2011, 09:21 AM
|
#13 |
|
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44ŽN 129°40ŽE
Posts: 655
Downloads: 122
Uploads: 6
|
Yes, I do not remember that in SH3 you can for as accurately define the parameters of target movement using a hydrophone.
__________________
Speed squadron is the slow speed of the ship ... but only so long as on the trail of the squadron did not sit submarines ...
|
|
|
03-17-2011, 10:15 AM
|
#14 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
03-17-2011, 10:53 AM
|
#15 |
|
中国水兵
![]() Join Date: Mar 2010
Location: 47°46′46″N, 37°14′51″E
Posts: 271
Downloads: 229
Uploads: 0
|
how to do this?
![]() ![]() I use to view and edit the program 010 Editor v3. or if you need another program to edit?
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
