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 04-13-06, 11:35 AM   #1
Boris
Sea Lord
 
Join Date: Jun 2005
Location: Hamburg, Germany
Posts: 1,691
Downloads: 41
Uploads: 0
Default Multiple ship skins

Multiple ship skins are a new addition in the GW mod right?

Either way, I noticed this nifty feature recently and have started making more skin variations of my own. But do all ships have this feature? I notice that a lot of ships do not have any skin files in their folders, I've only been adding to the one's that have. Can these other ships be multi-skinned too?
Boris is offline   Reply With Quote
Old 04-13-06, 11:43 AM   #2
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

Sergbuto made the C3 and a lot of the destroyers multi-skinned, but many ships in the game can use only one skin. All capital warships, many destroyers (including US ones), the LST, and the four coastal craft are this way. The .dat file needs to be edited - Sergbuto no longer has time to do the rest. I was going to try, but I don't have time for the next two weeks and didn't really understand the instructions I received. Maybe someone who has time could post more detailed instructions here in a thread (with screenshots - a picture is worth a thousand words). It is a great mod idea. :hmm:
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-13-06, 09:06 PM   #3
Boris
Sea Lord
 
Join Date: Jun 2005
Location: Hamburg, Germany
Posts: 1,691
Downloads: 41
Uploads: 0
Default

Could you send me sergbuto's instructions? I'm willing to have a crack at it.

Question for everyone: I've been looking for photos of the River Destroyer Escort, but am having no luck... has such a ship ever even existed? The closest thing I could find was a River frigate, but looks more like a black swan or a longer flower...
Boris is offline   Reply With Quote
Old 04-13-06, 09:20 PM   #4
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

This is what Sergbuto wrote:

Quote:
You need to do hexediting of the DAT file and for the corresponding .TGA, which you want to have multiple copies, replace sections with identificators 02, 03, and 08 with the cfg#TXR_ section. Put the texture plate in the ship folder and name it accordingly.
If you can figure it out, could you post more details here. If I or someone else could figure it out with your help, the work would go much quicker.

EDIT: I do know about the last part, about putting properly named textures in the ship's folder, obviously.
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-13-06, 10:49 PM   #5
Boris
Sea Lord
 
Join Date: Jun 2005
Location: Hamburg, Germany
Posts: 1,691
Downloads: 41
Uploads: 0
Default

Ok, so I know nothing about hex editing... but I downloaded a hex editor and tried to find what serbuto was on about.

Basically from what I can gather, the references to the tga texture files in the dat file have been replaced by the cfg#TXR section.

For example the flower corvette would once have been NCO_Flower512.tga and it now loks something like cfg#TXR_NCO_Flower...

I tried replacing this in the same fashion for the black swan, but the only results I got was a transparent looking radar (I must have damaged a little something)... and the correctly named and numbered tga's did not work.
I also notice that the multi-skinned ships dat files don't actually contain the (hull texture)tga file anymore, whereas the edited black swan i did still contained the texture file... so I obviously don't know what I'm doing.

I still don't know what exactly he meant by "replace sections with identificators 02, 03, and 08 with the cfg#TXR_ section"...

I can find only two parts in any given multi-skinned .dat that start with cfg#TXR.
Boris is offline   Reply With Quote
Old 04-14-06, 07:34 AM   #6
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

There was also an explanation of the .dat file format by lurbz which has been posted here a few times - you should do a search for it. However, some parts seem vague and there was a lot of stuff he hadn't figured out yet (the explanation was written a long time ago, even before Pack3d).

Actually, rather than making you search, here it is.

Quote:
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// 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
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-14-06, 01:17 PM   #7
UBOAT234
Weps
 
Join Date: Oct 2005
Location: Repubblica di San Marino (Italy)
Posts: 362
Downloads: 0
Uploads: 0
Default

How to extract .tga file









For example:




Clik OK and this is the result





Now




Now search again





Arrived here




Now if the work is good, you can copy this block, all this byte in a new file and save this, with extension: Ex. Miofile.tga

A- Now you can open with a Photo editor.

B- Now you can delete this block and change the text srting in Hex editor. refer to Pack3d for search string and write cfg#txr...

it still follows ...
I will explain other that serves...


BEST REGARDS
UBOAT234
UBOAT234 is offline   Reply With Quote
Old 04-14-06, 01:22 PM   #8
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

I think it is starting to make sense to me. I can try this on Saturday - maybe I will try it today if I have time. Thanks a lot UBOAT234, this is a lot of help indeed.
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-14-06, 01:36 PM   #9
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

OK, I've almost got it. There is only one part I do not understand, and that is how to find the beginning of the value for the .tga. Here is a screenshot (I am using the Tugboat).

Would I start counting 12 bytes after the highlighted 61?



EDIT:

Is this the section I would copy into a new file and then delete? I need a little more help before I finish this. I hope to get this done soon, as I have to study for an exam tonight. If anyone can help a little more, please do so soon.

__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-14-06, 02:50 PM   #10
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

I just extracted the section indicated in my last screenshot and tried to open it with ArcSoft Photo Studio (which DOES open .tga's). However, it won't open the new file - I get a message stating that the file format is invalid or not supported. What have I done wrong?
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-14-06, 03:44 PM   #11
UBOAT234
Weps
 
Join Date: Oct 2005
Location: Repubblica di San Marino (Italy)
Posts: 362
Downloads: 0
Uploads: 0
Default

With calm...
why I am not "good" with English and it serves to me of the time.
But this evening is successful multitexture
I have render the KGeorgeV multitexture.
And second, I have added new node, where it does not exist, Ex. I have only M01 and M02, added M03 and M04 is successful!

In another message I have communicated that I have added objects with zones in zon. then other...

however I have other news. Then I explain. Now I test for in order not to say not true things. Ok? I test and after compose the screenshot.
The memory is necessary much time, why some things not well. I have made in speed.
Have in this day, download a software for create a videoclip. Now I test and after I share a suite of tutorial.

And... in this hour it is night here and I as soon as have ended to work. Rest the grey cells and public the screenshot tomorrow.

Soon.


AG124 here: bref
1)


2)




BEST REGARDS
UBOAT234
UBOAT234 is offline   Reply With Quote
Old 04-14-06, 04:54 PM   #12
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Hi, All.
TGA dataBlock structura:
03 00 00 00 - 4 bytes ... dataBlock Type
next
00 00 00 00 - 4 bytes ... dataBlock SubType or variant
next
2C 00 10 00 - 4 bytes ... dataSize or TGA File Size = 1 048 620 bytes
next ... TGA File:
12 bytes TGA header
next
00 02 - 2 bytes ... TGA width = 512 pix
next
00 02 - 2 bytes ... TGA height = 512 pix
next
20 - 1 byte ... TGA Color Depth = 32 bit
next
TGA body
next
2E 00 - End of TGA File

Anvart
Anvart is offline   Reply With Quote
Old 04-14-06, 04:58 PM   #13
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

EDIT: This post was made before I saw that last one.

OK. That;s actually very clear - I can see exactly what you mean. That is now no longer my problem.

I made a mistake the first time - it appears that I should be looking NATF.tga instead of NATF_Complete.tga. But there are two NATF'tga's one with an address of 00015D71 and one with an address of 00295EEF. The second one has the TRUEVISION-XFILE entry very close above it. This is the one pictured in my last screenshot, and it is the one which I used.

This is a list of the steps which I took:

I selected NATF.tga.



Then I counted out the 12 bytes+1 which I would need to find the start of the .tga. They are highlighted below. The last zero is the presumed beginning of the .tga.



Next, I found TRUEVISION-XFILE.



And selected the .tga exactly as you pointed out.



I then pasted the selection in a new .dat file, and saved it with a .tga extension...and then couldn't open it.



And there lies my problem. I actually don't seem to have any trouble following any of your instructions - I understand you perfectly. Maybe the Tugboat/NATF is different than the rest?

Also, if I deleted the hightlighted section, I know I should add NATF_xx, but how and where exactly should I add it?
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 is offline   Reply With Quote
Old 04-14-06, 05:14 PM   #14
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

AG124,
you don't right.


Anvart
Anvart is offline   Reply With Quote
Old 04-14-06, 05:24 PM   #15
AG124
Sea Lord
 
Join Date: Jun 2005
Location: Canada
Posts: 1,878
Downloads: 4
Uploads: 0
Default

Quote:
AG124,
you don't right.
So where exactly did I go wrong? I'm sure its something small, right?
__________________


DOWNLOAD GWX HERE:
http://www.thegreywolves.com/index.html
AG124 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 09:10 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.