SUBSIM Radio Room Forums



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

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

Reply
 
Thread Tools Display Modes
Old 05-26-12, 05:47 PM   #511
quink99
中国水兵
 
Join Date: Jul 2011
Posts: 278
Downloads: 941
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
In laymen's terms I'm giving you the tools to add/expand/change a process. If you're not familiar with what a process is it's a Windows term - once again, in laymen's terms, think of it as the encapsulation of everything needed to run an application in windows.

DLL injection let's you write code in some editor (Visual Studio for instance), compile that code into a DLL, and then inject that into a process to either change it's functionality, override a functionality, and/or add new functionality. Now simply injecting a DLL isn't going to do much. Yes, the DLL is now part of the process but it's never being 'called'. You need to add hooks into the existing code so that your new code is called.

If you're really computer saavy you can replace an existing DLL with your own. That lets you do things the app never intended to do (DLL injection/code injection does also but this way is easier for some)

Injecting a file is just as it sounds - taking the contents of a file and placing it inside an active process. What does this do for you? I can think of many things! You all are familiar with my patches - you load up the patch file and then you enable the patches you want. Think of those patches as files being injected into the SH5 process (I actually write new data to existing files but it should help you understand the concept).

Now for those of you, like me, who love assembly (long live DOS!) injecting a file is the way to go. You can write your 'code' in an assembler, take the hex file generated and inject it into the process. Once I code in the ability to dump and replace process memory then you will have an easy way to add your hooks to call your new code.

I'm working on the ability to add watches currently. If your familiar with Visual Studio then you know what watches are already. If not I'll try to make it a little clear: say you have an application that displays a value on a screen and you'd really like to change that value and/or monitor it. We have no idea where this value resides so we have to do a little exploring inside the active process. We pick an area of memory and set a watch on it - the watch will monitor that area of memory for any changes. When it detects changes it can either suspend the process or just update the app with the new value. This allows you to see what that memory is doing in real time. By setting many different watches (and changing what they are monitoring) you will eventually find where the variable is located so you can manipulate it.

I made the app generic in nature so that it can be used on anything. It's not fixed to any particular app or process.

This app now let's you 'play' in my favorite playground...process memory. You are limited only by your imagination/skill level

A thing of beauty, TDW, You were able to explain it in such an elegant manner that even a complete computer retardo is beginning to grasp what your talking about..............Thanks so much, Quink
quink99 is offline   Reply With Quote
Old 05-26-12, 11:53 PM   #512
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.34.0 released. See post #1

You can now add watches Click the watches button to open the watches window. Use Watches-->Add to add watches. Should be pretty self-explanatory

Still working on the dumping/reloading of memory

Same thing still applies to the kernel32.dll as I haven't gotten around to coding that either.
TheDarkWraith is offline   Reply With Quote
Old 05-27-12, 03:43 AM   #513
Endroo
Nub
 
Join Date: May 2009
Posts: 3
Downloads: 5
Uploads: 0
Default

Hey TDW! Where can I find the older patches, like the first one? They don't appear to be in the latest patch's files.
Endroo is offline   Reply With Quote
Old 05-27-12, 08:49 AM   #514
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Endroo View Post
Hey TDW! Where can I find the older patches, like the first one? They don't appear to be in the latest patch's files.
All the patches are included with each new version. When you unzip the package you'll find (currently) three s5p files. These s5p files are the patch files.

I'm assuming when you say older patches like the first one you are referring to the hydro fix and map color changes. Those can be found in the TDW_SH5_Patches.s5p file.
TheDarkWraith is offline   Reply With Quote
Old 05-27-12, 11:34 AM   #515
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.35.0 released. See post #1

This version adds a new patch to the sh5.exe that fixes the broken resupply system while at sea

There's no way I could test for the full impact of this change so you all will have to let me know anything odd. All the change does is remove the check that determines the number of resupplies available (thus allowing you to resupply as long as a resupply point is shown on the map)
TheDarkWraith is offline   Reply With Quote
Old 05-27-12, 11:36 AM   #516
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

It's great! Thanks TDW!
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 05-27-12, 05:22 PM   #517
Endroo
Nub
 
Join Date: May 2009
Posts: 3
Downloads: 5
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
All the patches are included with each new version. When you unzip the package you'll find (currently) three s5p files. These s5p files are the patch files.

I'm assuming when you say older patches like the first one you are referring to the hydro fix and map color changes. Those can be found in the TDW_SH5_Patches.s5p file.
Why thank you! Good work, and I'm glad to see that someone is still taking care of this game to this day!
Endroo is offline   Reply With Quote
Old 05-27-12, 09:45 PM   #518
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Could we have the patcher remember the path to the sh5.exe or is that not allowed . Set path to sh5.exe rather than select path to sh5.exe .
THE_MASK is offline   Reply With Quote
Old 05-27-12, 10:07 PM   #519
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
Could we have the patcher remember the path to the sh5.exe or is that not allowed . Set path to sh5.exe rather than select path to sh5.exe .
I can do that. I can have it write the last path you selected for the file being patched to the patch file Good idea
TheDarkWraith is offline   Reply With Quote
Old 05-27-12, 10:11 PM   #520
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
I can do that. I can have it write the last path you selected for the file being patched to the patch file Good idea
Thankyou sir
THE_MASK is offline   Reply With Quote
Old 06-02-12, 06:31 PM   #521
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Finally found the function that adds the kiddy factor to the player's ordered depth so they cannot actually put their sub on the ocean's bottom. I have removed the kiddy factor and now you can order your sub to the bottom (or greater) and it will go to the bottom

Currently the sub will not incur damage if you order depth > ocean bottom so I'm trying to fix that now
TheDarkWraith is offline   Reply With Quote
Old 06-02-12, 07:14 PM   #522
mouseno4
Watch
 
Join Date: Jun 2012
Posts: 23
Downloads: 43
Uploads: 0
Default

Generic Patcher crashes with a big error when opening the s5p files. "Error reading patch file" along with a whole lot of jargon and ends with ''The system cannot find the file specified."
mouseno4 is offline   Reply With Quote
Old 06-02-12, 07:23 PM   #523
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by mouseno4 View Post
Generic Patcher crashes with a big error when opening the s5p files. "Error reading patch file" along with a whole lot of jargon and ends with ''The system cannot find the file specified."
Sounds like you need to download the latest version at post #1 of this thread

Sub will now incur damage from the ocean bottom if you ram into it New patch coming here very soon!
TheDarkWraith is offline   Reply With Quote
Old 06-02-12, 07:26 PM   #524
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Its like chridtmas .
THE_MASK is offline   Reply With Quote
Old 06-02-12, 07:45 PM   #525
mouseno4
Watch
 
Join Date: Jun 2012
Posts: 23
Downloads: 43
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Sounds like you need to download the latest version at post #1 of this thread

Sub will now incur damage from the ocean bottom if you ram into it New patch coming here very soon!
That is where i got the file from. I didnt know there were different download locations.

http://img198.imageshack.us/img198/9518/46384692.png
mouseno4 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:06 AM.


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