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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-21-10, 02:12 PM   #1
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default [WIP] Automatic log-book editor

Hi,

I am currently working on a perl script that automatically adds entries to the captain's log book depending on what happened during a patrol. Here is an example:

Stock log book entries:



Uploaded with ImageShack.us

Log book after running the script:



Uploaded with ImageShack.us

The script uses the *.crp file of a save-game which contains all entries in the 'console' during a patrol. It reads these entries, looks for certain patterns, and adds corresponding entries to the log book. At the moment it looks for these entries (first line is the text in the 'console', the second line the corresponding text that is added to the log book. The third line is the time in hours that must pass before another entry of this kind is added. E.g., this allows you to have weather reports only every 24h in your log book):

EntryText=Torpedo Impact!
EntryText=Torpedo impact.
0
EntryText=Torpedo missed, sir!
EntryText=Torpedo missed.
0
EntryText=Torpedo is a dud, sir!
EntryText=Torpedo is a dud.
0
EntryText=Tube 1 ready, sir!
EntryText=Tube 1 reloaded.
0
EntryText=Tube 2 ready, sir!
EntryText=Tube 2 reloaded.
0
EntryText=Tube 3 ready, sir!
EntryText=Tube 3 reloaded.
0
EntryText=Tube 4 ready, sir!
EntryText=Tube 4 reloaded.
0
EntryText=Tube 5 ready, sir!
EntryText=Tube 5 reloaded.
0
EntryText=Tube 6 ready, sir!
EntryText=Tube 6 reloaded.
0
EntryText=Firing tube 1, sir!
EntryText=Firing tube 1.
0
EntryText=Firing tube 2, sir!
EntryText=Firing tube 2.
0
EntryText=Firing tube 3, sir!
EntryText=Firing tube 3.
0
EntryText=Firing tube 4, sir!
EntryText=Firing tube 4.
0
EntryText=Firing tube 5, sir!
EntryText=Firing tube 5.
0
EntryText=Firing tube 6, sir!
EntryText=Firing tube 6.
0
EntryText=Crash dive
EntryText=Crash dive.
0
EntryText=Man the deck gun
EntryText=Order to man the deck gun.
0
EntryText=Man the flak gun(s)
EntryText=Order to man the flak gun.
0
EntryText=We're under attack, sir!
EntryText=Under attack.
1
EntryText=Enemy is pinging us, sir!
EntryText=Destroyer is using ASDIC.
1
EntryText=Depth charges in the water, sir!
EntryText=Depth charges.
1
EntryText=Detecting radar signals!
EntryText=Radar signals detected!
6
EntryText=We have to surface, sir!
EntryText=We have to surface.
0
Keyword=Wind Speed
EntryText=
24
Keyword=Sound contact, sir! Merchant
EntryText=Sonar operator reports sound contact.
6
Keyword=Sound contact, sir! Warship
EntryText=Sound operator reports warship.
6
Keyword=Ship spotted, sir!
EntryText=Ship spotted.
6
Keyword=Aircraft spotted, sir!
EntryText=Aircraft spotted.
1
Keyword=Submarine spotted, sir!
EntryText=Submarine spotted.
1
Keyword=damaged, sir!
Remove=7
0
Keyword=destroyed, sir!
Remove=7
0
Keyword=Flooding in
Remove=7
1
Keyword=repaired, sir!
Remove=7
0
Keyword=intact, sir!
Remove=7
0
Keyword=Diesel fuel reserve down to
Remove=8
0

At the moment these entries are still very short and I would like to replace them with longer once. It would be great if you could make some suggestions for better entries (but please keep in mind that they must be quite generic).

Thanks for any suggestions!

Cheers, LGN1

PS: After a patrol these entries can also be easily extended by JScones excellent Patrol-Log editor in SH Commander!
LGN1 is offline   Reply With Quote
 


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 06:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.