View Single Post
Old 05-15-15, 04:11 PM   #32
Husksubsky
XO
 
Join Date: May 2008
Location: oslo,Norway
Posts: 424
Downloads: 254
Uploads: 0
Default

Heres the "how to do"

HTML Code:
; Edited by TheDarkWraith for NewUIs_TDC_7_4_0
; Edited on 5/19/2013 @ 1730
;
;
; Automation
; Allows for player to automate common tasks while in patrol
; NOTE: last command executed will not have a time delay (the t time associated with it will be ignored) UNLESS that last command is a loop command
;
;
; format:
; command,x,y,a,b,c,d,t
; command is the name of the command to execute
; x = parameter 1 of command (has to be an UInt32 value!)
; y = parameter 2 of command (has to be an UInt32 value!)
; a = parameter 3 of command
; b = parameter 4 of command
; c = parameter 5 of command
; d = times to execute command (0=no limit)
; t = time to wait before issuing next command (in seconds) NOTE: minimum time delay is 0.1 second to account for code overhead
;
;
; Do not use the below as they cause problems!
; Activate_radar,0,0,0,0,0,0,t - activate radar (turn on) if installed
; Deactivate_radar,0,0,0,0,0,0,t - deactivate radar (turn off) if installed
; Radar_continuous_sweep,0,0,0,0,0,0,t
; Radar_one_sweep,0,0,0,0,0,0,t
; Rig_for_silent_running,0,0,0,0,0,0,t
; Secure_from_silent_running,0,0,0,0,0,0,t - secure from silent running
;
;
; If you want to switch between radar constant bearing and radar sweep modes you have to know the current mode and use the toggle command:
; NOTE: game starts in radar continuous sweep mode
; Radar_toggle_sweep_focus,0,0,0,0,0,0,t
;
; Available commands (from \data\cfg\commands.cfg):
; 
; Surface,0,0,0,0,0,0,t - surface the boat
;
; Periscope_depth,0,0,0,0,0,0,t - go to periscope depth.
;
; Snorkel_depth,0,0,0,0,0,0,t - go to snorkel depth
;
; Get_depth_under_sub_keel,0,0,0,0,0,0,t - get the depth under the sub's keel
;
; Knuckle_port,0,0,0,0,0,0,t - 90 degree turn to port
;
; Double_knuckle_port,0,0,0,0,0,0,t - 90 degree turn to port followed by a short straight run followed by another 90 degree turn to port
;
; Knuckle_starboard,0,0,0,0,0,0,t - 90 degree turn to starboard
;
; Double_knuckle_starboard,0,0,0,0,0,0,t - 90 degree turn to starboard followed by a short straight run followed by another 90 degree turn to starboard
;
; Deploy_decoys,0,0,0,0,0,0,t - deploys decoys (noise makers)
;
; NOTE: radar turn on is located below in additional commands
; Radar_turn_off,0,0,0,0,0,0,t - turns the radar off
;
; Radar_toggle_on_off,0,0,0,0,0,0,t - toggles the radar on/off
;
; Radar_toggle_range,0,0,0,0,0,0,t - toggle radar range between short and far
;
; NOTE: radar one sweep is located below in additional commands
; Radar_toggle_sweep_focus,0,0,0,0,0,0,t - toggles the radar between constant bearing and sweep mode
;
; Rise_whole_periscope,0,0,0,0,0,0,t - fully raise the attack scope
;
; Lower_whole_periscope,0,0,0,0,0,0,t - fully lower the attack scope
;
; Rise_whole_obs_periscope,0,0,0,0,0,0,t - fully raise the obs scope
;
; Lower_whole_obs_periscope,0,0,0,0,0,0,t - fully lower the obs scope
;
; Secure_from_silent_running,0,0,0,0,0,0,t - secure from silent running
;
; Ahead_slow,0,0,0,0,0,0,t - ahead slow bell
;
; Ahead_one_third,0,0,0,0,0,0,t - ahead 1/3 bell
;
; Ahead_standard,0,0,0,0,0,0,t - ahead standard bell
;
; Ahead_full,0,0,0,0,0,0,t - ahead full bell
;
; Ahead_flank,0,0,0,0,0,0,t - ahead flank bell
;
; Back_slow,0,0,0,0,0,0,t - back slow bell
;
; Back_standard,0,0,0,0,0,0,t - back standard bell
;
; Back_full,0,0,0,0,0,0,t - back full bell
;
; Back_emergency,0,0,0,0,0,0,t - back emergency bell
;
; All_stop,0,0,0,0,0,0,t - all stop bell
;
; Return_to_course,0,0,0,0,0,0,t - return to following waypoints
;
; Report_nearest_visual_contact,0,0,0,0,0,0,t - get the nearest visual contact spotted by crew
;
; Report_nearest_radio_contact,0,0,0,0,0,0,t - report the nearest radio contact received/detected
;
; Report_nearest_sound_contact,0,0,0,0,0,0,t - report the nearest sound contact detected.
;
; Report_nearest_warship_sound_contact,0,0,0,0,0,0,t - report the nearest warship sound contact detected
;
; Hydrophone_normal_sweep,0,0,0,0,0,0,t - perform normal sweeps on hydrophone
; 
;
; Additional commands:
;
; format:
; command,x,y,a,b,c,d,t
; command is the name of the command to execute
; x = parameter 1 of command (has to be something that can convert to float value!)
; y = parameter 2 of command (has to be something that can convert to float value!)
; a = parameter 3 of command
; b = parameter 4 of command
; c = parameter 5 of command
; d = times to execute command (0=no limit)
; t = time to wait before issuing next command (in seconds) NOTE: minimum time delay is 0.1 second to account for code overhead
;
;
; Set_Time_Compression,x,0,0,0,0,0,t - set time compression to x value (x must be a power of 2!)
;
; 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
;
; Activate_Scope_Station,x,0,0,0,0,0,t - activates a scope station where x = the scope station number (0=attack, 1=obs, 2=UZO)
;
; Leave_Scope_Station,0,0,0,0,0,0,t - leaves the scope station and returns to where avatar was
;
; Activate_NavMap_Station,0,0,0,0,0,0,t - activates the navigation map station
;
; Leave_NavMap_Station,0,0,0,0,0,0,t - leaves the nav map station and returns to where avatar was
;
; Set_new_depth,x,0,0,0,0,0,t - Dive to a depth of x meters. NOTE: whole positive numbers only!
;
; Set_new_depth_relative,x,0,0,0,0,0,t - Dives to a depth of current depth + x. NOTE: whole positive numbers only!
;
; Set_new_course,x,0,0,0,0,0,t - set course relative to current course. NOTE: whole numbers only
;
; Set_new_heading,x,0,0,0,0,0,t - set new heading. NOTE: Whole positive numbers only
;
; Set_new_speed,x,0,0,0,0,0,t - set the new speed (+ or - value and can be a float)
;
; Radar_turn_on,0,0,0,0,0,0,t - turns the radar on
;
; Radar_make_one_sweep,0,0,0,0,0,0,t - perform one sweep of radar (if installed)
;
; Radar_set_continuous_sweep_mode,0,0,0,0,0,0,t - sets the radar to continuous sweep mode
;
; Radar_set_constant_bearing_mode,0,0,0,0,0,0,t - sets the radar to constant bearing mode
;
; Enable_silent_running,0,0,0,0,0,0,t - set silent running (minimal noise)
;
; Disable_silent_running,0,0,0,0,0,0,t - secure from silent running
;
; 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!
;
; 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):
;    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
;    bit 12 = set time compression to 1 on contact detected
;
; Set_guns,x,y,a,b,c,0,t - set the deck and flak guns according to parameters below:
; if x=
; -1 = ignore
; 0 = man the deck gun
; 1 = secure the deck gun
; 2 = man the flack gun
; 3 = secure the flak gun
; 4 = man the deck and flack gun
; 5 = secure deck and flack guns
;
; if y=
; -1 = ignore
; 0 = settings for deck gun
; 1 = settings for flak gun
;
; if a=
; -1 = ignore
; 0 = fire at will
; 1 = hold fire
;
; if b=
; -1 = ignore
; 0 = short range
; 1 = medium range
; 2 = long range
;
; if c=
;Deck guns:
; 0 = Aim command deck
; 1 = Aim weapons
; 2 = Aim waterline
; 3 = Aim hull
;
;Flak guns:
; 0 = Aim fighters
; 1 = Aim bombers
; 2 = Aim any
; 3 = Closing targets
; 4 = any targets
;
; Navigate_from_file,0,0,a,0,0,0,t - performs automatic navigation from file specified by a (do not include extension! the .SHN extension will be added by the code). See \data\Navigation for example navigation files
;
; Play_tutorial,x,0,a,0,0,0,t - plays the tutorial specified by a (a should not have an extension and should be the name of a tutorial file in \data\Tutorials). x = 1 then auto start. x = 0 do not auto start.
;
; Crash_dive_now,0,0,0,0,0,0,t - initiates a crash dive
;
; Print_message,0,0,a,0,0,0,t - a is printed to the message box
;
; Report_position_celestial,0,0,0,0,0,0,t - (real navigation only) has the Navigator calculate and report current position using celestial navigation (weather and health dependent). Note: if Battlestations are set then Navigator will take a dead-reckoning fix instead.
;
; Report_position_deadreckoning,0,0,0,0,0,0,t - (real navigation only) has the Navigator calculate and report current position using dead-reckoning (weather and health dependent)
;
; Set_travel_mode,x,0,0,0,0,0,t - sets or disables travel mode in game. x = 0 travel mode disabled. x = 1 travel mode enabled.
;
; Wait_for_time,x,y,a,b,0,0,t - waits until the current Game time is the time specified. x = hour to wait for (24 hour time). y = minute to wait for. If a == 0 then GMT time is used. If a == 1 then local time is used. b is the message to display in the messagebox when time has been reached (leave blank for no message)
;
; Loop,x,0,0,0,0,0,t - loop this automation script x times before stopping. If x = -1 then it will loop forever until stopped by user. NOTE: if this is the last command it's t time WILL be considered
;
; Wait,0,0,0,0,0,0,t - wait for t seconds
;
;
; You define an Automation Script by starting with the header [AS] followed by the name of the script on the following line. Immediately following that is the header [CATEGORY] followed by the category name for this script. Following category is the header [SUBCATEGORY]. This defines the sub-category of the script.  Then immediately following that you have the header [DESCRIPTION], followed by your description of this script (can be nothing), followed by [DESCRIPTION_END]. Then immediately following that the header [COMMANDS]. Then your commands line by line finally followed by [COMMANDS_END].
;
; example:
;
;[AS]
;bogus_script
;[CATEGORY]
;bogus_category
;[SUBCATEGORY]
;bogus_subcategory
;[DESCRIPTION]
;your description here - can be multi-lined
;another line
;[DESCRIPTION_END]
;[COMMANDS]
;command1
;command2
;.....
;[COMMANDS_END]
;
;
Husksubsky is offline   Reply With Quote