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)
-   -   [TEC] Mod Tools, HowTo (https://www.subsim.com/radioroom/showthread.php?t=162702)

Chebawookee 03-13-10 04:11 AM

Oh I see, I never tried it with an unedited file.

gutted 03-13-10 04:36 AM

Apparantly its working now. go figure. I didn't do anything different.

jimimadrid 03-13-10 08:20 AM

Quote:

Originally Posted by gutted (Post 1312444)
What am i doing wrong?

I've enabled the modding stuff in the main.cfg. I'm running windowed mode... yet all the items are greyed out. How can i access the script manager?

I have had the same problem. Read here.

Quote:

Originally Posted by maerean_m (Post 1297490)
That happens because you right-clicked the task-bar button while the game was loading, during which it doesn't process the messages from the OS. So when Windows asks which options are enabled, it doesn't get an answer in a timely manner so it disables all of them.

In short (as specified in the 'big' post), right-click on task-bar only when there is no loading bar on the screen.
I know you may get impatient with all the loading times, but let the game do its job when it's loading (and don't touch the mouse :))


Therion_Prime 03-13-10 08:46 AM

Quote:

Originally Posted by TheDarkWraith (Post 1312049)
the 'logic' lives in the page's .py file. For example:

you add a button to Pagelayout_Groupfeedback. Now to 'handle' that button you need to open up \data\Scripts\Menu\Page layout.py and add the necessary code to handle click events, mouse in/out, etc.

Thanks, but I don't get it.

For example where is the code for "Page XO_TDC_Dialog.ini" ? :hmmm:

gutted 03-13-10 11:18 AM

Quote:

Originally Posted by jimimadrid (Post 1312752)
I have had the same problem. Read here.

I had already read that and followed it to the T.

Decoman 03-13-10 01:01 PM

Quote:

Originally Posted by Ablemaster (Post 1310407)
Wondered if someone could point me in the right direction, now i have Vista 64 bit i cant find an DDS converter to work with it ive looked everywhere all the usuall ones dont work correctly with Vista 64 so now im a bit stumped here. DDS Converter was fine with my old xp rig but now im lost, ive got photoshop cs4 also but no joy there, any help appreciated.

Nvidia has a .dds photoshop plugin that works with 32bit photoshop.

I can open dds files, but when I tried saving as dds it wouldn't allow me for unknown reason. So I use TheCompressonator instead for saving to .dds file format.

I have been doing this so far:
a) Load dds file into photoshop and rework the image
b) Save as Tif
c) Load tif into Ati's "TheCompressonator" (32bit and 64bit software) and do "save as original = save as" to store file as dds file.
d) I preview dds files in windows with TheCompressonator.

When viewing dds files in TheCompressonator, make sure to right click the image and switch to RGBA if the file has an alpha channel, or stick with default RGB if the file has no alpha channel. Right clicking the image offer three modes. RGB, RGBA & Alpha.

http://developer.nvidia.com/object/p...s_plugins.html (I think this is the phtososhp plugin)
http://ati.amd.com/developer/compressonator.html

TheCompressonator is available if one register on Amd/Ati's developer website, no confirmation email is even required. Just register and you can download their tools.

TheDarkWraith 03-13-10 02:06 PM

Quote:

Originally Posted by Decoman (Post 1313159)
Nvidia has a .dds photoshop plugin that works with 32bit photoshop.

I can open dds files, but when I tried saving as dds it wouldn't allow me for unknown reason. So I use TheCompressonator instead for saving to .dds file format.

I have been doing this so far:
a) Load dds file into photoshop and rework the image
b) Save as Tif
c) Load tif into Ati's "TheCompressonator" (32bit and 64bit software) and do "save as original = save as" to store file as dds file.
d) I preview dds files in windows with TheCompressonator.

When viewing dds files in TheCompressonator, make sure to right click the image and switch to RGBA if the file has an alpha channel, or stick with default RGB if the file has no alpha channel. Right clicking the image offer three modes. RGB, RGBA & Alpha.

http://developer.nvidia.com/object/p...s_plugins.html (I think this is the phtososhp plugin)
http://ati.amd.com/developer/compressonator.html

TheCompressonator is available if one register on Amd/Ati's developer website, no confirmation email is even required. Just register and you can download their tools.

do a google search for: dds_converter_v21.exe. Great program! :up:

Also if you use Photoshop CS4 64bit the nVidia DDS plug-ins don't work (bug with 64 bit version) but they do work with the 32 bit version which sucks for me since I have the 64 bit version.

skwasjer 03-13-10 06:18 PM

@maerean_m, is there a way to have completely 'new' .py scripts to autoload when the game starts, without the need to hook into a stock .py file and calling "MakeSureIsLoaded( MenuPageWrapper.InitializeScript.Now )" (I have made a blank/empty Page in menu editor). I have completely isolated functionality and would like to be able to install my mod without overwriting a stock file (which could potentially conflict with other mods).

TheDarkWraith 03-13-10 07:12 PM

Quote:

Originally Posted by skwasjer (Post 1313755)
@maerean_m, is there a way to have completely 'new' .py scripts to autoload when the game starts, without the need to hook into a stock .py file and calling "MakeSureIsLoaded( MenuPageWrapper.InitializeScript.Now )" (I have made a blank/empty Page in menu editor). I have completely isolated functionality and would like to be able to install my mod without overwriting a stock file (which could potentially conflict with other mods).

import it. In the Page Default Hud.py file add a line in InitializeScript:

from xxx import xxx
where xxx = name of page (i.e. Pageobsperiscope).
Oh you're probably wanting to have the game automatically import a new Page without having to use import huh?

skwasjer 03-13-10 07:45 PM

Ya ;)

I really don't want to distribute a new Page Default Hud.py file for just one new line, when all of my code is in a seperate .py file and a DLL ;)

Currently I hooked via Page Background.py which is empty. But still, others may want to do so too, and then there's the drama of merging scripts. Being able to just dump a file in a folder and have it's initializer called would be alot easier for us...


[edit] Oh and import doesn't do the same thing as my little script above, I also need to invoke the script to run (at least, it doesn't work without it). Yea, I want an autoload folder of some sorts...

Currently my Page background.py file only does this... note, this is only to run the entire script in another file 'MyModule.py'. The target script does nothing UI related...

Code:

from MyModule import MyModule
 
def InitializeScript():
 MyModule.MakeSureIsLoaded( MenuPageWrapper.InitializeScript.Now )
 
def StartGame():
 pass
 
def EndGame():
 pass
 
def UnloadScript():
 pass

Really wish this wouldn't be necessary...

Vorkapitan 03-14-10 08:22 PM

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!

skwasjer 03-14-10 09:01 PM

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...

Vorkapitan 03-14-10 09:31 PM

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.

gutted 03-15-10 02:50 AM

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.

reaper7 03-15-10 10:07 AM

Hi Gutted are you trying to port the AoB calculator into SH5. Nice good luck with it. :up:

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 :|\\


All times are GMT -5. The time now is 02:08 PM.

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