Log in

View Full Version : Stadimeter Solution by Reaper7


reaper7
06-15-10, 03:20 PM
I have found the Solution to the Stadimeter.
You say "But TDW has done it already".

Yes but I fixed it with no complex scripting or no external progamming at all. All done with just the Stock UI.

Can be added to any SH5 easily.

The solution struck me at work Today, and I thought no that can't work its to simple and to obvious.
But guess what it works and perfectly.

The Solution is hidden away in SH5 like most things, they never got rid of most of the SH3/4 UI.
And that includes the SH4 Targetting TDC Interface. With Range, Speed etc.
Including its stadimeter - thats the one thats being referenced in the Dials.cfg from SH4 and still in SH5.


[Dial58]
; will be changed by code
Name=TorpedoSolution_Mast_Height
Type=70; DIAL_TGT_MAST_HEIGHT_INTERNATIONAL
Cmd=Set_tgt_mast_height_international;
Dial=0x431A0002
CrtVal=0x431A0001
NewVal=0x0
DialVal=-90,98
RealVal=15,130; height
Circular=Yes
CmdOnDrag=Yes
Logarithmic=7.189;4.656
RelativeDrag=Yes
SndStep=5
SndList=1,Menu.TDC.AngleOnBow,360

[Dial59]
; will be changed by code
Name=TorpedoSolution_Temporary_Range
Type=68; DIAL_TGT_RANGE
;Cmd=Set_tgt_sel_value;
Dial=0x431A0001
CrtVal=0x431A0003
NewVal=0x0
DialVal=10,0
RealVal=11000,220; range
Circular=Yes
;CmdOnDrag=Yes
Logarithmic=-0.98;51.0
;RelativeDrag=Yes
;SndStep=5


And here is my Test - Puleed the SH4 Targeting TDC into my Attack Scope via script.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/Stadimeter1.jpg

http://i236.photobucket.com/albums/ff240/reaper7_bucket/Stadimeter2.jpg

http://i236.photobucket.com/albums/ff240/reaper7_bucket/Stadimeter3.jpg

http://i236.photobucket.com/albums/ff240/reaper7_bucket/Stadimeter4.jpg

So all thats needed is a button to be placed on screen to activate the stadimeter:

Is to Replacce the value in the Dials.cfg
CrtVal=0x431A0001 ; ID of stadimeter button.
with the value of your Button.

The Send Range Button to TDC ID is:
CrtVal=0x431A0005

Will do some further tests to see if I can replace the SH4 TDC with a single button via script. I think this should be easy enough :rock:.


You may notice is the last pic the range is 1080m in the Sh4 TDC and 4623m in the XO manual thats because the XO manual is getting the broken SH5 value (Mast height is always 20M).
To fix that all that should be required is to change the following

Type=68; DIAL_TGT_RANGE
;Cmd=Set_tgt_sel_value;
Dial=0x431A0001
CrtVal=0x431A0003

to match the Dial ID on the SH5 Range Dial.

TheDarkWraith
06-15-10, 03:39 PM
two problems with this:

1) the XO TDC dialog box is showing the incorrect range (4623m vice the 1080m on the dial). So the user would have to either change the XO TDC dialog box value or change the TDC range dial to the correct value. This is because the correct mast height is not being set (for those dials). Check your TDC range dial and you'll see the incorrect range is reported with this method. I explored this method also already. If there was a way to set the dials 'hands' by code then this solution would be viable as you could take the range reading from the SH4 style dial and set the TDC range dial to that value. But I haven't found any way to set the Range, AOB, or Speed dials by code yet.

2) that's an american dial from an american sub that would have to be visible at all times so the user can read the correct range and change either of the above listed items. That makes a two step method vice an automatic one. Plus we are using German subs not American subs.

reaper7
06-15-10, 03:54 PM
two problems with this:

1) the XO TDC dialog box is showing the incorrect range (4623m vice the 1080m on the dial). So the user would have to either change the XO TDC dialog box value or change the TDC range dial to the correct value. This is because the correct mast height is not being set (for those dials).

2) that's an american dial from an american sub that would have to be visible at all times so the user can read the correct range and change either of the above listed items. Plus we are using German subs not American subs.


Yes, that was just my proof of concept. Both very easy to fix.:D

1)Just fixed the first one 2 secs ago.
In the dials.cfg change the highlighted item

;Cmd=Set_tgt_sel_value; to
Cmd=Set_tgt_sel_value;


[Dial59]
; will be changed by code
Name=TorpedoSolution_Temporary_Range
Type=68; DIAL_TGT_RANGE
Cmd=Set_tgt_sel_value;
Dial=0x431A0001


http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stadimeter5.jpg

Now it sends the range to TDC repalacing the current SH5 one :D.

2) The American dial is not needed that was just from my proof on concept.
All thats needed is the stadimeter ID replace the Id in the dials.cfg with the Id from your own button.


[Dial58]
; will be changed by code
Name=TorpedoSolution_Mast_Height
Type=70; DIAL_TGT_MAST_HEIGHT_INTERNATIONAL
Cmd=Set_tgt_mast_height_international;
Dial=0x431A0002
CrtVal=0x431A0001


Change to the Id of your button

and in

[Dial59]
; will be changed by code
Name=TorpedoSolution_Temporary_Range
Type=68; DIAL_TGT_RANGE
Cmd=Set_tgt_sel_value;
Dial=0x431A0001
CrtVal=0x431A0003


Change to the Id of your button.



EDIT: (I'm wrong about Note2)

Jumped the gun aliitle bit the Device ID's for buttons are hardcoded so the XO manual and the TDCCOmputer ID can not be swapped.

Will look for a simple workaround. You could always pull the 2 buttons from the dial into the UI - that is what I will be doing in my Mod.
Will post the results.

Gorshkov
06-15-10, 04:00 PM
This is some TDC stuff from American subs present in SH4. Is this SH5 game so screwed-up you cannot find anything more historically accurate?

reaper7
06-15-10, 04:07 PM
This is some TDC stuff from American subs present in SH4. Is this SH5 game so screwed-up you cannot find anything more historically accurate?


Yes, the above is just proof of concept. The fix will not require the dial onscreen.
That is just some of the reduntant sh3/4 stuff left in the game from the devs.
All very handy stuff, allows alot of mod options.
Also those are the American dials but they are just graphics 2 mins in photoshop and they wouldn't look american :D.
That is how most graphic mods are done - change whats there to what you want it to be.

TheDarkWraith
06-15-10, 04:17 PM
Yes, the above is just proof of concept. The fix will not require the dial onscreen.
That is just some of the reduntant sh3/4 stuff left in the game from the devs.
All very handy stuff, allows alot of mod options.
Also those are the American dials but they are just graphics 2 mins in photoshop and they wouldn't look american :D.
That is how most graphic mods are done - change whats there to what you want it to be.

I think you're onto something but it's still not completely automated. You have to click on the use stadimeter and then you have to click on send range to TDC. Maybe there's a way to completely automate it :hmmm: Is the TDC range dial showing the correct range reading? Something tells me it isn't.

reaper7
06-15-10, 04:31 PM
I think you're onto something but it's still not completely automated. You have to click on the use stadimeter and then you have to click on send range to TDC. Maybe there's a way to completely automate it :hmmm: Is the TDC range dial showing the correct range reading? Something tells me it isn't.


It should, I will check. Maybe something like:

(ButtonName).MouseLeftButtonDown +=
Game.SubmarineCommands.ExecuteCommand( "Set_tgt_mast_height_international" )

(ButtonName).MouseLeftButtonUp +=
Game.SubmarineCommands.ExecuteCommand( "DIAL_TGT_RANGE" )

These are the 2 buttons:
PageTorpedoSolution_RightPanel_Range_SendRangeButt on and PageTorpedoSolution_RightPanel_StadimeterButton

TheDarkWraith
06-15-10, 04:32 PM
I got an idea for completely automating it.....trying it now :up: This find of yours might be the most excellent thing so far for SH5 if it also cures the resetting of the speed and AOB when using the stadimeter :D

reaper7
06-15-10, 04:44 PM
A picture says a 1000 words :D

http://i236.photobucket.com/albums/ff240/reaper7_bucket/Stadimeter6.jpg

TheDarkWraith
06-15-10, 04:47 PM
what about the speed and AOB? Did they get reset to 0?

reaper7
06-15-10, 04:49 PM
They were at 0 already. Will try a proper test :up:

reaper7
06-15-10, 04:58 PM
:damn: No reset to 0. The reason is because the built SH5 on top os Sh4.

The Sh4 Targetting TDC is made up of 3 parts Range, Speed and AOB.
In Sh4 you dragged the dial to value and clicked on send to tdc for each item.

Thats still happening in SH5 even though its meant to only use the stadimeter.

Here are the buttons used in SH4 TDC

PageTorpedoSolution_RightPanel_Range_SendRangeButt on
PageTorpedoSolution_RightPanel_Range_StadimeterBut ton
PageTorpedoSolution_RightPanel_Speed_SendSpeedButt on
PageTorpedoSolution_RightPanel_AngleOnBow_SendAngl eOnBowButton

Maybe we can get them all to activate at the same time sending the correct values :06:

TheDarkWraith
06-15-10, 05:01 PM
:damn: No reset to 0. The reason is because the built SH5 on top os Sh4.

The Sh4 Targetting TDC is made up of 3 parts Range, Speed and AOB.
In Sh4 you dragged the dial to value and clicked on send to tdc for each item.

Thats still happening in SH5 even though its meant to only use the stadimeter.

Here are the buttons used in SH4 TDC

PageTorpedoSolution_RightPanel_Range_SendRangeButt on.Visible PageTorpedoSolution_RightPanel_Range_StadimeterBut ton.Visible PageTorpedoSolution_RightPanel_Speed_SendSpeedButt on.Visible
PageTorpedoSolution_RightPanel_AngleOnBow_SendAngl eOnBowButton

Maybe we can get them all to activate at the same time sending the correct values :06:

I got an idea.....:D

reaper7
06-15-10, 05:04 PM
By commenting out the following that should fix the reset to 0 problem, will give it a try. :)

EDIT: No good either just stopped the SH4 dials turning


[Dial56]
Name=TorpedoSolution_Temporary_AngleOnBow
Type=42; DIAL_TGT_ANG_ON_BOW
;Cmd=Set_tgt_sel_value; shared between dials
Dial=0x43010002
CrtVal=0x43010003
NewVal=0x0
DialVal=0.1,-0.1
RealVal=180,-180; degrees
Circular=Yes
CmdOnDrag=Yes
RelativeDrag=Yes
SndStep=5
SndList=1,Menu.TDC.AngleOnBow,360

[Dial57]
Name=TorpedoSolution_Temporary_Speed
Type=69; DIAL_TGT_SPEED
;Cmd=Set_tgt_sel_value; shared between dials
Dial=0x43020002
CrtVal=0x43020003
NewVal=0x0
DialVal=0.01,-8.78; 360/41
RealVal=0,40; knots
Circular=Yes
CmdOnDrag=Yes
RelativeDrag=Yes
SndStep=5
SndList=1,Menu.TDC.AngleOnBow,360

John Channing
06-15-10, 05:24 PM
This is better than watching the World Cup!

JC

reaper7
06-15-10, 05:27 PM
This is better than watching the World Cup!

JC

:har: A long as it doesn't end in a draw like most games played so far.

TheDarkWraith
06-15-10, 05:29 PM
:har: A long as it doesn't end in a draw like most games played so far.

that $%^& thing I never liked in SH4 plus I shelved SH4 5 minutes after playing it so I'm totally unfamiliar with that integrated dial. But now that you've shed some light on how it works I think we can do something good with it :up:

reaper7
06-15-10, 05:58 PM
that $%^& thing I never liked in SH4 plus I shelved SH4 5 minutes after playing it so I'm totally unfamiliar with that integrated dial. But now that you've shed some light on how it works I think we can do something good with it :up:

It appears that when the stadimeter is released it updates the range correctly but also updates the temp speed and temp AOB to the Speed and AOB Dials hence the reason they both reset to 0 as the temp AOB and Temp Speed are set at 0.
Tried changing the default starting value of AOB to 90 degrees instead of 0 degrees via the DialVal= in dials.cfg
And when I updated the stadimeter it reset to 90 instead of 0 :hmmm:.
So the game is updating with the values that have not been set up yet.

So what is needed is to update the temp AOB and temp Speed with the current set values. That way they will reset to themselves.

Gorshkov
06-15-10, 06:00 PM
Is it possible to fix stock stadimeter?

TheDarkWraith
06-15-10, 06:04 PM
Is it possible to fix stock stadimeter?

it's been fixed

reaper7
06-15-10, 06:08 PM
Is it possible to fix stock stadimeter?

Yes, TDW fixed it in his Mod. And I've confirmed it can be fixed above.
What isn't working in Sh5 is a way to stop the stadimeter reseting the speed and AoB when it sets up the range.
That is a throwback to the way SH4 worked and its targeting Tdc.
What we are trying to do is figure a workaround to that issue. :03:

But to answer your problem yes it is working (Just that little reset to 0 niggle).


EDIT:
Sorry I see your refering to Stock not Mods.

Well the above could be used to fix it alright - it would mean a tiny little Mod to move the Stadimeter button and the Send to TDC button from the panel into the Main UI screen.

Gorshkov
06-15-10, 06:17 PM
Yes, I referred to stock game of course! I am interested precisely in such small mod which could fix stadimeter without changing stock game's UI. I do not own SH5 yet but I ordered it for 4 bucks to give it a tray and I have heard that not working stadimeter is the most annoying SH5 bug aside of some graphic glitches.

Ducimus
06-15-10, 06:25 PM
It appears that when the stadimeter is released it updates the range correctly but also updates the temp speed and temp AOB to the Speed and AOB Dials hence the reason they both reset to 0 as the temp AOB and Temp Speed are set at 0..

Sounds like that might be related to the Position Keeper from SH4.

reaper7
06-15-10, 06:28 PM
Sounds like that might be related to the Position Keeper from SH4.

Exactally the problem. Trying to work around it but it seems to be hardcoded to set the dials back to Default position.
Will have to try and see can I ghost the dials and then resend the value back after there reset :hmmm:.

Other than that a solution would be to use the Temp speed and the temp aob as the actual speed and AoB :hmmm:.
Gonna try that now give the AOB and speed the dial crtval ids of the temp aob and tem speed.

TheDarkWraith
06-15-10, 06:36 PM
got the speed to stay when using the stadimeter now if I can just get the AOB to stay :damn:

Gorshkov
06-15-10, 06:41 PM
Well, We had better wait for some 1.3 patch...UBI Soft Romania apparently made SH4 Fleet Boats from SH3 U-boats (propulsion system) and now SH5 U-boats from SH4 Fleet Boats (targeting system). ****! :down:

kylania
06-15-10, 06:47 PM
Well, We had better wait for some 1.3 patch...

I guarantee you'll have a lot more luck and enjoyment using TheDarkWaith's or Reaper7's UI mods than waiting to see if Ubisoft ever releases another patch.

TheDarkWraith
06-15-10, 06:51 PM
I see one problem with this whole method - the mast height is not being set. I've tested it with 3 different ships and the mast height stays constant. Where is the automatic updating of mast height coming from?

Ducimus
06-15-10, 06:52 PM
Well, We had better wait for some 1.3 patch...


Your going to be waiting a very long time.

UBI Soft Romania apparently made SH4 Fleet Boats from SH3 U-boats (propulsion system)

Partially correct in that they only modled two engines. How those engines worked was different then in SH3 however.


and now SH5 U-boats from SH4 Fleet Boats (targeting system). ****! :down:

Apparently! I didn't even attempt manual targeting in SH5. But i did find it odd how with the auto TDC you have to "mark" a target first, then, toggle the same "mark" again, and THEN select your aimpoint. Makes me wonder if im toggeling a position keeper in the background.

TheDarkWraith
06-15-10, 07:06 PM
That SH4 style AOB/Speed/Distance dial has a height slider that you move to set the mast height when the Range button is pressed. I don't see where this slider is getting updated automatically with the mast height data from the ship. If you set it to the correct mast height for the ship then the stadimeter works fine - you get the correct distance. But where is the automated input of the mast height? The user doesn't want to have to input the mast height. If I set the mast height slide to the correct mast height then I can even get the correct range using the XO TDC's stadimeter.
Using my automated mast height entry I see it set's the SH4 style AOB/Speed/Distance dial's height slider to the value I'm setting mast height to. So what am I missing here? :06:
I target a ship and lock onto it - the slider for height does not change. I select another target - slider for height does not change. It just stays stuck at 20m

Nausicaa
06-15-10, 07:24 PM
Excellent work guys ! Way to go.

John Channing
06-15-10, 08:13 PM
That SH4 style AOB/Speed/Distance dial has a height slider that you move to set the mast height when the Range button is pressed. I don't see where this slider is getting updated automatically with the mast height data from the ship. If you set it to the correct mast height for the ship then the stadimeter works fine - you get the correct distance. But where is the automated input of the mast height? The user doesn't want to have to input the mast height. If I set the mast height slide to the correct mast height then I can even get the correct range using the XO TDC's stadimeter.
Using my automated mast height entry I see it set's the SH4 style AOB/Speed/Distance dial's height slider to the value I'm setting mast height to. So what am I missing here? :06:
I target a ship and lock onto it - the slider for height does not change. I select another target - slider for height does not change. It just stays stuck at 20m

In SH4 the mast height come from when you select the correct ship in the Ship ID manual. Once you determine which ship you are looking at you check the box on the Ship ID manual and that loads the mast height. Then you set the AOB and speed on the pull out "TDC".

I have never adjusted the dial manually for mast height, but using this method I hit 10 out of 10 times.

JCC

TheDarkWraith
06-15-10, 08:17 PM
In SH4 the mast height come from when you select the correct ship in the Ship ID manual. Once you determine which ship you are looking at you check the box on the Ship ID manual and that loads the mast height. Then you set the AOB and speed on the pull out "TDC".

I have never adjusted the dial manually for mast height, but using this method I hit 10 out of 10 times.

JCC

that's the whole point. I select the correct ship and check it but the mast height doesn't get set. This is the stock bug still present (stuck at 20m). There's nothing automatically setting the mast height like it should be. My solution does it but I'm hoping that there's an easier and better way still. So this SH4 speed/aob/range dial is just another XO TDC thing in the way it works :nope:

reaper7
06-16-10, 01:26 AM
That SH4 style AOB/Speed/Distance dial has a height slider that you move to set the mast height when the Range button is pressed. I don't see where this slider is getting updated automatically with the mast height data from the ship. If you set it to the correct mast height for the ship then the stadimeter works fine - you get the correct distance. But where is the automated input of the mast height? The user doesn't want to have to input the mast height. If I set the mast height slide to the correct mast height then I can even get the correct range using the XO TDC's stadimeter.
Using my automated mast height entry I see it set's the SH4 style AOB/Speed/Distance dial's height slider to the value I'm setting mast height to. So what am I missing here? :06:
I target a ship and lock onto it - the slider for height does not change. I select another target - slider for height does not change. It just stays stuck at 20m

Had noticed that too. But still ranges appear to be correct when mast height slider is left untouched.
If you send range with stadimeter, range dial jumps to pretty much correct range, now if you move the mast height slider between min and max position - range adjusts slightly.
Its like the stadimeter is doing a approx to range and the mast height is a fine tune :hmmm:.

TheDarkWraith
06-16-10, 01:37 AM
Had noticed that too. But still ranges appear to be correct when mast height slider is left untouched.
If you send range with stadimeter, range dial jumps to pretty much correct range, now if you move the mast height slider between min and max position - range adjusts slightly.
Its like the stadimeter is doing a approx to range and the mast height is a fine tune :hmmm:.

I tried taking range readings on different ships at all different ranges with that dial and unless you set the mast height dial on it the ranges were off. The stock bug still prevails :nope: If you notice too the 'default' value for the mast height on that dial is 20m....the magic 20m bug.
The whole stadimeter problem easily boils down to the C++ code is not setting the mast height dial of the game to the ship's mast height. If Ubi would give us access to this portion of the C++ code it could be fixed.
Do a little experiment: read the target mast height dial everytime you lock onto (and identify) a new ship. You'll see that it's always set at 20. The slider on that SH4 style dial gives you visible proof that it never changes.

Gorshkov
06-16-10, 05:43 AM
So this bug is hard-coded. Yet we have to see for the next patch...

TheDarkWraith
06-16-10, 09:58 AM
So this bug is hard-coded. Yet we have to see for the next patch...

the 20m bug is hard coded but there is a work around for it. Reaper7 is trying to devise another way of doing it from the way I did. I hope he or someone else finds an easier/better way of doing it as mine is rather complicated (from a code standpoint but it does work).

reaper7
06-16-10, 12:52 PM
I was sure I was on to something there as It worked for the test mission ships I had - guess the height/distance was just a fluke :nope:.
Will keep at it trying a few things - you never know.

Have one other idea that I have to try.
Can someone that has Silent Hunter 4 installed check the Pages.ini for the Id number of the Confirm ship ID in the Recognition Manual.
As SH5 is built of Sh4 the Hardcoded ID for that should still be the same and is likely to be working. If so maybe we could replace the one in te XO Dialog box with our own chkbox with that Id assigned to it, that way it would send the mast value. :hmmm:


Found the SH4 one in Sh5 has an ID of 0x2506000B is this the same as the SH4 one I wonder?
Will try this in the game to see if it works.


EDIT: Also can someone make me a mission of say 5 or so stationery different ships at 1000m, 2000, 5000m & 1000m for testing purposes. Cheers

reaper7
06-16-10, 02:03 PM
Just did some more testing - and it is definitly working MAST HEIGHT is getting sent in the background.

Compare the values from the Stock SH5 Stadimeter and the reduntant SH4 Stadimeter in the following Pics all targets are at a 1000m distance from the Sub (All Stationery).

Merchant @ 1000M (Stadimeter placed at mast
http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Merchant-1.jpg

Look at the values for both are at 1713m before confirming the stadimeter Mast height.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Merchant-2.jpg

On setting the stadimeter XO dialog stays at 1713M but SH4 Jumps to aprox 1150M with mast height of aprox 42M.


Next a Tanker at 1000M

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Tanker-1.jpg

Look at the values for both are at 1513m before confirming the stadimeter Mast height.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Tanker-2.jpg

On setting the stadimeter XO dialog stays at 1513M but SH4 Jumps to aprox 1190M with mast height of aprox 42M.


There is definetly something getting sent to the SH4 stadimeter that isn't getting sent to the Sh5 one regardless of it being sent to the Mast height Dial.
Which thinking about it - it won't get sent to the Mast Height Dial anyway as the currentval= 'ID' would be needed from the temp solution dial. to update to show selected mast height from Send to TDC chkbox.


Going on this I decided to try my SH4 Send Mast Height to TDC ID that I found earlier.

And look at the results: :rock:

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/SH4-Recon-Manual.jpg


Everything updated correctly.
Range and Mast Height :rock::rock::rock::rock:.

Now to test and resolve the reset speed and Aob to 0. :yeah:


This proves my Theory from an earlier post. If you click on the Send mast height to TDC without setting the mast height it sends the value plus a small bit of error to give a close to mast height value thus giving you a close to but not exact range. (But still good enough to hit ships :)).
However if you set the Mast height manually on the SH4 Dial or correctly ID with the SH4 Recon Manual (Which sets the mast height dial) the range is sent the correct value and so you get a result with no error :).

This was to allow you to target ships by eyeballing height without the need of going thru the recon manual. If you guessed the mast height correctly you got a perfect range solution.
Bit if you used the auto mast height you weren't severly punished getting range solution close to the real value.

TheDarkWraith
06-16-10, 02:26 PM
http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/SH4-Recon-Manual.jpg



yes, clicking that check box sends the mast height data to the SH4 style dial thingy. But this is a 3 step process: you have to identify ship, then you have to open a rec manual, then you have to click on the check box. Now there is a way to make this a one step process.........this could get interesting :hmmm:
This solution will work since it's setting the tgt mast height dial. Before I was wondering how you were getting the tgt mast height dial (and thus the SH4 style dial thingy's mast height slider) set.
But I see one other problem: how are you going to get merchants into the rec manual you have displayed? This will work fine and dandy for the warships displayed in that rec manual but outside of those ships in it I don't see how it's going to work.
Have you tried opening the XO TDC dialog box's rec manual (or your version of it) and selecting the correct ship and pressing that button in the rec manual displayed above? It sets the mast height to the picture displayed in that rec manual, not the XO TDC one. I don't see how this can work?

reaper7
06-16-10, 02:52 PM
yes, clicking that check box sends the mast height data to the SH4 style dial thingy. But this is a 3 step process: you have to identify ship, then you have to open a rec manual, then you have to click on the check box. Now there is a way to make this a one step process.........this could get interesting :hmmm:
This solution will work since it's setting the tgt mast height dial. Before I was wondering how you were getting the tgt mast height dial (and thus the SH4 style dial thingy's mast height slider) set.
But I see one other problem: how are you going to get merchants into the rec manual you have displayed? This will work fine and dandy for the warships displayed in that rec manual but outside of those ships in it I don't see how it's going to work.


:haha: Your not thinking outside the Box. My Mod has already done similar things regards the stock UI. Like I said before I create frankenstine type results.

Already did this with the Torpedo Panel to fix the Salvo and speed switch bug where every time you used it it repeated it twice - mine doesn't ;).

TheDarkWraith
06-16-10, 03:06 PM
:haha: Your not thinking outside the Box. My Mod has already done similar things regards the stock UI. Like I said before I create frankenstine type results.

Already did this with the Torpedo Panel to fix the Salvo and speed switch bug where every time you used it it repeated it twice - mine doesn't ;).

I think outside the box all the time :D It's just that I did some testing with that 'button' in the stock rec manual some time ago and it only uses the data from the 'page' you have selected in that stock rec manual. So how are you going to get ships other than those listed in that stock rec manual to work? Selecting the correct ship in the XO TDC dialog box and then clicking that 'button' doesn't work...it sets the mast height to the ship on that page in the stock rec manual....
What merchants have you tried this 'solution' on? And at what ranges?

reaper7
06-16-10, 03:17 PM
I think outside the box all the time :D It's just that I did some testing with that 'button' in the stock rec manual some time ago and it only uses the data from the 'page' you have selected in that stock rec manual. So how are you going to get ships other than those listed in that stock rec manual to work? Selecting the correct ship in the XO TDC dialog box and then clicking that 'button' doesn't work...it sets the mast height to the ship on that page in the stock rec manual....
What merchants have you tried this 'solution' on? And at what ranges?

The Tanker and the Merchant ships above were not used with the Recognition Manual from SH4 the were got using the just the stadimeter button from the SH4 dial - as in the first 6 pics above.

The last one was just a test to see if the mast height changed, which it did but was not used in the other ones. They got the range just fine with a slight error due to the Mast height being in auto mode.
Still gives pretty close results :D.
Will test this furter till I have it working 100%. If not I can still use whats there to get it working 100% - I don't need a 1 click solution a 3 click one is just fine.
After all it was that way in SH3 and Sh4 :D. :up:

I'm sure there's away to get merchants into the rec manual -just got the select by country flag working.

TheDarkWraith
06-16-10, 03:34 PM
The Tanker and the Merchant ships above were not used with the Recognition Manual from SH4 the were got using the just the stadimeter button from the SH4 dial - as in the first 6 pics above.

The last one was just a test to see if the mast height changed, which it did but was not used in the other ones. They got the range just fine with a slight error due to the Mast height being in auto mode.
Still gives pretty close results :D.
Will test this furter till I have it working 100%. If not I can still use whats there to get it working 100% - I don't need a 1 click solution a 3 click one is just fine.
After all it was that way in SH3 and Sh4 :D. :up:

I'm sure there's away to get merchants into the rec manual -just got the select by country flag working.

at close ranges mast height being off by 1-2m isn't going to do much but at longer ranges it's going to significantly effect range reading. I still don't see how this is going to work 100% on every ship and give correct mast height data 100% of the time for each ship. Hopefully you figure out a way to do it but I really don't see how :up:

reaper7
06-17-10, 12:27 PM
In SH4 the mast height come from when you select the correct ship in the Ship ID manual. Once you determine which ship you are looking at you check the box on the Ship ID manual and that loads the mast height. Then you set the AOB and speed on the pull out "TDC".

I have never adjusted the dial manually for mast height, but using this method I hit 10 out of 10 times.

JCC

Exactally JCC, that was the way I used it in SH4 to and that is the way I got it working too. Giving exact mast height gives a better sollution, but not imputing an exact mast height does not give much of an error.
If you imput the Mast height by clicking on the send to TDC it sets the correct height. Now move the mast height dial from max to min and at only effects it by a few feet. Perfectly good enough as most shoots will be under 3000m anyway.
800 to 1200 being the range most use I would imagine.

Anyways you cant get a proper reading on long distance anyway due to mast not being visible enough :D.


at close ranges mast height being off by 1-2m isn't going to do much but at longer ranges it's going to significantly effect range reading. I still don't see how this is going to work 100% on every ship and give correct mast height data 100% of the time for each ship. Hopefully you figure out a way to do it but I really don't see how :up:

I belive I have that issue fixed ;).
Stay tune for aun update during the Week - This should be Big. (Just need to test fully that I can remove a few small bugs)

TheDarkWraith
06-17-10, 01:38 PM
If you imput the Mast height by clicking on the send to TDC it sets the correct height.

so how did you get ships outside of the stock rec manual to work? Clicking on the send to TDC only works for ships in that stock rec manual. There are no merchants in that stock rec manual.

reaper7
06-17-10, 05:15 PM
so how did you get ships outside of the stock rec manual to work? Clicking on the send to TDC only works for ships in that stock rec manual. There are no merchants in that stock rec manual.

EDIT: Ignore scalling on ship images. This is due to me Redoing all the ship.dds images for my Recognition Manual Mod.
I will replace these with the stock ship.dds images for proper scalling :).


Hmmmm let me see :hmmm:.


Ahhh ok here ya go.


Now still work in progress, Very buggy but getting there. :D


I present...... Drum roll Please.


The Humble Merchant:

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/1.jpg

Clicked on Send Mast Height to TDC: Dial Jumps to 29.5 Meters :rock:
Now select stadimeter.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/2.jpg


Released at Mast Height: Range = 1100M

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/3.jpg

Oh and Side Profiles selected like in Sh4 by the little ship button in top right.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/4.jpg


And scroll thru the pages using left and right:

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/5.jpg

and next:

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/6.jpg


And last the Country select cover when you close the book (Or when Recon Manual Activated using 'N')

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Cover.jpg



Like I said I have a bit more work required to get it stable and showing all the Vessels. :up:

But this will be my next Recognition Manual and Stadimeter fix in my High Resolution UI - (With a bit of luck :D).


Don't need the rest of the rubbish in the XO Dialog Box - so that can go in the bin :haha:.

Klub Bilderberg
06-20-10, 07:20 AM
Am i getting it right, youre using sh4 style rec manual? So you have to slide through 15 other ships until you find the right one either you know anyway which one it is. I pretty much like the way it works in sh5 now by giving the user a filter function.

John Channing
06-20-10, 07:37 AM
Maybe I am missing something, but won't getting rid of the XO Dialogue box make conducting surface attacks with the UZO impossible? Without a TDC or dialogue box how the user input the target data?

JCC

reaper7
06-20-10, 08:20 AM
Am i getting it right, youre using sh4 style rec manual? So you have to slide through 15 other ships until you find the right one either you know anyway which one it is. I pretty much like the way it works in sh5 now by giving the user a filter function.

Yes, But with the amount of Merchants etc in SH5 you only have to scroll thru about 10 ships at most. Belive me its faster that going tru the ship porfile type selections of the Xo Dialog.

Maybe I am missing something, but won't getting rid of the XO Dialogue box make conducting surface attacks with the UZO impossible? Without a TDC or dialogue box how the user input the target data?

JCC


Not when I have TDC input on the UZO and Obs Scope (On my to do list) :D

John Channing
06-20-10, 11:13 AM
Exxxxxxxxxxxcellent.

JCC

ShoCkwaVe
06-20-10, 04:50 PM
I guarantee you'll have a lot more luck and enjoyment using TheDarkWaith's or Reaper7's UI mods than waiting to see if Ubisoft ever releases another patch.

or better yet a merge of both so we dont have to choose either or

your mods are each very Impressive & getting better every day

Reaper7 & TheDarkWraith ---> ((Team up already)) <----

Put Ubisoft to shame for not releasing sh5 with standards up to YOUR Par

keep up the good work guys! & many thanX!

:up:

Klub Bilderberg
06-21-10, 10:05 AM
Yes, But with the amount of Merchants etc in SH5 you only have to scroll thru about 10 ships at most. Belive me its faster that going tru the ship porfile type selections of the Xo Dialog.




maybe. Buts its more fun to identify targets like that.

reaper7
06-21-10, 12:21 PM
I may try and do a stock version with the XO Dialog box. I could put the stadimeter button and the Send to TDC as buttons on the side of the screen. That should be workable :hmmm:.

That way It could be a drop in Mod for everybody to use so as to fix the Stadimeter issue. Or for anybody to use in there Mods. :).

BowfinSS287
06-21-10, 08:56 PM
yes please do that.....fantastic idea....where do i sign:rock:

Zedi
06-23-10, 08:03 AM
I may try and do a stock version with the XO Dialog box. I could put the stadimeter button and the Send to TDC as buttons on the side of the screen. That should be workable :hmmm:.

That way It could be a drop in Mod for everybody to use so as to fix the Stadimeter issue. Or for anybody to use in there Mods. :).

Any news on this project? :DL

John Channing
06-23-10, 08:38 AM
See the last page of this thread...

http://www.subsim.com/radioroom/showthread.php?t=169119

JCC

Zedi
06-23-10, 11:06 AM
I saw it, that's why I ask here. So far Reaper released his work integrated in his UI pack, but I'm asking about the stand alone stadimeter fix mod...

reaper7
06-23-10, 11:49 AM
I saw it, that's why I ask here. So far Reaper released his work integrated in his UI pack, but I'm asking about the stand alone stadimeter fix mod...

Ran into a road block regards the XO Dialog page. Will need to see if I can get around it or this will not be possible to go furter.
The only way so far to get it working is with the SH4 type Rec Man - and that has some limitations regarding WO ship identify etc.

Other than that I could release it just as the Auto mast send to TDC as talked about earlier in the post.
Results are not as accurate as the proper send mast to TDC but are very close. At close distances of 1000m error may only be a couple of meters.

Still a hell of alot better than stock eg a ship at 1000m using the Auto Mast height buttons will give a reading of 1010M approx while stock will give it as 1400M aprox etc.

Other thann that its the SH4 Rec Manual method that I've in WIP in my UI Mod as JCC linked above. ;)

Zedi
06-23-10, 12:15 PM
Reading all these comments, makes me so angry on these amateurs who were in charge of the SH5 script part. I can't imagine wtf they did all this time when SH5 was in development. They didn't even bothered to write a new code for SH5, just reused the old ones and they even failed on that. How the frak they did not get fired for this lame job they did.. is beyond my understanding.

Anyway, my highest respect for you Reaper and for what you try to do, hope that finally you will find a workaround, I will pray for you :)

reaper7
06-26-10, 03:14 PM
I've been doing a hell of a lot of testing and the Mast Height Problem just wasn't adding up.
As your aware from the First post I announced that I had a fix for the stadimeter bug, and after impute from others that this and that didn't work due to mast height not being sent.
I went on to getting the Sh4 Recon Manual working in SH5 with the working send mast height to TDC.
Excellent everything work perfectly,:hmmm: Hmmm I still wasn't convinced.

So I started doing a lot of tests on different ships at different ranges and the results did not add up. So I did a bit of searching on the SH4 forums (As SH5 is built on SH4 - what applies there applies here).

And came across this which validates my results.

I know a bit about Mast Heights, Manual Targeting, the relationship between the Stadimeter reading and the Position Keeper, and what results one gets with a poor firing solution (SCAF (http://www.subsim.com/radioroom/showthread.php?t=126016)). May I say, with some of RFB 1.52's mast heights, you couldn't hit a bull's behind with a base fiddle!!! OK, so maybe you could if you were 600 yards from target; the torpedo's don't arm themselves before 400 yards!!

I've spent a lot of time testing, calibrating, retesting, finding manual range using the stadimeter, to know the stock mast heights are on average 25-35% incorrect. Enough so that one meter (the internal game files are all in meters) on average, will produce a little less than 50 yards of difference for a manual targeting solution compared to an automatically found one. This is with the range being taken at a standard 1200 to 1300 yard distance, and with an average mast height of 19-23 meters.

If you use the auto targeting feature you can stop reading now. The relationship of correct range finding with auto targeting compared to manual targeting is like day and night. The devs developed auto targeting to keep accurate track of targets for you. In this regard they did it very well. You can still screw up, but most of the hard work is done for you. In auto targeting the game doesn't use the mast heights to find range but rather object coordinates to find the correct relationship's between one another. The game keeps track of hundreds of objects, so finding the distance between just two is a piece of cake.

In manual targeting the player makes the inputs for a firing solution. The one I'm most concerned about is mast heights since this one figure is out of the players control (it is placed in the game through the ships .cfg files), and yet it makes part of the equation for manually finding accurate range when doing it yourself. The game crunches the numbers for you, but the solution is only as good as the input figures you use.


This is exactly what I was noticing in my Results:

If I use my fix for stadimeter as in the first post I was getting good results.
Now if I use the (Send Mast to TDC) which you would imaging to give more accurate results, this was not the case it gave results close to the Non TDC ones but still a bit off.

So the game is actually using accurate results when in Auto Mode and less accurate results whan using the Send mast Height to TDC method. :-?
The reason for this is the game measures the distance between objects (ie Ships) in Auto Mode (Accurate) while the manual mode uses the .cfg file to get the Mast Heights which are not so accurate.


What this means is the Fix for the stadimeter is NOT in "sending Mast height to TDC" but in "sending range and bearing to TDC" as in my first post. :D


Expect a proper Stadimeter Mod Fix soon.

TheDarkWraith
06-26-10, 03:21 PM
my solution has no problems with it, I get excellent range readings with the automatic mast height's inserted with my code. I don't understand what you're talking about now. It appears you're trying to re-invent the wheel of make something work that won't work :06: The range is set using the stadimeter (or the TDC range dial), the bearing/AOB/etc. are set using the TDC dials. So what's this proper thing you speak of? :hmmm:

reaper7
06-26-10, 03:32 PM
my solution has no problems with it, I get excellent range readings with the automatic mast height's inserted with my code. I don't understand what you're talking about now. It appears you're trying to re-invent the wheel of make something work that won't work :06: The range is set using the stadimeter (or the TDC range dial), the bearing/AOB/etc. are set using the TDC dials. So what's this proper thing you speak of? :hmmm:

Like everything is this game its built for automatic mode (Noob mode).
When you use auto TDC (Not sending the mast height) the game gets the distance between ships (Objects) using its own ingame measurments. The same way the Percise Sonar range works.

as quoted by capnscurvy If you use the auto targeting feature you can stop reading now. The relationship of correct range finding with auto targeting compared to manual targeting is like day and night. The devs developed auto targeting to keep accurate track of targets for you

Now When you use The Send Mast height (manual mode) your telling the engine to use the heights found in the ship.cfg files which are not 100% accurate.
The ship mast heights has always been a problem from sh3-sh5 in there accuracy at time up to 30% off in the correct height.

What this means is using 'The Send mast height to TDC' you are actually introducing a small bit of error to the results.

EDIT: I'm not saying your method is wrong. I'm saying that the Devs messep up the implementaion of the Manual Targeting method. your method is bacically the way I had it working with the SH4 recon mod for stadimeter (Result wise that is).
It would be given the exact same results.
What I'm saying like most things in this game Mauals mode is giving worse result that Auto Mode.

Both ways give me great range readings, but the Auto Mode are slightly better and more so at very long range.

And if you bypass the Send to TDC part and use the Seng rand and bearing to TDC as found on the SH4 Position keeper dial it imputs the range using Auto Mode giving better results. :)

I'm posting this info for everyone to use if wanted :)

TheDarkWraith
06-26-10, 03:48 PM
What this means is using 'The Send mast height to TDC' you are actually introducing a small bit of error to the results.

from what you're saying then using the button for it will (in the rec manual) introduces the error. Setting the mast height by code introduces no error. My range readings are spot on no matter what ship, what distance. I played with that button you're playing with for days, that whole pk thing is fubar'd to no end. It was easier just to develop a better way of doing it :yep:
Here's probably why you're getting the error you're seeing: you have to have the XO TDC in off in order to use the button you're using. The minute you turn TDC back On the internal values for range, aob, speed, etc. get fubar'd by the game.

reaper7
06-26-10, 03:56 PM
from what you're saying then using the button for it will (in the rec manual) introduces the error. Setting the mast height by code introduces no error. My range readings are spot on no matter what ship, what distance. I played with that button you're playing with for days, that whole pk thing is fubar'd to no end. It was easier just to develop a better way of doing it :yep:
Here's probably why you're getting the error you're seeing: you have to have the XO TDC in off in order to use the button you're using. The minute you turn TDC back On the internal values for range, aob, speed, etc. get fubar'd by the game.

That may be the case - it possible is the button that introduces the error.
But when I don't use it I'm getting excellent results. ;)

So as I had posted in the first post that method is a working solution for the Stadimeter. No need for SH4 manuals or Send mast height buttons.
All thats needed is the 'Send range to TDC' it appears to do its own bit of magic and just sets it to the correct range :D.

Your coding most likely worked around the problem as it was ouside of the game engine where it had no control.
I'm just glad I found a way to do the same ingame :yeah:.

TheDarkWraith
06-26-10, 04:01 PM
I guess I'm missing the big picture here. You're making this whole thing 'work' by leaving TDC in off? Where is the fun of taking the range reading using the stadimeter or something like it? How are you going to use the TDC dials? The minute you flip TDC to on the dials reset.....:hmmm:

reaper7
06-26-10, 04:14 PM
I guess I'm missing the big picture here. You're making this whole thing 'work' by leaving TDC in off? Where is the fun of taking the range reading using the stadimeter or something like it? How are you going to use the TDC dials? The minute you flip TDC to on the dials reset.....:hmmm:

No. TDC is in On (Manual Mode). Whats happening is that when I use the stadimeter it gives the incorrest rang due to the 20M bug.
But when I click the 'Send range to TDC' button it jumps to the correct range when using the XO-Dialog manual - Hence its getting range in Auto Mode.
I don't know why this is happening - It may be due to the SH4 PK dial having access to the correct range ingame and returing the correct value.
After all we were not meant to have access to that button.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stadimeter5.jpg

All I know is if I use the SH4 Recon Manual that has the working 'Send mast to TDC' as the mast changes to the correct height where as the XO-Dialog stays at 20M.
Then the results are similar but the 2nd method seem to have a small error in the results.
With the 1st method being the more accurate at long rage (Not much in it though).

reaper7
06-26-10, 04:31 PM
Here we have a Cinnamron Class Tanker range is 1050 to 1100 Meters out.
Ship has been confirmed in the XO-Dialog check box.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stad1.jpg

Stadimeter selected via the range option in the XO-Dialog box.
Solution come back at 735M - Thats not right :nope:.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stad2.jpg

Now click on the Button topright of the screen (Yellow Scope), and viola: (This is the Send range To TDC of the PK Dial)
Range is now reported to be 1085 Meters :salute:

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stad3.jpg

Here's the Tai map of said target. Crappy ruler and its 50m incremants reports it as 1050M (1000m - 1100m). Actual is 1085M :D.

http://i236.photobucket.com/albums/ff240/reaper7_bucket/High%20Resolution%20UI/Stad5.jpg

TheDarkWraith
06-26-10, 04:47 PM
I see one possible issue. Totally screw up the stadimeter taking - put the line way out of whack (either way above or below the target) to get an 'incorrect' stadimeter reading. Now press your button - what's the range reported? The exact range??

reaper7
06-26-10, 05:07 PM
I see one possible issue. Totally screw up the stadimeter taking - put the line way out of whack (either way above or below the target) to get an 'incorrect' stadimeter reading. Now press your button - what's the range reported? The exact range??


Just tested that there, and no it works ok throw the line out of whack and the results are out of whack too.
As far as I can see Results are perfect. :)

Maybe you could test on your side.
All I've done is importd the Torpedosolution page into the attack periscope page.
then made the following visible

PageTorpedoSolution_RightPanel.Visible = True
PageTorpedoSolution_RightPanel_AutohideButton.Visi ble = True
PageTorpedoSolution_RightPanel_Range_SendRangeButt on.Visible = True

Then in the Dials.cfg

Mahe sure you change to this:

[Dial59]
; will be changed by code
Name=TorpedoSolution_Temporary_Range
Type=68; DIAL_TGT_RANGE
Cmd=Set_tgt_sel_value;
Dial=0x431A0001
CrtVal=0x431A0003
NewVal=0x0
DialVal=10,0
RealVal=11000,220; range
Circular=Yes
;CmdOnDrag=Yes
Logarithmic=-0.98;51.0
;RelativeDrag=Yes
;SndStep=5
;SndList=1,Menu.TDC.AngleOnBow,360

Now select a target, bring up the XO Dialgox box, use the stadimeter than click the SendRangeButton button.

TheDarkWraith
06-26-10, 05:10 PM
I'll have to try it when I get home. What does the XO dialog box say the range is when using this button? How about the TDC range dial? Have you tried at longer ranges (2000, 3000, and 4000m)? and try using ships with a great spread in their actual mast heights (i.e. one with a mast height of 15 and one with a mast height of >30 at the same ranges)

reaper7
06-26-10, 05:15 PM
I'll have to try it when I get home. What does the XO dialog box say the range is when using this button? How about the TDC range dial? Have you tried at longer ranges (2000, 3000, and 4000m)?


Both the XO Dialog box and the TDC dial report the wrong range untill the PK SendRangeButton is clicked. Then they change to the correct value :D.

Yes tested it at long range medium range and short range with different class vessels (mast heights were 25m to 45M). Seems to work no problem. :up:
Hope you can confirm this. :03:

Thanks TDW for all your assistance. :yeah:

EDIT: One thing I noticed that may back this up. Was if I used this method to get the range and then Used the Mast height dial in the PK to change the Mast height then redid the SendRangeButton it had no effect on the reading. The Inner range dial moved with the Mast-height outer dial, there by keeping the range (Kind of like it was automatically matching the range to the pointer on the Mast-height dial).

madmex
06-27-10, 05:26 PM
and were can we find the link to this mod ??


Thanks,
Jack

reaper7
06-27-10, 05:59 PM
What perfect timing you have. Just released it 5 Mins ago. :haha:

Link here: http://www.subsim.com/radioroom/showthread.php?t=171615

Stevepine
06-28-10, 06:54 PM
What perfect timing you have. Just released it 5 Mins ago. :haha:

Link here: http://www.subsim.com/radioroom/showthread.php?t=171615

Hi there Reaper..... fantastic efforts! I like your determination. just want to ask... will this fix work with just your UI or with most / others?

reaper7
06-29-10, 11:40 AM
Hi there Reaper..... fantastic efforts! I like your determination. just want to ask... will this fix work with just your UI or with most / others?

This Mod changes the Default Hud.ini so will conflict with any that use that.
Including my own UI - will be relasing the next version with this included in it :up:.