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 04-15-11, 11:22 AM   #1
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default Linear Dial Help

Hi Guys need some help with getting a linear dial working.

I wish to create a linear dial like the hard-coded compass dial.
This is what I have in Dials Config

Code:
[Dial116]
Name=reaper7_Bearing Dial
Type=24; DIAL_SOL_BEARING
Dial=0x26000000
CrtVal=0x26000010; My New Bearing Graphic
NewVal=0x0
DialVal=0,360
RealVal=0,360; degrees
Circular=No
I can get it to rotate by turning the Periscope, but here is where the problem is:
The Linear dial move up/down and not left/right which is the direction I need it to go (Like the stock Bearing Compass).
Any suggestions how to achieve this
reaper7 is offline   Reply With Quote
Old 04-15-11, 01:10 PM   #2
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
Default

Hi mate,

Have you try rotating your needle in paint program then adjust value?

Also negative number in dial can change orientation.

There is many ways to adjust those needles

Best regards hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-15-11, 05:39 PM   #3
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Hans Witteman View Post
Hi mate,

Have you try rotating your needle in paint program then adjust value?

Also negative number in dial can change orientation.

There is many ways to adjust those needles

Best regards hans
Hi mate, dial is not circular. Need to do a rectangular dial like the compass bearing at attack scope .

But linar dials in Sh3 seem to only work in the up/down plane (eg the Fuel Gauge) but I need to make a linar dial that rotates left/right like the hardcoded compass bearing .
Haven't managed to get it working this way .
reaper7 is offline   Reply With Quote
Old 04-15-11, 05:50 PM   #4
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
Default

Hi mate,

Have you tried to disable circular to no instead of yes in dials.cfg:


[Dial40]
Name=Fuel level
Type=34; DIAL_FUEL
Dial=0x0
CrtVal=0x3F300001
NewVal=0x0
DialVal=195,17
RealVal=0,1; normalized
Circular=No

I know it could also been control via menu_1024_768 just have a look at it sorry if my memory is not fresh enough because last year i play a lot whit menu and dials and after awhile i don't remember how i did some.

Best regards hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-15-11, 06:04 PM   #5
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

If you mean go from left to right or right to left?
Create a Dummy Node and attach it to that.
Then rotate the Dummy Node.
That should work.
  Reply With Quote
Old 04-15-11, 06:10 PM   #6
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
Default

Quote:
Originally Posted by privateer View Post
If you mean go from left to right or right to left?
Create a Dummy Node and attach it to that.
Then rotate the Dummy Node.
That should work.
Yep another way around, there is so many way to do stuff in that game that why so many get confused because there is no absolute prcocedures for some aspect of modding.

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-15-11, 06:23 PM   #7
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

They don't call them 'Dummy' nodes for nothing you know.

  Reply With Quote
Old 04-15-11, 07:55 PM   #8
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Will this work for the 2d User Interface dials or is this method for 3d model.
I'm looking to do a Interface Linear dial that need to work just like the Periscope bearing ie: rotate 360 degrees in relation to the periscope.
reaper7 is offline   Reply With Quote
Old 04-15-11, 08:06 PM   #9
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Ah, That's different.
Only one I could think to ask is danlisa.
PM him and say I suggested you contact him so if he gets upset?
He can come crab at me.
  Reply With Quote
Old 04-16-11, 03:04 AM   #10
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
Hi Guys need some help with getting a linear dial working.

I wish to create a linear dial like the hard-coded compass dial.
This is what I have in Dials Config

Code:
[Dial116] Name=reaper7_Bearing Dial Type=24; DIAL_SOL_BEARING Dial=0x26000000 CrtVal=0x26000010; My New Bearing Graphic NewVal=0x0 DialVal=0,360 RealVal=0,360; degrees Circular=No
I can get it to rotate by turning the Periscope, but here is where the problem is:
The Linear dial move up/down and not left/right which is the direction I need it to go (Like the stock Bearing Compass).
Any suggestions how to achieve this
What are you trying to use the dial for? Just a repeater of where the optics are trained at, or are you willing to link it to another indicator like fuel, battery or whatever? Also on which screen do you want to put it? Or in the menu bar?
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 04-16-11, 05:20 AM   #11
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by reaper7 View Post
....
I'm looking to do a Interface Linear dial that need to work just like the Periscope bearing ie: rotate 360 degrees in relation to the periscope.
can't help you with a linear dial (as i tried it at past but had only big fails) but a workaround that you can do and have a 'fake' linear dial is :

create a VERY VERY BIG rounded image with the bearings's numbers at the 'edge' of it and make it rotate as a usal rounded dial . cover it and let only a small 'window' to show you the current value that you want. this rounded dial seems and behave at the end like a fake linear one

you can see examples of this trick at 6-feeling dials (the bearing on the upper side of rudder dial) and at OLC,ACM,MaGui 's compass (the one that shows at the left bottom side of console)
__________________
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 04-16-11, 05:58 AM   #12
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Hitman View Post
What are you trying to use the dial for? Just a repeater of where the optics are trained at, or are you willing to link it to another indicator like fuel, battery or whatever? Also on which screen do you want to put it? Or in the menu bar?
Its actually for my UI in SH5, but if I can get it to work it will also work in SH3/4 as well.
Its needed for both Obs and attack scope stations, and need to be linked to the following dial type Type=24; DIAL_SOL_BEARING so yes its basically a copy of the Periscope Compass Bearing but will not be showing the compass bearing but a graphic of my own design that will work in the same way as the compass bearing.
But will achieve an effect not seen in Silent Hunter yet in the Imerssion side.

Basically if I can pull it of will achieve a 3d effect within the 2d User Interface - giving a whole lot more atmospheric to the Periscope stations .

Quote:
Originally Posted by makman94 View Post
can't help you with a linear dial (as i tried it at past but had only big fails) but a workaround that you can do and have a 'fake' linear dial is :

create a VERY VERY BIG rounded image with the bearings's numbers at the 'edge' of it and make it rotate as a usal rounded dial . cover it and let only a small 'window' to show you the current value that you want. this rounded dial seems and behave at the end like a fake linear one

you can see examples of this trick at 6-feeling dials (the bearing on the upper side of rudder dial) and at OLC,ACM,MaGui 's compass (the one that shows at the left bottom side of console)
I had though of this to but due to the positioning it needs with regard to the Periscope optics - a circular dial is out of the question.
The worst part is while the gave us linear dials (Fuel dial) they only move up/down - that are in the dials.cfg, they made linear dials that move left/right (compass bearing) hardcoded
reaper7 is offline   Reply With Quote
Old 04-16-11, 06:51 AM   #13
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

But why not simply make a clone copy of the existing bearing dial??
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 04-16-11, 07:12 AM   #14
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Hitman View Post
But why not simply make a clone copy of the existing bearing dial??
Not sure how you clone an object, can it have the same ID ??

For example the compass in the Attack scope has an ID of: 0x26000004
Its graphic is bearing.dds in data/menu/gui (1024x16) but displays only a portion of that (88x16). So when you rotate the scope the graphic scrolls thru that 88x16 window.
There is no entry for the Compass in the dials.cfg so the ID 0x26000004 is being rotated by Hardcode.

If I make a copy of the compass it will get a new ID which will not be touched by the hardcode, so in turn will not rotate it.

Can one fool the game into having 2 same ID's (Clone as you mention) or will that cause CTD.
I haven't tried to have the same ID for both items as SH5's Menu Editor does not allow for 2 same ID's, but I could edit the attack_scope.ini file to make them the same if cloning works


EDIT: Nope giving them the same ID didn't work - both the original and clone didn't rotate

Last edited by reaper7; 04-16-11 at 07:38 AM.
reaper7 is offline   Reply With Quote
Old 04-16-11, 08:13 AM   #15
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Ok this is what I'm trying to achieve, hopefully its possible.
I wish to get a panoramic type rotating of the Conning tower behind the periscope in the Attack Scope and a panoramic background of the control room at the Obs Scope.

Based on this http://www.kolumbus.fi/mika.ajomaa/P..._2_files/1.swf



As you can see in the Pic above I need to create 2 Compass like dials both sides of the periscope.

It copies the same principle as the Compass Bearing Dial found in the Attack scope etc.
But without a left/right linear dial in the dial.cfg menu I don't know how to get it to rotate properly. (As I said I've got it to rotate up/down but not left/right when configured as a linear dial ).

The concept is sound and will work if there is a method to rotate left/right like the hardcoded compass.

Last edited by reaper7; 04-16-11 at 08:38 AM.
reaper7 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 06:10 AM.


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