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 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
Old 12-21-10, 02:57 PM   #2
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Amazing mate
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 12-21-10, 03:25 PM   #3
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

WOW, very good Idea !!!!

Best regards,
Magic
__________________
Magic1111 is offline   Reply With Quote
Old 12-21-10, 03:30 PM   #4
Myxale
Admiral
 
Join Date: Feb 2006
Location: PQ AN 25
Posts: 2,178
Downloads: 70
Uploads: 0
Default

Together with SH3 LogEditor this will be as close as it gets to a real logbook!

Kudos mate°!!°
__________________
SH3+GWX
SH5+WoS
Still Sailing....still Deep

Myxale is offline   Reply With Quote
Old 12-21-10, 04:22 PM   #5
Delareon
Planesman
 
Join Date: Dec 2006
Posts: 192
Downloads: 77
Uploads: 0
Default

Quote:
Originally Posted by LGN1 View Post
Hi,
...
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
...
First i have to say its an excellent idea and would add much immersion to the game.
Then my questions
Are these entrys your Entrys or the Entries of the game?
I ask because if u search for that patterns it will not work in german i assume.
Delareon is offline   Reply With Quote
Old 12-21-10, 05:36 PM   #6
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Thanks for the encouraging words!

At the moment I have only a German and English version. However, it's easy to add other languages if someone wants to support them. It's also very easy to add other words/items as you like.

The script is quite easy to modify,..., but since I don't know how to program a GUI, you have to have perl For people using my other perl scripts it's not a problem, however, I guess for quite a few players it might be different. Depending on the interest, I might write an extended documentation explaining how to use the script (and perl) in more detail It might be also good for people who want to use the zigzag script.

Anyway, any suggestions for good entries for firing torpedoes,...

Cheers, LGN1
LGN1 is offline   Reply With Quote
Old 12-21-10, 09:04 PM   #7
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

Looks pretty cool so far!
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 12-21-10, 11:50 PM   #8
FUBAR295
Krusty Krab
 
FUBAR295's Avatar
 
Join Date: Mar 2002
Location: Decks awash in the North Atlantic
Posts: 1,450
Downloads: 493
Uploads: 0
Default

WOW!!!

Look forward to more.

Good Hunting,
FUBAR295
__________________
Good judgment comes from experience. Unfortunately, the experience usually comes from bad judgment.


FUBAR295 is offline   Reply With Quote
Old 12-21-10, 11:55 PM   #9
Gerald
SUBSIM Newsman
 
Gerald's Avatar
 
Join Date: May 2008
Location: Close to sea
Posts: 24,254
Downloads: 553
Uploads: 0


Cool,
__________________
Nothing in life is to be feard,it is only to be understood.

Marie Curie





Gerald is offline   Reply With Quote
Old 12-22-10, 03:10 AM   #10
CherryHarbey
Engineer
 
Join Date: Jul 2010
Location: Derby, UK
Posts: 200
Downloads: 86
Uploads: 0
Default

LGN1,
Very interesting stuff, I used to update my logs in SH3 Commander with most of this, but had to stop as it was consuming too much paper during patrols and too much time after patrols.
I used to include "evasion begun" and "evasion complete" entries which could be tied to the requests for silent running on/off.

I also used include oxygen level reports whilst under long evasions but not if I was diving to keep out of a storm. (or the 100% report you get after every dive!) Can your script include IF statements? or maybe just include the 50% 25% 10% reports?

And the Medic!!!!!! text could be linked to crew wounded/killed

Just my suggestions, feel free to ignore if it isn't easy to do
CherryHarbey is offline   Reply With Quote
Old 12-22-10, 10:04 AM   #11
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Hi,

here is an automatically generated log of an interesting patrol.

Page 1: I am leaving Brest on the 30. Dec. 1942. Many radar warnings and crash dives because of airplanes in the Bay of Biscay.



Page 2: 4. Jan. 1943. I receive a radar warning and dive. The sound operator reports a warship and merchant. I found a convoy. I shoot 5 torpedoes, but only 3 hit. Two ships sunk. Destroyer starts to use ASDIC.



Page 3: I find a slow tanker behind the convoy and sink it. 5. to 15. Jan. only weather reports. Poor visibility and strong winds. At least no planes.



Page 4: For training purposes I order the crew to man the deck gun and flak. Planes start to show up again.



Page 5 to 7: The boat is damaged by a plane. After receiving a radar warning and diving, the sound operator reports a merchant and warship. Another convoy. I shoot four torpedoes. 3 hits, 2 ships sunk. Another convoy is found after diving because of a radar warning. I shoot 3 torpedoes. 3 hits, 2 ships sunk. Destroyer starts to throw depth charges. Fuel down to 50%.







Page 8: Trip back through the Bay of Biscay. Many radar warnings. Feb. 7th 1943 sound operator reports sound contact. Our escort.




It's quite interesting, the crew did not spot a single ship. All contacts were made via radar warnings. I wonder whether it worked that well in real-life, too. I doubt it.

As you can see the entries are quite generic because you don't have much information. However, the automatically generated log can serve well as a first draft for a more detailed log with JScones' SH3 Patrol Log Editor.
LGN1 is offline   Reply With Quote
Old 12-22-10, 11:10 AM   #12
Rickster1
Chief
 
Join Date: Jul 2005
Posts: 320
Downloads: 508
Uploads: 0
Default

Superb, back to SH3 from SH5
Rickster1 is offline   Reply With Quote
Old 12-22-10, 11:13 AM   #13
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Great Idea. Sh3 is not yet dead. NOT YET.

Could it work in the background during gameplay?
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 12-22-10, 11:16 AM   #14
Delareon
Planesman
 
Join Date: Dec 2006
Posts: 192
Downloads: 77
Uploads: 0
Default

Ah suggestion: as i see for example in the log for the sunked Passagierdampfer.
There are many messages which are similiar like the "Torpedotreffer". All the same time and the same message. Would it be possible to group them?
for example "3 Torpedotreffer" or when u launch many torpedos in small intervalls something like "Torpedoschuss aus Rohren 3, 4, 5, 6".

Just an idea if its possible to implement would be nice, because of a shorter log
Delareon is offline   Reply With Quote
Old 12-22-10, 01:37 PM   #15
rea00cy
Loader
 
Join Date: Jul 2007
Location: Central FL
Posts: 88
Downloads: 337
Uploads: 0
Default

This is cool! I look forward to seeing this mod ready to use.

Happy hunting,

rea00cy
__________________
ATROPOS-the deadly nightshade
rea00cy 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:04 PM.


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.