![]() |
[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: http://img338.imageshack.us/img338/6000/shortox.th.jpg Uploaded with ImageShack.us Log book after running the script: http://img502.imageshack.us/img502/3721/longhx.th.jpg 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! |
Amazing mate :o
|
WOW, very good Idea !!!! :up:
Best regards, Magic:salute: |
Together with SH3 LogEditor this will be as close as it gets to a real logbook!
Kudos mate°!!° |
Quote:
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. |
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 :hmmm: It might be also good for people who want to use the zigzag script. Anyway, any suggestions for good entries for firing torpedoes,... :D Cheers, LGN1 |
Looks pretty cool so far! :sunny:
|
WOW!!!
Look forward to more.:):DL:):DL Good Hunting, FUBAR295 |
Cool, :up:
|
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 |
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. http://img228.imageshack.us/img228/9076/17007994.th.jpg 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. http://img84.imageshack.us/img84/7159/45582310.th.jpg 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. http://img255.imageshack.us/img255/3997/47974786.th.jpg Page 4: For training purposes I order the crew to man the deck gun and flak. Planes start to show up again. http://img413.imageshack.us/img413/9114/41394702.th.jpg 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%. http://img20.imageshack.us/img20/4295/58926088.th.jpg http://img256.imageshack.us/img256/9794/60495245.th.jpg http://img543.imageshack.us/img543/7722/40986002.th.jpg Page 8: Trip back through the Bay of Biscay. Many radar warnings. Feb. 7th 1943 sound operator reports sound contact. Our escort. http://img834.imageshack.us/img834/4650/80251663.th.jpg 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. |
Superb, back to SH3 from SH5
|
Great Idea. Sh3 is not yet dead. NOT YET.
Could it work in the background during gameplay? |
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 ;) |
This is cool! I look forward to seeing this mod ready to use.
Happy hunting, rea00cy |
All times are GMT -5. The time now is 01:06 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.