PDA

View Full Version : [TEC] SH5.exe patches to fix bugs and add functionality


Pages : [1] 2 3 4 5 6 7 8 9 10 11 12 13 14

TheDarkWraith
03-16-11, 11:03 PM
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 :nope: 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 :timeout:
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 :rock:
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!

http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3834

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




Generic patcher application written by moi:
http://www.subsim.com/radioroom/picture.php?albumid=669&pictureid=6659

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) :rock:. 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.

Starting with v1.0.115.0 Added two new patches to SH5.exe: Disable UPlay browser and Show game messages. Disabling the UPlay browser will allow you to play single missions and test campaign only. Campaign progress will NOT be updated while this patch is active (copy protection of game). Show game messages is for Advanced Users and will show a dialog box every time the game adds a new entry to it's internal log.

Starting with v1.0.116.0 Fixed bug in SH5.exe Disable UPlay patch that would prevent command line args from being parsed and if the language chosen for the game wasn't recognized the UPlay browser would still be shown

Starting with v1.0.118.0 Added a new patch to the SH5.exe: Carriers spawning aircraft when they have a contact detected.

Starting with v1.0.119.0 Fixed bug in the Carriers spawning aircraft patch that caused waypoints of units that weren't based from a carrier or were based from a carrier but the carrier had no contacts to be incorrectly set. Added the ablility of the carrier to spawn more than two units. It can spawn 1 additional unit also (for a total of 3). This is a variable in the SH5 patch file that is currently set to 1.

Starting with v1.0.121.0 Revised the Carriers spawning aircraft patch again. See here for details: http://www.subsim.com/radioroom/showpost.php?p=2079044&postcount=2193

Starting with v1.0.122.0 Added two new entries to \data\Cfg\AirStrike.cfg: Carrier Night Modifier and Carrier Default Air Strike Probability. If these entries are found in the file they will override the Carriers spawning aircraft patch's default settings for these.

Starting with v1.0.124.0 Added a new patch to the SH5.exe, SHSim.exe, and SimData.dll: Electric engine properties. This patch will add a new section to the sub's .cfg files named [ElectricEngineProperties]. It allows you to define the engine ratios for the electric engines. See the Notes= of the patch for more info and an example.

Starting with v1.0.125.0 Revised the Carriers spawning aircraft patch. The revision lets airbases spawn aircraft. Units that detect a contact and within the reach of an airbase will radio to the airbase asking for air assistance. If the airbase agrees it will dispatch units to investigate/attack the unit's contact

Starting with v1.0.126.0 Revised the Engine ratios patch to fix bug of AI sub's battery capacity being incorrectly reported to the game

Starting with v1.0.127.0 Added a new patch to the SH5.exe: Max dive depth for messagebox. This patch will have the navigator report the max dive depth possible for the sub's current position and current depth when asking for depth under keel as an entry in the messagebox

Starting with v1.0.128.0 Revised the Carriers/Airbases spawning airplanes patch: fixed bug of player's radioman asking for air assistance when never told so, fixed bug of carriers/airbases using incorrect % chance of spawning units when they have no contacts and/or no units have contact passed to them, revised the code so that I can use whether unit has a radio or not (for determining if unit radioed for assistance and whether units/airbases received that message). Currently this determine if has radio function returns 1 (unit has radio and is operational). I have to code it in yet. When unit asks for air assistance the logic steps value is now set to a random value between 1 and 4 (defined in patch file).

Starting with v1.0.142.0 Added new commands to the game. Added patch to SH5.exe that allows submarines and environmentals to be 'heard' on the hydrophone (Submarine and Environmental will show in hydro box). Fixed CTD that could happen in the Broken hydro patch for SH5.exe when the hydrophone needle passes over a dead unit.

Starting with v1.0.143.0 Added a new patch to the sh5.exe: Stadimeter can only be used at Attack scope or UZO (as Sextant)

Starting with v1.0.144.0 Revised the Stadimeter as Sextant patch so that game can automatically set the zoom level required for the Sextant.

Starting with v1.0.145.0 Finished the radio portion of the Carriers/Airbases spawning aircraft patch. The patch will look for 2 zones: 235 (Radio Room) and 236 (Transmit antenna). It will then check the damage to each one. If the damage is greater than the damage in the patch file (0.5 for both) then the unit was unable to radio for support (air support). This makes it paramount to place your deck gun shells on the radio room and/or it's transmit antenna! The patch also has the 237 zone enabled: receive radio antenna (max damage of 0.5). It's coded to be able to use it but currently nothing is using this feature (to be added here soon!). Added 2 new patches to the sh5.exe: remove yellow designation triangle for deck gun and disable automatic deck gun firing/man the deck gun when target designated for deck gun

Starting with v1.0.146.0 fixed bug in determine whether unit has radio capability code that was incorrectly calculating the current damage to the zone. Add a new patch to SHCollisions.act and SHSim.act: Units must use radio to contact other units about contacts. This new patch forces the units to use their radio to contact other units in regards to a contact they have spotted. If unit spots a new contact: game will see if unit has radio transmit capability. If it does not nothing happens. If it does have radio transmit capability: it will broadcast a message to each unit of it's own nationality in the game. Each unit will be tested to see if it has radio receive capability. If it does not then it does not receive the message. If it does then it will receive the message and set course for the unit that dispatched the message. All this depends on gap's Ship radio damage work. If the unit does not have the zones for radio room or transmit/receive antennas then the patch considers them as available and can be used. Ensure to check the Files= entry for the new patches!

Starting with v1.0.147.0 fixed bug of new radio room and antenna zones not enabled in AI crew damage control patch. Now the AI crew is able to repair these zones (if they aren't damaged too much and/or flooded too much)

Starting with v1.0.148.0 fixed intermittent bug in Units must use radio patch that could cause endless animation looping and possible CTD. Added a new patch to SH5.exe Advanced users: Damage zone debugging. See the patch's Notes= for info on how to use it.

Starting with v1.0.149.0 In the SH5.exe Stadimeter as sextant patch I moved two of the changes to updates so that the Navigator assistant speed calcs feature of my UIs mod will work correctly if Stadimeter as sextant patch is disabled.

Starting with v1.0.151.0 added a new patch to the SHSim.act file: Air-To-Air combat. This patch allows aircraft to target and engage other aircraft. NOTE: in order to work correctly you need to have minimum IRAI v0.0.41.0 installed also.

Starting with v1.0.152.0 added a new patch to the SHSim.act file: Artillery (coastal defenses) and anti-aircraft units able to acquire and track contacts

Starting with v1.0.156.0:
- added some new Updates to sh5.exe
- added a new patch to SH5.exe and SHSim.act: manual diveplane control - this patch allows manual control of the fore and aft diveplanes. BE SURE TO CHECK OUT THE NOTES WITH THIS NEW PATCH!
- added a new patch to SHSim.exe: Air-to-air combat - this patch allows aircraft to target and engage other aircraft.
- added a new patch to SHSim.exe: Coastal defense sub loops - Allows coastal defenses to detect subs that are submerged and/or in heavy fog
- revised new command code in SH5.exe so that it can pass Param1 and Param2 on to functions and to all scripts
- added new code to SH5.exe that allows the defining of commands not recognized by the game to dials

Starting with v1.0.157.0 revised the manual diveplanes control patch to fix the CTD that would happen if you had manual control of any diveplanes enabled and you exited to main menu and then loaded a save game or picked another single mission

Starting with v1.0.158.0 added 3 new patches to the SHSim.act file: searchlights active at dusk when they have a contact, Player's unit visual sensor affected by available light, and Units visual sensor affected by available light (does not affect player's unit)

Starting with v1.0.159.0 rewrote the Player's unit visual sensor affected by available light and Units visual sensor affected by available light (does not affect player's unit) patches due to non-linearity found (not accounting for 0 based numbers) and to add some error checking (in case user enters incorrect values for variables in patch file) and because the code was FUGLY!

Starting with v1.0.160.0:
- added a new patch to the SH5.exe: Increase render distance of units. This new patch will, as it says, increase the render distance of units from the player's unit. Default render distance is 40000.0m. This patch will let you define an additional value to add to this 40000.0m thus increasing the render distance from the player's unit. Default value is an additional 40000.0m. See the Notes= of the new patch to learn how to change the default value.
- revised the Player's unit visual sensor affected by available light and Units visual sensor affected by available light (does not affect player's unit) patches so that if it's nighttime it will use the additional nighttime multiplier specified in the patches.
- Added notes (Notes=) to the Player's unit visual sensor affected by available light, Units visual sensor affected by available light (does not affect player's unit), and searchlights active at dusk when they have a contact patches so that the end-user knows how to adjust the variables for those patches

Starting with v1.0.161.0 added a new Update to the SHSim.act file: Amount of available light that determines when it's nighttime in the game for sensors. Updates are found under the Updates node. This allows the end-user to set the amount of available light that determines nighttime for sensors. See the Notes= of the update for how to adjust.

Starting with v1.0.162.0 added a new game file to the patcher: kernel.dll. Add a new patch to kernel: Objects follow wind direction. This new patch will have any objects that have _FLG in their name (flags for one) AND a GlobalWind controller attached to them take wind direction and speed into consideration. See the Files= and Notes= of the patch for more info.

Starting with v1.0.163.0 added a new game file to the patcher: EnvSim.act. Added two new patches to EnvSim: wind speed allowed to be set to 0m/s and max allowable wind speed increased to 60m/s (stock game was 15m/s). NOTE: MissionEditor2 will only allow you to specify 15m/s for wind speed so you'll have to hand edit the file to attain > 15m/s wind speed

Starting with v1.0.164.0 revised the SH5.exe stadimeter as sextant patch. Now you can take readings on heavenly bodies from +75 to -15 from the waterline.

Starting with v1.0.165.0 added a new patch to SHSim_act: RPM inertia. Player's unit and AI unit's shafts/props will now have inertia and thus will not 'spin up' or 'spin down' at ridiculous speeds. See the Notes= of the patch for how to change the multipliers

Starting with v1.0.166.0 revised the RPM inertia patch in the SHSim_act to fix bug of trying to use invalid pointer that can happen in campaigns and some single missions

Starting with v1.0.168.0 revised the RPM inertia patch again in the SHSim_act to fix CTDs

Generic Patcher v1.0.168.0 available here: https://www.mediafire.com/?mq113wyas39h38i
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/showpost.php?p=1735615&postcount=7773
http://www.subsim.com/radioroom/showthread.php?t=197960
http://www.subsim.com/radioroom/showthread.php?t=205620
http://www.subsim.com/radioroom/showpost.php?p=2085882&postcount=3565

gap
03-17-11, 12:53 AM
Thank you TDW :yeah:
testing it now!

Diablo2
03-17-11, 12:56 AM
:o TDW you are a god amongst men, will try it out. :rock:

Obelix
03-17-11, 01:04 AM
...
- go to address 0x197A4A and change the byte from 75 to 74
:rock:

TheDarkWraith :|\\

But this address does not exist!:nope: Maybe it 0x197A40:06:? 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:-?? I use the hex editor in CFF explorer. I have no way of checking - a working computer is too weak to SH5

gap
03-17-11, 03:28 AM
You mean that sh5.exe from cd game?

no it works fine with the patched .exe, the one stored in your HD

But this address does not exist! 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? I use the hex editor in CFF explorer.

the address is correct, at least it was for me. Any hex editor should do the job. I used this one:

http://www.chmaas.handshake.de/delphi/freeware/xvi32/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

TheDarkWraith
03-17-11, 07:13 AM
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).

stoianm
03-17-11, 07:29 AM
wow ... just tested and yes ... it is working:rock::rock::rock:... just amaising... thx TDW

EDIT: 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

Zedi
03-17-11, 08:14 AM
... so you can get an idea what the programmer was thinking/implementing ...

I think he was thinking at tits.

Anyway, nice finding. This also means that the green light will turn on at active contact?

mobucks
03-17-11, 08:26 AM
AWESOME NESS



This also means that the green light will turn on at active contact?

I was just about to request this be fixed next.:ping:

stoianm
03-17-11, 08:53 AM
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:

http://i1124.photobucket.com/albums/l568/stoianm/hydro.jpg

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

Obelix
03-17-11, 09:12 AM
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:

http://i1124.photobucket.com/albums/l568/stoianm/hydro.jpg

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
In this case, it seems to me that this is cheating! This greatly simplifies life so easy and it was not for the German submariners. Does hydrophones that time could give such accurate results? Personally, I doubt it! The most that can hydrophone - so this issue bearing on the target and determine zoom in touch. And it is largely dependent on the acoustics. Only at the end of the war became possible attacks without the use of the periscope, which focused exclusively on the hydrophone.
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.

stoianm
03-17-11, 09:15 AM
In this case, it seems to me that this is cheating! Does hydrophones that time could give such accurate results? Personally, I doubt it! The most that can hydrophone - so this issue bearing on the target and determine zoom in touch. And it is largely dependent on the acoustics.
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.
is the same thing like when DDs detect you so acurate in game... so will balance the situation.. and i only use in fog days... for me is not like cheating... dunno .. maybe tdw can make to be not so acurate but i like this way... i never played sh3 but what was in sh3 the hydro reading? - have not the same acurate results?

Obelix
03-17-11, 09:21 AM
. i never played sh3 but what was in sh3 the hydro reading? - have not the same acurate results?
Yes, I do not remember that in SH3 you can for as accurately define the parameters of target movement using a hydrophone.

TheDarkWraith
03-17-11, 10:15 AM
In this case, it seems to me that this is cheating! This greatly simplifies life so easy and it was not for the German submariners. Does hydrophones that time could give such accurate results? Personally, I doubt it! The most that can hydrophone - so this issue bearing on the target and determine zoom in touch. And it is largely dependent on the acoustics. Only at the end of the war became possible attacks without the use of the periscope, which focused exclusively on the hydrophone.

The hydrophone can give fairly accurate bearing measurements. You turn the dial until the sound is the loudest and that would be the bearing to the target. I don't see that as cheating. Now what would be considered cheating is the sonarman giving you precise range to target on that bearing. The only way that could be accomplished is with active sonar (ping) but even that would be susceptible to some error (range). The only way you can currently get that range to target on that bearing is by asking the sonarman for it in my UIs mod.

SashaKA001
03-17-11, 10:53 AM
how to do this?:damn::damn::damn: I use to view and edit the program 010 Editor v3. or if you need another program to edit?

TheDarkWraith
03-17-11, 10:58 AM
how to do this?:damn::damn::damn: I use to view and edit the program 010 Editor v3. or if you need another program to edit?

you should be able to open your SH5.exe file with any hex editor. I use Hex Workshop. I think you can download a free trial of Hex Workshop from the internet (the maker of it is Breakpoint Software).

Are you having trouble opening the sh5.exe or finding the byte to change :06:

SashaKA001
03-17-11, 11:15 AM
you should be able to open your SH5.exe file with any hex editor. I use Hex Workshop. I think you can download a free trial of Hex Workshop from the internet (the maker of it is Breakpoint Software).

Are you having trouble opening the sh5.exe or finding the byte to change :06:

no bytes can not find, but I think they are the same or not

http://i2.imageban.ru/out/2011/03/17/ff91f4d06651496178b4240c682cbb45.jpg (http://imageban.ru)

TheDarkWraith
03-17-11, 11:20 AM
at the bottom right of your screenshot you'll see this:

Pos 0 [0h]

You need to scroll through the file until you make that say 197A4Ah then you'll see the byte (75) to change to 74

I would post a screenshot of this location so everyone could see but I don't want to get into legal issues of any kind ;)

It's not illegal to provide information on how to do something in software. Reverse engineering is used all the time in the software industry to learn about undocumented functions in applications and to figure out how viruses do their dirty work for example. It is illegal to provide a patched/modifed version of the software to end-users without permission from the creator(s). What you do with your licensed version for your own use is up to you :DL

Krauter
03-17-11, 11:32 AM
The only way that could be accomplished is with active sonar (ping) but even that would be susceptible to some error (range). The only way you can currently get that range to target on that bearing is by asking the sonarman for it in my UIs mod.

The only problem I see with this is that U-boats were not equipped with any active sonar (pinging equipment) only passive sonar (hydrophones). Thus, how does the sonarman instantly get a range solution (assuming that he uses ping, which is not available to German U-boats..)

As I'm not familiar with your UIs mod (dam this laptop for being a mac..) I'm not familiar with the routine to get range from sonar. But unless it's triangulation it's not realistic IMO.

TheDarkWraith
03-17-11, 11:41 AM
The only problem I see with this is that U-boats were not equipped with any active sonar (pinging equipment) only passive sonar (hydrophones). Thus, how does the sonarman instantly get a range solution (assuming that he uses ping, which is not available to German U-boats..)

As I'm not familiar with your UIs mod (dam this laptop for being a mac..) I'm not familiar with the routine to get range from sonar. But unless it's triangulation it's not realistic IMO.

The game makes a command available in the commands.cfg file that allows you to get the exact range to target. That's how the sonarman can instantly get you a range solution. That's why I said it's only cheating if you use the sonarman this way from my UIs mod. If you don't then you don't get range to target. All you get is bearing info from the hydrophone station.

Krauter
03-17-11, 11:44 AM
Aah. By the way this was not meant as a jab or anything :).

Perhaps it could be implemented (unless it isn't already) where you have to take at least two bearings to target with a reasonable time span to get a range solution?

TheDarkWraith
03-17-11, 11:49 AM
Aah. By the way this was not meant as a jab or anything :).

Perhaps it could be implemented (unless it isn't already) where you have to take at least two bearings to target with a reasonable time span to get a range solution?

I didn't take it as a jab so don't worry :up:

That could be implemented via further patching. Being that I finally discovered where this function is located I am just starting to understand what/how it works by decoding it. This is a very tedious and time-consuming ordeal. Any kind of work like this takes time and patience.

Krauter
03-17-11, 11:51 AM
Well. All the best in your work then :)

And besides.. I've got about 5-6 more years till I'm done my degree so I go a good little bit of time to wait till I can play Sh5 anyways :up:

Cheers mate! And thank god for you or else this game would've gone bottoms up long ago.

TheDarkWraith
03-17-11, 12:00 PM
And besides.. I've got about 5-6 more years till I'm done my degree so I go a good little bit of time to wait till I can play Sh5 anyways :up:

That's the one thing I never had to do, go to college (I have no degree and am proud to say it. You can be successfull without one :yep:). All my training was from the military :salute: Everything else I needed to know I got from reading (and still reading!) books :up:

Trevally.
03-17-11, 12:35 PM
Some info on active sonar


Folks,

German U-boats of WW2 DID have active sonar..they just did not use it and it was eventually removed.

The type VII was fitted with active sonar in the mid 40 time frame.It was a revolving
transducer like the KBT mount seen later in the war.The reasons that it was removed later on and that we don't hear of U-boats using active sonar are as follows:

1. It was a 'trainable' device not an 'array' like the GHG so it had relatively short range...only 3000-4000 meters under good conditions. The passive GHG could hear an individual ship at around 20000 meters and a convoy at approx 100nm
(again these are under ideal conditions). An active 'array' would have given much greater range (probably out to 15000 meters).

2. Allied escorts could hear the active pulses and home in on them from well beyond the sonars effective range.

3. It was not as sophisticated as the 'Neiubling' system on the type XXI and was not linked into the U-boats fire control system like the 'Neiubling' was. This meant that it took a relatively long time to figure out a targets course/speed etc using the sonar...all the time transmitting and letting the escorts know where you are.
The XXI soanar needed as few as 3 pings to determine target speed/course which was fed directley to the fire control system allowing the tactic called 'deep directed shooting'. The tactics which where devised by test group 'Sultan' for the XXI were these. The target would be located at long range by the GHG and teh U-boat positioned on a interceot course. As the strength of the contact on the GHG
increased and the GHG operator thought that the target was withing 10000 meters the 'Neiubling' was switched on to 'listen only' mode. The system had a cathode ray screen to diplay all contacts and in 'listen only' mode it displayed ocean noise. When the propellor noise of the ship/s could be seen on the screen (as a regular series of spikes across the bottom of the screen - the beats of the propellor blades - the set was switched to 'active' and several pulses sent out.

4. As the allies increasingly used radar to spot surfaced U-boats the U-boats started carrying radar warning devices. The associated electronics cabinets had to go somewhere and the space used by the little used active sonar seemed like the ideal place.



http://www.uboat.net/forums/read.php?20,59905,60690

SashaKA001
03-17-11, 12:52 PM
:yeah::yeah::yeah:

http://i2.imageban.ru/out/2011/03/17/89d6db21ba9e17dee90fc52fa107c85c.jpg (http://imageban.ru)

jwilliams
03-17-11, 02:07 PM
- go to address 0x197A4A and change the byte from 75 to 74




:yeah:

good work. thank-you.
:salute:

Magic1111
03-17-11, 02:12 PM
Can I use the fixed SH5.exe during Mid-patrol or should I wait when Iīm beeing in port ?

Best regards,
Magic:salute:

Church SUBSIM
03-17-11, 03:27 PM
It didn't work for me in mid patrol from a saved.

The sonar man would reply to the command asking him where the nearest sound contact was but when I would go listen at the hydro station I could not hear the ship. I fired a torp at the ship and I could hear the whistle of the torp.

Think it was a saved game issue.

===============

Yep saved game issue. Works well - thanks TDW!

sirbum69
03-17-11, 04:28 PM
You know TDW im really starting to wander why in the hell you didnt develope this game.

The things you have done and things you have fixed that make this game even remotly enjoyable to play are Enormous. I pre-ordered this game thinking it was going to be like SH3 and 4 only to place it on my shelf 3 weeks later.

Then you started working on it and man, i come back to a Totally different game with your UI. Now you go and do something like this and just blow me away again...:D

To you sir i Tip my hat and say Thank you for allowing me the enjoyment of getting my $50.00 dollars back from a maker who stole it with crap!!!!!

Cheers

Capt. Shark Bait
03-17-11, 04:50 PM
so, where is this string:confused:? search can't find it, and looking at the screenie for 010 editor is of no use, nor was xvi32. I don't wanna add any mods until this is takebn care of. thx

TheDarkWraith
03-17-11, 05:21 PM
so, where is this string:confused:? search can't find it, and looking at the screenie for 010 editor is of no use, nor was xvi32. I don't wanna add any mods until this is takebn care of. thx

what string? You change a single byte in the sh5.exe file and that's it. You use a hex editor to access that byte.

SashaKA001
03-17-11, 05:25 PM
so, where is this string:confused:? search can't find it, and looking at the screenie for 010 editor is of no use, nor was xvi32. I don't wanna add any mods until this is takebn care of. thx

http://i4.imageban.ru/out/2011/03/18/9b89056cbc20076847268b729ccb4f26.jpg (http://imageban.ru)

TheDarkWraith
03-17-11, 05:26 PM
Then you started working on it and man, i come back to a Totally different game with your UI. Now you go and do something like this and just blow me away again...:D

It's the challenge part that drives me. I am the type of person that continuously has to be challenged. I seek things that make me think, are complex to solve, and/or supposedly have no 'fix'. I find great enjoyment from disassembling/decoding whatever it is to figure out how it works and then figuring out ways to exploit it and make it do things/behaviors it wasn't designed to do (or was totally overlooked by the engineer who designed it). The military taught me well and gave me great skills (I also taught myself much from reading books) :yeah:

Capt. Shark Bait
03-17-11, 05:27 PM
I found something, but i don't know if that's it. 1970h that had 75 as the first 2 digits, now changed to 74. the Pos is, Pos: 6521 [1970h]

edit: seems what I found wasn't it

TheDarkWraith
03-17-11, 05:29 PM
I found something, but i don't know if that's it. 1970h that had 75 as the first 2 digits, now changed to 74. the Pos is, Pos: 6521 [1970h]

Incorrect position. The position needs to be [197A4Ah].

sirbum69
03-17-11, 05:34 PM
yeh im having the same issue not finding it with the hex editor XVI32. I actully copy pasted it into the find box lol and it said it was an invalid hex number...gonna try some others

sirbum69
03-17-11, 05:45 PM
ahh you have to do a search to find the hex as a decimal, not a hex...and i downloaded 010 hexeditor to find it

Capt. Shark Bait
03-17-11, 05:54 PM
good thing i got something to weigh down the scroll button:o

SASHA, thx

THE_MASK
03-17-11, 06:15 PM
Using XV132 , i searched 197A4Ah and it says string not found . All the first numbers are like 24425C and so on .

THE_MASK
03-17-11, 06:30 PM
Just make a patch , your just fixing the hydrophone for god sakes .

Obelix
03-17-11, 06:38 PM
Here is the sequence of actions in the CFF Explorer
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3800
http://www.subsim.com/radioroom/picture.php?albumid=354&pictureid=3801

Capt. Shark Bait
03-17-11, 06:53 PM
used that CFF and found it right off. how is it that those other editors can't find it?

THE_MASK
03-17-11, 07:10 PM
Thanks for that , found it with CFF Explorer . I have no idea how to use a hex editor , how do i change it ? I am getting possed off fist .

TheDarkWraith
03-17-11, 07:18 PM
Just make a patch , your just fixing the hydrophone for god sakes .

Wish it was that easy but the EULA doesn't allow this.

THE_MASK
03-17-11, 07:20 PM
Wish it was that easy but the EULA doesn't allow this.It was directed at a dev that will read this , in my frustration at not being able to find the line , then not knowing how to change it :damn:

7thSeal
03-17-11, 07:26 PM
sober, if you've found it using CFF just click on the '5' and change it to 4 so that its 74.

Then save overriding the original after you've made a backup of it. :)

Obelix
03-17-11, 07:39 PM
It's the challenge part that drives me. I am the type of person that continuously has to be challenged. I seek things that make me think, are complex to solve, and/or supposedly have no 'fix'. I find great enjoyment from disassembling/decoding whatever it is to figure out how it works and then figuring out ways to exploit it and make it do things/behaviors it wasn't designed to do (or was totally overlooked by the engineer who designed it). The military taught me well and gave me great skills (I also taught myself much from reading books) :yeah:
I would like to shake your hand!:up: In recent years, education policy is that all of us disaccustoms think, but the vast majority of people do not read books. I should very difficult to force their children to think, look and make their own decisions.
I always respected self-taught without purchased diplomas.:salute:

TheDarkWraith
03-17-11, 07:47 PM
I would like to shake your hand!:up: In recent years, education policy is that all of us disaccustoms think, but the vast majority of people do not read books. I should very difficult to force their children to think, look and make their own decisions.
I always respected self-taught without purchased diplomas.:salute:

I am also one that is proud to say I have NO degree. I have never set foot in ANY college :D Yes, you can be successful without a degree :up: All I have is my military training and everything that I taught myself.
It is quite sad Obelix that education is pushing towards 'automation' and not teaching how to rationalize/problem solve/think. It's very prevalent here in the US and is going to be the downfall of this great country. School kids are REQUIRED to have a $200 calculator that does graphing in my community. These kids have no idea how to do long division let alone graph a quadratic equation. They do know how to type it into the calculator and get the result though :nope:

Capt. Shark Bait
03-17-11, 08:03 PM
seems this won't work for me. got a launcher.exe needs to close after changing the 75 to 74. reinstalled and still unable to run SH5 with 75 or 75
any ideas? thx

TheDarkWraith
03-17-11, 08:06 PM
seems this won't work for me. got a launcher.exe needs to close after changing the 75 to 74. reinstalled and still unable to run SH5 with 75 or 75
any ideas? thx

you must have changed the wrong address. Restore your backup and try again :yep: See above a couple of posts for a screenshot showing the address.

Obelix
03-17-11, 08:12 PM
... School kids are REQUIRED to have a $200 calculator that does graphing in my community. These kids have no idea how to do long division let alone graph a quadratic equation. They do know how to type it into the calculator and get the result though :nope:
Unfortunately, this practice is widely implemented in Russia, designed ostensibly to improve education.:nope:
But stop, we escaped from the topic, it's time to stop. :timeout: Must speak of this in another topic.

Capt. Shark Bait
03-17-11, 08:59 PM
you must have changed the wrong address. Restore your backup and try again :yep: See above a couple of posts for a screenshot showing the address.

tried it again and it seems to work. dunno about the hydrophones yet

TheBeast
03-17-11, 09:04 PM
I tried this using the XVI32 HEX Editor and could not located bit to change.
I fired up CFF Explorer and found the bit and changed it successfully.

Sonar is now working as TDW describes.:rock:

sirbum69
03-17-11, 09:28 PM
For anyone having problems finding the string...You have to click on Find and then change it so it Finds "Looks" for the string in the first post but as a "Decimal" not a "Hex". For some reason it doesnt realize what it is unless it thinks its a decimal.

THE_MASK
03-17-11, 09:57 PM
I realised i had the contacts commented out for the real navigation mod .
;820=Unknown
;821=Warship
;822=Merchant
;823=Submarine
;824=Aircraft
825=Land
How does uncommenting these affect real navigation ?


http://img204.imageshack.us/img204/8016/contactqj.jpg (http://img204.imageshack.us/i/contactqj.jpg/)

My hydrophone man Benno the tool seems to be doing his job properly now .

TheDarkWraith
03-17-11, 10:15 PM
I realised i had the contacts commented out for the real navigation mod .
;820=Unknown
;821=Warship
;822=Merchant
;823=Submarine
;824=Aircraft
825=Land
How does uncommenting these affect real navigation ?

well you could be mousing over one of the maps and get accidentally shown one of the strings above. But don't worry - the next patch will address this as I just found out where the game reads these strings to show in the hydrophone box. What I'm going to do is make new strings at a different location than the above and point the game to read those so that they can be shown in the hydrophone box and not in the nav maps :rock:

EDIT:

DO NOT UNCOMMENT THOSE! You will add some unwanted functionality into real navigation. Apply patch v0.0.2 to remedy this problem.

TheDarkWraith
03-17-11, 11:35 PM
patch v0.0.2 available at post #1 :|\\

stoianm
03-18-11, 12:17 AM
patch v0.0.2 available at post #1 :|\\
You are saying that patches are not cumulative:hmmm: i can not make the both patches in one shoot in sh5.exe and to aplie one single patch? if i aplie patch 2 after patch 1 than i will not overwritte the patch1?

tnx

Zedi
03-18-11, 02:17 AM
Lemme get this straight. We are not breaking the frakin DRM here, but a frakin' bug that Ubi did not bothered to patch/solve it!

So I say, frak Ubi and their lame EULA, release the moded exe.. they can kiss our bottom, damn thief's.

UBOOT_fan
03-18-11, 05:35 AM
The question raised by Obelix reminded me something else. I saw a documentary in which there is a sub at the end of the war which in its tests it fired torpedoes UNDER the water, UNDER the periscope view I mean (that it's on the film). What sub was that ? Did anyone know ?

Magic1111
03-18-11, 06:44 AM
The question raised by Obelix reminded me something else. I saw a documentary in which there is a sub at the end of the war which in its tests it fired torpedoes UNDER the water, UNDER the periscope view I mean (that it's on the film). What sub was that ? Did anyone know ?

Yes, thatīs was the Type XXI, read: http://en.wikipedia.org/wiki/German_Type_XXI_submarine and http://www.uboat.net/technical/electroboats.htm
Best regards,
Magic:salute:

TheDarkWraith
03-18-11, 07:07 AM
You are saying that patches are not cumulative:hmmm: i can not make the both patches in one shoot in sh5.exe and to aplie one single patch? if i aplie patch 2 after patch 1 than i will not overwritte the patch1?

tnx

You can apply both patches in one shot if you want. You'll notice that each patch changes different addresses.

stoianm
03-18-11, 07:09 AM
You can apply both patches in one shot if you want. You'll notice that each patch changes different addresses.
ok then... so patch 1 fix the broken hidro.... patch 2 fix the text from hydro station to display when i use the patch togheter with your real nav?... if i make an fix where i change the adrees sugested at patch 1 and patch 2 then i am good to go with real nav and hydro fix... i understood wright?

TheDarkWraith
03-18-11, 07:14 AM
ok then... so patch 1 fix the broken hidro.... patch 2 fix the text from hydro station to display when i use the patch togheter with your real nav?... if i make an fix where i change the adrees sugested at patch 1 and patch 2 then i am good to go with real nav and hydro fix... i understood wright?

that's correct :up:
Working on patch 3 now....

stoianm
03-18-11, 07:15 AM
Working on patch 3 now....
awsome... you mean to have the uboats spoted displayed on the hydro station note pad?

TheDarkWraith
03-18-11, 07:21 AM
awsome... you mean to have the uboats spoted displayed on the hydro station note pad?

That's what I'm working on. If you manage to 'spot' a submarine on the hydrophone station I want it to display Submarine instead of Unknown or Warship

stoianm
03-18-11, 07:28 AM
That's what I'm working on. If you manage to 'spot' a submarine on the hydrophone station I want it to display Submarine instead of Unknown or Warship
nice:rock:.... and now just as an reminder... did you remember about smoked depth charges:06::)

Stormfly
03-18-11, 08:33 AM
That's what I'm working on. If you manage to 'spot' a submarine on the hydrophone station I want it to display Submarine instead of Unknown or Warship

ohh does this mean we could maybe have a working submarine hydro sound also ?

...ah, and dont forget some random whale song`s :D

Magic1111
03-18-11, 04:50 PM
ok then... so patch 1 fix the broken hidro.... patch 2 fix the text from hydro station to display when i use the patch togheter with your real nav?... if i make an fix where i change the adrees sugested at patch 1 and patch 2 then i am good to go with real nav and hydro fix... i understood wright?

Means this, I donīt need Patch 2 when I not use Real Navigation ? Is this right ? :hmmm:

Best regards,
Magic:salute:

stoianm
03-18-11, 04:50 PM
Means this, I donīt need Patch 2 when I not use Real Navigation ? Is this right ? :hmmm:

Best regards,
Magic:salute:
both... 1 and 2

TheDarkWraith
03-18-11, 05:08 PM
Means this, I donīt need Patch 2 when I not use Real Navigation ? Is this right ? :hmmm:

Best regards,
Magic:salute:

If you're not using real navigation then you don't need patch 2

stoianm
03-18-11, 05:11 PM
If you're not using real navigation then you don't need patch 2
he want to learn real nav... i will make an video tutorial and i will post on forum how to use real nav

TheDarkWraith
03-18-11, 05:16 PM
he want to learn real nav... i will make an video tutorial and i will post on forum how to use real nav

oh then he needs to install patch 2 then :up:

v6.4.0 of my UIs mod will already include the menu.txt file changes for all the supported languages :DL

Magic1111
03-18-11, 05:45 PM
he want to learn real nav... i will make an video tutorial and i will post on forum how to use real nav

oh then he needs to install patch 2 then :up:

v6.4.0 of my UIs mod will already include the menu.txt file changes for all the supported languages :DL

Thanks for answers !!! :yeah:

jean74
03-19-11, 05:28 AM
Hi TheDarkWraith

What should I say instead of THANK YOU?

Take Care

Jean

BowfinSS287
03-19-11, 10:32 AM
I got it working .....after having a small break down
I've never used a hex editor before.....yes noob

it was well worth the trouble.....thanks again for another great fix:woot:

I wonder what else is going to get fixed?

illuminatus
03-19-11, 12:34 PM
I have the steam version of the executable and the values don't match in the addresses specified on top. 0x197A4A for example, has a value of 2D. Doh!

Budds
03-19-11, 04:17 PM
Like the wider "Cone" for sound of targets....... but it seems that if I ping the target, it gives the distance the full "Width" of the Cone just like sound pick up.
ie,,,, if I ping taget @ 20 degrees and target is really @ 28, I will get distance.

Would be nice if the Active Sonar would only return if you were within say 3-5 degrees of "Middle of The Boat".
But maybe not possible?

Anywyas........
Thanks Sir..... Great Stuff........
:up:

d3vnu11
03-19-11, 05:41 PM
This going to work for the Steam version of the game ? With it's DRM embedded in the exec.

TheDarkWraith
03-19-11, 05:45 PM
This going to work for the Steam version of the game ? With it's DRM embedded in the exec.

I haven't been able to look at the steam version as I don't have a copy of the steam exe file ;) My exe file came from the DVD version of the game. If somehow I was able to look at a steam version I can probably make a patch for it also.

stoianm
03-19-11, 05:46 PM
I haven't been able to look at the steam version as I don't have a copy of the steam exe file ;) My exe file came from the DVD version of the game.
What steam means?.. the version downloaded from the site... i mean the one that you buy with your credit card and download?

d3vnu11
03-19-11, 07:24 PM
What steam means?.. the version downloaded from the site... i mean the one that you buy with your credit card and download?
Steam is another company that sells downloadable and purchasable games. http://www.steampowered.com
Kev

Captain Can
03-19-11, 08:25 PM
TDW i am having problems. here is the screenshot (http://i52.tinypic.com/25pjrpk.jpg)of my code.but i cant see any 75 or 74. what may be the problem?

TheDarkWraith
03-19-11, 08:27 PM
TDW i am having problems. here is the screenshot (http://i52.tinypic.com/25pjrpk.jpg)of my code.but i cant see any 75 or 74. what may be the problem?

Let me guess....you have steam version of game :06: If so, be patient. I might have something for you all here soon for it.

kiwi_2005
03-19-11, 10:21 PM
:rock::rock: And heres me thinking it was just me being bad at finding contacts.

Going to try this out. :salute:

Zedi
03-20-11, 03:59 AM
My engines are reported as warship contact even when they are on halt. So basically if I have a ship right in my back, he will be always invisible just because the sonar will hear my engines first.. even if they are stooped.

anzacmick
03-20-11, 05:10 AM
gday all... rising from the depths after a long time... tis good to be surfaced:|\\...and wow...what changes have unfolded.. SH5 is turning from a red headed bastard child into a prodigal son... with alot of help from the usual suspects.... kinda exciting times... ANYWAYS.....

just a quick question to TDW...
any link to the diesel engine pitch/volume control in the SH5.exe??
the way the game has it setup now just sucks:down:.. i personally call it a bug.
I know nothing of this hocus pocus u use to work ur magik, but im hoping if sommet like a hydrophone op fix could be sought from a .exe, maybe there is hope for something like the diesel engine speed/pitch/volume fix. crossing my fingers.

my mrs will have ur children should u suceed...heheh:hmmm: ..tho she dont know yet...lmao

cheers in advance

mobucks
03-20-11, 01:12 PM
My engines are reported as warship contact even when they are on halt. So basically if I have a ship right in my back, he will be always invisible just because the sonar will hear my engines first.. even if they are stooped.


In any event, I do not think in real life you could hear at bearing 180 behind sub with hydrophones. If you watch the hydro operator, he always skips listening from bearing 170-190

TheDarkWraith
03-20-11, 03:01 PM
In any event, I do not think in real life you could hear at bearing 180 behind sub with hydrophones. If you watch the hydro operator, he always skips listening from bearing 170-190

exactly which is why I don't consider this a bug but rather a feature.

TheDarkWraith
03-20-11, 03:33 PM
For you Steam based users I have to say sorry I can't help you all. You can read why at post #1.

MiTon
03-20-11, 05:47 PM
Thanks TDW,

just tested it with german version and it's working like charm!

Greets

MiTon

TheDarkWraith
03-21-11, 03:53 PM
finally narrowed down where in the exe the map text colors are controlled. Here I made them green:
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3830

Problem is other text is affected by this change. Still hunting and deciphering but hope to have a patch for this here soon :up:

stoianm
03-21-11, 03:58 PM
finally narrowed down where in the exe the map text colors are controlled. Here I made them green:


Problem is other text is affected by this change. Still hunting and deciphering but hope to have a patch for this here soon :up:
tnx..:rock:- this was one of my biggest problem in my SH5... i get tired often because of the indescifrabil writting of numbers from drawing and few days ago i asked you about that... manny thanks:salute:

d3vnu11
03-21-11, 04:25 PM
For you Steam based users I have to say sorry I can't help you all. You can read why at post #1.
Yeah it was what I feared well might as well order the dvd :) You Steam version is even worse because you get steams DRM along with Ubisofts. Does the DVD version have a DRM ?
Kevin

TheDarkWraith
03-21-11, 04:28 PM
ok, finally deciphered the code and am able to control the color of each tool on the nav map now without ANY adverse effect on any other text. You'll be able to specify the color for each tool on the nav map with Patch 3 :rock:
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3831

stoianm
03-21-11, 04:31 PM
You'll be able to specify the color for each tool on the nav map with Patch 3 :rock:

first time i was like:timeout: when i saw the pink color... and then i readed this ''You'll be able to specify the color for each tool on the nav map with Patch 3'' and now i am like:rock:

tnx

d3vnu11
03-21-11, 04:34 PM
first time i was like:timeout: when i saw the pink color... and then i readed this ''You'll be able to specify the color for each tool on the nav map with Patch 3'' and now i am like:rock:

tnx

Not Fair !!! I want to be able to patch my exe ! Does DRM for ubisoft's download version work or is that exe also wrapped up in crap too ? Can any dl version confirm his patches work ?
Regards.
Kevin

stoianm
03-21-11, 04:36 PM
Not Fair !!! I want to be able to patch my exe ! Does DRM for ubisoft's download version work or is that exe also wrapped up in crap too ? Can any dl version confirm his patches work ?
Regards.
Kevin
i can confirm... i have an dowload version from ubisoft.. it is working:up:

d3vnu11
03-21-11, 04:38 PM
i can confirm... i have an dowload version from ubisoft.. it is working:up:
Sold ! gonna buy it right now. Should I get the gold or is it basicly a rip off to get more money since the box version of the game is basicly broken :)
Kev

TheDarkWraith
03-21-11, 04:54 PM
patch 3 will also let you change the color of the distance scale on the nav map and TAI map:
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3832

d3vnu11
03-21-11, 04:58 PM
patch 3 will also let you change the color of the distance scale on the nav map and TAI map:
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3832

As I used to say when I was writing Linux kernel drivers. "wewt".

d3vnu11
03-21-11, 05:02 PM
<a href="http://speedtest.dslreports.com"><img border=0 src="http://www.dslreports.com/im/95970907/1154.png"></a>

And that was while I was downloading sh5 from ubisoft at 1,833 kbps

stoianm
03-21-11, 05:06 PM
Sold ! gonna buy it right now. Should I get the gold or is it basicly a rip off to get more money since the box version of the game is basicly broken :)
Kev
dunno.. i never played with gold.. i understood has an biger manual and another diferences but the base should be the same

TheDarkWraith
03-21-11, 05:30 PM
just applied patch 3 to my file and everything working perfectly :rock: I like cyan color (0x00FFFFFF) so I made everything cyan. Now something to note is that you can set opacity for all these colors also :D (I prefer all mine FF for opacity - solid color):
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3833

stoianm
03-21-11, 05:32 PM
loks nice ... and the FF for opacity i like it also:woot:

TheDarkWraith
03-21-11, 05:37 PM
patch 3 available at post #1 :|\\

SashaKA001
03-21-11, 07:37 PM
just applied patch 3 to my file and everything working perfectly :rock: I like cyan color (0x00FFFFFF) so I made everything cyan. Now something to note is that you can set opacity for all these colors also :D (I prefer all mine FF for opacity - solid color):
http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3833

so you need to write it as a picture or red, or I'm not out there looking for

http://i2.imageban.ru/out/2011/03/22/693b1625ab61348d5eb6bc061c7b1b2b.jpg (http://imageban.ru)

TheDarkWraith
03-21-11, 07:49 PM
you'll notice that the 4 bytes are FF 22 22 22. If you wanted a red color then you would change them to:
FF 00 00 FF

patch 3 revised to include one more color that user can define. Still looking for a couple more colors.....

SashaKA001
03-21-11, 07:53 PM
you'll notice that the 4 bytes are FF 22 22 22. If you wanted a red color then you would change them to:
FF 00 00 FF

patch 3 revised to include one more color that user can define. Still looking for a couple more colors.....

yes:yeah: yes:salute: yes:up: yes:woot:

stoianm
03-21-11, 08:01 PM
@TDW you said: ''NOTE2: stock values for the color (as seen in hex editor) are either 0xFF222222 or 0x4B444444''

i found diferent colors:

for example at this addres 0x103F95 i have this color 3CBB4444 wich is an strange red color.... i am missing something?:hmmm:

TheDarkWraith
03-21-11, 08:15 PM
@TDW you said: ''NOTE2: stock values for the color (as seen in hex editor) are either 0xFF222222 or 0x4B444444''

i found diferent colors:

for example at this addres 0x103F95 i have this color 3CBB4444 wich is an strange red color.... i am missing something?:hmmm:

you are one byte off. Your current location is 0x103F94 not 0x103F95 :yep:

Revised patch 3 again with more colors that can be customized. Still looking for a few more colors.....


I would like to compile a list of colors that you all have used for all these colors that can be customized now. Please post your color layout :yep:

SashaKA001
03-21-11, 08:27 PM
http://www.sukhoi.ru/forum/attachment.php?attachmentid=129223&d=1300756593
http://www.sukhoi.ru/forum/attachment.php?attachmentid=129225&d=1300756595

TheDarkWraith
03-21-11, 08:32 PM
@ SashaKA001 :up: Looking good. This was one of the biggest things that bugged me about SH5. The inability to customize the map colors and map tool colors. I mean, c'mon, give me OPTIONS :shifty: I shouldn't have to sift through an exe file looking for HARDCODED colors. That is just plain wrong to hardcode those :nope:

stoianm
03-21-11, 08:50 PM
you are one byte off. Your current location is 0x103F94 not 0x103F95 :yep:

Revised patch 3 again with more colors that can be customized. Still looking for a few more colors.....


I would like to compile a list of colors that you all have used for all these colors that can be customized now. Please post your color layout :yep:
Thanks... now i figured out.. i used an software called 0.10 editor that he reported wrong each adres.. i installed Hex Workshop and is ok now... i wil use the same cyan -

here you writted the cyan in RGBA? : ''I like cyan color (0x00FFFFFF) so I made everything cyan''

If i want to use cyan i must to change like this: FFFFFF00 ?

TheDarkWraith
03-21-11, 08:53 PM
Thanks... now i figured out.. i used an software called 0.10 editor that he reported wrong each adres.. i installed Hex Workshop and is ok now... i wil use the same cyan -

here you writted the cyan in RGBA? : ''I like cyan color (0x00FFFFFF) so I made everything cyan''

If i want to use cyan i must to change like this: FFFFFF00 ?

If using hex workshop with default settings then yes, enter the color as 0xFFFFFF00 (ABGR) for cyan :up:

TheDarkWraith
03-21-11, 09:55 PM
more colors added to patch 3. Now you can change the color of the lattitude and longitude degrees on the navigation map :D

Still haven't found all the colors I'm looking for. Still searching....

SashaKA001
03-22-11, 07:33 PM
very good:woot:

http://i3.imageban.ru/out/2011/03/23/7753a11dbef7fda643e5c03407456a6e.jpg
http://i1.imageban.ru/out/2011/03/23/383de1007aaace7dd909d7825a337739.jpg
http://i1.imageban.ru/out/2011/03/23/ad0cb144eac9ed58e430b550551b9eab.jpg

very good:rock::rock:

Meldric
03-23-11, 03:18 AM
Hi TDW!

Wouldn't it be possible to do the following (just an idea):

- Use your dll-injection method to hook into a common action in game (in the very beginning after loading a saved game)
- create a method in the dll to overwrite the values in memory instead of patching the .exe.

--> In this way you could also add an option (e.g. for the colors) to the GUI...

Impossible?

Meldric

d3vnu11
03-23-11, 07:15 AM
Hi TDW!

Wouldn't it be possible to do the following (just an idea):

- Use your dll-injection method to hook into a common action in game (in the very beginning after loading a saved game)
- create a method in the dll to overwrite the values in memory instead of patching the .exe.

--> In this way you could also add an option (e.g. for the colors) to the GUI...

Impossible?

Meldric

If it were possible you might even be able to help out the Steam users of SH5.

TheDarkWraith
03-23-11, 01:33 PM
Hi TDW!

Wouldn't it be possible to do the following (just an idea):

- Use your dll-injection method to hook into a common action in game (in the very beginning after loading a saved game)
- create a method in the dll to overwrite the values in memory instead of patching the .exe.

--> In this way you could also add an option (e.g. for the colors) to the GUI...

Impossible?

Meldric

impossible no, possible yes but I would use an easier method. I would just write to the memory in game! As my .dlls are already in the process memory I can manipulate it. It's a great idea to change colors on the fly. I'll add it to my list of things to look into :up: Colors could be set just like I've done with the scope settings using the mousewheel for each color component.

As far as for steam it's not possible to do because I don't own the steam version of the game and thus cannot 'see' the memory to verify the colors are located where they are in the boxed versions.

d3vnu11
03-23-11, 02:19 PM
impossible no, possible yes but I would use an easier method. I would just write to the memory in game! As my .dlls are already in the process memory I can manipulate it. It's a great idea to change colors on the fly. I'll add it to my list of things to look into :up: Colors could be set just like I've done with the scope settings using the mousewheel for each color component.

As far as for steam it's not possible to do because I don't own the steam version of the game and thus cannot 'see' the memory to verify the colors are located where they are in the boxed versions.

Yeah I was making the assumption that Steam just takes the box version and wraps their drm around it. It authenticate then extracts the the sh5 code and executes. I no longer run the Steam version either but I could install it to verify once you get something together :)
Regards,
Kev

TheDarkWraith
03-23-11, 10:55 PM
Finally nailed down the memory locations for:
- Compressed air level
- CO2 level
- Battery level
- Fuel level

just about got the hull integrity and flooding level memory locations nailed down also.

Now things can start to get really interesting :rock:

THE_MASK
03-23-11, 11:07 PM
Finally nailed down the memory locations for:
- Compressed air level
- CO2 level
- Battery level
- Fuel level

just about got the hull integrity and flooding level memory locations nailed down also.

Now things can start to get really interesting :rock:
Amazing :yeah:

stoianm
03-23-11, 11:09 PM
:DL:woot:

nozaurio
03-23-11, 11:13 PM
:yeah::yeah:

SashaKA001
03-23-11, 11:41 PM
Finally nailed down the memory locations for:
- Compressed air level
- CO2 level
- Battery level
- Fuel level

just about got the hull integrity and flooding level memory locations nailed down also.

Now things can start to get really interesting :rock:

can be found here and about the magnetic detonator?:ping::ping::ping:

Obelix
03-24-11, 06:37 AM
Hi TheDarkWraith!
Based on your breakthroughs in improving SH5 I'll try to make a couple of suggestions:
1. Is it possible to do so during the bombardment of depth charges in the boat, the flickering light. Or there is blackout for a few seconds?
2. This question may have already asked - can we make manual control of lighting inside the boat? That is, if necessary, to switch white, red or blue light?

TheDarkWraith
03-24-11, 06:51 AM
right now I'm concentrating on adding usable functionality as follows:
- if speed > safe speed for extended periscope then automatically retract periscope and prevent periscope from rising until speed is reduced
- if silent running is active then CO2 production is increased (due to stress of crew)
- if battlestations is active then CO2 production is increased (due to stress of crew)

just narrowed down where the depth value is in memory. Now just have to find the speed value and periscope extended heights values.

What is the maximum speed the sub can be at for a raised periscope :06:

Obelix
03-24-11, 06:57 AM
What is the maximum speed the sub can be at for a raised periscope :06:
As far as I know, the maximum speed with a raised periscope 6-7 knots, with higher speeds there are risks of pipe bend periscope.

THE_MASK
03-24-11, 06:58 AM
right now I'm concentrating on adding usable functionality as follows:
- if speed > safe speed for extended periscope then automatically retract periscope and prevent periscope from rising until speed is reduced
- if silent running is active then CO2 production is increased (due to stress of crew)
- if battlestations is active then CO2 production is increased (due to stress of crew)

just narrowed down where the depth value is in memory. Now just have to find the speed value and periscope extended heights values.

What is the maximum speed the sub can be at for a raised periscope :06:
http://www.uboatarchive.net/Manual.htm

unionemerald
03-26-11, 07:17 AM
I managed to fix the broken hydrophone station, and the references new entries in menu.text with a hex editor.
Two questions:

1. Do I still have to edit my menu.text file when using the NewUIs_TDC_6_4_0_ByTheDarkWraith.

2.Can someone explain me (if possible with a clear example), what digits have to be changed to change the colours, and what digits have to be used for the different possible colours. I can find the values, but the rest is like a little bit chinese to me.

TheDarkWraith
03-26-11, 10:33 AM
I managed to fix the broken hydrophone station, and the references new entries in menu.text with a hex editor.
Two questions:

1. Do I still have to edit my menu.text file when using the NewUIs_TDC_6_4_0_ByTheDarkWraith.

2.Can someone explain me (if possible with a clear example), what digits have to be changed to change the colours, and what digits have to be used for the different possible colours. I can find the values, but the rest is like a little bit chinese to me.

1. no. I made all the changes already for all the languages supported

2. Re-read post #1. It explains everything.

unionemerald
03-26-11, 02:47 PM
I know it's all quite logic to you, but not really to me.
First of all, I'm not familiar with a hex editor (used it for the first time), and second, english isn't my mother tongue. So I try to understand your explanation given in post #1, but it's not that simple. All what I'm asking for, is to give me a simple and clear example on how to change the colours of the toolmarks into the other possible colours.
B.T.W. I know you're doing one hell of a job with this game, but you must understand that a big part of the members on this forum (unfortunately) don't have the same knowledge like you. Otherwise SH5 would be a perfect game in no time!

Teiwaz
03-26-11, 03:07 PM
I know it's all quite logic to you, but not really to me.
First of all, I'm not familiar with a hex editor (used it for the first time), and second, english isn't my mother tongue. So I try to understand your explanation given in post #1, but it's not that simple. All what I'm asking for, is to give me a simple and clear example on how to change the colours of the toolmarks into the other possible colours.
B.T.W. I know you're doing one hell of a job with this game, but you must understand that a big part of the members on this forum (unfortunately) don't have the same knowledge like you. Otherwise SH5 would be a perfect game in no time!

Every HEX-Editor has an option that says something like "go to adress" or "jump to adress". You click that and then you enter something like "0xA8C43" or "A8C43" (depends on editor; see post #1 for those adresses - the 0x part is just an indicator that the following is a HEX number). Now just enter/type in the new value (see post #1 for those values).

For different RGB color codes you might find this site come in handy:
http://www.farb-tabelle.de/en/table-of-color.htm

Don't forget you need a ARGB value (A - Alpha Channel or opacity), I would go with just FF (100% opacity) for this.

SashaKA001
03-26-11, 03:41 PM
I know it's all quite logic to you, but not really to me.
First of all, I'm not familiar with a hex editor (used it for the first time), and second, english isn't my mother tongue. So I try to understand your explanation given in post #1, but it's not that simple. All what I'm asking for, is to give me a simple and clear example on how to change the colours of the toolmarks into the other possible colours.
B.T.W. I know you're doing one hell of a job with this game, but you must understand that a big part of the members on this forum (unfortunately) don't have the same knowledge like you. Otherwise SH5 would be a perfect game in no time!

http://i3.imageban.ru/out/2011/03/26/7f4cbbc565d32f054e146ccde58dac9a.jpg (http://imageban.ru)

ETsd4
03-26-11, 04:01 PM
Example to change protractor-lines to dark-blue with 100% opacity:

Go to address 0x1063E5.
You will fiind there the hex-values

FF222222or
4B444444or
FE111188or this
EE000000.

Overwrite the given value with your choosen hex-value for dark-blue,100% opacity:

FF00008BThen save the modified file.
That's it.

TheDarkWraith
03-26-11, 04:16 PM
I'm writing an application that will patch the SH5.exe file by reading patch files (in my patch format). Should have it available soon :up: You'll be able to enable/disable patches by clicking with mouse. You'll be able to choose colors by literally picking the color from a color dialog box.

SashaKA001
03-26-11, 05:58 PM
I'm writing an application that will patch the SH5.exe file by reading patch files (in my patch format). Should have it available soon :up: You'll be able to enable/disable patches by clicking with mouse. You'll be able to choose colors by literally picking the color from a color dialog box.

fine:up:

TheDarkWraith
03-26-11, 06:52 PM
SH5 Patcher application available at post #1 :|\\

stoianm
03-26-11, 06:58 PM
SH5Patcher application written by moi:

SH5 Patcher available here: http://www.gamefront.com/files/20162473/TDW_SH5_Patcher_7z

Trčs bon travail comme d'habitude ... Merci beaucoup ... et vous parlez aussi franįais, monsieur?:DL

TheDarkWraith
03-26-11, 07:32 PM
How do i use this patcher ? I cannot figure it out .

When you unzip the archive there is a folder. Inside that folder is the patcher application and an s5p file. Run the patcher application by double-clicking the exe file. You open the s5p file with the patcher (file-->open). Text in red is double-clickable and when double-clicked will do something. You can also backup and restore your sh5.exe file by file-->Backup sh5.exe and file-->restore sh5.exe if you want to play around with it.

TheDarkWraith
03-26-11, 07:44 PM
I put the 4 files in the silent hunter 5 game folder .
I go into sh5 patcher and open TDW_SH5_Patches .
I get a message that says c:\Games\ubisoft\Silent Hunter 5\sh5.exe doesnt exist .

no reason to put the 4 files in your SH5 folder. Just put the extracted folder from the archive somewhere in your c: drive (or whatever drive is your system drive).

Oh yeah I forgot to remove an entry in that s5p file :oops: Open the s5p file with notepad and replace the path:

[EXE]
Path=c:\Games\Ubisoft\Silent Hunter 5\

replace the highlighted text with the path to your silent hunter 5 folder or leave it blank to have an open file dialog box open up so you can select it's location.

EDIT:

link at post #1 for patcher app updated to reflect v1.1 of it

THE_MASK
03-26-11, 08:00 PM
Downloaded 1.1 , works brilliantly thanks :yeah:

pascal4541
03-26-11, 08:12 PM
Thank you TheDarkWraith :salute:
Very easy to use...It's perfect
He still took some time to understand ...:DL

unionemerald
03-27-11, 01:57 AM
Thanks a lot TheDarkWraith! This makes it a lot more easy to change the colours. Indeed very easy to use. :yeah:

Finding the proper hex-values wasn't the problem, but I didn't know the specific values to use for the different colours.
Thanks Teiwaz for the website link, and SashaKAOO1 and ETsd4 for the extra explanation. :salute:

THE_MASK
03-27-11, 05:30 AM
I have no real navigation marks now .

brandtryan
03-27-11, 09:01 AM
I have no real navigation marks now .

Sober--don't know if this is your problem, or just specific to me.

Any scale past the scale in screenshot (any more zoom in) and I cannot place supermarks. I have to zoom out to level in screenie to be able to place a SM.

http://thephotonwrangler.com/galleries/sm.jpg

TheDarkWraith
03-27-11, 09:42 AM
I have no real navigation marks now .

Sober--don't know if this is your problem, or just specific to me.

Any scale past the scale in screenshot (any more zoom in) and I cannot place supermarks. I have to zoom out to level in screenie to be able to place a SM.

what changed for both of you that has caused this? I have all patches enabled and experience no problems :hmmm:

ETsd4
03-27-11, 02:34 PM
[QUOTE=brandtryan;1628849]Sober--don't know if this is your problem, or just specific to me.

Any scale past the scale in screenshot (any more zoom in) and I cannot place supermarks. I have to zoom out to level in screenie to be able to place a SM.
/QUOTE]

I have this problem too. But its not caused by tweaking some specific addresses of the sh5.exe-file. It is a problem of the NewUIs with TDC for SH5 by TheDarkWraith (and probably with your screen-resulotion). A good work-around to get rid of the problem is to change the position of the super-mark with V after you have set your super-mark. Thats what i do. I have installed NewUIs with TDC for SH5 by TheDarkWraith v6.0.0.

TheDarkWraith
03-27-11, 02:49 PM
I looked through my code to see what was going on (and to remember how they worked) and now I know why you can't set a supermark. In order to place a supermark your sub or a previous supermark has to be visible in the nav map. I need a reference to work off of to 'place' the supermark and that is why there is this limitation (and this was the only way I could get them to work).

ETsd4
03-27-11, 03:32 PM
I looked through my code to see what was going on (and to remember how they worked) and now I know why you can't set a supermark. In order to place a supermark your sub or a previous supermark has to be visible in the nav map. I need a reference to work off of to 'place' the supermark and that is why there is this limitation (and this was the only way I could get them to work).

Thxs for the explanation. That illustrates why at extreme zoom-in without any sub-icon and no other shown supermarks it is not possible to add a supermark on the map.

THE_MASK
03-27-11, 04:58 PM
I have no real navigation marks now .
I reinstalled real nav and forget to comment out the sub . sorry .

ReallyDedPoet
03-27-11, 07:29 PM
Does it matter when this is installed?

TheDarkWraith
03-27-11, 08:55 PM
Does it matter when this is installed?

No. Each patch can be enabled/disabled at any time :up:

ReallyDedPoet
03-27-11, 09:05 PM
No. Each patch can be enabled/disabled at any time :up:

Great, thanks :up:

brandtryan
03-28-11, 08:08 AM
I reinstalled real nav and forget to comment out the sub . sorry .

DOH--me too. Sorry DW. For some reason I thought one of the other patches/mods took care of this.

brandtryan
03-28-11, 12:29 PM
I reinstalled real nav and forget to comment out the sub . sorry .

Hmm. I verified my menu.txt has the right entries--but still can't place a SM unless there is another SM within view. For now, just using solution above, creating one zoomed out, then moving it, zoomed in.

TheDarkWraith
03-28-11, 12:45 PM
Hmm. I verified my menu.txt has the right entries--but still can't place a SM unless there is another SM within view. For now, just using solution above, creating one zoomed out, then moving it, zoomed in.

see post #151

brandtryan
03-28-11, 06:39 PM
see post #151

got it

MiTon
03-31-11, 06:59 AM
Hi TDW,

thanks again for your great work.

To make the pathcher even more enjoyable for noobs like me, there would be one thing that'll be realy helpfull.

Sometimes when chosing new colors, I had problems with the readability.
And starting up SH5 to check the new colors always take a lot of time, so
a navmap preview would be awesome.

regards

MiTon

stoianm
03-31-11, 07:09 AM
Hi TDW,

thanks again for your great work.

To make the pathcher even more enjoyable in for noobs like me, there would be one thing, that'll be realy helpfull.

Sometimes when chosing new colors, I had problems with the readability.
And starting up SH5 to check the new colors always take a lot of time, so
a navmap preview would be awesome.

regards

MiTon

You have some colors chart exprimed in RGB value here:

RGB-COLORS-CHART-1 (http://www.web-source.net/216_color_chart.htm)

RGB-COLORS-CHART-2 (http://www.htmlcenter.com/blog/rgb-color-chart/)


And here is a useful tool to make your combination in the RGB code to see how the colors will be displayied in your game:

RGB-colors-CALCULATOR (http://www.drpeterjones.com/colorcalc/)


regards

Magic1111
03-31-11, 07:25 AM
- 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




Hi Folks!

Iīve a question: Can we change the color for the plotting line with the SH5-Patcher Tool?

I mean, when i click with left mouse key on my sub-icon on NavMap to plot the course, this color of line I would change in another color (because the line is too thin, hard to see) ?

Mean "compass" from the above quote these plotting line ? And when yes, I doesnīt find the right setting in the SH5-Patcher-Tool ? Which "change Number" is for the compass ?:hmmm:

Best regards,
Magic

MiTon
03-31-11, 09:51 AM
You have some colors chart exprimed in RGB value here:

RGB-COLORS-CHART-1 (http://www.web-source.net/216_color_chart.htm)

RGB-COLORS-CHART-2 (http://www.htmlcenter.com/blog/rgb-color-chart/)


And here is a useful tool to make your combination in the RGB code to see how the colors will be displayied in your game:

RGB-colors-CALCULATOR (http://www.drpeterjones.com/colorcalc/)


regards

Thx Stoianm, very helpfull!

But personaly, with these charts only, I find it hard to figure out if these colors are matching. Maybe I'm some kind of colorblind??
So I thought that this could be a nice feature if TDW is bored for a minute or two. :D

SashaKA001
03-31-11, 10:13 AM
Men here everything is clear and simple.:har: Choosing a protractor choose the color you want, make it true.:yeah: You also have to have all chewed only remaining swallow,:yep: and all. it is not clear?:timeout:

MiTon
03-31-11, 10:22 AM
Men here everything is clear and simple.:har: Choosing a protractor choose the color you want, make it true.:yeah: You also have to have all chewed only remaining swallow,:yep: and all. it is not clear?:timeout:


It's no question how to chose different colors. I can do that!
It was just an idea for a "nice to have feature"

I addmit I have no tallent finding nicely corresponing colors for my taste that give a good readability for me.
And since SH5 startup takes a lot of time, it would be cool to see how your new colors will look ingame.


Greets

MiTon

Magic1111
03-31-11, 12:41 PM
Hi Folks!

Iīve a question: Can we change the color for the plotting line with the SH5-Patcher Tool?

I mean, when i click with left mouse key on my sub-icon on NavMap to plot the course, this color of line I would change in another color (because the line is too thin, hard to see) ?

Mean "compass" from the above quote these plotting line ? And when yes, I doesnīt find the right setting in the SH5-Patcher-Tool ? Which "change Number" is for the compass ?:hmmm:

Best regards,
Magic

For more clearify my above post here a screenshot:

http://img862.imageshack.us/img862/9637/sh5img20110331193059.jpg (http://img862.imageshack.us/i/sh5img20110331193059.jpg/)


I would have the plotting line (see the arrows) in another color ! Is this possible ?

Best regards,
Magic

SashaKA001
03-31-11, 03:35 PM
For more clearify my above post here a screenshot:

http://img862.imageshack.us/img862/9637/sh5img20110331193059.jpg (http://img862.imageshack.us/i/sh5img20110331193059.jpg/)


I would have the plotting line (see the arrows) in another color ! Is this possible ?

Best regards,
Magic

but it is not right for you?:yeah:

Church's NavMap - Red Lines (http://www.subsim.com/radioroom/downloads.php?do=file&id=3087)

Magic1111
03-31-11, 03:59 PM
but it is not right for you?:yeah:

Church's NavMap - Red Lines (http://www.subsim.com/radioroom/downloads.php?do=file&id=3087)

Sure, I know the MOD, but the red color appear only after plotting course (when I click with right mouse button to confirm the course).

I mean, when I click on sub-icon or waypoint-icon to plot an course, this line (as see in my screenshot) for draw/plot the course is not in red or another color ! And in my opinion this line is too tiny and hard to see !!!

As I described, only when Iīm ready with course plotting and I click the right mouse button, then the line appear in red INSTEAD of the big-stock-blue Line (from Stock game).

You know what I mean ?:hmmm:

Best regards,
Magic

SashaKA001
03-31-11, 04:14 PM
Sure, I know the MOD, but the red color appear only after plotting course (when I click with right mouse button to confirm the course).

I mean, when I click on sub-icon or waypoint-icon to plot an course, this line (as see in my screenshot) for draw/plot the course is not in red or another color ! And in my opinion this line is too tiny and hard to see !!!

As I described, only when Iīm ready with course plotting and I click the right mouse button, then the line appear in red INSTEAD of the big-stock-blue Line (from Stock game).

You know what I mean ?:hmmm:

Best regards,
Magic

Yes, I understand what you mean, then it should:ping: do and look:ping: TheDarkWraith:shucks::shucks::shucks:

Magic1111
04-01-11, 02:34 AM
Yes, I understand what you mean, then it should:ping: do and look:ping: TheDarkWraith:shucks::shucks::shucks:

Yes, would be nice if he would help here !!! :yeah:

Alky
04-01-11, 01:21 PM
I tried the hex editor thing with "HexEdit" and the "XVI32" also mentioned in a post in this thread. I either wasn't allowed to change the bytes or couldn't find them in a search. Thank you TDW for the patcher, it solved all my hacking short-comings :DL
At least I think so. I ran the hydrophone patch and it chaned the date and time so I assume it worked, I haven't had time to try the game. Now I have to locate the Real Navigation mod I think. :hmmm:

stoianm
04-01-11, 01:25 PM
I tried the hex editor thing with "HexEdit" and the "XVI32" also mentioned in a post in this thread. I either wasn't allowed to change the bytes or couldn't find them in a search. Thank you TDW for the patcher, it solved all my hacking short-comings :DL
At least I think so. I ran the hydrophone patch and it chaned the date and time so I assume it worked, I haven't had time to try the game. Now I have to locate the Real Navigation mod I think. :hmmm:
it is in the same mod with the New ui by tdw:

http://www.subsim.com/radioroom/showpost.php?p=1332669&postcount=1

regards

Obelix
04-04-11, 04:21 AM
Hi TheDarkWraith!
Does not appear to you at the expanse of the sh5.exe system damage and repair the boat? I think everybody knows that the system damage and repair the boat does not hold water. Is there any progress on this issue?

Obelix
04-05-11, 05:41 PM
I do not understand what is written or just do not really have an answer?:06:

Obelix
04-06-11, 08:12 PM
And hello again, TheDarkWraith
I want to put the puzzle before you, it concerns the sound of diesel engines.
Can you make an extra controller, which will receive signals from the engine telegraph and post-processing of signals received from the telegraph to issue a command to launch the audio file corresponding to the current turnover of diesel engines? Stock sound file can be replaced by zero, or disable it in Sh.sdl. I'm sure so you can solve the problem of changing the sound of diesel engines is not on the volume. So it is possible to realize the adjustment of the sound frequency.
What do you think?
Perhaps it could be some sort of additional scripts.
In general, I imagine it like this:
need to write a script that will intercept the command of throttle and convert them into commands to start the necessary audio files. But it already you know best how to implement it and whether it is possible (I am sure that is possible)

Dignan
04-12-11, 06:52 AM
Can the SH5Patcher be used to install patch 1 (hydro fix)?

MiTon
04-12-11, 12:22 PM
Can the SH5Patcher be used to install patch 1 (hydro fix)?

Hi Dignan!

Yes it can, that's what TDW built it for! (and to apply patch 2 and 3).
Just take a look at the first post and you'll find this!


http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3851


regards


MiTon

Dignan
04-12-11, 01:22 PM
Hi Dignan!

Yes it can, that's what TDW built it for! (and to apply patch 2 and 3).
Just take a look at the first post and you'll find this!


http://www.subsim.com/radioroom/picture.php?albumid=468&pictureid=3851


regards


MiTon

Thanks for the reply. :up:

wokelly
04-21-11, 10:51 PM
TheDarkWraith (http://www.subsim.com/radioroom/member.php?u=254741) directed me here so I can fix the colours on the tactical map because I can't see the grey against the blue background. I got a hex editor, but I can't find the lines specified. I don't know how to find things like 0x197A4A, or even 197A4A.

http://img860.imageshack.us/img860/5136/cantsee.jpg[/URL]

Can someone point out the areas on the left and top I am suppose to be looking at?

TheDarkWraith
04-21-11, 10:55 PM
TheDarkWraith (http://www.subsim.com/radioroom/member.php?u=254741) directed me here so I can fix the colours on the tactical map because I can't see the grey against the blue background. I got a hex editor, but I can't find the lines specified. I don't know how to find things like 0x197A4A, or even 197A4A.

Can someone point out the areas on the left and top I am suppose to be looking at?

Post #1 of this thread at the very bottom has an application I wrote to make things much easier for this :yep:

Medzell
04-25-11, 04:05 AM
I have to say, after being away for quite a long time, that what's been going on is amazing!! That wee SH5.exe modifier is an absolute Godsend for those of us who are longer in the tooth (and poorer in the eyes) than we care to mention. MO and TDW with Real Nav and 100% realism makes SH5 so much more enjoyable now for those of us who are immersion/reality freaks. Only problem is, I'll most likely be at it at least 12 hours-a-day now!!!!!

LtzS_Petersen
06-02-11, 02:16 PM
Wow, now my Sonar Man can help the Cook with the Potatoes. :yeah:
Great work!

Ruby2000
06-02-11, 03:34 PM
Hi TDW,


the German version of your Patcher :up:

http://forums-de.ubi.com/eve/forums/a/tpc/f/1151033738/m/6511078809?r=1531078809#1531078809

Best Regards

Ruby

Nikitn
06-05-11, 11:17 AM
In this case, it seems to me that this is cheating! This greatly simplifies life so easy and it was not for the German submariners. Does hydrophones that time could give such accurate results? Personally, I doubt it! The most that can hydrophone - so this issue bearing on the target and determine zoom in touch. And it is largely dependent on the acoustics. Only at the end of the war became possible attacks without the use of the periscope, which focused exclusively on the hydrophone.
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.

Well not really he was using active sonar and that tech was pretty accurate even back then. Measuring distance was easy. Just send out one, maybe a few, sound pulse(s), and see how long until you receive it back. velocity=distance/time => time=distance/velocity

Tho ur right, until the XXI using active sonar was very risky for regular subs, as potential escorts could easily pick up the signal.

Nikitn
06-05-11, 11:36 AM
In this case, it seems to me that this is cheating! This greatly simplifies life so easy and it was not for the German submariners. Does hydrophones that time could give such accurate results? Personally, I doubt it! The most that can hydrophone - so this issue bearing on the target and determine zoom in touch. And it is largely dependent on the acoustics. Only at the end of the war became possible attacks without the use of the periscope, which focused exclusively on the hydrophone.
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.

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:

http://i1124.photobucket.com/albums/l568/stoianm/hydro.jpg

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

Ya don't need to do that. I made a little formula (I'm bored yes) for the target's speed:

Speed= sqrt[(sin(a)*x/tan(a) -y)^2 + (sin(a)*x)^2]/time

Where a= the angle difference on your hydrophone (you said your angle went from 61 to 49... that means a=61-49=12). time= how long ur measurement took (in your case 5 minutes = 5*60s=300s)

x= your first range report (2980 meters in your case).
y= your second range report (2170 meters in your case).

Just put all of that in your calculator (make sure angle is configured as degrees and not radians if you live in the USA) and you should have the target's speed. For real WW2 subs, probably the on-board analogue computer would do that automatically...

I could show you how to locate the course as well using math and a calculator if you want, it's not hard !

Obelix
06-05-11, 07:54 PM
Well not really he was using active sonar and that tech was pretty accurate even back then. Measuring distance was easy. Just send out one, maybe a few, sound pulse(s), and see how long until you receive it back. velocity=distance/time => time=distance/velocity

Tho ur right, until the XXI using active sonar was very risky for regular subs, as potential escorts could easily pick up the signal.
All true, but the Germans did not use active sonar because of the risk of being detected. Hydrophone could not send the same impulses that he only listened.

parazaine
07-01-11, 08:12 AM
I know this may be pushing things a bit but i'd like to be able to try plotting the 4 bearing method myself and one of the barriers i've found (apart from the time constraint) was telling one bearing from another, one mark from another etc.

Is it perhaps possible to have a cycle of colors for say a certain number of instances of the same thing (line ,mark or whatever) so that say line 1 drawn is one color, line 2 is another and so on for maybe 4 different colors before repeating?

Also is there an easy way to draw parallels using the in-game tools? Perhaps someone could do a tutorial for those noobs like myself that are lacking the basic knowledge of how to use the map tools effectively?

The ability to add small text entries to the map might also be useful?

TheDarkWraith
07-01-11, 09:12 AM
The ability to add small text entries to the map might also be useful?

Those are called Supermarks and are available in my UIs mod.

TheDarkWraith
07-01-11, 09:13 AM
I know this may be pushing things a bit but i'd like to be able to try plotting the 4 bearing method myself and one of the barriers i've found (apart from the time constraint) was telling one bearing from another, one mark from another etc.

Is it perhaps possible to have a cycle of colors for say a certain number of instances of the same thing (line ,mark or whatever) so that say line 1 drawn is one color, line 2 is another and so on for maybe 4 different colors before repeating?

interesting idea :hmmm:

Trevally.
07-01-11, 11:49 AM
I know this may be pushing things a bit but i'd like to be able to try plotting the 4 bearing method myself and one of the barriers i've found (apart from the time constraint) was telling one bearing from another, one mark from another etc.

Is it perhaps possible to have a cycle of colors for say a certain number of instances of the same thing (line ,mark or whatever) so that say line 1 drawn is one color, line 2 is another and so on for maybe 4 different colors before repeating?

Also is there an easy way to draw parallels using the in-game tools? Perhaps someone could do a tutorial for those noobs like myself that are lacking the basic knowledge of how to use the map tools effectively?

The ability to add small text entries to the map might also be useful?

Try my tutorial for four bearings with real nav.
Click on my sig for download:up:

parazaine
07-01-11, 05:14 PM
Try my tutorial for four bearings with real nav.
Click on my sig for download:up:

Thx, downloaded, will take a look.

parazaine
07-01-11, 05:15 PM
re: supermark

Lol, I wondered what that feature was...didnt seem to do anything but then it wouldn't unless i typed something?

TheDarkWraith
07-01-11, 10:21 PM
re: supermark

Lol, I wondered what that feature was...didnt seem to do anything but then it wouldn't unless i typed something?

You click on the supermark icon then click on map where you want it placed. Once you click the map then a box will popup to allow you to type your text in.

Anvart
07-02-11, 01:20 PM
Hi, guys.
The question from simple curiosity ...
What program do you prefer to use for R/E?
OllyDbg 1.10, OllyDbg 2.01, Immunity Debugger 1.83, IDA 5.? (Pro is not free) or some other program?

TheDarkWraith
07-02-11, 01:38 PM
Hi, guys.
The question from simple curiosity ...
What program do you prefer to use for R/E?
OllyDbg 1.10, OllyDbg 2.01, Immunity Debugger 1.83, IDA 5.? (Pro is not free) or some other program?

Olly Debug 1.10 and CE 6.1 are my main ones (and then some ancilliary tools for dumping PE header, listing ordinals of dlls, some tools I've made, etc.)

Anvart
07-02-11, 02:22 PM
Thanks, RB/TDW. :DL
Immunity Debugger 1.83 is very similar to Olly Debugger, but it uses python.
and...
What do you mean by the abbreviation CE 6.1? z/Scope Code Editor/Emulator 6.1.? Network and Internet tool?:haha:
and...
Do you like cracklab.ru?

reaper7
07-02-11, 08:12 PM
Cheat Engine 6.1 ;) great for tracing pointers etc.

Tomi_099
07-03-11, 06:29 AM
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).

----------:up:-------------- Reverse engineering------------:up: --------------

Great work and a real beginning.
Those who want to learn assembly and want to understand what Hexadecimal
Everything can , and how a computer works should start here.


Assembly for NEWBIS ...and more....---Google / Vivek Ramachandran ----


For Start !!
http://www.securitytube.net/video/208

http://www.securitytube.net/groups?operation=view&groupId=5





This video is part of the following groups:




1. Assembly Language Megaprimer for Linux ( 11 videos)
Assembly Primer for Hackers (Part 1) System Organization
Assembly Primer for Hackers (Part 2) Virtual Memory Organization
Assembly Primer for Hackers (Part 3) GDB Usage Primer
Assembly Primer for Hackers (Part 4) Hello World
Assembly Primer for Hackers (Part 5) Data Types
Assembly Primer for Hackers (Part 6) Moving Data
Assembly Primer for Hackers (Part 7) Working with Strings
Assembly Primer for Hackers (Part 8) Unconditional Branching
Assembly Primer for Hackers (Part 9) Conditional Branching
Assembly Primer for Hackers (Part 10) Functions
Assembly Primer for Hackers (Part 11) Functions Stack
. after then cams ..this !!!

http://raykoid666.wordpress.com/2009/11/17/buffer-overflow-primer-review/

http://www.securitytube.net/groups?operation=view&groupId=4


The links to the different parts:
Part 1 (Smashing the stack)
Part 2 (Writing exit shellcode)
Part 3 (Executing shellcode)
Part 4 (Disassembling execve)
Part 5 (shellcode for execve)
Part 6 (exploiting a program)
Part 7 (exploiting a program: demonstration)
Part 8 (return to libc theory)
Part 9 (return to libc theory: demonstration)


Videos 1-4 have to do with basic system calls, mov commands,
you make a hello world program and then video 3 is all about using gdb

[URL=http://imageshack.us/photo/my-images/4/memorysy.jpg/][IMG]http://img4.imageshack.us/img4/9968/memorysy.jpg
(Viveks tutorial is the best i***8217;ve seen)

Videos 5-11 are all about more indepth mov commans, creating variables and examining memory layout and values with gdb.
This is all very useful but just watching the videos is not enough!
You need to go through and do it along with him,
you have to write the programs(even though he says you can download them) and you need to get assembly in your fingers.

Think of great athletes, they didn***8217;t get great by watching sports on TV ***8211;
they went out and did the real thing ***8211;

Exact same concept with computers ***8211;

Practice practice practice. :yeah:

Anvart
07-03-11, 07:06 AM
Cheat Engine 6.1 ;) great for tracing pointers etc.
Thanks, reaper7.
I forgot about it... it's as ArtMoney... but my favorite is IDA Pro... :O:

@Tomi_099

Thanks, Tomi.

**************************************************
P.S. In internet there are granny2.dll with granny2.pdb ver. 2.8.39...
and granny 3D exporters ver. 2.8.39 for Max/Maya 2008 ... 2011.
... nothing I can say more I did not test this stuff.

Dodo11
07-04-11, 07:20 AM
Thx for this patcher and for all your mods.

Brumete
07-06-11, 11:33 AM
Could someone make a video tutorial on how to perform the steps with the hex editor to patch the sh5.exe?, Would be helpful for those who do not have much experience with these editors and this way of patching the sh5.exe. thank you very much

Targor Avelany
07-06-11, 11:35 AM
there is no need for the HEX editors, as TDW created a patcher, which could be found in the first post of this thread.

arctic
07-06-11, 01:26 PM
I was just about to move from GWX to SH5 as I heard the amazing modders of subsim have fixed the game!
Too bad I bought the game from steam, now I guess I have to buy that box version too. :dead:

Anyways, great work TheDarkWraith. Thank you in advance.

captnmike
07-08-11, 10:51 AM
EY! EY! Fello Sub Captn's,
A simple question? : Is there a "hotkey" for zooming (in & out) the "Navigation Map"? My mouse wheel is wearing out and I can't find the "magnifying glass" in the map tools in SH5 like there was in SH1-4!
Thanks in advance for any reply!
Captnmike :-):nope:

maferio
08-21-11, 05:10 PM
Hi everybody!, glad to find this nice forums :DL

I'm a newbie in SH series and I decided start my career in SHV. In the last few days I'm reading as much as I can in order to set up SHV properly by means of realism.

First of all I want to thank TDW for the subject of this thread :yeah:

Let's see, my copy of the game is the retail one purchased in Spain, (see cover (http://www.clonigames.com/2545-2514-thickbox/silent-hunter-5-codegame.jpg)). I DO NOT own the steam version and I have the game fully updated with the last official patch.

However my sh5.exe does not appear as it's supposed to be. It happens exactly the same thing as the guy in post #84 (http://www.subsim.com/radioroom/showpost.php?p=1623552&postcount=84), see picture here (http://i52.tinypic.com/25pjrpk.jpg).

How can be that? I assume that I can not fix the hydrophone issue, isnīt it ? :wah: :damn:

Many thanks in advance!

THE_MASK
08-21-11, 05:17 PM
Hi everybody!, glad to find this nice forums :DL

I'm a newbie in SH series and I decided start my career in SHV. In the last few days I'm reading as much as I can in order to set up SHV properly by means of realism.

First of all I want to thank TDW for the subject of this thread :yeah:

Let's see, my copy of the game is the retail one purchased in Spain, (see cover (http://www.clonigames.com/2545-2514-thickbox/silent-hunter-5-codegame.jpg)). I DO NOT own the steam version and I have the game fully updated with the last official patch.

However my sh5.exe does not appear as it's supposed to be. It happens exactly the same thing as the guy in post #84 (http://www.subsim.com/radioroom/showpost.php?p=1623552&postcount=84), see picture here (http://i52.tinypic.com/25pjrpk.jpg).

How can be that? I assume that I can not fix the hydrophone issue, isnīt it ? :wah: :damn:

Many thanks in advance! use the patcher
http://www.gamefront.com/files/20162641/TDW_SH5_Patcher_7z

maferio
08-22-11, 03:20 AM
use the patcher
http://www.gamefront.com/files/20162641/TDW_SH5_Patcher_7z

Hi Sober, thanks for your answer :up:.

Indeed I already considered use the patcher but it wonīt work cause that script (see file TDW_SH5_Patches.s5p attached in the patcher) assumes a specifically structure of the sh5.exe which doesnīt fit mine.

I begin to assume that exist a special DVD box version of SHV which for some reason the binary file sh5.exe is different from former versions. Fortunately TDW contact me yesterday and I'll send my sh5.exe for his analysis. I hope he can confirm or deny my hypothesis :hmmm:

As Captain Can told me, my problem was my game didnīt updated to version 1.2. I manually updated to patch 1.2 and that fixed my sh5.exe

pythos
08-28-11, 11:57 PM
How do I use the patcher?

I clicked on the application icon, and it opened. I backed up the SH5 exe, and then tried to open the EXE file, but it does not appear on the list anymore. The file type it is looking for is an .s5p. What is that?

I keep reading I no longer need to edit hex, and that the patcher does everything, but it seems to not do anything.

My sonar man is completely deaf. Had a merchant visible off the port bow, chugging along, and the operator could not detect it.

0rpheus
08-28-11, 11:59 PM
How do I use the patcher?

I clicked on the application icon, and it opened. I backed up the SH5 exe, and then tried to open the EXE file, but it does not appear on the list anymore.

My sonar man is completely deaf. Had a merchant visible off the port bow, chugging along, and the operator could not detect it.

http://www.subsim.com/radioroom/showpost.php?p=1735615&postcount=7773

:salute:

mia389
08-29-11, 12:05 AM
0rpheus just beat me to it :O: If you dont see the exe you will have to find it. My exe is in C:\Ubisoft\Silent Hunter 5

pythos
08-29-11, 12:17 AM
THank you.

Now to see if my operator can do his job. LOL

tkripta
09-03-11, 02:17 PM
Brought the steam version of game without knowing this bug... man! that sucks!
Great archive with normal version, gratz man

0rpheus
09-03-11, 05:20 PM
Asking here because it seems more appropriate - I can't find an option to do it in the exe patcher, but is it possible to change the colour of the warship sonar line in the TAI, like it is with the ruler etc?

Thanks :salute:

TheDarkWraith
09-03-11, 07:37 PM
Asking here because it seems more appropriate - I can't find an option to do it in the exe patcher, but is it possible to change the colour of the warship sonar line in the TAI, like it is with the ruler etc?

Thanks :salute:

that one should be much easier to change as it's a file: \data\Menu\Gui\ContLine.dds :up: Be warned that it's used for other things than just the sonar line

0rpheus
09-03-11, 08:02 PM
that one should be much easier to change as it's a file: \data\Menu\Gui\ContLine.dds :up: Be warned that it's used for other things than just the sonar line

Hmm, like what? All I want is to make them more visible in deeper ocean (the blues are almost the same)... but not if it's gonna bork something else! :D

Lasnud
09-05-11, 12:29 PM
Thanks TDW amazing job!!!! :yeah:

Magic1111
09-05-11, 02:10 PM
Thanks TDW amazing job!!!! :yeah:

:salute::salute::salute:Welcome aboard !!!:salute::salute::salute:

mrwayne
09-21-11, 12:09 PM
Have you found a solutin for the steam version? Or i must buy a nonsteamversion?=(

bobgold
09-30-11, 03:54 AM
really wish I had known about this before I bought the game on steam...

TheDarkWraith
09-30-11, 08:20 AM
Have you found a solutin for the steam version? Or i must buy a nonsteamversion?=(

from post #1:

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.

mobucks
09-30-11, 09:56 AM
Don't sweat it too much Bob, many of us got along fine before these .exe patches came along. If you play map contacts on, the blue/black lines on the map render the hydro fix redundant, and if you play realism, you'll be using your ears more than your eyes, which seems more realistic anyway. As for the changing of line colors, one way to get around that is to look for map mods that change the colors of the map seawater, making the default grey lines you draw much easier to see.

Lonelywolfmother
10-01-11, 11:32 AM
Is this compatible with stock 1.2 version?

Thanks.

Trevally.
10-01-11, 12:00 PM
Is this compatible with stock 1.2 version?

Thanks.

Yes:up:

Lonelywolfmother
10-01-11, 12:07 PM
Yay thank you!:salute:

csvscs96
10-15-11, 08:46 PM
i have a problem , i did everything according to the post instruction but when i go to the hyrdophone station, the sonarman reports ship bearing 62 but on the chart at the upper left corner says bearing 56..:wah:

kylania
10-15-11, 09:59 PM
Welcome to the forums! :)

Each contact will be detectable in a range of degrees, and your sonar man will usually call out the loudest, middle, bearing for the contact. If you hop on the hydrophone you should be able to hear this.

Then again, I've seen times where the sonar guy is totally off. He'll call one degree and i'll listen and it'll be 20-30 degrees off entirely. He was also detecting my own screws as unknown when the engines turned off and the boat at a stop, so... I dunno really. :)

Try a save and reload, worked for me in that one 'sonar guy can't hear straight' situation.

oakdesign
10-21-11, 07:40 AM
I'm using the Steam Version for SH so I could not use TDW's exe patcher and had to life with the hydro bug.
Yesterday I was on a patrol and was hydro hunting a target using the four bearing method. After I changed postition to take my forth bearing my dump sonar guy did't report a contact, so I jumped to the sonar station myself and the funny thing was
The target's ship class showed up within the complete 20° cone not only for the part of a second as before.
As I haven't changed anything on my mod soup and I have auto update for my steam games turned on it could be that I got a patched Steam SH5.exe?
Anyway I'm happy to have a functional hydrophone now and can go on hunting.

Husksubsky
10-26-11, 09:08 PM
Let me try to get this right. I can patch the sh5.exe at any time? don t need to clear the modlist in JSGME? ( Does any mods change dh5.exe btw?)

I want patch 2 when using realnav or not. Does it add add text to the map or only the hydrophone notepad.

Do we need to do anything with these strings at all nowadays? Or does it automaticly read from menu that comes with Realnav

;820=Unknown
;821=Warship
;822=Merchant
;823=Submarine
;824=Aircraft
825=Land

:salute:

kylania
10-26-11, 09:29 PM
Yeah, just run it once and you're set. The RealNav needs the three things set in the SH5 Patcher as well as the menu.txt changes in it's readme.txt.

But basically just run the patcher, do the 4 things at the top, then change colors for what you want and you're done with that till a reinstall or (heh, can't believe I'm gonna try to say this with a straight face...) a new patch from Ubisoft.

Husksubsky
10-26-11, 10:56 PM
Yeah, just run it once and you're set. The RealNav needs the three things set in the SH5 Patcher as well as the menu.txt changes in it's readme.txt.

But basically just run the patcher, do the 4 things at the top, then change colors for what you want and you're done with that till a reinstall or (heh, can't believe I'm gonna try to say this with a straight face...) a new patch from Ubisoft.
Thx Done.:). I will never understand why those changes to menu.txt since there is allready a menu.txt there with those changes implemented.
This is my modlist btw
cheers:salute:
Magnum_Opus_v0_0_1
Enhanced FunelSmoke1.2_by HanSolo78
TheDarkWraith_DC_Water_Disturbances_v2_0_SH5
Dynamic Environment SH5 Basemod (realistic version) V2.1
Dynamic Environment SH5 Waves (realistic version) V2.1
Dynamic Environment SH5 Atlantic Floor V2.1
Dynamic Environmental SH5 Realistic Colors V2.1
Dynamic Environment SH5 Undersea (temperate and polar) V2.1
Dynamic Environmental SH5 Shallow Waters V2.1
Dynamic Environment SH5 Shallow Waters V2.1 Patch
FX_Update_0_0_19_ByTheDarkWraith
NewUIs_TDC_6_8_0_ByTheDarkWraith
NewUIs_TDC_6_8_0_Das_Boot_Crew_Mod_by_Illyustrator
NewUIs_TDC_6_8_0_No_Snorkel_Exhaust_Smoke
Manos Scopes-patch for 16x9
IO_StrategicMap_4_5_for_TDWv680
NewUIs_TDC_6_8_0_Real_Navigation
IRAI_0_0_30_ByTheDarkWraith
IRAI_0_0_30_No_hydrophone_on_surface
Stormys DBSM SH5 v1.3 Basemod
Stormys DBSM SH5 v1.3 optional -6db damped Sonarguy
Stormys DBSM SH5 v1.3 optional NavMap babelling
Stormys DBSM SH5 v1.3 optional remaining orig sounds converted to 22Khz
Stormys DBSM SH5 v1.3 additional crew sounds beta6
Stormys DBSM SH5 v1.3 optional louder engine sounds
Trevally Automated Scripts v0.6

TheDarkWraith
11-08-11, 10:11 PM
v1.0.21.0 released. See post #1.

This version adds the ability to define the default hydrophone volume used in-game. As the hydrophone volume cannot currently be changed in-game this allows you to define the volume wanted.

Using the patch file provided in the zip file will set the hydrophone volume to 1.0 (max volume). The stock value is 0.9 (so 1.0 will be a 10% increase in volume)

:|\\

Magic1111
11-09-11, 07:59 AM
v1.0.21.0 released. See post #1.

This version adds the ability to define the default hydrophone volume used in-game. As the hydrophone volume cannot currently be changed in-game this allows you to define the volume wanted.

Using the patch file provided in the zip file will set the hydrophone volume to 1.0 (max volume). The stock value is 0.9 (so 1.0 will be a 10% increase in volume)

:|\\

Good idea TDW, many thanks!!! :yeah:

Best regards,
Magic

Loltak
11-10-11, 01:28 PM
Don't sweat it too much Bob, many of us got along fine before these .exe patches came along. If you play map contacts on, the blue/black lines on the map render the hydro fix redundant, and if you play realism, you'll be using your ears more than your eyes, which seems more realistic anyway. As for the changing of line colors, one way to get around that is to look for map mods that change the colors of the map seawater, making the default grey lines you draw much easier to see.

So if i understand well, if i let the contact on the map (with or without color) this bug will no so "tragic" and i could not use this fix.
I ask this because buy the steam version is more convenience for me ;)

Gerald
11-10-11, 01:45 PM
@ Csvscs96! Welcome to SubSim :sunny:

TheDarkWraith
11-12-11, 08:44 PM
Working on next patch since I'm stuck in Portland, OR currently. The goal of this next patch is to fix the bug where CO2 is still generated when snorkel is raised. I've isolated the CO2 generation function and as you can see below it has nothing in it that looks to see if snorkel is raised or even present on the sub (my comments are included so you can 'see' what's going on) :nope:

Maybe some of you all will recognize some of these hard coded values in the code. I'd like to figure out what these values are.

Oh and another thing I noticed is that CO2 level is compared to a value that looks like a maxiumum CO2 level (0.899). CO2 levels > 10% are fatal are they not?? :shifty:


014D3BC0 /. 55 PUSH EBP ; Computes new CO2 percentage
014D3BC1 |. 8BEC MOV EBP,ESP ; create stack frame
014D3BC3 |. 83EC 58 SUB ESP,58 ; create temp variables
014D3BC6 |. 894D A8 MOV DWORD PTR SS:[EBP-58],ECX ; store pointer to memory locations at bottom of stack
014D3BC9 |. 8B45 A8 MOV EAX,DWORD PTR SS:[EBP-58] ; load EAX with pointer to memory variables
014D3BCC |. 8378 14 00 CMP DWORD PTR DS:[EAX+14],0 ; checking to see if something is enabled or not. What is it???
014D3BD0 |. 75 07 JNZ SHORT sh5.014D3BD9 ; if enabled then jump (this means we are generating CO2)
014D3BD2 |. 32C0 XOR AL,AL ; not enabled: zero out AL
014D3BD4 |. E9 22030000 JMP sh5.014D3EFB ; no CO2 generation - jump to end of function
014D3BD9 |> 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58] ; is enabled: copy pointer to memory locations to ECX
014D3BDC |. 8B51 14 MOV EDX,DWORD PTR DS:[ECX+14] ; load pointer into EDX
014D3BDF |. 8B45 A8 MOV EAX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into EAX
014D3BE2 |. 8B48 14 MOV ECX,DWORD PTR DS:[EAX+14] ; load pointer into ECX
014D3BE5 |. 8B12 MOV EDX,DWORD PTR DS:[EDX]
014D3BE7 |. 8B82 F4020000 MOV EAX,DWORD PTR DS:[EDX+2F4]
014D3BED |. FFD0 CALL EAX ; moves a byte into AL (denoting whether submerged or not - 1 = submerged)
014D3BEF |. 0FB6C8 MOVZX ECX,AL ; move AL into ECX first zeroing out ECX
014D3BF2 |. 85C9 TEST ECX,ECX ; test ECX to see if 0 or not (if 0 then surfaced)
014D3BF4 |. 75 07 JNZ SHORT sh5.014D3BFD ; if not 0 (then sub is submerged) then jump
014D3BF6 |. B0 01 MOV AL,1 ; was 0 (sub is surfaced): load 1 into AL
014D3BF8 |. E9 FE020000 JMP sh5.014D3EFB ; jump to end of function (no CO2 generation)
014D3BFD |> 8B55 A8 MOV EDX,DWORD PTR SS:[EBP-58] ; was not 0 (sub is submerged): copy pointer to memory locations into EDX
014D3C00 |. 8B42 14 MOV EAX,DWORD PTR DS:[EDX+14] ; load pointer into EAX
014D3C03 |. 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into ECX
014D3C06 |. 8B49 14 MOV ECX,DWORD PTR DS:[ECX+14] ; load pointer into ECX
014D3C09 |. 8B10 MOV EDX,DWORD PTR DS:[EAX]
014D3C0B |. 8B82 DC010000 MOV EAX,DWORD PTR DS:[EDX+1DC]
014D3C11 |. FFD0 CALL EAX ; loads a pointer into EAX (what is this pointer??)
014D3C13 |. 8945 F8 MOV DWORD PTR SS:[EBP-8],EAX ; store pointer into stack variable
014D3C16 |. 837D F8 00 CMP DWORD PTR SS:[EBP-8],0 ; compare stack variable to 0
014D3C1A |. 75 07 JNZ SHORT sh5.014D3C23 ; if not 0 then jump
014D3C1C |. 32C0 XOR AL,AL ; is 0: zero out AL
014D3C1E |. E9 D8020000 JMP sh5.014D3EFB ; jump to end of function (no CO2 generation)
014D3C23 |> F3:0F1005 9079>MOVSS XMM0,DWORD PTR DS:[1597990] ; not 0: load CO2 generation rate? into XMM0 - hard coded value (value loaded was 48.0)
014D3C2B |. F3:0F1145 F4 MOVSS DWORD PTR SS:[EBP-C],XMM0 ; store XMM0 to temp variable
014D3C30 |. D945 F4 FLD DWORD PTR SS:[EBP-C] ; load temp variable to top of floating point stack
014D3C33 |. D9E8 FLD1 ; load +1.0 to top of floating point stack
014D3C35 |. DEF1 FDIVRP ST(1),ST ; computes 1.0 (ST0) divided by CO2 generation rate? (ST1), places result back on top of stack, pops top of floating point stack
014D3C37 |. D95D FC FSTP DWORD PTR SS:[EBP-4] ; store result into temp variable and pop top of floating point stack (CO2 generation rate per person??)
014D3C3A |. D945 FC FLD DWORD PTR SS:[EBP-4] ; load temp variable (CO2 generation rate per person??) onto top of floating point stack
014D3C3D |. D84D 08 FMUL DWORD PTR SS:[EBP+8] ; multiply result by floating point number (357.1)
014D3C40 |. DC35 D8745901 FDIV QWORD PTR DS:[15974D8] ; divide by floating point value (3600.0 i.e. 1 hour)
014D3C46 |. D95D F0 FSTP DWORD PTR SS:[EBP-10] ; store result (total CO2 generation rate per second) into temp variable and pop top of floating point stack
014D3C49 |. 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into ECX
014D3C4C |. 8B51 14 MOV EDX,DWORD PTR DS:[ECX+14] ; load pointer into EDX
014D3C4F |. 8B45 A8 MOV EAX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into EAX
014D3C52 |. 8B48 14 MOV ECX,DWORD PTR DS:[EAX+14] ; load pointer into ECX
014D3C55 |. 8B12 MOV EDX,DWORD PTR DS:[EDX]
014D3C57 |. 8B82 20020000 MOV EAX,DWORD PTR DS:[EDX+220]
014D3C5D |. FFD0 CALL EAX ; Loads the current CO2 percentage onto top of floating point stack
014D3C5F |. D95D EC FSTP DWORD PTR SS:[EBP-14] ; store current CO2 percentage to temp variable and pop top of floating point stack
014D3C62 |. FF15 FC605401 CALL DWORD PTR DS:[<&Utils.?GetGameplayS>; Utils.?GetGameplaySettings@@YAPAUGameplaySettings@ @XZ
014D3C68 |. 8378 08 00 CMP DWORD PTR DS:[EAX+8],0 ; comparing some game play setting to 0 (to see if enabled or not) - Gameplay setting most likely Limited O2 - need to verify this!
014D3C6C |. 74 60 JE SHORT sh5.014D3CCE ; if gameplay setting not enabled then jump
014D3C6E |. D945 EC FLD DWORD PTR SS:[EBP-14] ; gameplay setting enabled: load current total CO2 percentage to top of floating point stack
014D3C71 |. DD05 48E95401 FLD QWORD PTR DS:[154E948] ; either loads minimum O2 percentage or maximum CO2 percentage - hard coded value (value was 0.899)
014D3C77 |. DFF1 FCOMIP ST,ST(1) ; compares value just loaded (ST0) to current total CO2 percentage (ST1) and pops top of floating point stack
014D3C79 |. DDD8 FSTP ST ; pop top of floating point stack
014D3C7B |. 72 17 JB SHORT sh5.014D3C94 ; if value loaded was less than current total CO2 percentage then jump
014D3C7D |. 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58] ; value loaded greater than current CO2 percentage: copy pointer to memory locations into ECX
014D3C80 |. 8B51 14 MOV EDX,DWORD PTR DS:[ECX+14] ; load pointer into EDX
014D3C83 |. D945 F0 FLD DWORD PTR SS:[EBP-10] ; load total CO2 generation rate per second onto top of floating point stack
014D3C86 |. D88A 58040000 FMUL DWORD PTR DS:[EDX+458] ; multiply total CO2 generation rate per second (ST0) by some floating point value (factor? value was 1.0)
014D3C8C |. D845 EC FADD DWORD PTR SS:[EBP-14] ; add current CO2 percentage to total CO2 generation rate per second (ST0)
014D3C8F |. D95D EC FSTP DWORD PTR SS:[EBP-14] ; store new current CO2 percentage to temp variable and pop top of floating point stack
014D3C92 |. EB 1B JMP SHORT sh5.014D3CAF ; skip over if value loaded was less than current CO2 percentage
014D3C94 |> D945 F0 FLD DWORD PTR SS:[EBP-10] ; value loaded less than current total CO2 percentage:
014D3C97 |. DC35 C8715901 FDIV QWORD PTR DS:[15971C8]
014D3C9D |. 8B45 A8 MOV EAX,DWORD PTR SS:[EBP-58]
014D3CA0 |. 8B48 14 MOV ECX,DWORD PTR DS:[EAX+14]
014D3CA3 |. D889 58040000 FMUL DWORD PTR DS:[ECX+458]
014D3CA9 |. D845 EC FADD DWORD PTR SS:[EBP-14]
014D3CAC |. D95D EC FSTP DWORD PTR SS:[EBP-14]
014D3CAF |> 51 PUSH ECX ; store pointer to memory locations on stack (just a placeholder will be overwritten)
014D3CB0 |. D945 EC FLD DWORD PTR SS:[EBP-14] ; load new current CO2 percentage to top of floating point stack
014D3CB3 |. D91C24 FSTP DWORD PTR SS:[ESP] ; store new current CO2 percentage to current stack location and pop top of floating point stack
014D3CB6 |. 8B55 A8 MOV EDX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into EDX
014D3CB9 |. 8B42 14 MOV EAX,DWORD PTR DS:[EDX+14] ; load pointer into EAX
014D3CBC |. 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58] ; copy pointer to memory locations into ECX
014D3CBF |. 8B49 14 MOV ECX,DWORD PTR DS:[ECX+14] ; load pointer into ECX
014D3CC2 |. 8B10 MOV EDX,DWORD PTR DS:[EAX]
014D3CC4 |. 8B82 24020000 MOV EAX,DWORD PTR DS:[EDX+224]
014D3CCA |. FFD0 CALL EAX ; ensure new current CO2 percentage in range 0.0 to 1.0
014D3CCC |. EB 1C JMP SHORT sh5.014D3CEA ; skip over gameplay setting not enabled
014D3CCE |> 51 PUSH ECX ; gameplay setting not enabled:
014D3CCF |. D9EE FLDZ
014D3CD1 |. D91C24 FSTP DWORD PTR SS:[ESP]
014D3CD4 |. 8B4D A8 MOV ECX,DWORD PTR SS:[EBP-58]
014D3CD7 |. 8B51 14 MOV EDX,DWORD PTR DS:[ECX+14]
014D3CDA |. 8B45 A8 MOV EAX,DWORD PTR SS:[EBP-58]
014D3CDD |. 8B48 14 MOV ECX,DWORD PTR DS:[EAX+14]
014D3CE0 |. 8B12 MOV EDX,DWORD PTR DS:[EDX]
014D3CE2 |. 8B82 24020000 MOV EAX,DWORD PTR DS:[EDX+224]
014D3CE8 |. FFD0 CALL EAX
014D3CEA |> DD05 08725901 FLD QWORD PTR DS:[1597208] ; load a floating point value onto top of floating point stack (hard coded memory location - value was 0.75)
014D3CF0 |. D945 EC FLD DWORD PTR SS:[EBP-14] ; load new current CO2 percentage to top of floating point stack
014D3CF3 |. DFF1 FCOMIP ST,ST(1) ; compares new current CO2 percentage (ST0) to hard coded value (ST1) and pop top of floating point stack
014D3CF5 |. DDD8 FSTP ST ; pop top of floating point stack
014D3CF7 |. 0F82 AC000000 JB sh5.014D3DA9 ; if new current CO2 percentage (ST0) was less than hard coded value (ST1) then jump
014D3CFD |. C745 E4 000000>MOV DWORD PTR SS:[EBP-1C],0 ; new current CO2 percentage was greater than hard coded value:
014D3D04 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3D07 |. 8B11 MOV EDX,DWORD PTR DS:[ECX]
014D3D09 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3D0C |. 8B82 E0000000 MOV EAX,DWORD PTR DS:[EDX+E0]
014D3D12 |. FFD0 CALL EAX
014D3D14 |. 8945 E8 MOV DWORD PTR SS:[EBP-18],EAX
014D3D17 |. EB 09 JMP SHORT sh5.014D3D22
014D3D19 |> 8B4D E4 /MOV ECX,DWORD PTR SS:[EBP-1C]
014D3D1C |. 83C1 01 |ADD ECX,1
014D3D1F |. 894D E4 |MOV DWORD PTR SS:[EBP-1C],ECX
014D3D22 |> 8B55 E4 MOV EDX,DWORD PTR SS:[EBP-1C]
014D3D25 |. 3B55 E8 |CMP EDX,DWORD PTR SS:[EBP-18]
014D3D28 |. 7D 7F |JGE SHORT sh5.014D3DA9
014D3D2A |. 8B55 E4 |MOV EDX,DWORD PTR SS:[EBP-1C]
014D3D2D |. 8B45 F8 |MOV EAX,DWORD PTR SS:[EBP-8]
014D3D30 |. E8 4BE1DFFF |CALL sh5.012D1E80
014D3D35 |. 8945 E0 |MOV DWORD PTR SS:[EBP-20],EAX
014D3D38 |. 6A 0B |PUSH 0B
014D3D3A |. 8B45 E0 |MOV EAX,DWORD PTR SS:[EBP-20]
014D3D3D |. 8B10 |MOV EDX,DWORD PTR DS:[EAX]
014D3D3F |. 8B4D E0 |MOV ECX,DWORD PTR SS:[EBP-20]
014D3D42 |. 8B42 14 |MOV EAX,DWORD PTR DS:[EDX+14]
014D3D45 |. FFD0 |CALL EAX
014D3D47 |. 0FB6C8 |MOVZX ECX,AL
014D3D4A |. 83F9 01 |CMP ECX,1
014D3D4D |. 75 55 |JNZ SHORT sh5.014D3DA4
014D3D4F |. 8B55 E0 |MOV EDX,DWORD PTR SS:[EBP-20]
014D3D52 |. 8955 DC |MOV DWORD PTR SS:[EBP-24],EDX
014D3D55 |. D945 08 |FLD DWORD PTR SS:[EBP+8]
014D3D58 |. DC35 D8745901 |FDIV QWORD PTR DS:[15974D8]
014D3D5E |. DC0D C8715901 |FMUL QWORD PTR DS:[15971C8]
014D3D64 |. D95D D8 |FSTP DWORD PTR SS:[EBP-28]
014D3D67 |. D945 D8 |FLD DWORD PTR SS:[EBP-28]
014D3D6A |. DC35 88795901 |FDIV QWORD PTR DS:[1597988]
014D3D70 |. D95D D8 |FSTP DWORD PTR SS:[EBP-28]
014D3D73 |. 51 |PUSH ECX
014D3D74 |. D945 D8 |FLD DWORD PTR SS:[EBP-28]
014D3D77 |. D91C24 |FSTP DWORD PTR SS:[ESP]
014D3D7A |. E8 61C60300 |CALL sh5.015103E0
014D3D7F |. 8BC8 |MOV ECX,EAX
014D3D81 |. E8 9AC70300 |CALL sh5.01510520
014D3D86 |. 8845 D7 |MOV BYTE PTR SS:[EBP-29],AL
014D3D89 |. 0FB645 D7 |MOVZX EAX,BYTE PTR SS:[EBP-29]
014D3D8D |. 83F8 01 |CMP EAX,1
014D3D90 |. 75 12 |JNZ SHORT sh5.014D3DA4
014D3D92 |. 6A 02 |PUSH 2
014D3D94 |. 8B4D DC |MOV ECX,DWORD PTR SS:[EBP-24]
014D3D97 |. 8B11 |MOV EDX,DWORD PTR DS:[ECX]
014D3D99 |. 8B4D DC |MOV ECX,DWORD PTR SS:[EBP-24]
014D3D9C |. 8B82 E0000000 |MOV EAX,DWORD PTR DS:[EDX+E0]
014D3DA2 |. FFD0 |CALL EAX
014D3DA4 |>^E9 70FFFFFF \JMP sh5.014D3D19
014D3DA9 |> DD05 48E95401 FLD QWORD PTR DS:[154E948] ; new current CO2 percentage was less than hard coded value: load hard coded value to top of floating point stack (value was 0.8999)
014D3DAF |. D945 EC FLD DWORD PTR SS:[EBP-14] ; load new current CO2 percentage to top of floating point stack
014D3DB2 |. DFF1 FCOMIP ST,ST(1) ; compare new current CO2 percentage (ST0) to hard coded value (ST1) and pop top of floating point stack
014D3DB4 |. DDD8 FSTP ST ; pop top of floating point stack
014D3DB6 |. 0F82 AA000000 JB sh5.014D3E66 ; if new current CO2 percentage is less than hard coded value then jump
014D3DBC |. C745 CC 000000>MOV DWORD PTR SS:[EBP-34],0 ; new CO2 percentage is greater than hard coded value:
014D3DC3 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3DC6 |. 8B11 MOV EDX,DWORD PTR DS:[ECX]
014D3DC8 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3DCB |. 8B82 E0000000 MOV EAX,DWORD PTR DS:[EDX+E0]
014D3DD1 |. FFD0 CALL EAX
014D3DD3 |. 8945 D0 MOV DWORD PTR SS:[EBP-30],EAX
014D3DD6 |. EB 09 JMP SHORT sh5.014D3DE1
014D3DD8 |> 8B4D CC /MOV ECX,DWORD PTR SS:[EBP-34]
014D3DDB |. 83C1 01 |ADD ECX,1
014D3DDE |. 894D CC |MOV DWORD PTR SS:[EBP-34],ECX
014D3DE1 |> 8B55 CC MOV EDX,DWORD PTR SS:[EBP-34]
014D3DE4 |. 3B55 D0 |CMP EDX,DWORD PTR SS:[EBP-30]
014D3DE7 |. 7D 7D |JGE SHORT sh5.014D3E66
014D3DE9 |. 8B55 CC |MOV EDX,DWORD PTR SS:[EBP-34]
014D3DEC |. 8B45 F8 |MOV EAX,DWORD PTR SS:[EBP-8]
014D3DEF |. E8 8CE0DFFF |CALL sh5.012D1E80
014D3DF4 |. 8945 C8 |MOV DWORD PTR SS:[EBP-38],EAX
014D3DF7 |. 6A 0B |PUSH 0B
014D3DF9 |. 8B45 C8 |MOV EAX,DWORD PTR SS:[EBP-38]
014D3DFC |. 8B10 |MOV EDX,DWORD PTR DS:[EAX]
014D3DFE |. 8B4D C8 |MOV ECX,DWORD PTR SS:[EBP-38]
014D3E01 |. 8B42 14 |MOV EAX,DWORD PTR DS:[EDX+14]
014D3E04 |. FFD0 |CALL EAX
014D3E06 |. 0FB6C8 |MOVZX ECX,AL
014D3E09 |. 83F9 01 |CMP ECX,1
014D3E0C |. 75 53 |JNZ SHORT sh5.014D3E61
014D3E0E |. 8B55 C8 |MOV EDX,DWORD PTR SS:[EBP-38]
014D3E11 |. 8955 C4 |MOV DWORD PTR SS:[EBP-3C],EDX
014D3E14 |. D945 08 |FLD DWORD PTR SS:[EBP+8]
014D3E17 |. DC35 D8745901 |FDIV QWORD PTR DS:[15974D8]
014D3E1D |. D95D C0 |FSTP DWORD PTR SS:[EBP-40]
014D3E20 |. D945 C0 |FLD DWORD PTR SS:[EBP-40]
014D3E23 |. DC35 88795901 |FDIV QWORD PTR DS:[1597988]
014D3E29 |. D95D C0 |FSTP DWORD PTR SS:[EBP-40]
014D3E2C |. 51 |PUSH ECX
014D3E2D |. D945 C0 |FLD DWORD PTR SS:[EBP-40]
014D3E30 |. D91C24 |FSTP DWORD PTR SS:[ESP]
014D3E33 |. E8 A8C50300 |CALL sh5.015103E0
014D3E38 |. 8BC8 |MOV ECX,EAX
014D3E3A |. E8 E1C60300 |CALL sh5.01510520
014D3E3F |. 8845 BF |MOV BYTE PTR SS:[EBP-41],AL
014D3E42 |. 0FB645 BF |MOVZX EAX,BYTE PTR SS:[EBP-41]
014D3E46 |. 83F8 01 |CMP EAX,1
014D3E49 |. 75 16 |JNZ SHORT sh5.014D3E61
014D3E4B |. 51 |PUSH ECX
014D3E4C |. D9E8 |FLD1
014D3E4E |. D91C24 |FSTP DWORD PTR SS:[ESP]
014D3E51 |. 8B4D C4 |MOV ECX,DWORD PTR SS:[EBP-3C]
014D3E54 |. 8B11 |MOV EDX,DWORD PTR DS:[ECX]
014D3E56 |. 8B4D C4 |MOV ECX,DWORD PTR SS:[EBP-3C]
014D3E59 |. 8B82 00010000 |MOV EAX,DWORD PTR DS:[EDX+100]
014D3E5F |. FFD0 |CALL EAX
014D3E61 |>^E9 72FFFFFF \JMP sh5.014D3DD8
014D3E66 |> DD05 A0715901 FLD QWORD PTR DS:[15971A0] ; new CO2 percentage is less than hard coded value: load top of floating point register with hard coded value (value was 0.9900)
014D3E6C |. D945 EC FLD DWORD PTR SS:[EBP-14] ; load top of floating point register with new current CO2 percentage
014D3E6F |. DFF1 FCOMIP ST,ST(1) ; compare new current CO2 percentage (ST0) to hard coded value (ST1) and pop top of floating point stack
014D3E71 |. DDD8 FSTP ST ; pop top of floating point stack
014D3E73 |. 0F82 80000000 JB sh5.014D3EF9 ; if new current CO2 percentage is less than hard coded value then jump
014D3E79 |. C745 B4 000000>MOV DWORD PTR SS:[EBP-4C],0 ; new current CO2 value greater than hard coded value:
014D3E80 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3E83 |. 8B11 MOV EDX,DWORD PTR DS:[ECX]
014D3E85 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
014D3E88 |. 8B82 E0000000 MOV EAX,DWORD PTR DS:[EDX+E0]
014D3E8E |. FFD0 CALL EAX
014D3E90 |. 8945 B8 MOV DWORD PTR SS:[EBP-48],EAX
014D3E93 |. EB 09 JMP SHORT sh5.014D3E9E
014D3E95 |> 8B4D B4 /MOV ECX,DWORD PTR SS:[EBP-4C]
014D3E98 |. 83C1 01 |ADD ECX,1
014D3E9B |. 894D B4 |MOV DWORD PTR SS:[EBP-4C],ECX
014D3E9E |> 8B55 B4 MOV EDX,DWORD PTR SS:[EBP-4C]
014D3EA1 |. 3B55 B8 |CMP EDX,DWORD PTR SS:[EBP-48]
014D3EA4 |. 7D 53 |JGE SHORT sh5.014D3EF9
014D3EA6 |. 8B55 B4 |MOV EDX,DWORD PTR SS:[EBP-4C]
014D3EA9 |. 8B45 F8 |MOV EAX,DWORD PTR SS:[EBP-8]
014D3EAC |. E8 CFDFDFFF |CALL sh5.012D1E80
014D3EB1 |. 8945 B0 |MOV DWORD PTR SS:[EBP-50],EAX
014D3EB4 |. 6A 0B |PUSH 0B
014D3EB6 |. 8B45 B0 |MOV EAX,DWORD PTR SS:[EBP-50]
014D3EB9 |. 8B10 |MOV EDX,DWORD PTR DS:[EAX]
014D3EBB |. 8B4D B0 |MOV ECX,DWORD PTR SS:[EBP-50]
014D3EBE |. 8B42 14 |MOV EAX,DWORD PTR DS:[EDX+14]
014D3EC1 |. FFD0 |CALL EAX
014D3EC3 |. 0FB6C8 |MOVZX ECX,AL
014D3EC6 |. 83F9 01 |CMP ECX,1
014D3EC9 |. 75 2C |JNZ SHORT sh5.014D3EF7
014D3ECB |. 8B55 B0 |MOV EDX,DWORD PTR SS:[EBP-50]
014D3ECE |. 8955 AC |MOV DWORD PTR SS:[EBP-54],EDX
014D3ED1 |. 8B4D AC |MOV ECX,DWORD PTR SS:[EBP-54]
014D3ED4 |. E8 671B0400 |CALL sh5.01515A40
014D3ED9 |. 0FB6C0 |MOVZX EAX,AL
014D3EDC |. 83F8 01 |CMP EAX,1
014D3EDF |. 75 16 |JNZ SHORT sh5.014D3EF7
014D3EE1 |. 51 |PUSH ECX
014D3EE2 |. D9E8 |FLD1
014D3EE4 |. D91C24 |FSTP DWORD PTR SS:[ESP]
014D3EE7 |. 8B4D AC |MOV ECX,DWORD PTR SS:[EBP-54]
014D3EEA |. 8B11 |MOV EDX,DWORD PTR DS:[ECX]
014D3EEC |. 8B4D AC |MOV ECX,DWORD PTR SS:[EBP-54]
014D3EEF |. 8B82 00010000 |MOV EAX,DWORD PTR DS:[EDX+100]
014D3EF5 |. FFD0 |CALL EAX
014D3EF7 |>^EB 9C \JMP SHORT sh5.014D3E95
014D3EF9 |> B0 01 MOV AL,1 ; new current CO2 value less than hard coded value: move 1 into AL
014D3EFB |> 8BE5 MOV ESP,EBP ; kill stack frame
014D3EFD |. 5D POP EBP ; restore base pointer
014D3EFE \. C2 0400 RETN 4 ; return to caller popping 4 from stack


now I just have to find the snorkel in the exe :cool:

Lt. Surge
11-13-11, 03:26 AM
hi,
I downloaded the patcher and I try to open the TDW_SH5_Patches.s5p file but the program pops up with:
error reading patch file.

Is there a place i need to install the program (eg. in SH5 folder) or is the file corrupted when downloading.

Cheers.

Trevally.
11-13-11, 05:23 AM
Oh and another thing I noticed is that CO2 level is compared to a value that looks like a maxiumum CO2 level (0.899). CO2 levels > 10% are fatal are they not?? :shifty:

Im sure you only get the co2 warning at 10% but can go higher. Im not sure how much higher as I always panic and surface with the warning:D

hi,
I downloaded the patcher and I try to open the TDW_SH5_Patches.s5p file but the program pops up with:
error reading patch file.

Is there a place i need to install the program (eg. in SH5 folder) or is the file corrupted when downloading.

Cheers.

Try using 7zip to extract the download http://www.7-zip.org/ :up:

tonschk
11-13-11, 06:39 AM
The goal of this next patch is to fix the bug where CO2 is still generated when snorkel is raised. I've isolated the CO2 generation function and as you can see below it has nothing in it that looks to see if snorkel is raised or even present on the sub :nope:



:salute::yeah::up::DL:rock::woot::sunny:

TheBeast
11-13-11, 07:46 AM
CO2 levels > 10% are fatal are they not?? :shifty:


If I remember correctly, IRL, Co2 level of => 10% crew begin losing mental facalties and levels => 15%, crew begin to pass out.

Regards!
TheBeast

Lt. Surge
11-13-11, 08:33 AM
Hi all,
I have used 7zip to extract the program, backed up SH5.exe. But the error still pops up.

File Error
Error reading patch file C:\Ubisoft\TDW_SH5_Patches.s5p

thanking you's for any help

sirbum69
11-13-11, 12:21 PM
make sure both files are placed in the top level of your Sh5 directory. The patch file and the program. I just got the same error and that fixed it for me

Lt. Surge
11-14-11, 12:08 AM
make sure both files are placed in the top level of your Sh5 directory. The patch file and the program. I just got the same error and that fixed it for me

hi thankyou for help
but, still a no go

THE_MASK
11-14-11, 12:23 AM
Patch the game to 1.2 first :up:

Lt. Surge
11-14-11, 01:24 AM
Patch the game to 1.2 first :up:

hi,
yes the game has been patched to 1.2.0.
Also I have installed the Magnum_Opus_0_0_1 and its patch.
and still no good.

THE_MASK
11-14-11, 02:21 AM
It has to be the dvd version .

Lt. Surge
11-14-11, 07:44 AM
It has to be the dvd version .
hi
yes the game is the boxed dvd version,
i'm running windows 7

Kretschmer the IV
11-17-11, 05:06 AM
Hi all,
I have used 7zip to extract the program, backed up SH5.exe. But the error still pops up.

File Error
Error reading patch file C:\Ubisoft\TDW_SH5_Patches.s5p

thanking you's for any help

I got the same issue here. Win7 64
Hmm, you could provide a patched exe for download :yeah: I will try in VMWare with Windows XP 32

-hmm kay. Win Xp 32 didnt work out either so i guess i failed with download or decompression 7zip

- redownloaded and extracted with both 7zip and win build in unzipper

>error reading file.. :/

Thanks to POST
http://www.subsim.com/radioroom/showpost.php?p=1628394&postcount=136
Its quite simple! :yeah:

Rocco_99
11-17-11, 07:12 AM
v1.0.21.0 released. See post #1.

Ty a lot TDW. Yur MOD works vry well in my game. Vry easy to install...Iīm not a computerīs expert and i did it easily...

Yu are the guy!!! :rotfl2::rotfl2::rotfl2:


R.

Jacke
11-20-11, 10:23 AM
Hi all,
I have used 7zip to extract the program, backed up SH5.exe. But the error still pops up.

File Error
Error reading patch file C:\Ubisoft\TDW_SH5_Patches.s5p

thanking you's for any help

I've just got the DVD version of SH5. Updated it to 1.2. And when I run SH5Patcher v1.0.21.0 and try to open the .s5p file, I also get this error.

(Running on Vista 32-bit.)

I can patch the .exe manually with a hex editor, but this tool would be helpful.