PDA

View Full Version : Nationality mod v3.0


sergbuto
07-26-05, 02:35 PM
The mod has been updated with additional flags of Belgium, Denmark, Ireland, and Panama. Flags for very small vessels are still missing in the game and will be added in future versions of the mod.

Download is available on my site.

Shadow9216
07-26-05, 02:41 PM
Cool! Thanks Serg.

I'm going to edit my DefSide.cfg to add these in, anyone want a copy? It's pretty easy to do yourself, but if you want to save yourself some extra work...

Egan
07-26-05, 02:50 PM
The mod has been updated with additional flags of Belgium, Denmark, Ireland, and Panama. Flags for very small vessels are still missing in the game and will be added in future versions of the mod.

Download is available on my site.

Excellent to know! Thanks! :up:

sergbuto
11-26-05, 11:45 AM
According to a number of requests I have added more flags in the new version (3.0) of the mod. The full list now looks like this

-Turkey and Bulgaria (Black Sea)
-Denmark and Finland (North Europe)
-Belgium, Czechia, Estonia, Hungary, Ireland, Latvia, Lithuania, and Slovakia (Europe)
-Portugal and Spain (Eastern Atlantic)
-Albania, Croatia, RSI/Republica Sociale Italiana and Yugoslavia (Med)
-Colombia, Mexico, and Panama (Carribean)
-Argentina (South Atlantic)

as well as a Red Cross flag.

Download is on my site.

Rubini
11-26-05, 03:47 PM
Great work as usual Sergei!

Thanks for RSI and Red Cross! ;)

Rubini.

Scire
11-27-05, 04:45 PM
Lots of thanks Sergei! :up:

Fercyful
11-30-05, 01:44 PM
Like to see Argentina (my country) inside the game! :up:

thanks Sergei! :rock: :arrgh!:

jasonb885
03-19-06, 04:36 AM
Any chance for the addition of duplicate entries for America, Sweden, and other nations that appear in convoys, but need to always be 'at War' with Germany? The flags need not change, but rather a new entry for each needs to exist called something like AmericaWar, SwedenWar, ect.

If I could determine the record boundaries I'd try making a copy of one with a different name, but it was mentioned the name has to be the same length as an existing entry. I suppose the length of each entry is included in the file? (i.e. they're not fixed length, but variable with a header or foot indicating total length?)

:hmm:

sergbuto
03-19-06, 07:01 AM
Format of DAT files has been described by lurbz. Make a search for his nick. If you still have a problem, you can always replace one of barely used country names with a new name of the same length using a hex-editor, say Czechia for USAtWar, and then change the texture of the corresponding flag.

jasonb885
03-19-06, 04:19 PM
Format of DAT files has been described by lurbz. Make a search for his nick. If you still have a problem, you can always replace one of barely used country names with a new name of the same length using a hex-editor, say Czechia for USAtWar, and then change the texture of the corresponding flag.

I hadn't thought of that, but it's a good idea. I hadn't considered that the name for the atWar country is probably completely arbitrary, as long as there's a matching Roster.

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

:up:

ref
03-19-06, 04:44 PM
I found a copy of lurbz's DAT file spec from last Fall which I have saved in a text file now.
:up:

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

ref@datafull.com

Thanks, Ref

kenijaru
03-19-06, 06:30 PM
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 :up: also, i wouldnt be able to do it myself so, as we say in argentina: "es lo que hay" :/\k:

Happy Times
03-19-06, 07:01 PM
Whats the story behind the sun? Ive always wondered. :hmm:

jasonb885
03-19-06, 07:28 PM
I found a copy of lurbz's DAT file spec from last Fall which I have saved in a text file now.
:up:

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

ref@datafull.com

Thanks, Ref


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

jasonb885
03-20-06, 12:53 AM
/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...

jasonb885
03-20-06, 02:44 AM
/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.

:up:

ref
03-20-06, 06:33 AM
@jasonb885

Thank's :up:

Ref

Cdre Gibs
03-20-06, 09:50 AM
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.

jasonb885
03-20-06, 01:37 PM
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.

:up: