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

Reply
 
Thread Tools Display Modes
Old 06-01-12, 07:38 AM   #1
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

This is amazing, well done - this is one thing I solely missed making my UI .
Wii add this to my UI Ui-boat V5.

Ps The RAOBF are from my Ui-Boat V5 and also HAHD U-Boot_HAHD
Nice to see it working the way I always dreamed it to work

Last edited by reaper7; 06-01-12 at 07:48 AM.
reaper7 is offline   Reply With Quote
Old 06-01-12, 09:44 AM   #2
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Thanks, reaper7! I was beginning to think nobody's interested

I still have to insist that this RAOBF I took from CSP MaGui by dr. Jones I've taken it to make that example video just for my own sake: it's basically two images (there's more in total, but actual tool is just that), so there wasn't a lot input areas to calculate.

See the outer ring: it has this metallic rod thing at 8 o'clock, and a plastic 'cover' with red mark at 1 o'clock. These actually (I guess) should block the input to the inner ring (they are a part of the outer ring after all), but as of now such fancy stuff is not possible to do without adding (dummy) items, as I encountered some issues with overlapping input areas inside one UI item (I'll investigate a bit more and update the first post accordingly). IIRC, in your mod the plastic markers are in a separate image, so this should not pose any problems at all.

PS.
I beleive I've also answered your PM, but right now my 'sent items' box is empty. I only guess it's due to ongoing maintenance, so I'll wait and see if it pops up.
radcapricorn is offline   Reply With Quote
Old 06-01-12, 12:02 PM   #3
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Hi radcapricorn

I have just watched your vid for the mouse control and it looks great

With the download, if I am using TDWs UI and install the .dll in Sh5 main dir and the .py script in the script/menu file - will i be able to control the RAOBF and attack disc as you did in the vid
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 06-01-12, 01:16 PM   #4
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Thanks, Trevally!

Quote:
Originally Posted by Trevally
With the download, if I am using TDWs UI and install the .dll in Sh5 main dir and the .py script in the script/menu file - will i be able to control the RAOBF and attack disc as you did in the vid
Not per se, no. This is not that automated The sample .py script is just that - sample (though the touchpad areas defined for the attack disc there are for the attack disc from TDW's UI). I've extracted it from my UI test page script. You'll need to actually add some code to TDW's scripts to use the functionality. One way is to copy/paste that code into TDW's Page TDC.py (IIRC the Attack Disc in TDW's UI is located at TDC page) and add proper initialization/cleanup to InitializeScript()/UnloadScript() functions.
For example, here's how I do it in my test page (simplified code off the top of my head):

Code:
# File scripts/menu/pages/Page_Test1.py

# The following is the contents of the sample script

import clr
clr.AddReference("RadCapTools")
from RadCapTools import InputCanvas

class AttackDisc( object ):
# The definition of the attack disc from the sample script follows
# ...

# The contents of sample script end here

# global variable to store the attack disc input handler
g_AttackDisc = None

def InitializeScript():

    compassRose = Page_Test1_AttackDisc_Front_CompassRose
    bearingLead = Page_Test1_AttackDisc_Front_BearingLeadAngle
    targetDisc = Page_Test1_AttackDisc_Front_TargetDisc
    attackCourse = Page_Test1_AttackDisc_Front_AttackCourse

    # Create the attack disc input handler
    global g_AttackDisc
    g_AttackDisc = AttackDisc(compassRose, bearingLead, targetDisc, attackCourse)

# Some more code skipped...

def UnloadScript():
    # Destroy the attack disc input handler
    global g_AttackDisc
    if g_AttackDisc:
        g_AttackDisc.dispose()
    g_AttackDisc = None
That'd roughly be the modification to TDW's scripts/menu/pages/Page TDC.py.
Now, those Page_Test1_AttackDisc_Front_* names are for my UI page. For TDW's, you'll have to look at data/menu/pages/Page TDC.ini to figure out proper names.

I think I may have to write a more detailed instructions on what to do, but that'll be later once I'm at my SH5 rig and have an actual UI mod files to use for illustration.

Oh, yeah, and a follow-up:
In the first post, I mentioned the issues with rotation if the textures are not square. Some original attack disc textures from TDW's UI are not square so I had to edit them accordingly (this required resizing them in GIMP and making changes in SH5 Menu Editor). Anyway, excpect an update with proper instructions in an hour or so.

Last edited by radcapricorn; 06-01-12 at 01:49 PM. Reason: Follow-up on rotations
radcapricorn is offline   Reply With Quote
Old 06-01-12, 01:56 PM   #5
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Thanks radcapricorn
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 06-01-12, 05:57 PM   #6
radcapricorn
Helmsman
 
Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
Default

Post #2 is updated with a small how-to.
radcapricorn is offline   Reply With Quote
Old 06-02-12, 05:14 AM   #7
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by radcapricorn View Post
That's pretty much it.

great tutorial



Quote:
If I get permission from TheDarkWraith to post changes to his scripts, I'll show you how you can use that sample python module to actually control attack disc in TDW's UI. I've actually already tested that code with his UI (since I already have touchpad areas calculated for that attack disc) and I must say it works perfectly.

For any other objects (RAOBFs, 3-bearing tools and whatnot) you'll have to wait until I've finished my calculator app: I'm done with manual calculations
Fingers crossed

Quote:
Wow, that took a lot more time than I expected. But that's not all. Stay tuned
__________________
Trevally Mods for SH5
Trevally. 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 11:53 PM.


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.