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 02-27-11, 09:07 AM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by BigBANGtheory View Post
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?
Yes one can change core game features to a large extent and one can add new features to the game. It's not as easy as it sounds though. Your new content would be in the dll to inject and you hook into the game to have it execute your new code. You add the hook via code in your dll.

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
TheDarkWraith is offline   Reply With Quote
Old 02-27-11, 07:16 PM   #2
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Yes one can change core game features to a large extent and one can add new features to the game. It's not as easy as it sounds though. Your new content would be in the dll to inject and you hook into the game to have it execute your new code. You add the hook via code in your dll.

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
Amazing

could be possible then make a surface warships game or more complex submarines or weapons
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 02-27-11, 07:22 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Hartmann View Post
Amazing

could be possible then make a surface warships game or more complex submarines or weapons
whatever you code your dll to do and how you hook it into the game will define what changes/additions/removals are incurred in the game
TheDarkWraith is offline   Reply With Quote
Old 02-27-11, 07:36 PM   #4
Krauter
Ocean Warrior
 
Join Date: Aug 2007
Location: Montreal, Canada
Posts: 2,870
Downloads: 102
Uploads: 1
Default

Dam.. I could see the CWSS guys making good use of this in the SH4 Mod Workshop
__________________
Quote:
The U.S almost went to war over some missles in Cuba... Thank god the X-Men were there to save us right?
Krauter is offline   Reply With Quote
Old 02-27-11, 07:38 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Krauter View Post
Dam.. I could see the CWSS guys making good use of this in the SH4 Mod Workshop
have them contact me and I'll make a version of this injector for SH4

What most people don't know is that a .exe file is mapped in memory by the Windows loader when the process is started. By copying these memory blocks one can assemble their own .exe file. So after injecting your .dll you could have it save the memory regions to a file (with an appropriate PE header) thus creating a new version of the sh5.exe file (a patched version if you will with your changes). Sounds easy to do but it's rather involved (but doable).
TheDarkWraith is offline   Reply With Quote
Old 02-27-11, 08:26 PM   #6
Yamato_NF
King of the Ocean
 
Join Date: Mar 2010
Location: Michigan, United States
Posts: 337
Downloads: 621
Uploads: 0
"SH4 Injector": Possibility?

DarkWraith,
I think Jhapprich can make good use of this for CWSS, (Cold Warriors: Steel Sharks). which is supposed to bring SH4 into the Cold War!
i posted a reply on the CWSS thread found
here:
http://www.subsim.com/radioroom/showthread.php?t=161396
i said that i would recommend this program and to ask for a 32bit version for SH4
ill shoot him a PM aswell.
Yamato_NF
__________________
Proud owner of SH3/4/5
Proud owner of the DCS series
http://farm9.staticflickr.com/8323/8...917b3c20_m.jpg
"He who controls the seas controls the world."
Yamato_NF is offline   Reply With Quote
Old 02-27-11, 08:32 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Yamato_NF View Post
DarkWraith,
I think Jhapprich can make good use of this for CWSS, (Cold Warriors: Steel Sharks). which is supposed to bring SH4 into the Cold War!
i posted a reply on the CWSS thread found
here:
http://www.subsim.com/radioroom/showthread.php?t=161396
i said that i would recommend this program and to ask for a 32bit version for SH4
ill shoot him a PM aswell.
Yamato_NF
I'll start work on making a 32bit SH4 version then
TheDarkWraith is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 08:27 PM.


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