SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
03-12-10, 01:15 AM | #1 | |
Captain
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
|
Quote:
__________________
Kilroy was here |
|
03-12-10, 01:16 AM | #2 | |||
Captain
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
|
Quote:
__________________
Kilroy was here |
|||
03-13-10, 06:18 PM | #3 |
The Old Man
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
|
@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).
__________________
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-13-10, 07:12 PM | #4 | |
Black Magic
|
Quote:
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? |
|
03-13-10, 07:45 PM | #5 |
The Old Man
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
|
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
__________________
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 Last edited by skwasjer; 03-13-10 at 08:00 PM. |
03-12-10, 01:27 AM | #6 | |
Black Magic
|
Quote:
explain what you mean by a dummy 3D object. I've seen these before in SH3/4 but never really understood what they were for. |
|
03-12-10, 01:54 AM | #7 | ||
Captain
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
|
Quote:
The Z order is the one from the tree you see in the menu editor. If you want to bring a page closer to the player, drag it down in that tree. The Z order is saved in data\Menu\Pages\menu_1024_768.ini (so you include that file too in your mod). The menu items also have methods for the z-order: MakeSureIsBehindOfZOrder, MakeSureInFrontOfZOrder, SendToBackZOrder and BringToFrontZOrder. BringToFrontZOrder must NOT be used on menu pages (will cause BIG bugs). Mihai
__________________
Kilroy was here |
||
03-12-10, 01:59 AM | #8 | |
Captain
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
|
Quote:
For you, it means you need to find an already existing dummy object on sub's hierarchy (there are plenty of those) and attach your controller to it.
__________________
Kilroy was here |
|
|
|