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 4: Wolves of the Pacific
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-04-18, 09:06 PM   #1
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default Is there a way to extract mission results to a file?

Hello everybody.

I am new to SHIV and I am doing a survey of its functions with a view to integrating SHIV with several other titles to form a combined operations WW2 campaign system (already working with IL2 1946 and Arma 2/Iron Front). If that concept interests you, you can find a little more about it at http://seowhq.net/seowwiki-en/index....s_meta-SEOW%3F

Be that as it may, my present question is this. Is it possible to use scripting or some other means to extract SHIV (or SH5) mission data (objects, locations, damage states) into a readable text file, e.g. at the end of a mission or save time? I see the game produces binary save files (yuk).

I have looked at Kim Ronhof's SH4Report tool which looks fabulous and easy to use, but there is no documentation of the methods he employed, just the .exe file. I would like to be able to extract the mission data myself somehow if I can - this helps with the integration stage.

Any tips or pointers would be helpful to me!

Cheers,
4Shades
4Shades is offline   Reply With Quote
Old 03-04-18, 09:27 PM   #2
cdrsubron7
Sink'em All
 
cdrsubron7's Avatar
 
Join Date: Mar 2001
Location: Naperville, IL
Posts: 2,150
Downloads: 305
Uploads: 1


Default

Welcome to Subsim, 4Shades. Happy to have you with us.
__________________



Head Deep and Keep'em Astern" - LtCDR Samuel D Dealy
SHIV Guide | Imperial Japanese Navy | US Submarines



cdrsubron7 is offline   Reply With Quote
Old 03-05-18, 10:58 AM   #3
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by 4Shades View Post
..... I have looked at Kim Ronhof's SH4Report tool which looks fabulous and easy to use, but there is no documentation of the methods he employed, just the .exe file. I would like to be able to extract the mission data myself somehow if I can - this helps with the integration stage.

Any tips or pointers would be helpful to me!

Cheers,
4Shades
I remember now, I had to make the PDF in the Patrol Report generator download more user friendly, so I provided step by step pictures. I was getting swamped with questions and the pictures solved that - 'one picture is worth a thousand words : )

Here you go:
Quote:
The following files are used:
SHReport.ini – this is a file that the program generates, if it doesn’t exit’s – the sole purpose is to save the information of the users command name and suborn number + the last patrol area.

Replayinfo.rep this file saves the name of the mission (the name you save the game under in SH4), it is used to generate the list to choose the report from.

ActiveUserPlayerUnits.upc - the name of the boat is saved here.

SaveData.clg – the ships that have been sunk are saved her with date time and location. This is where the actual information is located.

SaveData.crp – many crew remarks are saved her – the last entry date is used to generate the date of the report. The Torpedo firing data is taken from the crew remarks (ex. "Firing tube 2, sir!")

GamePlaySettings.cfg – the information of the level of realism is saved here – the program adds the % of each feature to make up the setting% = the JANAC %.
SH4 Report generator ver. 5102
http://www.subsim.com/radioroom/down...o=file&id=3560

If someone wants Start Patrol & End Patrol dates, as soon as you're dropped on your boat from the Office, make a command or ask for a weather report if your install has that option. Be sure to Save at the end of your patrol with a name like Patrol End, then end your patrol. Use this Patrol End save for the report tool to use. Use your regular patrol end patrol save for your career.

Hope this helps, Welcome to Subsim!

Happy Hunting!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."


Last edited by aanker; 03-05-18 at 11:56 AM.
aanker is offline   Reply With Quote
Old 03-05-18, 07:36 PM   #4
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default

Many thanks for the information! I am investigating now ...

Cheers,
4Shades
4Shades is offline   Reply With Quote
Old 03-05-18, 08:48 PM   #5
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default

OK, a couple of questions, regarding SaveData.clg and JSGME.

Question 1
I ran a stock mission (Battle off Samar) for a few minutes and a few ships got sunk, 3 or 4, but I did not shoot any torpedoes. Then I made a Save file and exited the game to examine the files you list.

Replayinfo.rep: found it, a binary file but should be easy to parse.

ActiveUserPlayerUnits.upc: readable text, no problems.

SaveData.clg: zero-length file? Does this only contain the player kills maybe? What about all the AI kills?

SaveData.crp: readable text, no problems.

GamePlaySettings.cfg: readable text, no problems.


Question 2
As a second (minor) issue, I found a problem running the report tool. I started SH4Report_5102.exe, double-clicked my Save file and the following error came up:

Cannot open file "...GAMEPATH\Mods\JSGMEini". The system cannot find the path specified.

My game install is a stock Steam d/l with no mods/addons at all. I guess SH4Report requires JSGME to be present.

Cheers,
4Shades

4Shades is offline   Reply With Quote
Old 03-05-18, 09:25 PM   #6
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,742
Downloads: 439
Uploads: 2


Default

What folder do you have Steam installed in, and which Windows OS are you using there, 4Shades?
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 03-05-18, 09:34 PM   #7
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default

Hi there propbeanie,

I have Win10. Steam is in C:\Program Files (x86)\Steam but for disk space reasons SH4 is in a separate registered Steam folder on E:\SteamLibrary\steamapps\common\Silent Hunters Wolves of the Pacific.

Cheers,
4Shades
4Shades is offline   Reply With Quote
Old 03-05-18, 09:43 PM   #8
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

OK, a couple of questions, regarding SaveData.clg and JSGME.
Question 1
I ran a stock mission (Battle off Samar) for a few minutes and a few ships got sunk, 3 or 4, but I did not shoot any torpedoes. Then I made a Save file and exited the game to examine the files you list.

Replayinfo.rep: found it, a binary file but should be easy to parse.
Replayinfo.rep this file saves the name of the mission (the name you saved the game under in SH4), it is used to generate the list of Saves to use to choose the report from.
ActiveUserPlayerUnits.upc: readable text, no problems.

SaveData.clg: zero-length file? Does this only contain the player kills maybe? What about all the AI kills?
Yes, only player kills
SaveData.crp: readable text, no problems.

GamePlaySettings.cfg: readable text, no problems.
Question 2
As a second (minor) issue, I found a problem running the report tool. I started SH4Report_5102.exe, double-clicked my Save file and the following error came up:
This tool is meant more for career mode but the files have the same function. Anyway, to install it, follow my pictures, you need to navigate to where SH4.exe is and highlight that folder. The report tool goes in /documents/SH4/data/cfg/SaveGames. This needs to be done first to create the ini file. The error below is because the ini file wasn't created.
Cannot open file "...GAMEPATH\Mods\JSGMEini". The system cannot find the path specified.
My game install is a stock Steam d/l with no mods/addons at all. I guess SH4Report requires JSGME to be present.
Yes, install JSGME. Good luck with your project, now you know what each file is for. BTW, Steam didn't exist or nobody used it when the report tool was made. I prefer a DVD.

Happy Hunting!
Cheers,
4Shades

__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 03-05-18, 10:29 PM   #9
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default

OK, I installed JSGME and got the SH4Report tool to work. Wonderful!

@aanker: you say that only player kills are recorded in SaveData.clg. Yes this is perfectly fine for player-centric reports for career mode etc. But for my purposes I would like to have location and status for all ships/subs/boats at the end of the mission (or at save time). The game must record all of this information somewhere, e.g. InstantSave.rep or maybe SaveFile.rep, so it can continue the game from a save file(s). The real issue is the format of the .rep files, and whether it is even permissible to work out that format.

Many thanks for all the help so far!

Cheers,
4Shades
4Shades is offline   Reply With Quote
Old 03-06-18, 08:08 AM   #10
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,742
Downloads: 439
Uploads: 2


Default

Quote:
Originally Posted by 4Shades View Post
Hi there propbeanie,

I have Win10. Steam is in C:\Program Files (x86)\Steam but for disk space reasons SH4 is in a separate registered Steam folder on E:\SteamLibrary\steamapps\common\Silent Hunters Wolves of the Pacific.

Cheers,
4Shades
In this case, it's a good thing you had "disk space reasons". A Library Folder on another drive keeps Windows from "protecting" the folder with UAC, so you are good to go with the "E:\" drive setup for the game. Stay away from the folder on the C: drive, since Windows "protects" it from edits, including mods...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 03-06-18, 09:38 AM   #11
4Shades
Swabbie
 
Join Date: Mar 2018
Location: Western Australia
Posts: 6
Downloads: 2
Uploads: 0
Default

Yes, agreed. UAC is horrific.
4Shades is offline   Reply With Quote
Old 03-06-18, 11:57 AM   #12
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by 4Shades View Post
OK, I installed JSGME and got the SH4Report tool to work. Wonderful!

@aanker: you say that only player kills are recorded in SaveData.clg. Yes this is perfectly fine for player-centric reports for career mode etc. But for my purposes I would like to have location and status for all ships/subs/boats at the end of the mission (or at save time). The game must record all of this information somewhere, e.g. InstantSave.rep or maybe SaveFile.rep, so it can continue the game from a save file(s). The real issue is the format of the .rep files, and whether it is even permissible to work out that format.

Many thanks for all the help so far!

Cheers,
4Shades
It would be interesting to learn where SH4 does save mid-action data when a player saves to restart later. (You thought Replayinfo.rep??) - I don't know what I would use this information for other than to keep the file name(s) and purpose in my notes for future reference to be able to answer this question in case someone asks.

I have a load of mid patrol Saves I could dig through when I have a reason and time. If you trace it down, as I'm sure you will, please post where SH4 hides that info.... lol

Happy Hunting!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker 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 04:36 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.