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 01-23-11, 06:04 AM   #31
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by dcb View Post
As I don't know very well how scripts are working, I'm not sure if what I have in mind is possible, but I'll ask anyway:

I'm thinking about an automated behavior that will initiate emergency dive and evasive maneuvers as soon as a plane is spotted. IRL, this was the job of the watch crew, and not that of the captain (he might have been asleep, or eating, or whatever). Relaying the 'plane spotted' message to the skipper and waiting for him to order the emergency dive would have wasted valuable seconds, so it was up to the watch crew to ring the alarm.

Can scripts replicate this behavior, so that the AI takes evasive maneuvers on its own?
See this thread here http://www.subsim.com/radioroom/showthread.php?t=174400

For now it can't run when a plane is spotted. You still need to run the script.

TDW has however posted notes in the automation txt that commands we have in the tutorial files will be added to automation.
When this happen - the script you discribe will then be possible
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 01-23-11, 08:27 AM   #32
Akula4745
Convicted Ship Killer
 
Join Date: Mar 2009
Location: Just out of sight... plotting your course and speed
Posts: 846
Downloads: 371
Uploads: 1
Default

Quote:
Originally Posted by Trevally. View Post
For now it can't run when a plane is spotted. You still need to run the script.

TDW has however posted notes in the automation txt that commands we have in the tutorial files will be added to automation.
When this happen - the script you discribe will then be possible
Now that sounds promising!!
__________________
Akula4745



"If you sit by the river long enough... the body of your enemy will float by -- SunTzu"
Akula4745 is offline   Reply With Quote
Old 01-23-11, 08:37 AM   #33
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

This is the sweep cammand from automation:-

Quote:
; Sweep_Scope,x,y,a,b,c,0,t - sweep the scope from a start of y degrees to an end of a degrees. Time to sweep from y to a determined by b. Next command will be issued after time t (time t doesn't start until sweeping complete). x = the scope station number (0=attack, 1=obs, 2=UZO). c is a decimal number representing the bits set for the following options (use windows calc to input binary number then convert to decimal):
; this function will wait for scope station to be visible (will wait for 15 seconds and if not visible then a skip command will be issued)
; bit 0 = lock the contact on contact spotted (if bit 2,3,4, or 5 isn't set then contact will be immediately unlocked)
; bit 1 = set current heading for contact on contact spotted
; bit 2 = stop sweep on contact spotted
; bit 3 = stop sweep and follow target on contact spotted
; bit 4 = pause sweep on contact spotted
; bit 5 = pause sweep and follow target on contact spotted
; bit 6 = pause game (and either also pause sweep) on contact spotted
; bit 7 = abort script on contact spotted
; bit 8 = inform user that contact was detected
If this could be used without having to be at the station - it could be used to continuously to fix the "my watch crew are blind" problem.

Also if this could be added :-

Quote:
;Operation|a|b|c|d|e|f - performs operation, a, on b and c. d, if used, is a valid Label command or variable/pointer to a label command. a can be a variable or pointer (needs to be enclosed in <>). b, c and d, if used, can be variables or pointers and needs to be enclosed in <<>> or specify None.
; if b is None then operand 1 is the value retrieved from g_TR1 else operand 1 is the value retrieved for b (if value retrieved is a pointer it will be dereferenced)
; if c is a literal value (i.e. 5 or 7.9) then it must have a type declarer following it. Specify u for unsigned integer, i for integer, f for float, and nothing for strings
; if a is + or - then e defines the dial type: 0 = not a dial, 1 = a dial whose values are -180 to 180, 2 = a dial whose values are 0 to 360
Then all sorts of things could be done.
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 01-23-11, 01:21 PM   #34
dcb
Grey Wolf
 
Join Date: Apr 2005
Location: Bucharest, Romania
Posts: 845
Downloads: 544
Uploads: 0
Default

Quote:
Originally Posted by Trevally. View Post
See this thread here http://www.subsim.com/radioroom/showthread.php?t=174400

For now it can't run when a plane is spotted. You still need to run the script.

TDW has however posted notes in the automation txt that commands we have in the tutorial files will be added to automation.
When this happen - the script you discribe will then be possible

Thank you for your answer. I took the time and read the thread you mentioned, and found an idea that looks promising, at least to me. This is one of the posts by TDW in the thread:

Yes the script can either pause or pause the game on contact detected.

If a script can do something like this on contact detected, then imagine a plane evasion script activated at the beginning of the patrol, which stays "silent" until the plane is detected, then runs the series of commands. It's like some sort of "sleeping script" that only activates itself when a certain condition (plane detected) is met. After the evasion maneuvers are completed, the script ends and it is up to the player to reactivate it again when he resurfaces.Is something like this possible? Unfortunately, I know nothing about Python and working with scripts, so here I am bothering you and other people who know.
dcb is offline   Reply With Quote
Old 01-23-11, 01:37 PM   #35
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

For this to work the sweep scope (uzo) would need to work when not at station. I don't know if this is possible.

When TDW added the message feature he scanned a radius around the boat for contacts and send a message etc.
If this same command could be introduced into automation, it could then be used to set conditions.

It would need to be able to detect height so as to determine ship or aeroplane. I know detecting speed is not possible - so height

If all this could be done it would go a long way to getting better info from your crew. Some scripts could be set to take action and others could just flash up a message for you to take action.
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 09-10-12, 02:24 PM   #36
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default

Hello,

are these scripts usable with New UI 7.x.x? Or are they outdated, I'm not shure.

Paco.
Paco is offline   Reply With Quote
Old 09-10-12, 10:45 PM   #37
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Paco View Post
Hello,

are these scripts usable with New UI 7.x.x? Or are they outdated, I'm not shure.

Paco.
Yes they are usable. My Automation class hasn't changed for many, many versions now
TheDarkWraith is offline   Reply With Quote
Old 09-11-12, 01:08 AM   #38
Paco
Captain
 
Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Yes they are usable. My Automation class hasn't changed for many, many versions now
Thanks!
Paco is offline   Reply With Quote
Old 02-25-16, 03:06 PM   #39
Shmal_
Watch
 
Join Date: May 2014
Location: Russian Federation, Sankt-Petersburg
Posts: 23
Downloads: 105
Uploads: 0
Default

Who ever tryed to remake it for Magui interface mod?
Shmal_ is offline   Reply With Quote
Reply


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 01:42 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.