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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-18-15, 05:56 PM   #1
ExFishermanBob
Difficulties Numbing
 
Join Date: Aug 2013
Location: AN19
Posts: 470
Downloads: 43
Uploads: 0


Default In-game save date

I have been searching in SH3 Mods for where the date in-game (e.g. 23 January 1940) is placed when saving the game. I have written a utility to extract this information, but wondered, before polishing it too much for release, whether there was an available tool, or something simpler than reading the relevant ISF file.

Have I not used the correct search terms in the forum? Perhaps someone who has been here a long time can tell me if such a tool has been written before.

(The utility is handy when writing to the message log as you can ensure that any message WILL appear, if it is dated appropriately).

Last edited by ExFishermanBob; 08-18-15 at 05:58 PM. Reason: Clarified!
ExFishermanBob is offline   Reply With Quote
Old 08-18-15, 06:01 PM   #2
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by ExFishermanBob View Post
I have been searching in SH3 Mods for where the date in-game (e.g. 23 January 1940) is placed when saving the game. I have written a utility to extract this information, but wondered, before polishing it too much for release, whether there was an available tool, or something simpler than reading the relevant ISF file.

Have I not used the correct search terms in the forum? Perhaps someone who has been here a long time can tell me if such a tool has been written before.

(The utility is handy when writing to the message log as you can ensure that any message WILL appear, if it is dated appropriately).
How are you able to read the ISF file? Are you decoding it?
areo16 is offline   Reply With Quote
Old 08-18-15, 06:07 PM   #3
ExFishermanBob
Difficulties Numbing
 
Join Date: Aug 2013
Location: AN19
Posts: 470
Downloads: 43
Uploads: 0


Default

Just open it as a binary file in python (or your language of choice).
There are a few parts with the name of your submarine-type (e.g. SSTypeVIIB) - you'll see it with a hex editor. Offset from the first one, at 330 bytes after the end of the submarine-type, is a pair of words with the year (e.g. \x07\x94 which is 1940: see http://coolconversion.com/math/binar...n_hexadecimal_)

After that comes the month, day, hour and minute (although the latter can be off by one if the minute has just changed).
ExFishermanBob is offline   Reply With Quote
Old 08-18-15, 06:13 PM   #4
ExFishermanBob
Difficulties Numbing
 
Join Date: Aug 2013
Location: AN19
Posts: 470
Downloads: 43
Uploads: 0


Default

I suspect that there is lat-long, or distance from 0 and equator somewhere in there too, but I don't need that yet (I have a distance to latlong converter, but not a distance / latlong to grid converter - would be handy for finding out the 6-figure grid reference as the logs only seem to hold 4-figures, such as AM76)
ExFishermanBob is offline   Reply With Quote
Old 08-18-15, 06:19 PM   #5
areo16
Sonar Guy
 
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
Default

Quote:
Originally Posted by ExFishermanBob View Post
I suspect that there is lat-long, or distance from 0 and equator somewhere in there too, but I don't need that yet (I have a distance to latlong converter, but not a distance / latlong to grid converter - would be handy for finding out the 6-figure grid reference as the logs only seem to hold 4-figures, such as AM76)

LGN1's Tracking Room mod has a perl function in it that converts to or from the grid system using the meters from equator system that the game uses.
areo16 is offline   Reply With Quote
Old 08-18-15, 06:23 PM   #6
ExFishermanBob
Difficulties Numbing
 
Join Date: Aug 2013
Location: AN19
Posts: 470
Downloads: 43
Uploads: 0


Default

Quote:
Originally Posted by areo16 View Post
LGN1's Tracking Room mod has a perl function in it that converts to or from the grid system using the meters from equator system that the game uses.
That would be interesting to look at - does it just take the user's typed input, or read from the files, I wonder.
ExFishermanBob 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 09:44 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.