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 > Silent Hunter 5
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-14-26, 05:57 AM   #1
Peril
Swabbie
 
Join Date: May 2012
Location: Copenhagen,Denmark
Posts: 5
Downloads: 52
Uploads: 0
bullhorn Claude Ai +REA gain access to games code.

Hello, guys!

It’s been six years since my last login, just before COVID. How time flies!

I’m curious to know whether any of you seadogs have been following the latest developments in AI, particularly reverse engineering with Claude Code and a GitHub MCP project called REA (Reverse Engineer Anything).There are many Youtube videos about this.

Apparently, Opus 5.5 is pushing the boundaries of what AI can do when it comes to analyzing game code, potentially opening the door to recreating games as clones and enabling enhancement and bug fixing. If these developments live up to the hype, it could open up some interesting possibilities for gaining access to the inner workings of our beloved Silent Hunter series and perhaps breathing new life into these classics.

Imagine what could be possible with the right tools and a bit of community effort. It’s certainly an interesting time to be following AI and game optimization, cloning and modding!

So, has anyone here been keeping an eye on these developments?

Last edited by Peril; 10-14-26 at 06:11 AM.
Peril is offline   Reply With Quote
Old 10-14-26, 08:48 PM   #2
arthurdiaz
Swabbie
 
Join Date: Oct 2026
Posts: 7
Downloads: 25
Uploads: 0
Default

If AI continues to evolve at the pace it has been, I imagine in a few years you could have it spin up a Silent Hunter 6 using the existing game code and it could make a competant sequel in a matter of a few hours. That sounds a bit ridiculous, but with some of the stuff coming out now its pretty reasonable to assume we will see stuff like that.

Somebody made a Jagged Alliance 2 1.13 editor with AI recently, it's pretty incredible what it can do, basically 15 years of editing tools that needed libraries and installers and configuration condensed into a single .exe file that does everything more intuitively then any of them did. Silent Hunter has a similar file structure to JA2 1.13, with flat files for most of its content. I imagine building an editor for it that allows you to manipulate all the game files in a single app would be simple if someone tasked the AI to create it.

Edit: The latest AI models are now hooked into blender as a good example. Imagine having the AI render Type IX or Type XXI subs in native game format with proper shaders so they are essentially functional in SH5 with sounds and everything. That's technically already available, its the users that haven't caught up with the tecnology yet. Check youtube for what these models can do in Blender today, its incredible.

I AI coded the SH4 air recon functionality into SH5. Recon Flights Download:
https://www.mediafire.com/file/86mvj...lights.7z/file

More AI testing since I decided to dive into this.
*Made an in-game newspaper with 263 editions that you can check while docked.
*Removed 1000's of TWoS fishing boats that were driving me crazy without losing all the other TWoS traffic.
*Found a bug in sh5.exe that was causing a list to populate beyond its allocated memory causing it to crash. I had basically lost a savegame to this one because it would crash at the same spot every time and the AI found the issue and patched it out and my campaign continues. I have more details on this one if anyone is interested, it analyzed a crash dump of the exe and read through its memory addressing to find the issue and patched it. This is a stock SH5 bug made worse by mods writing to a list more then the game anticipated causing the list to overflow sometimes - real SH5 bugfixing in 2026! AI be crazy.
*Created scripts to generate internal hull data for the 60+ ships missing damage details in TWoS/OH2.5.

*Merchant Boarding BETA Release:
https://www.mediafire.com/file/uk1nf...eta167.7z/file
(Overwrite DefaultHud.py from Reconflights if installed)

Last edited by arthurdiaz; 11-05-26 at 06:13 PM.
arthurdiaz is offline   Reply With Quote
Old 10-30-26, 06:57 AM   #3
OldCoder
Soundman
 
Join Date: Mar 2016
Posts: 149
Downloads: 25
Uploads: 0
Default

Does sh5 write crash dumps? If so to where, or otherwise how did you trap the faulting location and reason? Thanks.
OldCoder is offline   Reply With Quote
Old 10-30-26, 03:30 PM   #4
arthurdiaz
Swabbie
 
Join Date: Oct 2026
Posts: 7
Downloads: 25
Uploads: 0
Default

Quote:
Originally Posted by OldCoder View Post
Does sh5 write crash dumps? If so to where, or otherwise how did you trap the faulting location and reason? Thanks.
I can attach the AI logs for this so you can see its processing.

It does rudimentary analysis of the Windows Event Viewer -> Application logs, which windows generates automatically. It then requested detailed crash dumps via registry keys that generate windows crash dumps for selected executables. I enabled that, reproduced the crash, sent the dump and it identified the cause from it. The commands are available in this log I'm attaching.

This does not include the dissasembly details it steps through to read the game files, thats a ton of data and the UI doesn't let me export it so these returns are pure text explanations, but it gives you an idea of how it process flows to debug the crashes.

Edit: I don't want to share edited sh5.exe files for multiple reasons here, but if you are crashing at the same spot of a save and have this error (Fault: MSVCR90.dll. Exception code: 0xc0000417 in Windows Event Viewer -> Application Logs). I've attached the explanation of how to fix it with a simple hex edit or pop it into an AI agent to have it run the fix on your copy.
Attached Files
File Type: txt crashlogs.txt (11.6 KB, 4 views)
File Type: txt SH5_MSVCR90_crash_fix.txt (3.3 KB, 1 views)

Last edited by arthurdiaz; 11-03-26 at 08:39 PM.
arthurdiaz is offline   Reply With Quote
Old 10-31-26, 05:13 AM   #5
vickers03
Ace of the Deep
 
Join Date: May 2007
Location: germany
Posts: 1,115
Downloads: 812
Uploads: 39


Default

awesome work you are doing here!
does this work for SH4 too?

would it be possible to create an editor for SH4/SH5 ?
vickers03 is offline   Reply With Quote
Old 10-31-26, 04:46 PM   #6
arthurdiaz
Swabbie
 
Join Date: Oct 2026
Posts: 7
Downloads: 25
Uploads: 0
Default

Most of the features I've explored would not work in SH3 or 4. Silent Hunter 5 introduced Python & .NET, and these mods utilize those languages to run their functions.

Certainly lots of other mods would be doable for those games, the AI's best function is simply automating things that take lots of time, like building those internal hull meshes for 3d damage. That would take a long time by hand, the AI writes a python script that analyzes the hull and generates proper internals based on bridge/engine room/etc location. That all carries over to SH4 ship .dat files.

I haven't looked at tasking the AI to make an editor, I could brainstorm it but right now I'm focused on adding specific game features I want to see.
You have a limited amount of compute each week so you have to plan out your approach to avoid having the AI run in circles.

SH5.exe, at least through Ubisoft Connect version and TWoS provided .exe, is not encrypted so it is hex editable and thats why the AI can make quick patches for it. SH4.exe through Steam is encrypted so it would have to utilize some sort of .dll patcher to patch it in memory after steam loads it. The other library files are the same as SH5 though.

I tasked the AI with how it would add some of the features I've made in SH5 to SH4, and it confirmed the .dll injection route, but also added this which kind of opens up anything for Sh3 or 4:
"Write the logic in whatever language you like. Plain C++ calls game functions directly. You can also bring your own runtime: a 32-bit Python interpreter (python3x.dll) embedded in your DLL gives you real Python scripting in SH4, and a 32-bit .NET runtime can be loaded into the process the same way for C#. SH4 not shipping a scripting engine doesn’t stop you from adding one."

Basically anything is possible. One caveat and this is something you see a lot lately with other games. These dll's can be dangerous, SH5 already has lots of dll mods, TDW's files are mostly dll based so its not new, but AI generated dll files are a potential security issue and developers are shutting down AI modding utilizing them in their steam workshops right now as a precaution. SH5 has exposed scripting languages built in so I don't need dll files for these mods, they are open source plain text readable, but something to keep in mind when you see AI generated mods.

Last edited by arthurdiaz; 10-31-26 at 05:24 PM.
arthurdiaz is offline   Reply With Quote
Old 11-01-26, 04:21 AM   #7
vickers03
Ace of the Deep
 
Join Date: May 2007
Location: germany
Posts: 1,115
Downloads: 812
Uploads: 39


Default

thanks for the explanation, very interesting stuff
vickers03 is offline   Reply With Quote
Old 11-03-26, 10:13 AM   #8
OldCoder
Soundman
 
Join Date: Mar 2016
Posts: 149
Downloads: 25
Uploads: 0
Default

Quote:
Originally Posted by arthurdiaz View Post
I can attach the AI logs for this so you can see its processing.

It does rudimentary analysis of the Windows Event Viewer -> Application logs, which windows generates automatically. It then requested detailed crash dumps via registry keys that generate windows crash dumps for selected executables. I enabled that, reproduced the crash, sent the dump and it identified the cause from it. The commands are available in this log I'm attaching.

This does not include the dissasembly details it steps through to read the game files, thats a ton of data and the UI doesn't let me export it so these returns are pure text explanations, but it gives you an idea of how it process flows to debug the crashes.
Ah, interesting that it worked for you.

input: Sent Windows event viewer Application crash log for sh5.exe
Faulting application name: sh5.exe, version: 1.2.0.0, time stamp: 0x562b9a96
Faulting module name: MSVCR90.dll, version: 9.0.30729.9625, time stamp: 0x5db2747f
Exception code: 0xc0000417

When sh5 was crashing here, it exited without writing anything into the event logs... at least I had assumed it was crashing (part-way through load). If I see it crash again, i'll take another look.
OldCoder is offline   Reply With Quote
Old 11-03-26, 10:16 AM   #9
Aktungbby
Gefallen Engel U-666
 
Aktungbby's Avatar
 
Join Date: Jul 2013
Location: On a tilted, overheated, overpopulated spinning mudball on Collision course with Andromeda Galaxy
Posts: 17,658
Downloads: 24
Uploads: 0


Default Welcome back!

Peril!
__________________

"The world is too rediculous to even live in!"- Little Big Man
Aktungbby is offline   Reply With Quote
Old 11-03-26, 12:54 PM   #10
OldCoder
Soundman
 
Join Date: Mar 2016
Posts: 149
Downloads: 25
Uploads: 0
Default

So with help from AI, along with my own debugging and findings from years ago(!), I was able to make a fix for the missing tonnage bar. It's actually quite interesting and turned out to be an-memory relay fault (upc.exe) that lives between sh5 and osi.exe.

See attached readme for more details.
Attached Files
File Type: txt README.txt (11.1 KB, 5 views)
OldCoder is offline   Reply With Quote
Old 11-05-26, 07:27 PM   #11
arthurdiaz
Swabbie
 
Join Date: Oct 2026
Posts: 7
Downloads: 25
Uploads: 0
Default

I released an initial version of the Merchant Boarding mod, linked in my first post. Its only hard requirement is TDW's NewUI's latest version as it uses this to draw the GUI, but it works with TWoS.

The included AI mod overwrites some of the TWoS AI files to revert them to stock merchant/escort behavior because of licensing restrictions in IRAI. My suggestion, since these are swappable pretty much anytime, is to save your game if you find a merchant you want to stop, exit and activate the "Merchant Heave-To AI v.1.0" Mod in JSGME, then relaunch and reload and make your stop. This way, you will still use IRAI until a boarding is necessary, and can switch back once you are finished.

Hopefully I can get permission to edit IRAI to make this unnecessary, but if not I can create a new AI framework to replace it.

Some bugs/features about the mod still in progress:
  • Neutral to Enemy flow testing; I am having a hard time finding neutrals to test in my campaign so credit for these kills should be working but I can't verify it. Does it correctly count post-patrol as well?
  • Dinghy spawn gives a "Warship spotted" message when boarding begins.
  • Scuttle charges are 2 per patrol and granted at the start of the patrol but only tracked through a .txt file at root so it needs better implementation.
  • Dinghy dissapears when you bring up save/load menu and return to game. Not a bug, deleted to remain out of saves.
  • If a ship is on fire while boarding, damage over time might make it run. Also might kill your crew. Not really a bug, but run logic might need gating. Fires are never extinguished in this game it seems.
This mod can write Renown and Morale changes to your savegame but is otherwise save agnostic and can be removed or readded at any time.
arthurdiaz is offline   Reply With Quote
Old 11-11-26, 06:06 PM   #12
OldCoder
Soundman
 
Join Date: Mar 2016
Posts: 149
Downloads: 25
Uploads: 0
Default

Quote:
Originally Posted by arthurdiaz View Post
If AI continues to evolve at the pace it has been, I imagine in a few years you could have it spin up a Silent Hunter 6 using the existing game code and it could make a competant sequel in a matter of a few hours. That sounds a bit ridiculous, but with some of the stuff coming out now its pretty reasonable to assume we will see stuff like that.

Somebody made a Jagged Alliance 2 1.13 editor with AI recently, it's pretty incredible what it can do, basically 15 years of editing tools that needed libraries and installers and configuration condensed into a single .exe file that does everything more intuitively then any of them did. Silent Hunter has a similar file structure to JA2 1.13, with flat files for most of its content. I imagine building an editor for it that allows you to manipulate all the game files in a single app would be simple if someone tasked the AI to create it.

Edit: The latest AI models are now hooked into blender as a good example. Imagine having the AI render Type IX or Type XXI subs in native game format with proper shaders so they are essentially functional in SH5 with sounds and everything. That's technically already available, its the users that haven't caught up with the tecnology yet. Check youtube for what these models can do in Blender today, its incredible.

I AI coded the SH4 air recon functionality into SH5. Recon Flights Download:
https://www.mediafire.com/file/86mvj...lights.7z/file

More AI testing since I decided to dive into this.
*Made an in-game newspaper with 263 editions that you can check while docked.
*Removed 1000's of TWoS fishing boats that were driving me crazy without losing all the other TWoS traffic.
*Found a bug in sh5.exe that was causing a list to populate beyond its allocated memory causing it to crash. I had basically lost a savegame to this one because it would crash at the same spot every time and the AI found the issue and patched it out and my campaign continues. I have more details on this one if anyone is interested, it analyzed a crash dump of the exe and read through its memory addressing to find the issue and patched it. This is a stock SH5 bug made worse by mods writing to a list more then the game anticipated causing the list to overflow sometimes - real SH5 bugfixing in 2026! AI be crazy.
*Created scripts to generate internal hull data for the 60+ ships missing damage details in TWoS/OH2.5.

*Merchant Boarding BETA Release:
https://www.mediafire.com/file/uk1nf...eta167.7z/file
(Overwrite DefaultHud.py from Reconflights if installed)
Do you mind sharing the details of that list you're talking about? Or more specifically a way to reproduce that problem locally?
OldCoder is offline   Reply With Quote
Old 11-12-26, 06:39 PM   #13
arthurdiaz
Swabbie
 
Join Date: Oct 2026
Posts: 7
Downloads: 25
Uploads: 0
Default

Quote:
Originally Posted by OldCoder View Post
Do you mind sharing the details of that list you're talking about? Or more specifically a way to reproduce that problem locally?
I edited my second post and uploaded two text files that help describe that issue. In the crashlogs.txt file, there are three crashes I talked with the AI about fixing, this crash is the first issue at the top of the file. The fix for others to apply themselves on their own .exe file is in SH5_MSVCR90_crash_fix.txt.
arthurdiaz is offline   Reply With Quote
Reply

Tags
claude, modding, rea, reverse engineering


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:23 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.