SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-30-10, 05:15 AM   #1
ACSoft
Soundman
 
Join Date: Mar 2005
Location: Switzerland
Posts: 149
Downloads: 57
Uploads: 0
Default

Quote:
Originally Posted by Heretic View Post
Weird isn't it? It's the only command I've found that the sequence makes a difference.
Yes, crazy stuff ! Most probably something weak inside the script interpreter engine. I bet for something "time critical".

By the way, did you found a way to tweak the timing for the guys to go down ?

Another question: Is-it possible to tie your normal dive behavior to the dive command given through a direct mouse click on the deep-meter ?

ACS
ACSoft is offline   Reply With Quote
Old 03-30-10, 08:44 AM   #2
Heretic
Commodore
 
Join Date: Mar 2005
Location: Nebraska
Posts: 617
Downloads: 240
Uploads: 2


Default

Quote:
Originally Posted by ACSoft View Post
Yes, crazy stuff ! Most probably something weak inside the script interpreter engine. I bet for something "time critical".

By the way, did you found a way to tweak the timing for the guys to go down ?

Another question: Is-it possible to tie your normal dive behavior to the dive command given through a direct mouse click on the deep-meter ?

ACS
Clicking the depth gauge triggers the set_depth command. I can script it to do anything I want. The trouble is I don't know which direction the depth change is so I just have some hydroplane orders. Even if the boat is on the surface, I can't assume that a depth change is a dive since you could be clicking on 0 depth or something.

As far as getting the crew down before it goes under. The only way I 've thought of is to move the crash_dive command down futher in the sequence, delaying the dive. Dunno if that's an appropriate thing for this mod to be doing tho.
Heretic is offline   Reply With Quote
Old 03-30-10, 09:22 AM   #3
Thresher
Sailor man
 
Join Date: Apr 2006
Location: New Mexico, USA
Posts: 46
Downloads: 20
Uploads: 0
Default

Quote:
Originally Posted by Heretic View Post
Clicking the depth gauge triggers the set_depth command. I can script it to do anything I want. The trouble is I don't know which direction the depth change is so I just have some hydroplane orders. Even if the boat is on the surface, I can't assume that a depth change is a dive since you could be clicking on 0 depth or something.
I would think there is some global being set when this happens, as well as a global for current_depth for comparison's sake.

Do we have a list of known global var's anywhere?
Thresher is offline   Reply With Quote
Old 03-30-10, 09:31 AM   #4
Heretic
Commodore
 
Join Date: Mar 2005
Location: Nebraska
Posts: 617
Downloads: 240
Uploads: 2


Default

Quote:
Originally Posted by Thresher View Post
I would think there is some global being set when this happens, as well as a global for current_depth for comparison's sake.

Do we have a list of known global var's anywhere?
There seems to be because the UI scripts likely use it. I wonder if it's possible to do something with the python stuff to pass variables to the AI scripts. Would be handy. The AI scripts have their own globals defined in init.aix.
Heretic is offline   Reply With Quote
Old 03-30-10, 10:37 AM   #5
Thresher
Sailor man
 
Join Date: Apr 2006
Location: New Mexico, USA
Posts: 46
Downloads: 20
Uploads: 0
Default

I emailed UBI about getting a list of globals and to what extent we can play with the .py legally ..... and a few other things.

Cross your fingers.
Thresher is offline   Reply With Quote
Old 03-30-10, 03:00 PM   #6
Thresher
Sailor man
 
Join Date: Apr 2006
Location: New Mexico, USA
Posts: 46
Downloads: 20
Uploads: 0
Default

Quote:
Originally Posted by Thresher View Post
I emailed UBI about getting a list of globals and to what extent we can play with the .py legally ..... and a few other things.

Cross your fingers.
I asked:

Is their a list of global variables that are accessible by scripts?

For instance, we want to determine if a depth clicked on the gauge is greater than or less than current depth, so that we can perform different crew actions via scripts.

Reply:


Response (Jason) - 03/30/2010 03:28 PM
Unfortunately, Ubi Soft Technical Support can not provide information for editing the game in any way. Please refer to your LICENSE AGREEMENT for more information.


Thresher is offline   Reply With Quote
Old 03-30-10, 03:36 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Thresher View Post
I asked:

Is their a list of global variables that are accessible by scripts?

For instance, we want to determine if a depth clicked on the gauge is greater than or less than current depth, so that we can perform different crew actions via scripts.
GUIDialsWrapper provides functions just for this. A good example of this code being used is in my UIs mod.
TheDarkWraith is offline   Reply With Quote
Old 03-30-10, 03:02 PM   #8
kylania
Silent Hunter
 
Join Date: Aug 2006
Posts: 3,528
Downloads: 118
Uploads: 0
Default

Quote:
Originally Posted by Thresher View Post
I emailed UBI about getting a list of globals and to what extent we can play with the .py legally ..... and a few other things.

Cross your fingers.
Quote:
There's a button called ViewGlobals to let you see the variables that the script is working with and see the exposed properties for those variables.
* The script manager has some useful features like text-auto-complete, jump-to-function-definition, find-text and go-to-line-number.
* Also, there's a tab called Class Definitions to see all the classes exported to the python scripts containing the inheritance tree, description, nested types, properties, methods and events.
http://www.subsim.com/radioroom/showthread.php?t=162702
__________________

kylania is offline   Reply With Quote
Old 03-30-10, 03:18 PM   #9
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

Quote:
Originally Posted by Thresher View Post
I emailed UBI about getting a list of globals and to what extent we can play with the .py legally ..... and a few other things.

Cross your fingers.
ask one of the devs via pm here...you might get an answer...



marean_m or elanaiba
__________________


urfisch is offline   Reply With Quote
Old 04-02-10, 05:58 AM   #10
ACSoft
Soundman
 
Join Date: Mar 2005
Location: Switzerland
Posts: 149
Downloads: 57
Uploads: 0
Default

Quote:
Originally Posted by Heretic View Post
Clicking the depth gauge triggers the set_depth command. I can script it to do anything I want. The trouble is I don't know which direction the depth change is so I just have some hydroplane orders. Even if the boat is on the surface, I can't assume that a depth change is a dive since you could be clicking on 0 depth or something.
Of course, if you cannot detect that the command is given when in "surfaced" state and that the command order a depth greater or equal to periscope deepth, better to left all this as it is now.

Sad, I thought this might be possible to do in the script, by reading some variables.


Quote:
Originally Posted by Heretic View Post
As far as getting the crew down before it goes under. The only way I 've thought of is to move the crash_dive command down futher in the sequence, delaying the dive. Dunno if that's an appropriate thing for this mod to be doing tho.
Thanks for the info. I will make some tests.

ACS
ACSoft is offline   Reply With Quote
Old 04-05-10, 01:26 PM   #11
EgoApocalypse
Lieutenant
 
Join Date: Jun 2008
Location: The system might fail you. But dont fail youself...................
Posts: 252
Downloads: 36
Uploads: 0
Default

Great.................now its starting to feel like it should.
__________________




EgoApocalypse is offline   Reply With Quote
Reply

Tags
favorite

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:49 AM.


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