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 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-18-09, 08:49 PM   #1
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default 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?

Last edited by Webster; 04-18-09 at 09:02 PM.
  Reply With Quote
Old 04-18-09, 09:31 PM   #2
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by WEBSTER View Post
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
__________________

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 04-18-09, 10:38 PM   #3
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by peabody View Post
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.


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?
  Reply With Quote
Old 04-18-09, 11:07 PM   #4
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

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?
  Reply With Quote
Old 04-19-09, 12:02 AM   #5
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

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


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:



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



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:



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
__________________

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 04-19-09, 04:05 AM   #6
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,099
Downloads: 109
Uploads: 2


Default

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
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 04-19-09, 01:07 PM   #7
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Hitman View Post
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

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.
  Reply With Quote
Old 04-19-09, 01:13 PM   #8
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by peabody View Post
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.
  Reply With Quote
Old 04-19-09, 02:34 PM   #9
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by WEBSTER View Post
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.
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
__________________

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 12:20 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.