![]() |
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. |
It's not sticky maybe because is another tutorial dealing with the same thing made by karamazovnew here
Anyway.. I agree, all TEC and tutorial should be sticky as every bit of info about moding is important. |
Quote:
|
This is great!! :yeah:Thank you for the tutorials!
|
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++. |
Try dropping a message in Reaper7's PM box :03:
|
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... |
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) |
Quote:
Thanks. |
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.
|
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.
|
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 :oops: |
All times are GMT -5. The time now is 10:58 PM. |
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.