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 11-19-23, 04:04 PM   #1
Hebe Vollmaus
Lieutenant
 
Join Date: Jun 2010
Location: Germany
Posts: 250
Downloads: 3
Uploads: 1
Default about Crash, zero-sized 3d-objects, index and shadows in Dat-files

Hi there,
for some reason i would like to stop modding and try to play again a Campaign from 1939 on to the end in 1945.
But my game does not allow this! In the middle of 1942 i stumbled over a Ship that crashes the game to desktop. Modding may be an endless-loop. LOL
I created a Training-Mission with that ship only to be shure the reason is this ship. Whenever i hit the target with my heavy-shells the game crashed. So with the help of "Silent 3ditor" (S3D) looked into its Dat-file. Found a bunch of zero-sized 3D-objects. Filled these 3Ds with something real. And the game nolonger crashes.
Really annoying, since the zero-sized 3D-objects allone should not be the problem, as there are some other files around which use these things for good. For example for fake-funnels or rudders.
I expanded mySH3-TooL to detect these Zero3Ds. On the way i found five Dat-files which S3D cannot open. Three of them had bad index-lenght. So added this to detect also indexes to my tool. What can i say... Almost all Dat-files in my SH3-install had bad indexes. Checked the original unmodified SH3 files - all are ok, and there are no zero-sized 3D-objects. As my game-install runs otherwise good, these indexes seems to be useless to the game.
For the long story short, i deleted all indexes i can find. Also allmost all Shadows (SHD, DynamicShadowCast, DynamicShadow), and useless (unfinished/forgotten) zero-sized 3D-object. The game looks the same, as it does not use DynamicShadows anyway.
SH3\data is a little more then 4GB. Saves little less then 60MB. Maybe not worth doing so. But now i have 3800 unused 3D-objects less.

Greetings.
Hebe Vollmaus is offline   Reply With Quote
Old 11-19-23, 05:04 PM   #2
FUBAR295
Krusty Krab
 
FUBAR295's Avatar
 
Join Date: Mar 2002
Location: Decks awash in the North Atlantic
Posts: 1,304
Downloads: 443
Uploads: 0
Default

Hebe,


Interesting post. It may not help with the size but the loading time may be a bit faster, hopefully. There is a lot of junk and repetitive files taking up memory and adding to load times. I think Fifi and AlexOne have done a great job getting rid of unneeded stuff.


I use your tool, it's great!


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


FUBAR295 is offline   Reply With Quote
Old 11-20-23, 07:06 AM   #3
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 5,804
Downloads: 457
Uploads: 0


Default

Yes, tons of unnecessary or not working things everywhere in this game
Actually revising MFM ships, and had surprises with their 3D model… don’t know where they come from, but plenty weird things too

Fifi is offline   Reply With Quote
Old 11-20-23, 09:44 AM   #4
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 824
Downloads: 27
Uploads: 0


Default

Quote:
Originally Posted by Hebe Vollmaus View Post
Hi there,
for some reason i would like to stop modding and try to play again a Campaign from 1939 on to the end in 1945.
But my game does not allow this! In the middle of 1942 i stumbled over a Ship that crashes the game to desktop. Modding may be an endless-loop. LOL
I created a Training-Mission with that ship only to be shure the reason is this ship. Whenever i hit the target with my heavy-shells the game crashed. So with the help of "Silent 3ditor" (S3D) looked into its Dat-file. Found a bunch of zero-sized 3D-objects. Filled these 3Ds with something real. And the game nolonger crashes.
Really annoying, since the zero-sized 3D-objects allone should not be the problem, as there are some other files around which use these things for good. For example for fake-funnels or rudders.
I expanded mySH3-TooL to detect these Zero3Ds. On the way i found five Dat-files which S3D cannot open. Three of them had bad index-lenght. So added this to detect also indexes to my tool. What can i say... Almost all Dat-files in my SH3-install had bad indexes. Checked the original unmodified SH3 files - all are ok, and there are no zero-sized 3D-objects. As my game-install runs otherwise good, these indexes seems to be useless to the game.
For the long story short, i deleted all indexes i can find. Also allmost all Shadows (SHD, DynamicShadowCast, DynamicShadow), and useless (unfinished/forgotten) zero-sized 3D-object. The game looks the same, as it does not use DynamicShadows anyway.
SH3\data is a little more then 4GB. Saves little less then 60MB. Maybe not worth doing so. But now i have 3800 unused 3D-objects less.

Greetings.
Hi Hebe Vollmaus,

1. Is it possible to automatically remove all the useless SHD nodes with your tool?

2. What is a "bad index"?


Quote:
Originally Posted by Fifi View Post
Yes, tons of unnecessary or not working things everywhere in this game
Actually revising MFM ships, and had surprises with their 3D model… don’t know where they come from, but plenty weird things too
Le Diable est dans les détails... (the Devil is in the detail)...
Mister_M is offline   Reply With Quote
Old 11-20-23, 10:25 AM   #5
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,810
Downloads: 444
Uploads: 2


Default

I think he is referring to the S3D index:




As usual though, I could well be wrong... lol - Some of what Hebe found is from the hex-editing days. Silent3Ditor will not let you save a dat file without first updating the index, which it does automatically when you save, or you can initiate it yourself. S3D also does ID checks and will let you know if there are conflicts there. None of that functionality is available with hex-editing. That is up to the user. The empty 3D objects are also part of the hex-editing, as are a few other little "tricks" that hex-editing people employed to "mark" their files.

As for "automatically" removing such items, it is possible, but would involve some deep programming skills, which are hard to find these days in the "hobby" world. Hebe might be able to pull it off, but he has other, more important chores to do with his mySH3-Tool first... - which is something every modder should have in their toolbox, and use on a regular basis...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 11-20-23, 04:50 PM   #6
Hebe Vollmaus
Lieutenant
 
Join Date: Jun 2010
Location: Germany
Posts: 250
Downloads: 3
Uploads: 1
Default

Hi,
yes. Today we may be a very little bit amused. But 2007 was another world. No S3D. Only Hex-edit. And as for that i have high respect for these Modders in the old days.
The "Best of" i have seen until today is the "Air_br.dat". A landed Sunderland-Aircraft was made out of a small Torpedoboat. A lot of unseen Ballast were left in.

My tool is not able to remove these Nodes.
To do this i need to know all things what can be in a Dat-file, which i do not know. And as this functionality already exist in S3D i do not see, as of today, that i like to re-invent the wheel.
I think S3D can be "persuaded" to do this automatically, but only with a selfmade program that will telecommand S3D.

The index is what propbeanie has shown. But i would not call it "S3D index". Its a Dat-index.
I have two sorts of "Bad index". One are these with a wrong Lenght-entry in the index-Header. This will stop S3D from Loading. And a second with a Node (ID) within the index, that shows a wrong file-position. S3D always adds a comment into a Dat-file and therefore will be all internal Node-positions also re-positioned in this index.

S3D is very good. Now i have used a function that i have never used before: "Save in Mod". Very helpful!

Greetings.
Hebe Vollmaus 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 07:04 AM.


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