SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [REL] Multiple UIs for SH5 with TDC (https://www.subsim.com/radioroom/showthread.php?t=166093)

Choum 05-04-13 04:00 AM

Thanks fifi.

So there's no button to validate a ship directly from the TDW manual identification. :(

Moebius 05-04-13 01:18 PM

Independent Engine Controls.
 
So, I've D/Led and installed a reasonably good Mod Soup including IRAI, Stormys Sounds, OHII, Steelvikings Interior, Dynamic Weather, UHS and NewUi 7.3.

In the options editor I found "Independent Engine Controls" and activated same.

Now, what are the limitations on these?

I ask cos at the moment I am cruising, in thickish fog, about 500m off Danzig Port, with decks awash @ 6-6.5m (Any deeper and the electrics kick in) with Diesels RUNNING doing approx 4 knots cos there's still at least 3 A class & V&W class Destroyers out there in the fog and 4 knots is reasonably "rigged for silent" on the surface, it seems. (Certainly if I go above 6 knots the escorts hear me and come looking)


What I want to do is have one shaft running at 4 knots ie One Third Ahead and have the other spinning at Flank Speed (if the enemy doesn't hear it) CHARGING my Battery . . . .

Can this be done? Do I have to be 'surfaced' to do so? (The 'Recharge' icon flickers between White and Grey with 'Decks Awash')

Also, in options editor, I can't set a Hotkey for the Engines. I know I'm supposed to double-click the Hotkey 'heading' but nothing happens . . . .

Thanks in advance for your help X

TheDarkWraith 05-04-13 05:14 PM

Quote:

Originally Posted by Moebius (Post 2051333)
So, I've D/Led and installed a reasonably good Mod Soup including IRAI, Stormys Sounds, OHII, Steelvikings Interior, Dynamic Weather, UHS and NewUi 7.3.

In the options editor I found "Independent Engine Controls" and activated same.

Now, what are the limitations on these?

I ask cos at the moment I am cruising, in thickish fog, about 500m off Danzig Port, with decks awash @ 6-6.5m (Any deeper and the electrics kick in) with Diesels RUNNING doing approx 4 knots cos there's still at least 3 A class & V&W class Destroyers out there in the fog and 4 knots is reasonably "rigged for silent" on the surface, it seems. (Certainly if I go above 6 knots the escorts hear me and come looking)


What I want to do is have one shaft running at 4 knots ie One Third Ahead and have the other spinning at Flank Speed (if the enemy doesn't hear it) CHARGING my Battery . . . .

Can this be done? Do I have to be 'surfaced' to do so? (The 'Recharge' icon flickers between White and Grey with 'Decks Awash')

Also, in options editor, I can't set a Hotkey for the Engines. I know I'm supposed to double-click the Hotkey 'heading' but nothing happens . . . .

Thanks in advance for your help X

What you want to do is possible. Selecting recharge batteries from the Engineer officer will cause one of the shafts to rotate freely and the diesel engine ramp up to full speed and recharge batteries. If the Recharge icon is flickering then I need to look at the decks awash patch again :up:

TheDarkWraith 05-04-13 05:19 PM

Quote:

Originally Posted by SkyBaron (Post 2048890)
I'm trying to make a mod to play a sound based on text from the messagebox. I was able to do it by inserting a couple of lines on Page Default Hud.py inside Game_NewLogMessage with this code:

Code:

  if entrytext.StartsWith(  Menu.GetLocalizedText( MENU_MESSAGE ) ):
            GetTDWSound().PlaySound( GetSH5InstallPath() + "\\data\\Sound\\MY_SOUND.wav", 0.8 )

This works fine but how do I make an independent .py file just for this mod? How do I tell SH5 to run the .py I made? I have some C# experience but as you can see I'm new to python scripting. The library I mentioned that I need to use is obviously TDWSound.dll, unless there's another method to do this.

You can use the intrinsic function Menu.PlaySound() but you need to register the sound file with the sdl file of the game (\data\Sound). Making independent py files for the game isn't that complicated but it does take some work. Look over how I did it with the file TheDarkWraithUserOptions.py (and .ini). You'll need to add new entries to the main menu file also which will break compatibility with most UI mods :-?

SkyBaron 05-04-13 07:55 PM

Quote:

Originally Posted by TheDarkWraith (Post 2051470)
You can use the intrinsic function Menu.PlaySound() but you need to register the sound file with the sdl file of the game (\data\Sound). Making independent py files for the game isn't that complicated but it does take some work. Look over how I did it with the file TheDarkWraithUserOptions.py (and .ini). You'll need to add new entries to the main menu file also which will break compatibility with most UI mods :-?

Thanks for the tips! I'll take a look on those.
I hope someday you'll have time to do a small "Hello World" tutorial on SH5 scripting(I don't mean just Python, but how scripting/menu/etc fit together) it would help a lot of people, well at least me! :haha:


EDIT: I finally figured out how to do it. Never thought of looking at the .ini files, that was the problem. Now when I try to use Menu.PlaySound("sh.sdl sound name") I get this error:

http://i44.tinypic.com/33e3jvs.jpg

If I use GetTDWSound().PlaySound everything works fine. Since I will probably make this compatible with the NewUI only, I'd rather use your sound library to avoid compatibility issues with some other mod's sh.sdl. :up:

TheDarkWraith 05-04-13 11:10 PM

Quote:

Originally Posted by SkyBaron (Post 2051519)
EDIT: I finally figured out how to do it. Never thought of looking at the .ini files, that was the problem. Now when I try to use Menu.PlaySound("sh.sdl sound name") I get this error:

If I use GetTDWSound().PlaySound everything works fine. Since I will probably make this compatible with the NewUI only, I'd rather use your sound library to avoid compatibility issues with some other mod's sh.sdl. :up:

You'd have to send me your files so I can see what you did to get the error. Did you add the required entry(ies) in the Sh.sdl file?

Of course my library function will work! It doesn't depend on the game in any way! I play sounds through my own method that doesn't require them to be registered with Sh.sdl :cool:

The only problem with trying to make something compatible with my files is you'll have to update them everytime I change a file you used. A real PITA! It's best to create your own .py and .ini file and add the required entry(ies) to the main menu file and then hook into the game messages so you can play your sound when a message comes you are looking for :yep:

gustlik87 05-04-13 11:44 PM

A little off-topic. I want to thank you TheDarkWraith for this mod. It is awesome... :)

SkyBaron 05-05-13 08:57 AM

Quote:

Originally Posted by TheDarkWraith (Post 2051557)
You'd have to send me your files so I can see what you did to get the error. Did you add the required entry(ies) in the Sh.sdl file?

yes, I'm sure I included the sh.sdl entry. Here are the files I changed for testing:

http://www.mediafire.com/?137hu28niodjjec

In MyScript.py if you uncomment Menu.PlaySound and comment TDWSound() I get that error message.

By the way, on Menu.py I added lines 28-29 to import my script. Maybe it's not the ideal place for that.

Thanks for the help TDW! :)

Vaudevillian 05-05-13 02:21 PM

I'm new to modding, so I apologize if this question is a bit too simplistic, but- how do I re-enable the ability to plot my course using the little circle icon on the map? I've seen the Nav options menu on the map, with all the checkboxes, but the ability to "activate waypoint tool when sub is clicked," along with a lot of other options, is grayed out. Is it something I configured, or..?

volodya61 05-05-13 02:49 PM

Disable NewUIs Real Navigation mod..

shamuboy1 05-05-13 03:00 PM

Okay so I installed the mod... but still has the SH5 style controls. I'm used to "[ and ]" turning 40 degrees to port. I don't really understand why it's not working. I must not be doing something right... :wah::/\\!!

Vaudevillian 05-05-13 05:43 PM

Thank you, Volodya!

Fifi 05-05-13 08:24 PM

Quote:

Originally Posted by shamuboy1 (Post 2051856)
Okay so I installed the mod... but still has the SH5 style controls. I'm used to "[ and ]" turning 40 degrees to port. I don't really understand why it's not working. I must not be doing something right... :wah::/\\!!

For others SH dials (like SH4/3) you have to run the application called fileviewer inside NewUIs and change the UI style.
Changes has to be made mod deactivated.

Vaudevillian 05-06-13 02:33 PM

Actually, my problem wasn't solved. I disabled all mods other than NewUIs by TheDarkWraith, the main one, and a good deal of the options for the Nav Map are still grayed out. I started a new game in case the changes wouldn't alter my save files, but that didn't seem to work, either. Is it something I'm doing?

TheDarkWraith 05-06-13 02:36 PM

Quote:

Originally Posted by Vaudevillian (Post 2052245)
Actually, my problem wasn't solved. I disabled all mods other than NewUIs by TheDarkWraith, the main one, and a good deal of the options for the Nav Map are still grayed out. I started a new game in case the changes wouldn't alter my save files, but that didn't seem to work, either. Is it something I'm doing?

Can you post a screenshot to see what the problem is you're having :06:


All times are GMT -5. The time now is 06:50 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.