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 09-17-06, 01:22 AM   #31
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Thanks for your post - I'd seen some stray references to SH3 Gen but somehow had missed getting around to checking it out. It looks very cool, and I'm definitely going to play around with it some more.

Unfortunately, however, there is a truncation effect as you mention below:

"Another important thing is that no entry must be longer than 255 characters. Even though SHIII will load and display the text correctly the first time, it will not save it, and therefore the entry will be truncated at the next reload."

This truncation effect is definitely interfering with the "personal entries" portion of my modified log file approach. Basically, with this truncation effect the personal entries have to be so short that the process loses a lot of its fun/appeal.

This truncation appears to be a result of something SH3 Gen is doing, rather than SH3 itself - I have had no problem with personal diary log entries much longer than 255 characters both being displayed in game and being saved down into the next saved game's log file, but when I run SH3 Gen on the new saved game and then look at the log in game, the entries have indeed been truncated. Do you have any idea why this truncation occurs with SH3 Gen and do you think there is any way it can be fixed/tweaked so that it won't truncate the entries in this fashion? I'd love to play around with SH3 Gen now that I've discovered it, but I'd hate to have to give up my newly-personalized captain's log to do so.

[edit] - BTW - I D/L'ed and am using the .NET 2.0 version 0.7.1 of SH3 Gen, in case that matters.
__________________

Last edited by panthercules; 09-17-06 at 01:25 AM.
panthercules is offline   Reply With Quote
Old 09-17-06, 07:00 AM   #32
GlobalExplorer
Admiral
 
Join Date: May 2005
Location: Berlin
Posts: 2,015
Downloads: 165
Uploads: 0
Default

Quote:
Originally Posted by panthercules
Thanks for your post - I'd seen some stray references to SH3 Gen but somehow had missed getting around to checking it out. It looks very cool, and I'm definitely going to play around with it some more.

Unfortunately, however, there is a truncation effect as you mention below:

"Another important thing is that no entry must be longer than 255 characters. Even though SHIII will load and display the text correctly the first time, it will not save it, and therefore the entry will be truncated at the next reload."

This truncation effect is definitely interfering with the "personal entries" portion of my modified log file approach. Basically, with this truncation effect the personal entries have to be so short that the process loses a lot of its fun/appeal.

This truncation appears to be a result of something SH3 Gen is doing, rather than SH3 itself - I have had no problem with personal diary log entries much longer than 255 characters both being displayed in game and being saved down into the next saved game's log file, but when I run SH3 Gen on the new saved game and then look at the log in game, the entries have indeed been truncated. Do you have any idea why this truncation occurs with SH3 Gen and do you think there is any way it can be fixed/tweaked so that it won't truncate the entries in this fashion? I'd love to play around with SH3 Gen now that I've discovered it, but I'd hate to have to give up my newly-personalized captain's log to do so.

[edit] - BTW - I D/L'ed and am using the .NET 2.0 version 0.7.1 of SH3 Gen, in case that matters.
That's something I cannot confirm right now. I think that this behaviour is not related to Sh3Gen in any way.

In fact, I would expect this kind of problem is caused by a too tiny array declaration in SHIII's .clg write routine. In other words, some programmer had a bad day and declared string entry[256] somewhere - had he simply typed, for example, string[2048] we would be so much better off!

Of course, it might be that I screw up something through the use of a redundant tag (header, entrytype etc) - but I need confirmation. Right now I am not convinced.

HINT: If you want to make a check, it is pretty simple. Use notepad to add a very long entry of at least 300-500 characters to the log. Load the savegame. Save it again under another name and reload this re-saved data. You will see that the text is truncated. You will also see that this is because the re-saved .clg does already contain the truncated entries (the glitch is in the writing, not the reading part).

If not, and you can confirm this with entries of 300, 400, 600 characters, please post here and contact me because this would definitely prove me wrong, and mean I screw up something.

Quote:
Originally Posted by panthercules
This truncation effect is definitely interfering with the "personal entries" portion of my modified log file approach. Basically, with this truncation effect the personal entries have to be so short that the process loses a lot of its fun/appeal.
I split up the longer entries into 255 character blocks and don't find it a big problem anymore.
__________________

GlobalExplorer is offline   Reply With Quote
Old 09-17-06, 11:54 AM   #33
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Quote:
Originally Posted by GlobalExplorer
HINT: If you want to make a check, it is pretty simple. Use notepad to add a very long entry of at least 300-500 characters to the log. Load the savegame. Save it again under another name and reload this re-saved data. You will see that the text is truncated. You will also see that this is because the re-saved .clg does already contain the truncated entries (the glitch is in the writing, not the reading part).

If not, and you can confirm this with entries of 300, 400, 600 characters, please post here and contact me because this would definitely prove me wrong, and mean I screw up something.
This is exactly what I did as a test before I posted the above - sorry if I wasn't clear on that. Outside the game, I made my long entries in save-game "Patrol22e" log file, then switched to SH3 and loaded up save-game "Patrol22e" - the long entries displayed just fine. I then saved the game and exited, saving it as "Patrol22f". I then re-entered the game, and loaded up save-game "Patrol22f" - the long entries displayed just fine and were not truncated. I then saved the game and exited (saving it as "Patrol22f" again), switched over and ran SH3Gen on "Patrol22f". When I switched back to the game and loaded up save-game "Patrol22f", the log entries were truncated. I had played and saved several times over the last few nights (before finding out about SH3Gen) and never had any problems with SH3 itself truncating the entries (only had the problem outlined above about choking if a single entry spanned more than one page). Sounds to me like the truncation problem has to be in or connected with SH3Gen somehow.

Here's a couple of screenshots of my log in-game (pages 1 and 2), in "Patrol22f" (after originally having been made in "Patrol22e" saved game):





I hope you can figure out why this is happening and fix it, cause SH3Gen does look like a very cool piece of work.
__________________
panthercules is offline   Reply With Quote
Old 09-17-06, 11:59 AM   #34
bigboywooly
Rear Admiral
 
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
Default

Quote:
Originally Posted by panthercules
Quote:
Originally Posted by GlobalExplorer
HINT: If you want to make a check, it is pretty simple. Use notepad to add a very long entry of at least 300-500 characters to the log. Load the savegame. Save it again under another name and reload this re-saved data. You will see that the text is truncated. You will also see that this is because the re-saved .clg does already contain the truncated entries (the glitch is in the writing, not the reading part).

If not, and you can confirm this with entries of 300, 400, 600 characters, please post here and contact me because this would definitely prove me wrong, and mean I screw up something.
This is exactly what I did as a test before I posted the above - sorry if I wasn't clear on that. Outside the game, I made my long entries in save-game "Patrol22e" log file, then switched to SH3 and loaded up save-game "Patrol22e" - the long entries displayed just fine. I then saved the game and exited, saving it as "Patrol22f". I then re-entered the game, and loaded up save-game "Patrol22f" - the long entries displayed just fine and were not truncated. I then saved the game and exited (saving it as "Patrol22f" again), switched over and ran SH3Gen on "Patrol22f". When I switched back to the game and loaded up save-game "Patrol22f", the log entries were truncated. I had played and saved several times over the last few nights (before finding out about SH3Gen) and never had any problems with SH3 itself truncating the entries (only had the problem outlined above about choking if a single entry spanned more than one page). Sounds to me like the truncation problem has to be in or connected with SH3Gen somehow.

Here's a couple of screenshots of my log in-game (pages 1 and 2), in "Patrol22f" (after originally having been made in "Patrol22e" saved game):





I hope you can figure out why this is happening and fix it, cause SH3Gen does look like a very cool piece of work.
PM Global Explorer - he may be able to help you guys
__________________


My mediafire page http://www.mediafire.com/?11eoq19bq9r41
bigboywooly is offline   Reply With Quote
Old 09-17-06, 12:01 PM   #35
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

I did PM him as he suggested - hopefully he'll get a chance to check into this and figure out what's going on.
__________________
panthercules is offline   Reply With Quote
Old 09-17-06, 03:22 PM   #36
bigboywooly
Rear Admiral
 
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
Default

He is very cooperative
Hope you guys can get this sorted as its looking real good
Very usefull idea
__________________


My mediafire page http://www.mediafire.com/?11eoq19bq9r41
bigboywooly is offline   Reply With Quote
Old 09-20-06, 09:27 AM   #37
GlobalExplorer
Admiral
 
Join Date: May 2005
Location: Berlin
Posts: 2,015
Downloads: 165
Uploads: 0
Default

Quote:
Originally Posted by panthercules
I did PM him as he suggested - hopefully he'll get a chance to check into this and figure out what's going on.
I must admit Sh3Gen is processing and possibly truncating the entries. But I never thought this was a problem because SHIII would not re-save the extra characters, anyway. This can and will be fixed, at least as far as Sh3Gen is concerned, but I still believe SHIII will not process the text differently.

@panthercules: I will send you a small patch when it's ready, and I hope you will report back to me if it solved the problem. Thanks a lot for your patience and for reporting your findings.

GE
__________________

GlobalExplorer is offline   Reply With Quote
Old 09-20-06, 06:30 PM   #38
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Quote:
Originally Posted by GlobalExplorer
Quote:
Originally Posted by panthercules
I did PM him as he suggested - hopefully he'll get a chance to check into this and figure out what's going on.
I must admit Sh3Gen is processing and possibly truncating the entries. But I never thought this was a problem because SHIII would not re-save the extra characters, anyway. This can and will be fixed, at least as far as Sh3Gen is concerned, but I still believe SHIII will not process the text differently.

@panthercules: I will send you a small patch when it's ready, and I hope you will report back to me if it solved the problem. Thanks a lot for your patience and for reporting your findings.

GE
Thanks for checking into this - the more I find out about SH3Gen the cooler it looks, but now that I've figured out how to get personal war diary entries into my in-game captain's log I've been having a lot of fun with it and I'd hate to give it up. As you can see from the screenshots below, some of these test entries have gotten quite a bit longer than 256 characters and SH3 seems to be handling them quite well in terms of displaying them in-game and saving/writing them down from one saved game to the next, so I hope the tweak to SH3Gen turns out to be easy and effective. I'll be happy to give your patch a whirl whenever it's ready and let you know how it turns out. (If it would help for me to send you the savedgame.clg file that's generating these in-game logs, I'd be happy to do so)






__________________
panthercules is offline   Reply With Quote
Old 09-21-06, 04:38 AM   #39
GlobalExplorer
Admiral
 
Join Date: May 2005
Location: Berlin
Posts: 2,015
Downloads: 165
Uploads: 0
Default

I have a theory that my usage of GetPrivateProfileString might be to blame and I hope I can look into it over the weekend or so. If my theory is right, it should be easily fixed.
__________________

GlobalExplorer is offline   Reply With Quote
Old 09-27-06, 12:49 PM   #40
KeldorKatarn
Helmsman
 
Join Date: Jul 2005
Posts: 103
Downloads: 0
Uploads: 0
Default

28. Oktober 1939
00:00 Uhr
AN 95
Haben Helgoland passiert.

30. Oktober 1939
06:50 Uhr
AN 14
Schiff in Orkney-Shetland Passage gesichtet. Gehe auf Abfangkurs.

08:00 Uhr
Zweierfächer. Ein Treffer. Drei Versuche einen Fangschuß zu setzen schlagen aufgrund Ausweichmaneuver des Gegners fehl. Nach fünfundvierzig Schuß Artillerie sinkt der Frachter schließlich über seine gesamte Länge.

13:05 Uhr
Vor Flugzeug getaucht. Wirft Bomben im zweiten Anflug. Keine Schäden. Bleibe bis Sonnenuntergang im Keller.

1. November 1939
07:45 Uhr
AN 24
Haben unser Operationsgebiet erreicht.

14:20 Uhr
Frachter mit Kurs NW gesichtet. Gehe auf Abfangkurs.

15:50 Uhr
Gegner zackt um Generalkurs 325° bei 3 Knoten Fahrt.

16:10 Uhr
Zweierfächer. Beides Volltreffer. Frachter gerät schnell mit Heck unter Wasser und sinkt nach wenigen Minuten über Achtersteven.

2. November 1939
03:10 Uhr
I WO meldet Schiff auf 319 Grad. Erkenne selbst nichts, gehe aber auf Abfangkurs.

04:40 Uhr
Zweierfächer auf kleinen Frachter. Zwei Treffer am Bug. Schiff sinkt schnell über Vordersteven.

3. November 1939
18:00 Uhr
Setze Kurs durch Orkney-Shetland-Passage auf neues Operationsgebiet in AN 79.

5. November 1939
12:41 Uhr
AN 12
Vor Flugzeug getaucht. Gebombt. Keine Schäden. Bleibe bis Dämmerung auf 40 Meter.

6. November 1939
12:10 Uhr
AN 41
Schiff im Süden gesichtet. Gehe auf Abfangkurs.

13:30 Uhr
Küstenfahrzeug. Nach zwei Fehlschüssen breche ich den Angriff aufgrund Wetterlage ab.

9. November 1939
01:30 Uhr
AN 84
Mehreren Zerstörern ausgewichen. Setze Kurs fort.

09:45 Uhr
AN 79
Kurz nach Eintreffen in Operationsgebiet von Elco Torpedoboot angegriffen. Lasse Artillerie Feuer erwidern. Elco nach mehreren Treffern versenkt. Leichte Schäden. Mit Bordmitteln zu reparieren.

10:00 Uhr
Werde von zwei weiteren Elcos und zwei Zerstörern angegriffen. Tauche weg.



- - -U-47 GING NACH EINER STUNDE WABO-VERFOLGUNG IM PQ AN79 AM 9. NOVEMBER 1939 GEGEN 11:15 VERLOREN - - -
KeldorKatarn is offline   Reply With Quote
Old 09-28-06, 05:53 PM   #41
HEMISENT
Ace of the Deep
 
Join Date: Feb 2003
Location: Northern Illinois
Posts: 1,052
Downloads: 135
Uploads: 0
Default

Just a note to say thanks to you guys for digging this up. I just successfully edited and saved my clg file and it showed up as advertized as a log entry in game.
__________________
Nuke 'em till they glow!
HEMISENT is offline   Reply With Quote
Old 09-28-06, 07:31 PM   #42
panthercules
The Old Man
 
Join Date: Apr 2005
Posts: 1,336
Downloads: 6
Uploads: 0
Default

Quote:
Originally Posted by HEMISENT
Just a note to say thanks to you guys for digging this up. I just successfully edited and saved my clg file and it showed up as advertized as a log entry in game.
Glad to be able to give back even a little bit, even though it pales in comparison to the contributions you and so many others have made around here. I hope you enjoy it as much as I have been - it's pretty addictive once you start doing this
__________________
panthercules 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:20 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.