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   #31
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   #32
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   #33
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   #34
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   #35
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   #36
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   #37
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
Old 08-26-10, 02:15 PM   #38
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
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
correct
TheDarkWraith is offline   Reply With Quote
Old 08-29-10, 04:35 PM   #39
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Hi Krauter,

Just wondering if you have any updates since TDW added new commands. The new advanced knuckle really can add to the ones you have made.

I have just finished one for aeroplane attacks:-

[AS]
Pesky Aeroplanes!
[CATEGORY]
Evasion
[COMMANDS]
crash_dive,0,0,0,0,0,0,0
Get_depth_under_sub_keel,0,0,0,0,0,0,40
Set_new_depth,50,0,0,0,0,0,1
Ahead_one_third,0,0,0,0,0,0,5
Activate_hydrophone_station,0,0,0,0,0,0,10
Sweep_hydrophone,0,360,120.0,897,0,0,1
Report_nearest_sound_contact,0,0,0,0,0,0,10
Leave_hydrophone_station,0,0,0,0,0,0,10
Activate_NavMap_Station,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,1800
Periscope_depth,0,0,0,0,0,0,60
Activate_Scope_Station,1,0,0,0,0,0,2
Rise_whole_obs_periscope,0,0,0,0,0,0,10
Sweep_Scope,1,0,360,60.0,192,0,10; (11000000)
Report_nearest_visual_contact,0,0,0,0,0,0,10
Lower_whole_obs_periscope,0,0,0,0,0,0,0
Leave_Scope_Station,1,0,0,0,0,0,0
Ahead_standard,0,0,0,0,0,0,0
Surface,0,0,0,0,0,0,90
Radar_turn_on,0,0,0,0,0,0,5
Radar_set_continuous_sweep_mode,0,0,0,0,0,0,20
Report_nearest_radio_contact,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,10
[COMMANDS_END]

I had to add "crash dive" to the \scripts\menu\TheDarkWraithAutomation.py

class AutomationCrashDive( TDWAutomation.AutomationScriptInFile.BaseAutomatio nCommandUndefined ):
def Execute( self, elapsedtime ):
if GetSubIsUnderwater():
return "skip"
else:
Game.SubmarineCommands.ExecuteCommand( "Crash_dive" )
return True

and:-

,[ "Crash_dive", AutomationCrashDive ]


Commands I am going to try to add next are:-

Man deck and flak guns
fire at will etc
__________________
Trevally Mods for SH5

Last edited by Trevally.; 08-29-10 at 04:47 PM.
Trevally. is offline   Reply With Quote
Old 08-29-10, 05:10 PM   #40
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by Trevally. View Post
Hi Krauter,

Just wondering if you have any updates since TDW added new commands. The new advanced knuckle really can add to the ones you have made.

I have just finished one for aeroplane attacks:-

[AS]
Pesky Aeroplanes!
[CATEGORY]
Evasion
[COMMANDS]
crash_dive,0,0,0,0,0,0,0
Get_depth_under_sub_keel,0,0,0,0,0,0,40
Set_new_depth,50,0,0,0,0,0,1
Ahead_one_third,0,0,0,0,0,0,5
Activate_hydrophone_station,0,0,0,0,0,0,10
Sweep_hydrophone,0,360,120.0,897,0,0,1
Report_nearest_sound_contact,0,0,0,0,0,0,10
Leave_hydrophone_station,0,0,0,0,0,0,10
Activate_NavMap_Station,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,1800
Periscope_depth,0,0,0,0,0,0,60
Activate_Scope_Station,1,0,0,0,0,0,2
Rise_whole_obs_periscope,0,0,0,0,0,0,10
Sweep_Scope,1,0,360,60.0,192,0,10; (11000000)
Report_nearest_visual_contact,0,0,0,0,0,0,10
Lower_whole_obs_periscope,0,0,0,0,0,0,0
Leave_Scope_Station,1,0,0,0,0,0,0
Ahead_standard,0,0,0,0,0,0,0
Surface,0,0,0,0,0,0,90
Radar_turn_on,0,0,0,0,0,0,5
Radar_set_continuous_sweep_mode,0,0,0,0,0,0,20
Report_nearest_radio_contact,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,10
[COMMANDS_END]

I had to add "crash dive" to the \scripts\menu\TheDarkWraithAutomation.py

class AutomationCrashDive( TDWAutomation.AutomationScriptInFile.BaseAutomatio nCommandUndefined ):
def Execute( self, elapsedtime ):
if GetSubIsUnderwater():
return "skip"
else:
Game.SubmarineCommands.ExecuteCommand( "Crash_dive" )
return True

and:-

,[ "Crash_dive", AutomationCrashDive ]


Commands I am going to try to add next are:-

Man deck and flak guns
fire at will etc
Nice , is there a teleport function in the automated scripts ? Teleport to inside sub first maybe .
THE_MASK is offline   Reply With Quote
Old 08-29-10, 06:08 PM   #41
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Hadnt thought of that.

There are some teleports:-

mav map
hydrophone station
scope stations

If I jump to a station, crashdive and then exit station.

I will test and see if that works.

Edit: With the station jump, you end up on the bridge underwater (where you start from). So its down the hatch only.
__________________
Trevally Mods for SH5

Last edited by Trevally.; 08-29-10 at 06:39 PM.
Trevally. is offline   Reply With Quote
Old 08-29-10, 07:07 PM   #42
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Trevally. View Post
I had to add "crash dive" to the \scripts\menu\TheDarkWraithAutomation.py

class AutomationCrashDive( TDWAutomation.AutomationScriptInFile.BaseAutomatio nCommandUndefined ):
def Execute( self, elapsedtime ):
if GetSubIsUnderwater():
return "skip"
else:
Game.SubmarineCommands.ExecuteCommand( "Crash_dive" )
return True

and:-

,[ "Crash_dive", AutomationCrashDive ]


Commands I am going to try to add next are:-

Man deck and flak guns
fire at will etc
I like to see that others have figured out how to add their own commands. I made it as simple as possible but still giving you the power of scripts in SH5. Though I would recommend giving the new automation command a different name than the built in command - something like Crash_dive_now for instance
TheDarkWraith is offline   Reply With Quote
Old 09-14-10, 12:44 AM   #43
Abd_von_Mumit
The Old Man
 
Join Date: Jan 2007
Location: Warszawa, Polska
Posts: 1,453
Downloads: 46
Uploads: 4
Default

Will you be releasing version updated to wirk with TDW 4.3.0 and later versions? (every script has a new obligatory field "Description" from 4.3.0 on, as per TDW's post scripts without this field will cease working).
__________________
Long, hard, wet and full of seamen. My precious.
SH3+GWX+OLC — sunk x4, retired x2; SH5+TDW — still exploring
My SH5 mods: EQuaTool - Elite Quality Map Tools, Patrol Routine Scripts, No Logo Intro Menu_Animation, Less Annoying Stopwatch
Links: SH5 mods I use, FileFront, Manual plotting how-to
Abd_von_Mumit is offline   Reply With Quote
Old 09-14-10, 05:36 AM   #44
DavyJonesFootlocker
The Old Man
 
Join Date: Dec 2007
Location: Stink Drunk in Trinidad
Posts: 1,572
Downloads: 138
Uploads: 0
Default

Cool
__________________
"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 09-14-10, 06:23 AM   #45
Krauter
Ocean Warrior
 
Join Date: Aug 2007
Location: Montreal, Canada
Posts: 2,983
Downloads: 102
Uploads: 1
Default

Unfortunately this mod is on hiatus until I get back to my regular Home PC (as I'm at University and am running a Mac -.-...)

However, I will download the files I made and try to tweak them and send them to a few people. If it works then I will distribute that material.

Cheers,

Krauter
__________________
Quote:
The U.S almost went to war over some missles in Cuba... Thank god the X-Men were there to save us right?
Krauter 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 02:34 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.