Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

Nationality mod v3.0
Goto page Previous  1, 2, 3
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop
View previous topic :: View next topic  
Author Message
ref



Joined: 21 Nov 2005
Posts: 252
Location: Mar del Plata, Argentina

PostPosted: Sun Mar 19, 2006 4:44 pm    Post subject: Reply with quote

jasonb885 wrote:
I found a copy of lurbz's DAT file spec from last Fall which I have saved in a text file now.
Thumbs Up


Can you please send me a copy?, I couldn' find it anywhere.

ref@datafull.com

Thanks, Ref
Back to top
View user's profile Send private message Send e-mail
kenijaru



Joined: 18 Jan 2006
Posts: 73
Location: Buenos Aires, Argentina

PostPosted: Sun Mar 19, 2006 6:30 pm    Post subject: Reply with quote

if thats the mod i downloaded a few days ago the argentinian flag's sun is missing.... it should look like this:
http://www.portalargentino.net/simbolos/bandarge.png
Yep
anyway, its good to have Argentina added to such a good game Yep
and the intention is what counts Thumbs Up also, i wouldnt be able to do it myself so, as we say in argentina: "es lo que hay" :/\k:
Back to top
View user's profile Send private message
Happy Times



Joined: 11 Jun 2005
Posts: 604
Location: Finland

PostPosted: Sun Mar 19, 2006 7:01 pm    Post subject: Reply with quote

Whats the story behind the sun? Ive always wondered. :hmm:
Back to top
View user's profile Send private message
jasonb885



Joined: 27 Mar 2002
Posts: 1749

PostPosted: Sun Mar 19, 2006 7:28 pm    Post subject: Reply with quote

ref wrote:
jasonb885 wrote:
I found a copy of lurbz's DAT file spec from last Fall which I have saved in a text file now.
Thumbs Up


Can you please send me a copy?, I couldn' find it anywhere.

ref@datafull.com

Thanks, Ref


lurbz wrote:

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
Back to top
View user's profile Send private message
jasonb885



Joined: 27 Mar 2002
Posts: 1749

PostPosted: Mon Mar 20, 2006 12:53 am    Post subject: Reply with quote

/me wonders if the ChessMaster 10 DAT extract actually correctly reimports stuff for copying one flag to another existing country's flag TGA.

:hmm:

My install is hosed, so I need to reinstall. I'm CTD even with all the mods I thought I had installed removed when visiting the museum...
Back to top
View user's profile Send private message
jasonb885



Joined: 27 Mar 2002
Posts: 1749

PostPosted: Mon Mar 20, 2006 2:44 am    Post subject: Reply with quote

jasonb885 wrote:
/me wonders if the ChessMaster 10 DAT extract actually correctly reimports stuff for copying one flag to another existing country's flag TGA.

:hmm:

My install is hosed, so I need to reinstall. I'm CTD even with all the mods I thought I had installed removed when visiting the museum...


Okay, that fixed the CTDs.

Also, the DatTexExtract for CM 10th Ed. does know how to correctly 'repack' the DAT file. So, you can modify the TGAs and they'll be repacked correctly, as long as the bit depth is the same as specified when viewing it. (i.e. some flags are 24-bit and others 16-bit, so the TGAs have to match up or some magic has to happen.)

So, I replaced Australia's TGA, Australian_m.tga, with American.tga, then repacked.

The result is Australia now has a US flag. Strangely, even the small merchants had the US flag without modifying flagS.dat. I don't know why that is. Maybe only small warships require flagS.dat updated.

Anyway, this means I can modify Sergbuto's excellent Nationality Mod v3.0 and reflag some nations that don't currently appear in the campaign and that no one's had any aspirations to add thus far with flags for Sweden, America, and others that are neutral, but still show up in convoys and thus need to be sinkable without penality.

As suggested by Serbuto, I'll pick some random name of equal length to the lucky nations and then represent those in the Roster and in the DefSide.cfg as enemy. I kind of feel bad it's taken about a year for this to happen. Oh well, better late than never... (Plus Panama was missing until November.)

This will mostly solve the issue of neutrals in convoys at the expense of several of the new nations added to the Nationality Mod. It's not a perflect solution, but as there wasn't much movement on including some of the newer nations in the Nationality Mod, it's something I personally can live with, at least.

I'll see if I can't complete this Monday or Tuesday night. Then I can update IC accordingly and see if it doesn't crash.

Thumbs Up
Back to top
View user's profile Send private message
ref



Joined: 21 Nov 2005
Posts: 252
Location: Mar del Plata, Argentina

PostPosted: Mon Mar 20, 2006 6:33 am    Post subject: Reply with quote

@jasonb885

Thank's Thumbs Up

Ref
Back to top
View user's profile Send private message Send e-mail
Cdre Gibs



Joined: 27 Apr 2005
Posts: 742

PostPosted: Mon Mar 20, 2006 9:50 am    Post subject: Reply with quote

jasonb885 wrote:
So, I replaced Australia's TGA, Australian_m.tga, with American.tga, then repacked.

The result is Australia now has a US flag. Strangely, even the small merchants had the US flag without modifying flagS.dat. I don't know why that is. Maybe only small warships require flagS.dat updated.


Hate to burst your bubble here, but I have sunk many Australian and New Zealand Merchants in convoys (much to my regret, I'd rather sinks yanks, germans or japs).

FlagS.dat is applied to - PTBoat's (both sides) Fishing boats 1, 2 & 3 (Fishing boat, small coastal vessel, trawler) only. All other ships use Flag.dat

Hope that clears things up for you.
Back to top
View user's profile Send private message
jasonb885



Joined: 27 Mar 2002
Posts: 1749

PostPosted: Mon Mar 20, 2006 1:37 pm    Post subject: Reply with quote

Cdre Gibs wrote:
jasonb885 wrote:
So, I replaced Australia's TGA, Australian_m.tga, with American.tga, then repacked.

The result is Australia now has a US flag. Strangely, even the small merchants had the US flag without modifying flagS.dat. I don't know why that is. Maybe only small warships require flagS.dat updated.


Hate to burst your bubble here, but I have sunk many Australian and New Zealand Merchants in convoys (much to my regret, I'd rather sinks yanks, germans or japs).

FlagS.dat is applied to - PTBoat's (both sides) Fishing boats 1, 2 & 3 (Fishing boat, small coastal vessel, trawler) only. All other ships use Flag.dat

Hope that clears things up for you.


You haven't burst anything. I was going to replace countries like, say, Lithuania, which aren't even represented in the stock campaign. Australia is in the stock game and there are ships tagged as such in the campaign itself, making it an illogical choice for replacement.

So, no harm, no foul.

Thanks for clearing up the flagS.dat item.

Thumbs Up
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop All times are GMT - 5 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group