PDA

View Full Version : [WIP] - SH4 War Journal


Skweetis
03-27-07, 07:34 PM
This is NOT A MOD but a UTILITY to create a readable patrol log from the save game files that SH4 creates. It in no way will affect/change/alter/overwrite or otherwise modify your save game files.

This thread (http://www.subsim.com/radioroom/showthread.php?t=109425) got me fired up again about work I began last year for SH3.

What was originally the start of a KTB generator that takes your save games and turns them into a readable KTB, will now be a War Journal generator for SH4.

The details of which are in the above mentioned thread, so I won't bore you with it again.

SUMMARY: Take a saved patrol and generate an easy to read Log from it. The perfect tool for story writers to reference!

The current state is not end-user friendly, while the back end works (ie creating the output text file) There is no user interface short of a button. So here is my development schedule (note that all BETA's will be open.):

20% - BETA 1: Create a user friendly interface, update to SH4.
WIP - BETA 2: Tweak and improve output text fileto better suit SH4 based on user feedback.
WIP - BETA 3: Add feature to generate easy to read HTML to print, or add to your website. Possibly add colour commentary.
WIP - BETA 4: Add backwards compatibility with SH3
WIP - BETA 5: Final bug testing and tweaking for final release
WIP - RELEASE

So if you have any images or information as to what a real US War Journal looks like, let me know.

Sample content of a generated text file from one of my SH4 patrols (I am using code tags to maintain formatting of the original file.) Keep in mind, that theprogram has not sufficiently been tweaked to handle all the messages/logging that SH4 creates, and is still very SH3 specific.

YYYYMMDD TIME ENTRY
19411210 1100 Ship spotted, sir! Bearing 195! Short range!
Ship spotted, sir! Bearing 103! Short range!
Ship spotted, sir! Bearing 265! Medium range!
Ship spotted, sir! Bearing 265! Long range!
Ship spotted, sir! Bearing 200! Short range!
Ship spotted, sir! Bearing 242! Medium range!
Ship spotted, sir! Bearing 066! Short range!
Ship spotted, sir! Bearing 075! Short range!
1113 Ship spotted, sir! Bearing 307! Long range!
19411211 1115 Radio Report Received! Enemy Task Force, Long 127° 53' E, Lat 28° 05' N, Course WSW, Speed 12 KTS!
19411212 0056 Ship spotted, sir! Bearing 024! Long range!
0224 Radio Report Received! Enemy Task Force, Long 118° 16' E, Lat 23° 47' N, Course SW, Speed 12 KTS!
0912 Radio Message Received: Appendix 0
19411214 0559 Radio Report Received! Enemy Task Force, Long 114° 39' E, Lat 19° 57' N, Course SW, Speed 12 KTS!
0901 Radio Report Received! Enemy Task Force, Long 132° 39' E, Lat 30° 06' N, Course WSW, Speed 12 KTS!
1203 Radio Report Received! Enemy Task Force, Long 115° 57' E, Lat 22° 29' N, Course WSW, Speed 12 KTS!
19411215 0817 Radio Report Received! Enemy Task Force, Long 133° 55' E, Lat 30° 45' N, Course WSW, Speed 12 KTS!
2357 Radio Report Received! Enemy Task Force, Long 115° 48' E, Lat 8° 16' N, Course NNE, Speed 11 KTS!
19411216 0027 Radio Report Received! Enemy Small Convoy, Long 118° 58' E, Lat 12° 19' N, Course S, Speed 12 KTS!
0600 Radio Report Received! Enemy Task Force, Long 107° 00' E, Lat 3° 37' N, Course N, Speed 11 KTS!
0652 Ship spotted, sir! Bearing 282! Long range!
19411210 1100 Ship spotted, sir! Bearing 195! Short range!
Ship spotted, sir! Bearing 103! Short range!
Ship spotted, sir! Bearing 265! Medium range!
Ship spotted, sir! Bearing 265! Long range!
Ship spotted, sir! Bearing 200! Short range!
Ship spotted, sir! Bearing 242! Medium range!
Ship spotted, sir! Bearing 066! Short range!
Ship spotted, sir! Bearing 075! Short range!
1113 Ship spotted, sir! Bearing 307! Long range!
19411211 1115 Radio Report Received! Enemy Task Force, Long 127° 53' E, Lat 28° 05' N, Course WSW, Speed 12 KTS!
19411212 0056 Ship spotted, sir! Bearing 024! Long range!
0224 Radio Report Received! Enemy Task Force, Long 118° 16' E, Lat 23° 47' N, Course SW, Speed 12 KTS!
0912 Radio Message Received: Appendix 0
19411214 0559 Radio Report Received! Enemy Task Force, Long 114° 39' E, Lat 19° 57' N, Course SW, Speed 12 KTS!
0901 Radio Report Received! Enemy Task Force, Long 132° 39' E, Lat 30° 06' N, Course WSW, Speed 12 KTS!
1203 Radio Report Received! Enemy Task Force, Long 115° 57' E, Lat 22° 29' N, Course WSW, Speed 12 KTS!
19411215 0817 Radio Report Received! Enemy Task Force, Long 133° 55' E, Lat 30° 45' N, Course WSW, Speed 12 KTS!
2357 Radio Report Received! Enemy Task Force, Long 115° 48' E, Lat 8° 16' N, Course NNE, Speed 11 KTS!
19411216 0027 Radio Report Received! Enemy Small Convoy, Long 118° 58' E, Lat 12° 19' N, Course S, Speed 12 KTS!
0600 Radio Report Received! Enemy Task Force, Long 107° 00' E, Lat 3° 37' N, Course N, Speed 11 KTS!
0652 Ship spotted, sir! Bearing 282! Long range!
0654 Ship spotted, sir! Bearing 269! Long range!
0702 Radio Report Received! Enemy Task Force, Long 133° 11' E, Lat 29° 25' N, Course SW, Speed 12 KTS!
0733 Ship spotted, sir! Bearing 041! Long range!
Nearest visual contact at bearing 042, range 24606 ft!
Ship spotted, sir! Bearing 045! Long range!
0735 Rise to periscope depth
0738 Sound contact, sir! Merchant Medium Speed Closing! Bearing 047! Long range!
0739 Sound contact, sir! Merchant Medium Speed Closing! Bearing 041! Long range!
0741 Rise to periscope depth
0744 Rise to periscope depth
0750 Firing tube 1, sir!
Firing tube 2, sir!
Torpedo in the water
Firing tube 3, sir!
Torpedo in the water
Torpedo in the water
Firing tube 4, sir!
Torpedo in the water
Torpedo impact
0751 Torpedo impact
Torpedo impact
Torpedo impact
0755 Surfaced
Firing at will
0806 Firing tube 5, sir!
Firing tube 6, sir!
Torpedo in the water
Torpedo in the water
0814 Torpedo missed sir
Torpedo missed sir
1809 Radio Report Received! Enemy Task Force, Long 134° 18' E, Lat 28° 20' N, Course WSW, Speed 11 KTS!
19411217 0612 Aircraft spotted, sir! Bearing 314! Long range!
0613 Firing at will
0614 Ship spotted, sir! Bearing 097! Short range!
0616 Ship spotted, sir! Bearing 028! Short range!
0617 Radio Report Received! Enemy Task Force, Long 133° 08' E, Lat 30° 25' N, Course WSW, Speed 12 KTS!
1755 Radio Report Received! Enemy Task Force, Long 110° 14' E, Lat 8° 53' N, Course NNE, Speed 11 KTS!
19411218 0029 Radio Report Received! Enemy Task Force, Long 117° 32' E, Lat 16° 11' N, Course N, Speed 11 KTS!
1841 Radio Report Received! Enemy Task Force, Long 111° 57' E, Lat 12° 11' N, Course NE, Speed 11 KTS!
19411219 0719 Radio Report Received! Enemy Task Force, Long 105° 03' E, Lat 2° 46' N, Course SSE, Speed 12 KTS!
1354 Radio Report Received! Enemy Task Force, Long 121° 03' E, Lat 21° 18' N, Course WSW, Speed 12 KTS!
19411220 0643 Aircraft spotted, sir! Bearing 159! Long range!
0646 Dive for trim test.
1324 Surfaced
1418 Aircraft spotted, sir! Bearing 192! Long range!
1934 Ship spotted, sir! Bearing 323! Long range!
1936 Nearest visual contact at bearing 039, range 13780 ft!
1938 Rise to periscope depth
1948 Ship spotted, sir! Bearing 005! Medium range!
Firing tube 1, sir!
Torpedo in the water
Firing tube 2, sir!
Torpedo in the water
Firing tube 3, sir!
Torpedo in the water
1949 Firing tube 4, sir!
Torpedo in the water
1951 Surfaced
1957 Torpedo missed sir
Torpedo missed sir
Torpedo missed sir
1958 Torpedo missed sir
2006 Firing tube 1, sir!
Torpedo in the water
2007 Torpedo impact
2011 Ship spotted, sir! Bearing 344! Short range!


Stuff like contact reports and torpedo launchings will be handled better come BETA 1.

Cheers.

Skweetis
03-28-07, 12:30 AM
A request from the community if I could...

I need save game folders from you guys to test against (located in: My Documents\SH4\Data\cfg\SaveGames\########\ where ######## is the number of the save game folder)

Specifically I need the files named (right-click, select PROPERTIES to get more information about the file if you are unsure or file extensions are hidden (a file extension is usually the three letters after the " . ", quotes excluded) :

SaveData.clg
SaveData.crp
SaveData.rmr
SaveData.rms

If you can email them to me at themcqueens@sympatico.ca I would GREATLY appreciate it. The more variety in the patrol the better!

Having many different versions of these files will help me in testing so I can spend more time coding than running patrols and get the first BETA out asap.

Thank you VERY MUCH in advance!

Cheers!

elanaiba
03-28-07, 03:59 AM
If I get right what you're trying to do, I'd say you should also look for the CareerTrack.upc file in MyDocument/sh4/data/cfg/upcinitial

Skweetis
03-28-07, 09:11 AM
Yes, the CarreerTrack file will be used as well, however, Im not that far in the interface to need it yet.

THanks though! :D

Skweetis
03-29-07, 10:28 PM
Just an Update on progress so far. The journaling is coming along slowly, and the code is growing exponentially. I've begun some preliminary formatting, and the out put file is now word-wrapped so it can be printed out.

Here is the same save file I used above, but with the updated formatting.

DATE TIME ENTRY
19411210 1100 Ship spotted, sir! Bearing 195! Short range!
Ship spotted, sir! Bearing 103! Short range!
Ship spotted, sir! Bearing 265! Medium range!
Ship spotted, sir! Bearing 265! Long range!
Ship spotted, sir! Bearing 200! Short range!
Ship spotted, sir! Bearing 242! Medium range!
Ship spotted, sir! Bearing 066! Short range!
Ship spotted, sir! Bearing 075! Short range!
1113 Ship spotted, sir! Bearing 307! Long range!
19411211 1115 RADIO TRAFFIC:
>> From: ...
>> To: ...
>> THE JAPANESE HAVE SUNK 2 BRITISH BATTLESHIPS BY AIR IN THE SOUTH CHINA SEA X
>> HMS REPULSE AND HMS PRINCE OF WALES ARE LOST X JAPANESE FORCES HAVE LANDED IN
>> THE PHILIPPINES X

19411212 0056 Ship spotted, sir! Bearing 024! Long range!
0224 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 127° 53' E, Lat 28° 05' N , Course
>> WSW, Speed 12 KTS!

0912 RADIO TRAFFIC:
>> From: ...
>> To: ...
>> GERMANY AND ITALY DECLARE WAR ON THE UNITED STATES X THE US CONGRESS WILL NOT
>> BE OUTDONE AND DECLARES WAR ON GERMANY AND ITALY X JAPANESE FORCES HAVE BEEN
>> TURNED BACK AT WAKE ISLAND X GOOD JOB BOYS X

2102 RADIO TRAFFIC:
>>
>>
>> On Thursday, December 11th, Germany and Italy have declared war against the
>> United States. The European and the Southeast Asian wars have now become a
>> global conflict between the Axis powers of Japanese Empire, Germany and Italy
>> united against the United

19411214 0559 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 118° 16' E, Lat 23° 47' N , Course
>> SW, Speed 12 KTS!

0901 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> ENGAGE ENEMY MERCHANT SHIPPING IN AREA CELEBES SEA

1203 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: ...
>> ALL CRAFT BE ADVISED JAPANESE INVASION OF BORNEO IMMINENT X REQUEST ASSISTANCE
>> AND AID FROM PATROL CRAFT IN THE AREA X

19411215 0817 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 114° 39' E, Lat 19° 57' N , Course
>> SW, Speed 12 KTS!

2357 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 132° 39' E, Lat 30° 06' N , Course
>> WSW, Speed 12 KTS!

19411216 0027 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 115° 57' E, Lat 22° 29' N , Course
>> WSW, Speed 12 KTS!

0600 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 133° 55' E, Lat 30° 45' N , Course
>> WSW, Speed 12 KTS!

0652 Ship spotted, sir! Bearing 282! Long range!
0654 Ship spotted, sir! Bearing 269! Long range!
0702 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 115° 48' E, Lat 8° 16' N , Course
>> NNE, Speed 11 KTS!

0733 Ship spotted, sir! Bearing 041! Long range!
Nearest visual contact at bearing 042, range 24606 ft!
Ship spotted, sir! Bearing 045! Long range!
0735 Dive to periscope depth
0738 Sound contact, sir! Merchant Medium Speed Closing! Bearing 047! Long range!
0739 Sound contact, sir! Merchant Medium Speed Closing! Bearing 041! Long range!
0741 Rise to periscope depth
0744 Rise to periscope depth
0750 Firing tube 1, sir!
Firing tube 2, sir!
Torpedo in the water
Firing tube 3, sir!
Torpedo in the water
Torpedo in the water
Firing tube 4, sir!
Torpedo in the water
Torpedo impact
0751 Torpedo impact
Torpedo impact
Torpedo impact
0755 Surfaced
Firing at will
0803 Enemy Unit Destroyed
0806 Firing tube 5, sir!
Firing tube 6, sir!
Torpedo in the water
Torpedo in the water
0811 Enemy Unit Destroyed
0814 Torpedo missed sir
Torpedo missed sir
1801 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Small Convoy , Long 118° 58' E, Lat 12° 19' N , Course
>> S, Speed 12 KTS!

1809 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 107° 00' E, Lat 3° 37' N , Course
>> N, Speed 11 KTS!

19411217 0612 Aircraft spotted, sir! Bearing 314! Long range!
0613 Firing at will
0614 Enemy Unit Destroyed
Ship spotted, sir! Bearing 097! Short range!
0616 Ship spotted, sir! Bearing 028! Short range!
0617 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 133° 11' E, Lat 29° 25' N , Course
>> SW, Speed 12 KTS!

1755 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: ...
>> JAPANESE TROOPS HAVE LANDED IN BORNEO X

19411218 0029 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 134° 18' E, Lat 28° 20' N , Course
>> WSW, Speed 11 KTS!

1841 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 133° 08' E, Lat 30° 25' N , Course
>> WSW, Speed 12 KTS!

19411219 0719 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 110° 14' E, Lat 8° 53' N , Course
>> NNE, Speed 11 KTS!

1354 RADIO TRAFFIC:
>> From: COMSUBPAC
>> To: USS Pollack
>> Contact Reported. Enemy Task Force , Long 117° 32' E, Lat 16° 11' N , Course
>> N, Speed 11 KTS!

19411220 0643 Aircraft spotted, sir! Bearing 159! Long range!
0646 Submerged
1324 Surfaced
1418 Aircraft spotted, sir! Bearing 192! Long range!
1934 Ship spotted, sir! Bearing 323! Long range!
1936 Nearest visual contact at bearing 039, range 13780 ft!
1938 Dive to periscope depth
1948 Ship spotted, sir! Bearing 005! Medium range!
Firing tube 1, sir!
Torpedo in the water
Firing tube 2, sir!
Torpedo in the water
Firing tube 3, sir!
Torpedo in the water
1949 Firing tube 4, sir!
Torpedo in the water
1951 Surfaced
1957 Torpedo missed sir
Torpedo missed sir
Torpedo missed sir
1958 Torpedo missed sir
2006 Firing tube 1, sir!
Torpedo in the water
2007 Torpedo impact
2010 Enemy Unit Destroyed
2011 Ship spotted, sir! Bearing 344! Short range!

Now I am working on cleaning up the repeat messages (Firing Tube 1, sir. Firing Tube 2 etc,) and consolidating it into a single entry of how many tubes fired, number of ships spotted la la la....

Once I am finished with the refining of the text file output, I will build the User interface and we should be ready for BETA 1. No time frame yet.

U-Bones
03-29-07, 10:48 PM
I -Really- like this idea. A logfile should be part of the game.

Mav87th
03-30-07, 06:28 PM
This is just a really cool mod - just say they word here if you still need more save files and carrer files...

Skweetis
03-30-07, 09:13 PM
Send them please! I haven't recieved any yet... so the more I have the better. Skippers tend to play differently, so getting as much variety in the save files as possible will make is of utmost importance. No limit, send them all. Run a new patrol, send the save file, keep sending them.

When I get to the Colour Commentary, there will be some simple AI envolved to get a tactical synopsis of what you were up to at that point (attacking convoy, getting DC'd etc.) and create a believable and readable journal when done. This will be the most challenging part, and by far the most advanced thing I have ever done. So the more save files I have to work from, the better. I will give full credit to all who help.

Revised: Please send the files to jamie@trux.com, there is no quota of file size, or amount there. If it gets bounced back due to M-Daemon, let me know via PM and I will make sure you are on the recieve-list.

Rock on, and thanks for the support. Im doing this for myself as much as I am for all!

Cheers.

cgjimeneza
06-22-08, 07:16 PM
hi.

have you advanced on the project? we might need it for our fleet ops.:|\\

LukeFF
06-23-08, 02:12 AM
hi.

have you advanced on the project? we might need it for our fleet ops.:|\\

Good greif, have you seen when he last posted on this forum and how old this thread is? :rotfl:

kptn_kaiserhof
06-23-08, 02:58 PM
cant you's read its not a mod its a utility

LukeFF
06-24-08, 12:09 AM
cant you's read its not a mod its a utility

I can read perfectly fine, and I can also see that he last posted on the 4th of July last year, so obviously the project hasn't progressed.

cgjimeneza
06-24-08, 07:20 AM
our fleet (www.subsowespac.org (http://www.subsowespac.org)) crypto officer authored an automated patrol report for sh1... he`s currently woriking on one for sh4... thats why I asked... maybe they could share ideas...

will ask him if he wants to put his crypto machine here.