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 09-30-14, 09:31 PM   #1
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default Radar hacking

Looking for two things here;

1. Which file or files controls the color of the PPI scope, for example if you want to change the display from red to green?
2. Which file or files controls the depth at which the radar automatically shuts down?
Sniper297 is offline   Reply With Quote
Old 10-01-14, 07:29 PM   #2
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Nope.

\Data\Library\USSubParts\Sensors_sub_US.sim

has a lot of data, but nothing I can find which controls the cutoff depth.

\Data\Interior\NSS_Salmon\NSS_Salmon_CT.sim

also has a lot of data, but nothing that looks like RGB values.
Sniper297 is offline   Reply With Quote
Old 10-08-14, 09:13 PM   #3
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Nobody knows even how to change the color from red to green? Possibly the depth cutout is hard coded into an EXE file somewhere, but it's hard to believe there isn't some file with RGB values for the display. The DDS files are actually green so there must be a shader someplace.
Sniper297 is offline   Reply With Quote
Old 10-09-14, 11:51 AM   #4
ETR3(SS)
Ocean Warrior
 
Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
Default

To answer your second question, try the units cfg file. Specifically the surface depth entry. It's been some time since I've worked on that aspect but I believe that's where you want to look.
__________________


USS Kentucky SSBN 737 (G)
Comms Div 2003-2006
Qualified 19 November 03

Yes I was really on a submarine.
ETR3(SS) is offline   Reply With Quote
Old 10-09-14, 05:28 PM   #5
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Not finding a units cfg file here.
Sniper297 is offline   Reply With Quote
Old 10-10-14, 12:39 AM   #6
ETR3(SS)
Ocean Warrior
 
Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
Default

Sorry, NSS_Sargo.cfg. That make more sense?
__________________


USS Kentucky SSBN 737 (G)
Comms Div 2003-2006
Qualified 19 November 03

Yes I was really on a submarine.
ETR3(SS) is offline   Reply With Quote
Old 10-10-14, 11:28 AM   #7
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Makes sense but no joy.

\Data\Submarine\NSS_Sargo\NSS_Sargo.cfg

[Unit]
ClassName=SSSargo
3DModelFileName=data/Submarine/NSS_Sargo/NSS_Sargo
HumanPlayable=YES
Interior=data/Interior/NSS_Salmon/NSS_Salmon
UnitType=200
MaxSpeed=21
MaxSpeedSubmerged=8.75
Length=94.6404
Width=8.1788
RenownAwarded=130

[Salvo]
1=1,3,2,4
2=1,2,4
3=1,3,4
4=1,4
5=2,3
6=1,3
7=2,4

[Properties]
PeriscopeDepth=16.7;meters
SnorkelDepth=15;meters
CrashDepth=40;meters
MaxDepth=100;meters
SurfaceDepth=5.061;meters
TorpLaunchMaxDepth=30;meters
StormConditions=9,0.1;max wind speed [m/s], max rain intensity [0,1]

[EngineProperties]
AllStop=0.00
AheadSlow=0.40
AheadOneThird=0.57
AheadStandard=0.80
AheadFull=0.94
AheadFlank=1.00
BackSlow=-0.26
BackStandard=-0.40
BackFull=-0.53
BackEmergency=-0.66


Nothing in there about radar.
Sniper297 is offline   Reply With Quote
Old 04-20-15, 06:15 PM   #8
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Well, in the library\us subparts\Sensors_sub_US.sim after comparing ID numbers to parent IDs in the dat file, I found the salmon/sargo SJ1 radar specs. Got a min and max height and a min and max sensor height, changing the min sensor height to -50 or whatever seems to have no effect. I know that number 55 in that file is the correct one because in addition to checking the ID with the parent ID I changed the sweep period from 20 to 6, and ingame the radar sweep takes 6 seconds instead of 20 for a complete rotation. I'd leave it that way (IIRC modern radar PPI scopes have a six second sweep) but then the sweep arc has to be changed from 9 degrees to 1 so it don't look weird, and the spike on the A scope don't look right either.

Questions not either self explanatory or explained by the descriptions;

RPMDetLevel=0.0 - Detection level at percentage of maximum RPM (between 0 and 1).

SkipSweep=true - When sweeping sensor skip invalid sectors.


Okay, but what do those mean, what do they affect?
Sniper297 is offline   Reply With Quote
Old 05-01-15, 09:41 PM   #9
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

I'm keeping this thread going in the hope that someone will eventually know the answer to one of these two questions. Automatic shutoff depth for the SJ radar is 40 feet, since I got one of those flat calms today I was able to test this - the SJ antenna doesn't actually go under on the SARGO until a depth of 50 feet. Makes no sense that the SJ cuts off when the antenna is still 10 feet above the water, makes even less sense that the crew AI doesn't have enough brainpower to turn it back on automatically when it keeps cutting out in heavy seas, and makes zero sense that there isn't a simple way to adjust the cutoff depth.
Sniper297 is offline   Reply With Quote
Old 05-04-15, 02:12 PM   #10
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sniper297 View Post
Looking for two things here;

1. Which file or files controls the color of the PPI scope, for example if you want to change the display from red to green?
2. ......
Edit:
Hitman, Nisgeis, Frederf, Anvart & Capt Scurvy all came to mind on this radar topic.

I must remember: Stock PPI is red, Stock PPI is red, Stock PPI is red, Stock PPI is red, ....

I'm guessing the red green 'switch' is in the Conning Tower Interior *.dat and/or *.sim files for each boat?

Last edited by aanker; 05-04-15 at 07:10 PM.
aanker is offline   Reply With Quote
Old 05-04-15, 03:00 PM   #11
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

"in RFB the A-Scope is green and his PPI red"

In the stock 1.4 game the A-scope is green and the PPI is red, no different from RFB. I have a mod that adds range rings, but it's still red.



I labeled them to avoid confusion because the buttons on the bottom are reversed, "Go to PPI radar" takes you to the A-scope, "Go to A-scope" takes you to the PPI. Fortunately the main radar button takes you to the PPI when double clicked. (This image is an interior lighting mod for the conning tower plus a camera hack for the conning tower interior view, I haven't uploaded either yet since I haven't bought 1.5 yet.)

I understand how colors work, 255, 0, 0 is red, change to 255, 255, 0 and you get yellow. Problem is I can't find anything in any file that has radar color data in it.
Sniper297 is offline   Reply With Quote
Old 05-04-15, 07:01 PM   #12
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sniper297 View Post
"in RFB the A-Scope is green and his PPI red"

In the stock 1.4 game the A-scope is green and the PPI is red, no different from RFB. I have a mod that adds range rings, but it's still red.

I labeled them to avoid confusion because the buttons on the bottom are reversed, "Go to PPI radar" takes you to the A-scope, "Go to A-scope" takes you to the PPI. Fortunately the main radar button takes you to the PPI when double clicked.
I recall that backward "Go to PPI radar" takes you to the A-scope, "Go to A-scope" takes you to the PPI." issue. The fix in menu.txt was simple.

OK, it's been so long since I saw Stock - That is my only excuse .... I just now fired up Stock 1.5 plus looked at screenshots from earlier versions, and sure enough there's a RED PPI. Sorry........

Last edited by aanker; 05-04-15 at 07:54 PM.
aanker is offline   Reply With Quote
Old 05-04-15, 08:50 PM   #13
TorpX
Silent Hunter
 
Join Date: Sep 2010
Posts: 3,975
Downloads: 153
Uploads: 11
Default

Quote:
Originally Posted by Sniper297 View Post
Questions not either self explanatory or explained by the descriptions;

RPMDetLevel=0.0 - Detection level at percentage of maximum RPM (between 0 and 1).

SkipSweep=true - When sweeping sensor skip invalid sectors.


Okay, but what do those mean, what do they affect?
I can only take a guess, but I think the first is related to detection being a function of how fast the beam is sweeping by.

The second, I think is for the display to have the sweep arm (whatever it is called) skipping dead zones that the unit cannot 'see'; like with the German sets mounted rigidly on tower?

I have no idea how to keep radar from turning off in high waves. I would check the 3d models of the radar masts themselves, to see if there are any interesting nodes there, but surely somebody has already done this (?). I know you are not the only one to notice this problem.




TorpX is offline   Reply With Quote
Old 05-05-15, 12:24 AM   #14
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Probably a reasonable reasoning. Percentage of maximum RPM could easily be a feature that was never finished (no control over sweep RPM in game, the only way to adjust it is by hacking the file) so they disabled it by setting it to zero.

Skip sweep who knows, in the real world there would be a huge blob at 180 minimum range if one of the periscopes was raised. I'll have to try setting it to FALSE and see if it replicates that effect.

3d models of the radar masts, I've looked at assorted 3D models in S3d without the slightest idea what I'm looking at - every time I've ever tried to learn even the most simple modeling program it beats me up and takes my lunch money.
Sniper297 is offline   Reply With Quote
Old 05-05-15, 02:45 PM   #15
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sniper297 View Post
Nobody knows even how to change the color from red to green? Possibly the depth cutout is hard coded into an EXE file somewhere, but it's hard to believe there isn't some file with RGB values for the display. The DDS files are actually green so there must be a shader someplace.
I knew I had a green PPI scope. Check this old topic by Mrahh:
http://www.subsim.com/radioroom/showthread.php?t=115207

In the mod are Radar.dds, ppiCircles.dds, & in the Shaders folder is a fix for PPIRadarPS.fx by Anvart. The CT *.sims were included in a version 1.21.
Readme:
Quote:
RadarSweep.7z
Author Anvart.
This mod is for SH4 game ver. 1.2.
This mod fix mistake in script shader file (PPIRadarPS.fx).
Now you can see stock grid on radar display.
On a plan of developers the grid is made of a celluloid film with grid figure and it is put from above on the radar display.
I also have cleaned word "Range:" from the radar display (in SHControllers.act file).
In this mod the size and the form of radar markers also are changed. Main marker is small circle, additional markers are
the slanting cross and the cross.

"SHControllers.act file must to be in main SH4 folder.".....
If these mods could be reverse engineered to see what was changed, it might be possible for you to turn the PPI from red to green in v1.5.



Screenshot from:
http://www.subsim.com/radioroom/show...=115207&page=6

Last edited by aanker; 05-05-15 at 02:55 PM.
aanker 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 05:01 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.