![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#16 |
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44´N 129°40´E
Posts: 665
Downloads: 124
Uploads: 7
|
![]()
I don't understand why this thread isn't sticky? I have long used the search, when accidentally discovered this thread. I think this is an important thread. Here I learned a lot about tools for SH5. Prior to that, once again had to worry modders and tear them away from important matters
Thank's for this tutorial.
__________________
Speed squadron is the speed of the slowest ship ... but only so long as on the trail of the squadron did not sit submarines ... ![]() Last edited by Obelix; 11-10-10 at 11:26 PM. |
![]() |
![]() |
![]() |
#18 | |
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44´N 129°40´E
Posts: 665
Downloads: 124
Uploads: 7
|
![]() Quote:
![]()
__________________
Speed squadron is the speed of the slowest ship ... but only so long as on the trail of the squadron did not sit submarines ... ![]() |
|
![]() |
![]() |
![]() |
#19 |
A-ganger
![]() Join Date: Oct 2010
Posts: 73
Downloads: 55
Uploads: 0
|
![]()
This is great!!
![]() |
![]() |
![]() |
![]() |
#20 |
Seasoned Skipper
![]() Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
|
![]()
Does anyone have the original files still?
Im trying to make my own TDC and running into syntax problems with the .py scripts. Im using notepad++ and checking and double checking but alas, I keep having problems with the script to call a basic TDC page on the attack periscope.... Any help would be appreciated. I've removed every space, checked tabs and it all looks fine in notepad++. |
![]() |
![]() |
![]() |
#21 |
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]()
Try dropping a message in Reaper7's PM box
![]() |
![]() |
![]() |
![]() |
#22 |
Seasoned Skipper
![]() Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
|
![]()
Tracked down in debugger to line15 column 1, looked at some other scripts and figured it out.
# Globals ShowTDC = True #Page attack periscope.py from menu import * def InitializeScript(): [TAB] Menu.PageActivated += Menu_PageActivated [TAB] Menu.PageDeactivated += Menu_PageDeactivated [TAB] Menu_PageActivated( Pageattackperiscope ) def StartGame(): [TAB] pass def Menu_PageActivated( page ): [TAB] if page == Pageattackperiscope: [TAB] [TAB] global ShowTDC [TAB] if ShowTDC: [TAB] [TAB] from PageTDC import PageTDC [TAB] [TAB] PageTDC.Visible = True def Menu_PageDeactivated( page ): [TAB] if page == Pageattackperiscope: [TAB] [TAB] global ShowTDC [TAB] if ShowTDC: [TAB] [TAB] from PageTDC import PageTDC [TAB] [TAB] PageTDC.Visible = False def EndGame(): [TAB] pass def UnloadScript(): [TAB] Menu.PageActivated -= Menu_PageActivated [TAB] Menu.PageDeactivated -= Menu_PageDeactivated should globals be double "tabbed"? it works now but then the TDC stays when I exit station the indentations listed in the tutorial seem wrong to me... Last edited by Jace11; 05-05-13 at 05:36 PM. |
![]() |
![]() |
![]() |
#23 |
Black Magic
![]() |
![]()
the python file layout controls flow of execution. If something is tabbed more or tabbed less than it should be the python execution engine will throw an error. Your example above would throw an error. If the global ___ is to be part of the function block then it needs to be tabbed the same as the function block.
If you've done any coding in C++ or C# think of the tabs as {}s. Think of the : as function header C#: private void myfunction(int a, float b) { a = Convert.ToInt32(b); } In python: def myfunction(a, b): [TAB]a = Convert.ToInt32(b) Last edited by TheDarkWraith; 05-06-13 at 03:03 PM. |
![]() |
![]() |
![]() |
#24 | |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() Quote:
Thanks. |
|
![]() |
![]() |
#25 |
Black Magic
![]() |
![]()
check your \documents\sh5\data\cfg\main.cfg file. There a header called Modding. There's an entry called MenuEditor. This needs to be set to true.
|
![]() |
![]() |
![]() |
#26 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Got it thanks. Wow, you guys have it easy over here with menu edits. I was hoping it was an external .exe file that I could use in sh3 as well.
|
![]() |
![]() |
#27 |
Nub
![]() Join Date: May 2016
Posts: 3
Downloads: 19
Uploads: 0
|
![]()
Hi!
I`m trying to find as much information on modding SH as possible. This thread is very interresting to me. But the links to the .pdf and archive seems to be broken ( I would be very grateful if you could share these files. P.S. Sorry for my English ![]() |
![]() |
![]() |
![]() |
Tags |
dials, editor, scripting, tutorial |
|
|