Log in

View Full Version : [REQ] (S3ditor) Can anybody help me create .dat file?


conus00
02-22-10, 04:26 PM
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:
http://i281.photobucket.com/albums/kk234/conus00/Italy_sample.jpg

If somebody just helped me to create the file i would really appreciate it.
Also, any suggestions for additional countries would be appreciated.
Thanks!

brat-01
02-23-10, 04:59 AM
Good afternoon! Sorry for my bad English. There are no problems to make one file - Flags.dat. But there is no any sense in it. The positive effect is absent.

conus00
02-23-10, 01:00 PM
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.

Nisgeis
02-23-10, 01:42 PM
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.

conus00
02-23-10, 05:13 PM
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.

peabody
02-23-10, 07:05 PM
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.

http://img6.imageshack.us/img6/655/flagdat1.jpg

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"

http://img684.imageshack.us/img684/2756/flagdat2.jpg

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

conus00
02-24-10, 04:01 PM
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

Nisgeis
02-24-10, 04:18 PM
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.

conus00
02-24-10, 05:19 PM
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

peabody
02-24-10, 07:07 PM
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. :D

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

conus00
02-24-10, 07:17 PM
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!

peabody
02-24-10, 10:23 PM
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

conus00
02-25-10, 01:45 AM
Great!!! I didn't know about that "Ctrl-thingy". :D
It works now. I can reassign models to nodes but I am having another issue. :damn:

PM'ed again...

Thanks a lot for all your help, peabody!

Nisgeis
02-25-10, 06:03 AM
3 is lower than 6. :D

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 :O:. Yes you can have an index of zero.

peabody
02-25-10, 02:40 PM
I was referring to your screenshot, which is correct, as an example of what it should look like when it's working :O:. 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.:O:

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