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 08-24-10, 09:29 PM   #1
DavyJonesFootlocker
The Old Man
 
Join Date: Dec 2007
Location: Stink Drunk in Trinidad
Posts: 1,572
Downloads: 138
Uploads: 0
Default

Man, I wish there was a script to have the XO compute a firing solution and all I have to do is fire.
__________________
"Silence means death. Stand on your feet. Inner fear your worst enemy."- Sepultura.
My Silent Hunter 5 mantra is this......"Torpedo missed, sir!"
A P-400 is a P-40 with a Zero after it.
A proud member of the Wikipedia Haters Club
DavyJonesFootlocker is offline   Reply With Quote
Old 08-25-10, 08:06 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I've greatly improved the sweep scope function for Automation. Via setting bits (use the windows calc to set binary pattern and then convert to decimal for value to use in script parameter) you can do the following:

# 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

so it's possible to have the scope sweeping and it lock onto a contact when spotted, set course to the contact, pause the sweep, set follow target, and pause the game all in one shot This should make those that play at TC1 very happy. The bit pattern for this would be:

1100011 binary and when converted to decimal is 99

I had to use bits, and thus binary, as it it the easiest way to sort out multiple options in this command.

EDIT:

I also added a new command: Advanced_knuckle

; Advanced_knuckle,x,y,a,b,c,0,t - executes a turn of x degrees at y depth at a speed. When turn is completed speed will be set to b speed and depth will be set to c. x = degrees to turn. y = new depth (9999 for current depth). a = new speed during turn (9999 for current speed - can be + or - and a float value). b = new speed after turn (9999 for starting speed - can be + or - and a float value). c = new depth (9999 for starting depth). NOTE: depth, speed, and course will be executed at same time!

By stringing 2 or more Advanced_knuckles together you get do any kind of evasive maneuver you want.

I also changed the function of the Loop command. If the first parameter is -1 then the loop will loop indefinitely until the user stops the script containing the loop.

Last edited by TheDarkWraith; 08-25-10 at 11:59 PM.
TheDarkWraith is offline   Reply With Quote
Old 08-26-10, 10:25 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Added some more features to Automation:

; Activate_hydrophone_station,0,0,0,0,0,0,t - activates the hydophone station
; Leave_hydrophone_station,0,0,0,0,0,0,t - leaves the hydrophone station
; Sweep_hydrophone,x,y,a,b - sweep the hydrophone from a start of x degrees to an end of y degrees. Time to sweep from x to y determined by a. Next command will be
issued after time t (time t doesn't start until sweeping complete). b is a decimal number representing the bits set for the following options (use windows calc to
input binary number then convert to decimal):

I'm finishing up the options for Sweep_hydrophone currently. I should be able to make it stop, pause, or pause game when a contact is detected
TheDarkWraith is offline   Reply With Quote
Old 08-26-10, 10:32 AM   #4
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

This is great news TDW
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 08-26-10, 11:13 AM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

coded in the contact detected for hydrophone sweep and set new course to contact detected. Working beautifully! Now to add the stop, pause, and pause game on contact detected


EDIT:

the dialog box above was for my testing to see if it would work or not. Since it did I've made it report that information to the messagebox if the bit is enabled to inform user:


you can also see that a new course was automatically called up to intercept the contact (I just so happen to be pointing north, 0 degrees, at the time). This happens if the bit is set to set new course on contact detected.

Last edited by TheDarkWraith; 08-26-10 at 11:38 AM.
TheDarkWraith is offline   Reply With Quote
Old 08-26-10, 12:57 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

finally finished up the Sweep_hydrophone command. I've given you great flexibility with it. It will detect contacts that you can't detect by sitting in front of the station and rotating the wheel.

; Sweep_hydrophone,x,y,a,b - sweep the hydrophone from a start of x degrees to an end of y degrees. Time to sweep from x to y determined by a. Next command will be
issued after time t (time t doesn't start until sweeping complete). b 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 = inform user that contact was detected
; bit 1 = set current heading for contact on Unknown contact detected
; bit 2 = set current heading for contact on Warship contact detected
; bit 3 = set current heading for contact on Merchant contact detected
; bit 4 = stop sweep on Unknown contact detected
; bit 5 = stop sweep on Warship contact detected
; bit 6 = stop sweep on Merchant contact detected
; bit 7 = pause sweep on Unknown contact detected
; bit 8 = pause sweep on Warship contact detected
; bit 9 = pause sweep on Merchant contact detected
; bit 10 = pause game (and either also pause sweep) on contact detected
; bit 11 = abort script on contact detected
TheDarkWraith is offline   Reply With Quote
Old 08-26-10, 02:13 PM   #7
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Thanks TDW,

Could someone check my sums to ensure I have this right.

Ok I want to
"inform user that contact was detected"
"pause game"

So that would be 10000000001 = 1025 ?

This is for hydrophone
__________________
Trevally Mods for SH5
Trevally. 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 07:31 AM.


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.