![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|||||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
11-20-23, 07:06 AM
|
#1 |
|
Navy Seal
![]() |
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
__________________
|
|
|
11-20-23, 09:44 AM
|
#2 | |
|
Ace of the Deep
![]() |
Quote:
1. Is it possible to automatically remove all the useless SHD nodes with your tool? ![]() 2. What is a "bad index"? Le Diable est dans les détails... (the Devil is in the detail)... |
|
|
|
11-20-23, 10:25 AM
|
#3 |
|
CTD - it's not just a job
|
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 naysayers" - Jimbuna |
|
|
11-20-23, 04:50 PM
|
#4 |
|
Frogman
![]() Join Date: Jun 2010
Location: Germany
Posts: 290
Downloads: 3
Uploads: 1
|
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. |
|
|
11-20-23, 10:03 PM
|
#5 |
|
GWX Project Director
|
Good stuff, Hebe. Thank you.
We are continuously finding and getting rid of extraneous bits too. It is nice to have more elements to look for. Every little bit counts. |
|
|
11-21-23, 10:57 AM
|
#6 |
|
GLOBAL MODDING TERRORIST
|
Old information about dat structure from around 2005.
Don't recall who posted it back then and it's never been updated to current knowledge. SH III DAT FILE FORMAT Skip the first 20 bytes they seem to be always the same. Next 4 bytes are a long with the header string lenght. Next is the author name and the "using Kashmir" stuff, total lenght as read above. Next, file is made of "chunks". All chunks are like this: ChunkType 4 bytes Chunk Subtype/Version 4 bytes chunk_size long (4 bytes) Data (chunk_size bytes) Chunk types and internal structure of each one: type 0: EMPTY chunk it's just 12 "00" bytes, so type, subtype and size are 0 type 1: 3D chunk after the Chunk type, subtype/ver and size, format of the data part is like follows: chunk_id: 8 bytes //this is used to reference this part inside the file. References usually found inside NODE (type 4) chunks ???????: 1 byte //don't know about this one nverts: 4 byte long //number of vertices vertex data: nverts * 3 floats(X,Y,Z)// these are vertices, 3 floats per vertex ntri: 4 byte long //number of triangles; triangle data: there are ntri triangles and their texture mapping, each one is as follows vertex1: unsigned 2-byte int vertex2: unsigned 2-byte int vertex3: unsigned 2-byte int texture coord1: unsigned 2-byte int texture coord2: unsigned 2-byte int texture coord3: unsigned 2-byte int ????????????: one byte ntxcoords: 4 byte long //number of texture coordinates texture coords data: ntxcoords * 2 floats // texture coordinates are 2D some objects end here, but some have "TMAP" and a bunch of floats after this, dunno what is that yet so I skip it type 2: TEXTURE REFERENCE? after the Chunk type, subtype/ver and size, format of the data part is like follows: chunk_id: 8 bytes //this is used to reference this part inside the file. References usually found inside NODE (type 4) chunks then a bunch of bytes that I haven't figured yet, usually ending with a texture filename. type 3: TGA FILE these are the TGA files, just packed after the type, subtype and chunk size. type 4: NODE (these tell us how parts are related to each other, in a tree-like hierarchy) after the Chunk type, subtype/ver and size, format of the data part is like follows: chunk_id: 8 bytes //this is used to reference this node inside the file. References usually found inside NODE (type 4) chunks parent_id: 8 bytes //reference to the "parent" node. root nodes have 00 00 00 00 00 00 00 00 as parent 3dpart_id: 8 bytes //reference to the 3d part managed by this node, 00 00 00 00 00 00 00 00 if this is a "dummy" node with no visible 3d part ????????: 1 byte, seems to be always 00. ????????: 1 byte, seems to be related to the number of different type 2 nodes referenced from this one. x offset: 4 bytes float //x offset from parent node y offset: 4 bytes float //y offset from parent node z offset: 4 bytes float //z offset from parent node then comes the type 2 chunk references and some stuff I don't yet understand type 6: DATA? these are children of type 10 chunks, they seem to hold effects, commands, interactions, etc... first 8 bytes are the reference to the type 10 parent. rest is strings and numerical values. type 8: LABEL these are used to label other nodes format is: 8 byte parent chunk reference string with label type 10: DATA? these seem to group type 6 chunks and attach them to type 4 nodes first 8 bytes: id of this chunk second 8 bytes: id of parent node then comes some data, usually strings and numbers. type 102: SCALE? these come usually near the end of the files, they are a bunch of floats, probably some global scaling, have to test it type 1001: INDEX this one seems to be an index, there are chunk ID's and the corresponding file postition, might have to update this if some chunk has its size altered, but some tries suggest this doesnñr affect loading. There are more chunk types, haven't had time to check them |
|
|
11-21-23, 11:03 AM
|
#7 |
|
Ace of the Deep
![]() |
And what is the unknown node that we sometimes see at the end of a .dat file in S3D?
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
