SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Multiple ship skins (https://www.subsim.com/radioroom/showthread.php?t=92028)

Boris 04-13-06 11:35 AM

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?

AG124 04-13-06 11:43 AM

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:

Boris 04-13-06 09:06 PM

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...

AG124 04-13-06 09:20 PM

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. :yep:

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

Boris 04-13-06 10:49 PM

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.

AG124 04-14-06 07:34 AM

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

UBOAT234 04-14-06 01:17 PM

How to extract .tga file

http://img208.imageshack.us/img208/6089/a002b9qy.jpg

http://img212.imageshack.us/img212/8959/a003b3le.jpg

http://img212.imageshack.us/img212/7013/a004b0wz.jpg



For example:

http://img132.imageshack.us/img132/2842/a0053lq.jpg


Clik OK and this is the result

http://img514.imageshack.us/img514/144/a0076xq.jpg



Now
http://img525.imageshack.us/img525/3257/a008b3fz.jpg



Now search again

http://img473.imageshack.us/img473/1238/a009b3kg.jpg



Arrived here
http://img490.imageshack.us/img490/4431/a010b8dq.jpg



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

AG124 04-14-06 01:22 PM

I think it is starting to make sense to me. :D 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. :up:

AG124 04-14-06 01:36 PM

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?

http://img140.imageshack.us/img140/6316/natftga2vs.jpg

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.

http://img209.imageshack.us/img209/9191/natftga27ah.jpg

AG124 04-14-06 02:50 PM

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? :oops:

UBOAT234 04-14-06 03:44 PM

With calm...
why I am not "good" with English and it serves to me of the time.
But this evening is successful multitexture :sunny:
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)
http://img230.imageshack.us/img230/8410/a008b22xj.jpg

2)
http://img236.imageshack.us/img236/8624/a010b28op.jpg



BEST REGARDS
UBOAT234

Anvart 04-14-06 04:54 PM

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

AG124 04-14-06 04:58 PM

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

OK. That;s actually very clear - I can see exactly what you mean. :yep: 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.

http://img133.imageshack.us/img133/1677/014im.jpg

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.

http://img133.imageshack.us/img133/2370/026im.jpg

Next, I found TRUEVISION-XFILE.

http://img133.imageshack.us/img133/6769/030cy.jpg

And selected the .tga exactly as you pointed out. :yep:

http://img146.imageshack.us/img146/3282/044ui.jpg

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

http://img136.imageshack.us/img136/3267/057vf.jpg

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?

Anvart 04-14-06 05:14 PM

AG124,
you don't right.


Anvart

AG124 04-14-06 05:24 PM

Quote:

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

AG124 04-14-06 07:08 PM

Here's where I think my problem is - I don't know which instance of each search to use. With both the KGV and Tugboat, there are two texture names in the .dat file - one near the top, and one further down shortly after the TRUEVISION-XFILE. There also appear to be three TRUEVISION-XFILE's.

From your screenshots, it appears as if you are using the first .tga reference and the last truevision. I have been using two in the center that were very close together. It looks as if I was using a much smaller part of the .dat file than I should hav been - my extracted .tga was only 1 KB. Is this my problem - should I use these other entries? I am going to give it a shot now...

And if I do have to select that huge block, what is the quickest way to do it? It seems to be taking a long time. :-?

UBOAT234 04-15-06 07:57 AM

Quote:

Originally Posted by AG124
Here's where I think my problem is - I don't know which instance of each search to use. With both the KGV and Tugboat, there are two texture names in the .dat file - one near the top, and one further down shortly after the TRUEVISION-XFILE. There also appear to be three TRUEVISION-XFILE's.

From your screenshots, it appears as if you are using the first .tga reference and the last truevision. I have been using two in the center that were very close together. It looks as if I was using a much smaller part of the .dat file than I should hav been - my extracted .tga was only 1 KB. Is this my problem - should I use these other entries? I am going to give it a shot now...

And if I do have to select that huge block, what is the quickest way to do it? It seems to be taking a long time. :-?


Hi,

I want to help hoping that a day aids you then me :up:

You copy the block mistaken.

The process is complex, but very simple if you execute step by step, what I have written before.
I want arrive to: multitexture ship ok?
For first you must comprise other.
However, when search the first reference, point in this and remember the popsition. Ex. in case of NATF;

Open NATF.dat in hex and in Pack3d

http://img217.imageshack.us/img217/7945/b0012uv.jpg


Point just like in up screenshot (I have evidenced in bleu)
to right you see: id A8825854E53810A9B

This is the first id, of the first image .tga. It remembers this why then it will serve. Write or copy in notepad or other.
-----

http://img83.imageshack.us/img83/4240/b0024hz.jpg


Like before.
This is the second id, (I have evidenced in bleu), but always of the first image .tga. It remembers this why then it will serve. Write or copy in notepad or other, and write what is.

http://img142.imageshack.us/img142/4369/b0034ma.jpg

Now copy this name, see the screenshot up, and serach this in editor hex.

http://img20.imageshack.us/img20/4857/b0040aa.jpg

Hour you can see where it is the point like I have indicated before in my screenshot.

-----

http://img83.imageshack.us/img83/5808/b0050ja.jpg

Here is the point, byte, where start tga file. Down in the Data Inspector you can see the offset of this byte.
Now without to touch nothing other, you must find the end.

http://img129.imageshack.us/img129/6563/b0064yu.jpg

In this screenshot, the key for the end of file (EOF)

-----

http://img80.imageshack.us/img80/7778/b0072ef.jpg

Here I have found TRUEVISION-XFILE
-----

http://img80.imageshack.us/img80/1209/b0083no.jpg

Here in green, the byte of TRUEVISION-XFILE,
and in black the point, byte, where is the end of file (EOF).
Down in the Data Inspector you can see the offset of this byte.

Now you have all data for edit this: delete or copy or convert.
But one other thing is to make one ship multitexture.
When you have create a tga file correct I can to explain other.

UBOAT234 04-15-06 08:20 AM

While for information we can:

Have improved the feature of ship an other with:

- Added new object in the ship, without software 3d, completely and working. (edit: .dat .sim .zon)

- Added new node: (M01, S01...) completely and working and programmable with file .eqp.

- Modify the zone, when change the lenght of ship.

- Modify the hit zone, move and change the dimension.

- Added Funnel and now smoke function.

-Added new gun, completely working and modifiable.


The work is hard, but not impossible.

BEST REGARDS
UBOAT234

Cdre Gibs 04-15-06 08:24 AM

I now your only trying to help Uboat234, but sadly due to your limited english skills, its making it even more confusing!

I'd suggest that you write it all out in Italian and maybe some1 here can do a translation. Because atm you have now even made me confused and I did do 1 multiskin job before!!!

I'm not trying to be rude, its just rather plain to see that the language barrier is doing a bloody good job again. :(

UBOAT234 04-15-06 08:29 AM

Quote:

Originally Posted by Cdre Gibs
I now your only trying to help Uboat234, but sadly due to your limited english skills, its making it even more confusing!

I'd suggest that you write it all out in Italian and maybe some1 here can do a translation. Because atm you have now even made me confused and I did do 1 multiskin job before!!!

I'm not trying to be rude, its just rather plain to see that the language barrier is doing a bloody good job again. :(

Great problem...
But,
Know you how to make the multiskin? If yes, then she explains it in English for ag124

BEST REGARDS
UBOAT234


All times are GMT -5. The time now is 10:29 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.