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

Reply
 
Thread Tools Display Modes
Old 08-28-11, 04:30 AM   #1
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,294
Downloads: 184
Uploads: 7


Default

FANTASTIC work Reaper7 !!!!
yes ,the formula you found (many many congrats !! ) seems that covers all situations and works correct

[just a note : the values for the above examples are :

-120 0 0 -120
-99 30 21 -90
-141 -30 -21 -150
120 0 0 120
134 20 14 140
106 -20 -14 100 ]

the impact angle dial is working absolutely correct BUT
there are side effects to other areas which are not allowing to use it ingame yet !
i am almost sure that ,thanks to Reaper, we are very close to overcome these side effects and have ,at last, an ORIGINAL Impact Angle dial for SH3!
just hope to solve the issues !

Congratulations Reaper !
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 08-28-11, 05:51 AM   #2
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
Default

Quote:
Originally Posted by makman94 View Post
[just a note : the values for the above examples are :

-120 0 0 -120
-99 30 21 -90
-141 -30 -21 -150
120 0 0 120
134 20 14 140
106 -20 -14 100 ]

the impact angle dial is working absolutely correct BUT
there are side effects to other areas which are not allowing to use it ingame yet !
i am almost sure that ,thanks to Reaper, we are very close to overcome these side effects and have ,at last, an ORIGINAL Impact Angle dial for SH3!
just hope to solve the issues !

Congratulations Reaper !
I have a habbit of rounding thing up or down - thats my bad maths head

But as stated the formula works - so we are very close to a fully functional dial.

My next step using the Dial types you supplied me is to find one that will have no impact on the game (Current one effect other parts of the sim).
Then I can get rid of the Static Impact Angle in our TDC with a working Impact Angle.
Bur I'm sure we'll find one.
reaper7 is offline   Reply With Quote
Old 08-28-11, 03:39 PM   #3
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
Default

Ok I believe I have a perfect working solution.

Its was a lot more complicated than I expected.

The problem with Hijacking dials is other function use them under the hood and so we get unwanted side effects.
My first attempt used the tgt_bearing dial which although was not being used visually by the TDC is being used by the Stadimeter and other areas.
This caused them to stop functioning correctly.

Solution find another dial that's not being used:

Well this proved impossible all dial types that are writable are being used.
There are 2 dial types:
  1. Ones writable by the user eg: Bearing
  2. Ones non-writable to the user eg clock seconds
So i need another workaround to use my code - after digging tru the command.cfg and the dial types available, I had an idea

Maybe its possible to use the Bearing dials after all there are 2 used for it.
  • Dial_Bearing
  • Dial_Bearing_10ths

So I converted my Dial over to the Dial_Bearing_10ths but my code didn't work, the dial_bearing10ths is non-writable or so it seemed
After digging about in Sh3's code I traced whats happening.
The Sim writes the Value of the Bearing to the Dial_Bearing and the using more code writes the bearings 1units to the Dial_Bearing_10ths. As the sim is constantly updating this value it will overwrite anything written to that location by my code (so appearing Read Only).

So loading the assembly I found the part of code that writes the value to the Dial_Bearing_10ths and, well basically blanked it .
So now nothing gets written to that area, leaving my code free to do so.
Thereby converting the Dial_Bearing_10ths needle into my Impact Angle Needle

Now as the games Bearing 10ths dial is no longer correctly bisplaying the bearings 1units (As its now an Impact Angle) that dial needs another trick to get it to work.
This I think can be done by turning that dial type back to a Dial_Bearing and converting the dials.cfg for that dial.

Code:
[Dial11]
Name=Sol_Bearing
Type=24; DIAL_SOL_BEARING
Cmd=Set_TDC_bearing
Dial=0x3B0D00FF
CrtVal=0x3B0D0001
NewVal=0x0
DialVal=0,360
RealVal=0,360; degrees
Circular=Yes
CmdOnDrag=Yes
SndStep=5
SndList=1,Menu.TDC.Bearing,360


[Dial12]
Name=Sol_Bearing10ths
Type=24; DIAL_SOL_BEARING; Converted Dial
Dial=0x0
CrtVal=0x3B0D0077
NewVal=0x0
DialVal=0,360
RealVal=0,360; degrees
Circular=Yes
Just need to work out the values needed for the lines above


EDIT:

Well it all works so far - need to test fully and send to Makman for indepth Testing - but its looking good.

Bearing_10ths dial is working using this fix:

Code:
[Dial11]
Name=Sol_Bearing
Type=24; DIAL_SOL_BEARING
Cmd=Set_TDC_bearing
Dial=0x3B0D00FF
CrtVal=0x3B0D0001
NewVal=0x0
DialVal=0,360
RealVal=0,360; degrees
Circular=Yes
CmdOnDrag=Yes
SndStep=5
SndList=1,Menu.TDC.Bearing,360


[Dial12]
Name=Sol_Bearing10ths
Type=24; DIAL_SOL_BEARING
Dial=0x0
CrtVal=0x3B0D0077
NewVal=0x0
DialVal=0,12960; Simulates the 1units
RealVal=0,360; degrees
Circular=Yes


Screenshot showing it in action using the same values in Makman pic above to show the Impact angle is displaying correctly.

AOB Gyro Bearing Impact Angle
106 -20 -14 100




As this will require editing the SH3 code, I'll have to do like H.Sie and Stiebler and release it as a Patcher - Once I figure out how to do that.

But this will allow a fully working Impact Angle without Interfering with any of the other dials or solution calculations used by Sh3's code.

Last edited by reaper7; 08-28-11 at 05:10 PM.
reaper7 is offline   Reply With Quote
Old 08-29-11, 07:46 AM   #4
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,294
Downloads: 184
Uploads: 7


Default

PERFECT JOHN !!!!!
Brilliant and very clever solution !! this will work for sure !

Impact angle dial will become true for sh3 () and as for the patch i believe that H.Sie will be able to take care of it and also to make it compatible with his great tweaked sh3.exe !

fantastic work and thought

bravo John !
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 08-30-11, 05:03 PM   #5
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
Default

Hi Makman, I've mailed you a bugfix - Impact Angle now works 100% (same as Sh4's)
Required a little more maths coding on my part to fix
reaper7 is offline   Reply With Quote
Old 07-22-20, 09:11 AM   #6
klh
Ensign
 
klh's Avatar
 
Join Date: Jan 2002
Location: Indiana, USA
Posts: 229
Downloads: 201
Uploads: 0
Default Impact Angle Dial update?

I apologize for bringing back an old thread. Has anyone successfully added a target impact angle (Auftreffwinkel) dial to SH3? From what I can find, Makman and Reaper7 were close, but I can't find the end to the story.

I have been modding the ARB 1920x1080 GUI to include a more historically accurate TDC (for example, correct AOB and target bearing dials), and would like to include this dial (top right in the picture).



This is not nearly as visually stunning as the TDC built by Karamazov for SH4, but it's been a fun project for me.

Last edited by klh; 08-03-20 at 08:49 AM.
klh is offline   Reply With Quote
Old 06-26-25, 05:53 PM   #7
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
Default

Quote:
Originally Posted by klh View Post
I apologize for bringing back an old thread. Has anyone successfully added a target impact angle (Auftreffwinkel) dial to SH3? From what I can find, Makman and Reaper7 were close, but I can't find the end to the story.

I have been modding the ARB 1920x1080 GUI to include a more historically accurate TDC (for example, correct AOB and target bearing dials), and would like to include this dial (top right in the picture).



This is not nearly as visually stunning as the TDC built by Karamazov for SH4, but it's been a fun project for me.

Good Evening Klh, I have been away from Silent Hunter for many years now. But recently I came across some of my old files, most of the work I did back then has been lost Including the finished version of this mod I was working on along with Manos at the time.

I believe I can re-create my backend for this and a simple frontend to show it working. But my UI skills with SH3 are minimal so it wont be pretty.
But it shouls be enough to be fully working and I will allow any modders to implement it into their mods/Supermods.
As it has been a long time withheld from the community due to not been released, and I believe the community can benefit from it still today.

Stay tunned I hope to get a release version built very soon.

reaper7 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 10:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.