![]() |
SH5 DLL Injection
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 :yep: Due to the way that I do the injecting and removing of the DLLs it's very hard to detect and counter (SH5 has no idea that anything happens at all!). Shouldn't trip any anti-virus software either. As this does not modify the SH5.exe or any game files it is completely legal :up: What it does is inject the dll selected into the current SH5 process or removes the selected DLL from the SH5 process. This is all done using the Win32 API which is part of Windows for those that are not familiar with it. The UI for the application is very intuitive and easy to use :yeah: This is the first step to extending, modifying, and/or creating new code for the game :D 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 :smug:). 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 http://www.subsim.com/radioroom/pict...pictureid=3716 |
Sounds like the next step . I think and hope this game will be around for a long time .
|
dude awesome!
|
Thank you Sir :salute:
|
This looks like a huge breakthrough for this game, the next gen in modding the game. :rock:
|
fantastic:woot:
maybe it is the time for somebody to start to think how to add snow in the sh5 now manny thanks TDW:salute: |
If I understand correctly this means you could potentially change core game features to a large extent! :rock:
Choosing my words carefully here... : How would one go about creating a new dll for SH5.exe injection? |
I don't understand a word, but sounds great! :D
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 :DL |
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 :up: |
nice!
but what does this injection method make possible? |
Quote:
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 :yeah: |
Quote:
Not sure if this solves the importing of new 3D models though? |
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 |
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 .
|
Quote:
|
All times are GMT -5. The time now is 12:54 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.