SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   how do you find an image file used in the cameras.dat file (https://www.subsim.com/radioroom/showthread.php?t=150798)

Webster 04-18-09 08:49 PM

how do you find an image file used in the cameras.dat file
 
lets say i want to add my own image file for the binocular in cameras.dat

(before anyone gets exited this is purely a "what if" example)

how do i find the image file used for it?

now i dont see anything in the cameras.dat that says binocular.dds file and even though it is easy to find in the menu folder because it is called binocular.dds, you dont always see it named that clearly so i want to know how to locate image files from the dat file.

so if its not easy to find, how can you find what image file something is connected to and follow that back to the image file and its location?



also a second question is:

what if i wanted to leave the existing binocular image alone so it is still used for the german side

but i want to redirect the cameras.dat to use a completely new image i added for US subs instead of the stock image. how would i do that?

peabody 04-18-09 09:31 PM

Quote:

Originally Posted by WEBSTER (Post 1086529)
lets say i want to add my own image file for the binocular in cameras.dat

(before anyone gets exited this is purely a "what if" example)

how do i find the image file used for it?

now i dont see anything in the cameras.dat that says binocular.dds file and even though it is easy to find in the menu folder because it is called binocular.dds, you dont always see it named that clearly so i want to know how to locate image files from the dat file.

so if its not easy to find, how can you find what image file something is connected to and follow that back to the image file and its location?



also a second question is:

what if i wanted to leave the existing binocular image alone so it is still used for the german side

but i want to redirect the cameras.dat to use a completely new image i added for US subs instead of the stock image. how would i do that?

The cameras.dat file only gives data such as angle of view, clip distance, zoom levels etc. No image files for the background around the view. Try looking in the menu 1024_768.ini. Do a search for "binoculars" or whatever the item is and it should give you a location for the .tga file associated with the object. That would be the image for the view while looking through them. If you want the physical 3D object while not looking through it, that would most likely be in the sub.dat file or conning tower.dat file.

Peabody

Webster 04-18-09 10:38 PM

Quote:

Originally Posted by peabody (Post 1086556)
Try looking in the menu 1024_768.ini. Do a search for "binoculars" or whatever the item is and it should give you a location for the .tga file associated with the object. That would be the image for the view while looking through them. If you want the physical 3D object while not looking through it, that would most likely be in the sub.dat file or conning tower.dat file.

Peabody


ok great, so if i search the menu 1024_728 it will give me the pathways to find image files being used. :up:


does that also mean if i change the dds file name in menu 1024_728 then that actually changes the image used in the game?

Webster 04-18-09 11:07 PM

ok i searched menu 1024_728 file and found this:

44=28;Page UZO
45=2B;Page obs periscope
46=26;Page attack periscope
47=27;Page binocular <<<<<<<<
48=3B;Page TDC
49=31;Page navigation map
50=32;Page attack map


and further down i found this:

[G27 I1]
Name=Page binocular <<<<<<<<
Type=1027;Menu page
ItemID=0x27000000
ParentID=0x0
Pos=0,0,1024,768
Zone= 0 768 1024 768 2 1 0x0 0.5 -0.5 0x27000000 -0.5 0.5 0 0
LoadingMode=2


then further down from that i found 14 places that the binocular.tga file is mentioned, they all looked like this:

[G27 I7]
Name=Background bottom
Type=1030;Static bmp
ItemID=0x27010001
ParentID=0x27010000
Pos=0,-718,1024,180
Zone= 0 50 1024 180 5 1 0x27010014 0 -1 0x27010001 0 0 0 0
Color=0xFF
Materials=1
Display=2;Linear
Mat 0=data/menu/gui/Binocular.tga <<<<<<<<
Crop 0=0.00195313,0.00195313,0.777344,0.00195313
MatFlags=0x29
TexFmt=0x0

[G27 I8]
Name=Background bottom right
Type=1030;Static bmp
ItemID=0x27010013
ParentID=0x27010000
Pos=512,-334,512,384
Zone= 512 434 512 384 5 1 0x27010012 0.5 -1 0x27010013 -0.5 0 0 0
Color=0xFF
Materials=1
Display=2;Linear
Mat 0=data/menu/gui/Binocular.tga <<<<<<<<
Crop 0=1,1,-1,-1
MatFlags=0x29
TexFmt=0x0

[G27 I9]
Name=Background bottom left
Type=1030;Static bmp
ItemID=0x27010014
ParentID=0x27010000
Pos=0,-334,512,384
Zone= 0 434 512 384 5 1 0x27010011 0.5 -1 0x27010014 -0.5 0 0 0
Color=0xFF
Materials=1
Display=2;Linear
Mat 0=data/menu/gui/Binocular.tga <<<<<<<<
Crop 0=0.00195313,1,1,-1
MatFlags=0x29
TexFmt=0x0

etc, etc, etc ...


so if i wanted to create a different view for the german binocular how would i go about doing this?

peabody 04-19-09 12:02 AM

Quote:

Originally Posted by WEBSTER (Post 1086592)
ok great, so if i search the menu 1024_728 it will give me the pathways to find image files being used. :up:


does that also mean if i change the dds file name in menu 1024_728 then that actually changes the image used in the game?

Not quite that easy, you have a Parent ID and Item IDs just like you would with S3D. There is a tutorial on here that explains some of this info. But basically you are taking this image show from Photoshop Elements with the selection on:

http://img25.imageshack.us/img25/2829/binocselect.jpg

And from the above image they take crops and place them with coodinates and a color to create the binocular outline:

http://img13.imageshack.us/img13/2218/binoc1.jpg

There also use the same image and take crops and layer them on top of each other with different colors and in certain positions to create the UZO view (which I lightened quite a bit since it is black to show the different parts:

http://img9.imageshack.us/img9/504/binocuzo.jpg

So, changing some things is not simply change an image. In this case there are several parts to it. And if you find the Parent ID and do a search, you will probably find there are more entries involved. For example to make the crosshairs and the scales. The scales may come from the periscope image. The crosshairs I don't know, never looked for them.

I have not played a lot with the menu1024_768.ini for obvious reasons, but I did use it when I made more Torpedo lights for more tubes added to Keltos' subs, and a few other things. But there is probably some of this stuff left over from SH3, so some may not even be used.

Hope that helps a bit, and I hope it is actually where the stuff you are looking for is located. Like I say some may not be used anymore.

Peabody

Hitman 04-19-09 04:05 AM

I have modded my own game to have a bincoular view that is simply a rounded hole, as a real bincoular. For that I used a new image for bincoulars.dds plus changes in the menu.ini...is that what you are after? If so, I have already done it :D

Webster 04-19-09 01:07 PM

Quote:

Originally Posted by Hitman (Post 1086675)
I have modded my own game to have a bincoular view that is simply a rounded hole, as a real bincoular. For that I used a new image for bincoulars.dds plus changes in the menu.ini...is that what you are after? If so, I have already done it :D


well your TBT mod changes the UZO view too so i wondered how i could seperate the TBT and the UZO which use the same TBT_1024 image file so the UZO would still use the stock image (but renamed UZO_1024) to keep the german side with the double sided view for it while the TBT uses your new realistic single view image.

i have since realised all realistic views are supposed to be of the single circle image anyway and the double view "look" is just a classic game image thing just so you remember you are looking through binoculars.

i was thinking other things might need different "looks" from one side to the other so i was interested in learning how to go about dividing the US and german sides when they share a single image file used for both.

i did not want this to become about your mod so i limited my inquires to the binoculars.


i often try to learn the process involved in doing any mod that interests me so i try to school myself on the process and problem areas in doing it.

because of this i will usually know something about the mod process long before i actually get the mod idea because my mod ideas are based on what i know how to do.

Webster 04-19-09 01:13 PM

Quote:

Originally Posted by peabody (Post 1086624)
Not quite that easy, you have a Parent ID and Item IDs just like you would with S3D. There is a tutorial on here that explains some of this info.

So, changing some things is not simply change an image. In this case there are several parts to it. And if you find the Parent ID and do a search, you will probably find there are more entries involved. For example to make the crosshairs and the scales. The scales may come from the periscope image. The crosshairs I don't know, never looked for them.

I have not played a lot with the menu1024_768.ini for obvious reasons, but I did use it when I made more Torpedo lights for more tubes added to Keltos' subs, and a few other things. But there is probably some of this stuff left over from SH3, so some may not even be used.

Hope that helps a bit, and I hope it is actually where the stuff you are looking for is located. Like I say some may not be used anymore.

Peabody


ok, thanks.

i can see doing it would be way too involved and that means lots of oportunities for errors and mistakes.

i was hoping it could work with a simple edit and redirect a path here or there. you helped me understand just how involved it would be. :up:

peabody 04-19-09 02:34 PM

Quote:

Originally Posted by WEBSTER (Post 1086896)
ok, thanks.

i can see doing it would be way too involved and that means lots of oportunities for errors and mistakes.

i was hoping it could work with a simple edit and redirect a path here or there. you helped me understand just how involved it would be. :up:

Well, it only looks complicated for the UZO because of the layers involved. I would image there would be a 'simple' way to do it without having to use all those images on top of each other.

After looking at Hitmans TBT that he mentioned, it is much easier than the items I listed for the UZO. That is why I say, some stuff is easy, some it more involved and some isn't even used at all.

Maybe if you talk with Hitman he could help you more than I can, like I commented, I have not used much of the stuff in the Menu1024 file, so I don't have any exact answers.

I only showed that info since you were looking for images for the cameras.dat and not specific on what you want to do. You just said,".. this is purely a "what if" example" so each 'example' would involve different data or course. So if may be easier than you think, depending what you want to do.

Peabody


All times are GMT -5. The time now is 06:02 AM.

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.