SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
03-01-10, 06:11 PM | #1 | |
Eternal Patrol
|
Quote:
Your post was made at 0755 my time, so people here were just getting up. The reason this thread was so dead was because everyone was asleep.
__________________
“Never do anything you can't take back.” —Rocky Russo |
|
03-03-10, 06:09 PM | #2 |
Commodore
Join Date: Mar 2005
Location: France
Posts: 614
Downloads: 60
Uploads: 0
|
tools for modders right out of the box! big suprise indeed! can't wait to try them out
awesome news |
03-14-10, 08:22 PM | #3 |
Samurai Navy
Join Date: May 2006
Posts: 594
Downloads: 1367
Uploads: 0
|
How to edit .py files
Hi Mates,
I'm trying to edit "Page Default Hud.py". What tools do I use? I'm currently in the "menu editor" but can't find a reference to this file anywhere. Thank you!
__________________
__________________________________________________ ________ __________________________________________________ ________ Joe |
03-14-10, 09:01 PM | #4 |
The Old Man
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
|
You can edit the scripts via the Script editor. Run the game in a window, then right click on the title bar to start the editor (one of the menu items). Each time you save the script it is reloaded so it's easy to test...
__________________
SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
03-14-10, 09:31 PM | #5 |
Samurai Navy
Join Date: May 2006
Posts: 594
Downloads: 1367
Uploads: 0
|
Sywasjer,
I was trying do do this "Open up Silent Hunter 5\data\scripts\menu\Page Default Hud.py Search for: def SetMiniMap( boolvalue ): Look down a few lines and change these values to True: Code: PageDefaultHud_MapGroup_ParallelCourseButton.Visib le = False PageDefaultHud_MapGroup_InterceptCourseButton.Visi ble = FalseThat's it." I can't find it/or the method to do it. Thanks for the info.
__________________
__________________________________________________ ________ __________________________________________________ ________ Joe |
03-15-10, 02:50 AM | #6 |
The Old Man
Join Date: Apr 2005
Location: New Orleans, LA.
Posts: 1,353
Downloads: 470
Uploads: 10
|
I'm sorta lost.
I was looking to add a thing or two into the UI. As a alittle "test" for myself i was just gonna do something simple like put an image onto the TDC page, and i was gonna have it rotate with the scope. Well I THOUGHT it would be pretty easy, as i have the mod that enables the TDC dials (by DarkWraith).. and i could just look at how the bearing dial works by peeking in the files that came with the mod. No Joy. I've got the graphic showing in-game no problem using the menu editor. But looking through the files that came with the TDC mod.. i just dont see where the bearing dial's hand is tied to the scope anywhere. I've looked through the .ini files, i've looked at the relevant scripts.. and i just dont see it. If i could figure this one example out, it would go a long way to understanding how the UI modding works. |
03-15-10, 10:07 AM | #7 |
sim2reality
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
Hi Gutted are you trying to port the AoB calculator into SH5. Nice good luck with it.
Being going over this thread trying to figure out how to mod stuff into the UI, but its all gone over my head. Maybe someone like a Dev or TheDarkWraith (No1 in UI mods to date) could do up a bacic tutorial on say getting in a custom dial and tying it into the interface. Hint hint... Please Last edited by reaper7; 03-15-10 at 10:44 AM. |
03-15-10, 11:48 AM | #8 |
The Old Man
Join Date: Apr 2005
Location: New Orleans, LA.
Posts: 1,353
Downloads: 470
Uploads: 10
|
I eventually intend to do that if i haven't given up on UI modding by then LOL.
Right now im just trying to figure it out, and see if i can get something spinning on the screen. |
03-15-10, 11:49 AM | #9 |
Sailor man
Join Date: Mar 2007
Posts: 46
Downloads: 6
Uploads: 0
|
These have obviously been left in by the devs - i personally dont think its a mistake by them - perhaps they where pissed with UBI soft aswell lol.
SH5 may have lots of bugs and many have moaned about its problems but to have access like this to a game is worth every penny i paid for it. It has huge possiblities to the point where previous versions of Silent Hunter could be added to the game, i wonder how long it will be before some of the excellent modders here port over SH4 uboat missions lol Perhaps SH5 will be the last in the series - but look what they have given us, all we need now is to get rid of the DRM! |
03-20-10, 05:41 PM | #10 |
Ace of the Deep
Join Date: Jan 2007
Location: at periscope depth
Posts: 1,204
Downloads: 97
Uploads: 0
|
I want to deepen me into modding. I want to make dutch navy ships.
Maybe this is the beginning.
__________________
|
02-15-11, 03:42 PM | #11 |
Grey Wolf
Join Date: Jan 2011
Location: greece
Posts: 820
Downloads: 488
Uploads: 0
|
well i guess i have to wait until a playble battleship builds.....since i cant do it because no one helps:/
|
03-25-11, 04:16 AM | #12 |
Sparky
Join Date: Apr 2010
Location: Germany
Posts: 157
Downloads: 270
Uploads: 2
|
Problem triggering action with new button!
Hello! I hope it's the right place to ask, but I've got a problem triggering an action from a new checkbox. Maybe someone can help? Here the situation: To toggle SpeechRecognition on/off I created a new checkbox with the MenuEditor. Located above the PageDefaultHud_Feedback_BottomBar_ToggleAdvancedCk (NewUI) It's showing ingame and I can click it. The coressponding Lines in Page Default Hud.ini look like this: Code:
[G0A I278] Name=ToggleSpeechRecCk Type=1033;Check box ItemID=0xA1E0001 ParentID=0xA1E0000 Pos=253,-4,18,20 Zone= 255 46 18 20 0 1 0xA1E0000 0.952727 -0.29 0xA1E0001 -0.5 0.5 0 0 Materials=8 Display=2;Linear Mat 0=data/menu/gui/layout/hud3.dds Crop 0=0.178711,0.105469,0.0175781,0.0195313 Mat 1=data/menu/gui/layout/hud3.dds Crop 1=0.178711,0.128906,0.0175781,0.0195313 Mat 2=data/menu/gui/layout/hud3.dds Crop 2=0.178711,0.105469,0.0175781,0.0195313 Mat 3=data/menu/gui/layout/hud3.dds Crop 3=0.178711,0.128906,0.0175781,0.0195313 Mat 4=data/menu/gui/layout/hud3.dds Crop 4=0.178711,0.105469,0.0175781,0.0195313 Mat 5=data/menu/gui/layout/hud3.dds Crop 5=0.178711,0.128906,0.0175781,0.0195313 Mat 6=data/menu/gui/layout/hud3.dds Crop 6=0.178711,0.105469,0.0175781,0.0195313 Mat 7=data/menu/gui/layout/hud3.dds Crop 7=0.178711,0.128906,0.0175781,0.0195313 MatFlags=0x9 TexFmt=0x0 Font=21 Text=0 TextPosFlags=0x2 TextOffsetY=8,8,8,8 TextFlags=0x0 CheckBoxWidth=0 StatesColors=0xCDBEB4FF, 0xCDBEB4FF, 0xCDBEB4FF, 0xCDBEB4FF Code:
from SpeechRecognition import ToggleSpeechRecognitionOnOff ... def PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked(): ToggleSpeechRecognitionOnOff() ... def InitializeScript(): .... PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk.Clicked += PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked ... def UnloadScript(): ... PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk.Clicked -= PageDefaultHud_Feedback_BottomBar_ToggleSpeechRecCk_Clicked So what went wrong importing Speech Recognition.py??? Called from Speech Recognition.py the command is working like expected! What's the minimum of code needed for a new button like this? What did I miss? What would be needed if I wan't to add a new group? Thanks in advance! Greets MiTon Last edited by MiTon; 03-25-11 at 05:08 AM. |
03-25-11, 09:00 AM | #13 |
Black Magic
|
If SpeechRecognition hasn't been 'opened' yet then it isn't initialized/valid. You must initialize it first either by opening it or using the MakeSureIsLoaded function of the ScriptManager.
Last edited by TheDarkWraith; 03-25-11 at 09:13 AM. |
03-25-11, 12:35 PM | #14 |
Sparky
Join Date: Apr 2010
Location: Germany
Posts: 157
Downloads: 270
Uploads: 2
|
Thx for sharing your knowledge TDW!
It's realy appreciated! Sorry for these dumb questions! Have been awake for over 30 hours, so concentration dropped quite low But I think I'm making slow but steady progress understanding Python and SH5 internals I may be misunderstanding, but since SpeechRecognition is started by the initScript it should be initialized from start, cause I can use it "out of the box". See here: Code:
def InitializeScript(): if SHSpeechEngine.IsSupported: global speech Game.SubmarineCommands.CommandWasGiven += test_CommandGiven Game.SubmarineCommands.DelayedCommandWasGiven += test_DelayedCommandGiven try: if speech == None: speech = SHSpeechEngine("de-DE") speech.Confidence = 0.70 speech.OrderReceived += speech_OrderReceived speech.Start() except: pass Code:
from SpeechRecognition import SpeechRecognition SpeechRecognition.Visible = True The name sounds promissing, already. Will give it a try! I have an other question related to the MenuEditor! Under "Item text" you can find a dropdow list for localized strings, which seems to read menu.txt. I added my strings there but they don't show up in the dropdownlist? Is there an other place to define those strings or do I have to set them through Code:
SpeechRecognition_SpeechRecognitionSettings_ConfidenceLevelText.Text = "TEST" Could be a strange bug since I'm having an other issue, as you can read in my post to NewUI: http://www.subsim.com/radioroom/show...postcount=6956 Thx again! Last edited by MiTon; 03-25-11 at 01:55 PM. |
04-04-11, 12:43 PM | #15 |
Sparky
Join Date: Apr 2010
Location: Germany
Posts: 157
Downloads: 270
Uploads: 2
|
Way to make use of python standard API??
Hi there!
How can I import standard python modules? They don't seem to be available in the ScriptManager. Is there a way? For example, I'd like to use this: Code:
import os.path from os.path import abspath as abspath regards MiTon |
|
|