![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#31 |
The Old Man
![]() Join Date: Dec 2007
Location: Stink Drunk in Trinidad
Posts: 1,572
Downloads: 138
Uploads: 0
|
![]()
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 |
![]() |
![]() |
![]() |
#32 |
Black Magic
![]() |
![]()
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 ![]() 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. |
![]() |
![]() |
![]() |
#33 |
Black Magic
![]() |
![]()
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 ![]() |
![]() |
![]() |
![]() |
#34 |
Navy Seal
![]() |
![]()
This is great news TDW
![]() |
![]() |
![]() |
![]() |
#35 |
Black Magic
![]() |
![]()
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. |
![]() |
![]() |
![]() |
#36 |
Black Magic
![]() |
![]()
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 |
![]() |
![]() |
![]() |
#37 |
Navy Seal
![]() |
![]()
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 |
![]() |
![]() |
![]() |
#38 |
Black Magic
![]() |
![]() |
![]() |
![]() |
![]() |
#39 |
Navy Seal
![]() |
![]()
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 Last edited by Trevally.; 08-29-10 at 04:47 PM. |
![]() |
![]() |
![]() |
#40 | |
Ace of the deep .
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#41 |
Navy Seal
![]() |
![]() ![]() 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. Last edited by Trevally.; 08-29-10 at 06:39 PM. |
![]() |
![]() |
![]() |
#42 | |
Black Magic
![]() |
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#43 |
The Old Man
![]() Join Date: Jan 2007
Location: Warszawa, Polska
Posts: 1,453
Downloads: 46
Uploads: 4
|
![]()
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 |
![]() |
![]() |
![]() |
#44 |
The Old Man
![]() Join Date: Dec 2007
Location: Stink Drunk in Trinidad
Posts: 1,572
Downloads: 138
Uploads: 0
|
![]()
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 |
![]() |
![]() |
![]() |
#45 | |
Ocean Warrior
![]() Join Date: Aug 2007
Location: Montreal, Canada
Posts: 2,983
Downloads: 102
Uploads: 1
|
![]()
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:
![]() |
|
![]() |
![]() |
![]() |
|
|