![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Black Magic
![]() |
![]()
I've written a little application in managed C# that allows you to pick a DLL to inject into SH5. You can also remove injected DLLs and remove currently loaded DLLs from the SH5 process. I call this application 'SH5 Injector'. This is a scaled down version of my 'DLL Injector' (DLL Injector can inject/remove DLLs into/from ANY process running on your computer)
This app is a 64bit application and thus will not work on 32bit OSs. It is also targeted at the .NET 3.5 framework or higher. This application is very handy for injecting custom DLLs into SH5 to monitor, replace, extend, or modify in-game code or variables. It can also be used to create DLL hooks on modules loaded into the game (through code in a custom DLL injected into the SH5 process). There are many uses for this ![]() As this does not modify the SH5.exe or any game files it is completely legal ![]() The UI for the application is very intuitive and easy to use ![]() This is the first step to extending, modifying, and/or creating new code for the game ![]() In a future release I plan on adding the ability to inject straight code into the SH5 process. I plan on letting you type assembly instructions right into the UI and then the app will compile those into machine code and inject into the process (in it's own memory space ![]() To use: - fire up SH5 - fire up SH5 Injector 32bit version: http://www.gamefront.com/files/20051...Injector32_exe 64bit version: http://www.gamefront.com/files/20049...Injector64_exe Last edited by TheDarkWraith; 02-28-11 at 10:44 AM. |
![]() |
![]() |
![]() |
#2 |
Ace of the deep .
|
![]()
Sounds like the next step . I think and hope this game will be around for a long time .
|
![]() |
![]() |
![]() |
#3 |
Seasoned Skipper
![]() Join Date: Jan 2010
Posts: 713
Downloads: 209
Uploads: 0
|
![]()
dude awesome!
|
![]() |
![]() |
![]() |
#4 |
Medic
![]() Join Date: May 2006
Location: Near Lake Leman and Geneva, FRANCE
Posts: 162
Downloads: 150
Uploads: 0
|
![]()
Thank you Sir
![]() |
![]() |
![]() |
![]() |
#5 |
Grey Wolf
![]() Join Date: Apr 2005
Location: Bucharest, Romania
Posts: 845
Downloads: 544
Uploads: 0
|
![]()
This looks like a huge breakthrough for this game, the next gen in modding the game.
![]() |
![]() |
![]() |
![]() |
#6 |
Ocean Warrior
![]() Join Date: Dec 2010
Location: Montreal, Canada
Posts: 2,776
Downloads: 833
Uploads: 11
|
![]()
fantastic
![]() maybe it is the time for somebody to start to think how to add snow in the sh5 now manny thanks TDW ![]() |
![]() |
![]() |
![]() |
#7 |
Officer
![]() Join Date: Dec 2009
Location: British Waters
Posts: 243
Downloads: 98
Uploads: 0
|
![]()
If I understand correctly this means you could potentially change core game features to a large extent!
![]() Choosing my words carefully here... : How would one go about creating a new dll for SH5.exe injection? |
![]() |
![]() |
![]() |
#8 |
Seaman
![]() Join Date: Mar 2006
Posts: 39
Downloads: 34
Uploads: 0
|
![]()
I don't understand a word, but sounds great!
![]() Will it be possible with such an injections to do/mod, for example: - snow - independent control of engines - complex your own sub damage/trim system - further IRAI improvements - .....? By the way, TDW, how much time have you actually just played the SH5? Take a break, you are unlocking doors faster then people enter ![]() |
![]() |
![]() |
![]() |
#9 | |
Black Magic
![]() |
![]() Quote:
I use Visual Studio 2008 C# or C++ to do my programming and my DLL creating. One could use Visual Basic if they wanted to. A DLL is an exe with one bit changed in the PE header to 'make' it a DLL. Any computer language can be used as long as you can compile the source code into a dll. I'm going to make a sample dll file and include source code so that you can see what this app can do for SH5 ![]() |
|
![]() |
![]() |
![]() |
#10 |
Sea Lord
![]() Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,969
Downloads: 42
Uploads: 0
|
![]()
nice!
but what does this injection method make possible?
__________________
|
![]() |
![]() |
![]() |
#11 |
Black Magic
![]() |
![]()
Anything that you can code in. You can create hooks, replace code, add code, view code, etc. It's just a matter of writing the .dll and injecting it in.
When a dll is loaded into a process the windows loader automatically calls the DLLMain function of the dll. This means your dll is 'run' as soon as it's injected into the process ![]() |
![]() |
![]() |
![]() |
#12 |
Engineer
![]() Join Date: Apr 2005
Posts: 210
Downloads: 86
Uploads: 0
|
![]()
I think an extreme example would be that should you have unlimited time, desire and resources to apply to such an undertaking you could use this DLL method to write a whole new Silent Hunter 6 using the existing core 3D engine. This example is far fetched but it helps explain the power now available to the community with this break through. We could be seeing proper un-official patches to the core game engine -however, it will require some highly skilled expert coders. This really is very exciting for Silent Hunter 5!
Not sure if this solves the importing of new 3D models though? |
![]() |
![]() |
![]() |
#13 |
Black Magic
![]() |
![]()
one could write a .dll to replace an entire function in the sh5.exe by using dll injection. The hardest part is deciphering the assembly language and figuring out what it's doing in the game.
Using OllyDebug you can attach to the SH5 process and suspend the game and 'look inside'. There you can figure out what you want to change/replace/add and write a .dll to replace the code wanted (make note of the RVA so you can modify the correct code!) I'll try and make a dll (with source) that hooks into the main sh5.exe code and executes a function in that dll. Basically what this dll would do is: - modify the ingame code to 'jump' to your function and execute it - once the function in the dll is complete it 'jumps' back to the ingame code like nothing ever happened. - As this new function is now part of the game code it will be called everytime the code comes to that spot |
![]() |
![]() |
![]() |
#14 |
Ace of the deep .
|
![]()
This is prolly lame , but with this could you click on a button in game and bring up google earth and look at your navmarks on google earth while playing the game .
|
![]() |
![]() |
![]() |
#15 | |
Black Magic
![]() |
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
|
|