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 > Silent Hunter 4: Wolves of the Pacific > SH4 ATO Mods
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-22-10, 04:26 PM   #1
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
[REQ] (S3ditor) Can anybody help me create .dat file?

I'm thinking about creating "All Nations-All Flags" mod but, even after trying hard, can't figure out how to modify flag.dat file.

I tried to compile list of countries even remotely involved in WW2 and create one big flag.dat file for all future modders so there will be no need to add to flags.dat or create additional flag2.dat, flag3.dat etc

So far I have hi-res flags for these countries:
Albania
Albania (merchant)
USA
Argentina
Argentina (merchant)
Australia same as Britain
Australia (merchant)
Bahrain
Belgium
Belgium (merchant)
Bolivia
Bolivia (merchant)
Brasil
Britain
Britain (merchant)
Bulgaria
Bulgaria (merchant)
Canada same as Britain
Canada (merchant)
Chile
China
Columbia
Columbia (merchant)
Costa Rica
Croatia
Croatia (merchant)
Cuba
Czech Republic
Denmark
Denmark (merchant)
Dominican Republic
Egypt
Egypt (merchant)
El Salvador
Estonia
Estonia (merchant)
Ethiopia
Fiji
Fiji (merchant)
Finland
Finland (merchant)
France
Free French
Free French (merchant)
Germany
Germany (merchant)
Guatemala
Guatemala (merchant)
Greece
Greece (merchant)
Haiti
Haiti (merchant)
Honduras
Honduras (merchant)
Hungary
Hungary (merchant)
Iceland
Iceland (merchant)
Iraq
Ireland
India same as Britain
India (merchant)
Italy
Italy (merchant)
Japan
Japan (merchant)
Latvia
Latvia (merchant)
Liberia
Lithuania
Lithuania (merchant)
Luxembourgh
Mexico
Netherlands
Newfoundland same as Britain
Newfoundland (merchant)
New Zealand same as Britain
New Zealand (merchant)
Nicaragua
Norway
Norway (merchant)
Philippines
Palestine (merchant)
Panama
Paraguay
Peru
Poland
Poland (merchant)
Portugal
Red Cross
Romania
Romania (merchant)
R.S.I.
R.S.I. (merchant)
Saudi Arabia
Slovak State
South Africa
South Africa (merchant)
Spain
Spain (merchant)
Sweden
Sweden (merchant)
Syria
Thailand
Thailand (merchant)
Turkey
Uruguay
Soviet Union
Soviet Union (merchant)
Venezuela
Venezuela (merchant)
Yugoslavia
Yugoslavia (merchant)

Here is a sample:


If somebody just helped me to create the file i would really appreciate it.
Also, any suggestions for additional countries would be appreciated.
Thanks!
__________________
conus00 is offline   Reply With Quote
Old 02-23-10, 04:59 AM   #2
brat-01
Nub
 
Join Date: May 2009
Posts: 2
Downloads: 181
Uploads: 0
Default

Good afternoon! Sorry for my bad English. There are no problems to make one file - Flags.dat. But there is no any sensein it. The positive effect is absent.
brat-01 is offline   Reply With Quote
Old 02-23-10, 01:00 PM   #3
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

There is a sense behind this mod: If you have all the nations involved in one flag.dat file then any future modders wanting to add additional nation to their mod can just "tap" into nation already in it.
Also, I was planning on releasing, besides the .dat file, all flags' .dds and also recognition manuals' .dds

Unfortunatey, I'm failing miserably in creating the .dat file in S3ditor.
__________________
conus00 is offline   Reply With Quote
Old 02-23-10, 01:42 PM   #4
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

What problem are you having? Are you copying the flag nodes and then assigning a material, with new flag graphic to the object?

EDIT: You may get a better response posting this in the SH4 Mod forum instead.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 02-23-10, 05:13 PM   #5
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

Quote:
Originally Posted by Nisgeis View Post
What problem are you having? Are you copying the flag nodes and then assigning a material, with new flag graphic to the object?
I just don't know how the nodes work in principle... i.e. what's tied to what.
I know how to assign new graphics to the object but the structure of the .dat file is complete mystery to me.
__________________
conus00 is offline   Reply With Quote
Old 02-23-10, 07:05 PM   #6
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by conus00 View Post
I just don't know how the nodes work in principle... i.e. what's tied to what.
I know how to assign new graphics to the object but the structure of the .dat file is complete mystery to me.
The nodes with the colored circles in front are the material nodes which contain the image of the flag.
The other nodes are for the mesh and animation.
Some countries have two flags, one civilian and one military and usually have an m or a C somewhere in the name.

Picture one shows the Material/texture or the picture of the flag. Notice at the right side there is a place to import/export the image.



The next picture is with the FLG node selected. Notice the Material Box has the material from the other picture which you put in using the "Add" button.

If you click the "3D Model" node you will see the ID listed at the top of the window for the 3D model is the number after "Model ID"



So to make a new flag you can copy an existing flag and then you need to import a new image and change the name "Japan" and give the nodes new IDs.

Here is dat file file I used in the example, you can play with your own flag images and then do a Remap IDs and import the dat into the flag.dat using "File/Import/dat file" and do it again with another flag.

http://www.filefront.com/15665911/Flagtemplate.dat

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Old 02-24-10, 04:01 PM   #7
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

I'm getting close but still getting error: "The node is referencing a model, but the index of the model is higher then the index of the node."

What does that mean?
THX
__________________
conus00 is offline   Reply With Quote
Old 02-24-10, 04:18 PM   #8
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

See where it says 'Index' in the right hand panel? The 'index' of the 3D Object node has to be lower than the 'parent' node that references it.

In the screenshot above, the parent node 'Node - Japan_FLG' has a 6: in front of it. The 3D Object below it, which that node is referencing has an index of 3, and the sub controller 4 and 5. You have to move the 3D objet so that it has a higher index, by either typing in the index number directly into the index box, or clicking the 'move index up/down' buttons.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 02-24-10, 05:19 PM   #9
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

How are indexes related to each other? Are they just random numbers?
Also will it not change the order of "items" in left-hand column?

THX
__________________
conus00 is offline   Reply With Quote
Old 02-24-10, 07:07 PM   #10
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by Nisgeis View Post
See where it says 'Index' in the right hand panel? The 'index' of the 3D Object node has to be lower than the 'parent' node that references it.

In the screenshot above, the parent node 'Node - Japan_FLG' has a 6: in front of it. The 3D Object below it, which that node is referencing has an index of 3, and the sub controller 4 and 5. You have to move the 3D objet so that it has a higher index, by either typing in the index number directly into the index box, or clicking the 'move index up/down' buttons.
3 is lower than 6.

There must be something else wrong. Can you have an index of 0? I think you can, but I am not positive.

@conus00,
Did you use this example or try a different one? Nisgeis is absolutely right (he usually is) the 3D model MUST have a lower index than the "parent node" and that is what the error is telling you.

I will test this to see if maybe when it gets imported it will change the numbers, so maybe the import is the problem, it's been a long time since I imported a .dat file.



Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.


Last edited by peabody; 02-24-10 at 07:20 PM.
peabody is offline   Reply With Quote
Old 02-24-10, 07:17 PM   #11
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

I found the problem: the new Node is still linked to the original model.
How do I change Linked 3D model "Model ID" to a different model?

@peabody: I just PM'd you. Can you, please, check out the attached files and help me out?
THANKS!
__________________

Last edited by conus00; 02-24-10 at 08:00 PM.
conus00 is offline   Reply With Quote
Old 02-24-10, 10:23 PM   #12
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by conus00 View Post
I found the problem: the new Node is still linked to the original model.
How do I change Linked 3D model "Model ID" to a different model?



@peabody: I just PM'd you. Can you, please, check out the attached files and help me out?
THANKS!
Conus00,

1 Select the new 3D model and copy the ID
2 Select the parent node, go to Linked 3D model and at the "Model ID" hold Ctrl and click on the ID and a "normal" box will open to paste the new ID.

I will check the PM you sent.

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Old 02-25-10, 01:45 AM   #13
conus00
Grey Wolf
 
Join Date: May 2008
Location: DB85
Posts: 804
Downloads: 166
Uploads: 0
Default

Great!!! I didn't know about that "Ctrl-thingy".
It works now. I can reassign models to nodes but I am having another issue.

PM'ed again...

Thanks a lot for all your help, peabody!
__________________

Last edited by conus00; 02-25-10 at 01:57 AM.
conus00 is offline   Reply With Quote
Old 02-25-10, 06:03 AM   #14
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by peabody View Post
3 is lower than 6.

There must be something else wrong. Can you have an index of 0? I think you can, but I am not positive.
I was referring to your screenshot, which is correct, as an example of what it should look like when it's working . Yes you can have an index of zero.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 02-25-10, 02:40 PM   #15
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by Nisgeis View Post
I was referring to your screenshot, which is correct, as an example of what it should look like when it's working . Yes you can have an index of zero.
Thank you, I wasn't positive on 0, the only time i ever see it is the Authorinfo node, and Conus00 added that. I know most of the things I have worked on (not SH4) the numbering started at 0 not 1.

Somebody has to pick on you.

I don't know if you ever ran into this problem but it appears to be the numbering. He send me the .dat file he was working on, I created a MOD and it CTD on the main loading screen.
So, just to tidy it up to make it easier to work with I renumbered the whole thing. Even though the 3D model WAS numbered lower than the Parent node, it was also numbered lower than the Material node and embedded image and lower than some of the numbers in the flag above it. All the child nodes were like this, due to selecting the Parent node of the previous flag and importing i believe, and that messes up the numbering of the child node.
When I renumbered to make it easier to work with, it worked. I didn't think the numbering mattered because of the index, but apparently it does. At least in this case.

Maybe you have some info on why?

Anyway I am going to show him how to import to avoid this issue. I just imported the "template" that I gave him and it works fine if I select the last node before the import, rather than selecting the Parent node above it. Which is the way I always did it anyway.

Another point I do not understand, maybe you know.
The Japan flags:
On the Material node, with the embedded image, it has a "label" (8/0) that is "Tempmat #15" for warships and "Tempmat #10" for Civilian. Why is this different than any other flag? And it is only a label, why would it affect anything? The material node is still a .tga, any idea why the Tempmat #15 label?

Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody 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 06:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.