SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
08-18-15, 05:56 PM | #1 |
Difficulties Numbing
|
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! |
08-18-15, 06:01 PM | #2 | |
Sonar Guy
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
|
Quote:
|
|
08-18-15, 06:07 PM | #3 |
Difficulties Numbing
|
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). |
08-18-15, 06:13 PM | #4 |
Difficulties Numbing
|
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)
|
08-18-15, 06:19 PM | #5 | |
Sonar Guy
Join Date: Oct 2013
Posts: 377
Downloads: 64
Uploads: 0
|
Quote:
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. |
|
08-18-15, 06:23 PM | #6 |
Difficulties Numbing
|
|
|
|