![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
08-04-10, 06:33 PM
|
#1 | |
|
Black Magic
![]() |
Quote:
Here is the preliminary file that will define the commands available and the syntax for automation:; Automation ; Allows for player to automate common tasks while in patrol ; ; Available commands (from \data\cfg\commands.cfg): ; ; format: ; command,x,y,t ; command is the name of the command to execute ; x = parameter 1 of command ; y = parameter 2 of command ; t = time to wait before issuing next command (in seconds) NOTE: minimum time delay is 1 second to account for code overhead ; ; a press of any key cancels the automation script! ; ; ; Set_depth,x,y,t - Dive to a depth of x meters. If y=0 then don't do a depth under keel check. If y=1 then check depth under keel before diving. If x > depth under keel then x will be set to: current depth < x < depth under keel - 5 ; Surface,0,0,t - surface the boat ; Periscope_depth,0,0,t - go to periscope depth. ; Snorkel_depth,0,0,t - go to snorkel depth ; Knuckle_port,0,0,t - 90 degree turn to port ; Double_knuckle_port,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,t - 90 degree turn to starboard ; Double_knuckle_starboard,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,t - deploys decoys (noise makers) ; Activate_radar,0,0,t - activate radar (turn on) if installed ; Radar_toggle_range - toggle radar range between short and far ; Deactivate_radar,0,0,t - deactivate radar (turn off) if installed ; Rise_whole_periscope,0,0,t - fully raise the attack scope ; Lower_whole_periscope,0,0,t - fully lower the attack scope ; Get_depth_under_sub_keel,0,0,t - get the depth under the sub's keel ; Rise_whole_obs_periscope,0,0,t - fully raise the obs scope ; Lower_whole_obs_periscope,0,0,t - fully lower the obs scope ; Rig_for_silent_running,0,0,t - set silent running (minimal noise) ; Secure_from_silent_running,0,0,t - secure from silent running ; Set_speed,x,0,t - set the current sub's speed ; Ahead_slow,0,0,t - ahead slow bell ; Ahead_one_third,0,0,t - ahead 1/3 bell ; Ahead_standard,0,0,t - ahead standard bell ; Ahead_full,0,0,t - ahead full bell ; Ahead_flank,0,0,t - ahead flank bell ; Back_slow,0,0,t - back slow bell ; Back_standard,0,0,t - back standard bell ; Back_full,0,0,t - back full bell ; Back_emergency,0,0,t - back emergency bell ; All_stop,0,0,t - all stop bell ; Set_course,x,0,t - set course relative to current course ; Set_heading,x,0,t - set new heading ; Return_to_course,0,0,t - return to following waypoints ; Report_depth_under_keel,0,0,t - get the depth under sub's keel ; Report_nearest_visual_contact,0,0,t - get the nearest visual contact spotted by crew ; Report_nearest_radio_contact,0,0,t - report the nearest radio contact received/detected ; Radar_one_sweep,0,0,t - perform one sweep of radar (if installed) ; Radar_continuous_sweep,0,0,t - continuous sweep of radar (if installed) ; Report_nearest_sound_contact,0,0,t - report the nearest sound contact detected. ; Report_nearest_warship_sound_contact,0,0,t - report the nearest warship sound contact detected ; Hydrophone_normal_sweep,0,0,t - perform normal sweeps on hydrophone ; ; ; Additional commands: ; ; Set_Time_Compression,x,0,t - set time compression to x value (x must be a power of 2!) ; Sweep_Scope,x,y,t - sweep the scope from a start of x degrees to an end of y degrees. Time to sweep from x to y determined by t. Next command will be issued after t time ; Activate_Scope_Station,x,0,t - activates a scope station where x = the scope station number (0=attack, 1=obs, 2=UZO) ; Leave_Scope_Station,0,0,t - leaves the scope station and returns to bridge ; Activate_NavMap_Station,0,0,t - activates the navigation map station ; Leave_NavMap_Station,0,0,t - leaves the nav map station and returns to bridge ; Loop,0,0,t - loop this automation script t times before stopping ; ; ; You define an Automation Script by starting with the header [AS] followed by the name of the script on the following line. Then immediately following that the header [COMMANDS]. Then your commands line by line followed finally by [COMMANDS_END] ; ; [AS] TDW_Cruise [COMMANDS] Return_to_course,0,0,1 ; ensure we're following waypoints and wait 1 second before next command Activate_NavMap_Station,0,0,5 ; activate the nav map station so we can see the full map and wait 5 seconds before next command Set_Time_Compression,32,0,3600 ; set time compression to 32 and wait 3600 seconds (1 hour) before next command Set_Time_Compression,1,0,1 ; set time compression to 1 and wait 1 second before next command Periscope_depth,0,0,15 ; go to periscope depth and wait 15 seconds before next command All_stop,0,0,1 ; order all stop and wait 1 second before next command Hydrophone_normal_sweep,0,0,60 ; tell hydrophone operator to normal sweep listening for contacts. Let him listen for 1 min (60 seconds) before next command Report_nearest_sound_contact,0,0,10 ; report nearest sound contact heard and wait 10 seconds before next command (this gives time for user to cancel auto) Rise_whole_periscope,0,0,15 ; fully raise the attack scope and wait 15 seconds before next command (take a look around to ensure it's ok to surface) Activate_Scope_Station,0,0,5 ; activate the attack scope station and wait 5 seconds before next command Sweep_Scope,0,360,60 ; sweep the scope from 0 to 360 in 30 seconds. Next command will be issued after sweep is finished Report_nearest_visual_contact,0,0,10 ; report nearest visual contact found. Wait 10 seconds before next command (this gives time for user to cancel auto) Leave_Scope_Station,0,0,1 ; leave the scope station thus returning to nav map station and wait 1 second before next command Lower_whole_periscope,0,0,1 ; fully lower the attack scope and wait 1 second before next command Ahead_standard,0,0,1 ; order ahead standard and wait 1 second before next command Surface,0,0,1 ; surface the boat and wait 1 second before next command Loop,0,0,5 ; loop through all this 5 times before stopping and ending this script [COMMANDS_END] |
|
|
|
08-04-10, 07:13 PM
|
#2 |
|
Helmsman
![]() Join Date: Jan 2009
Location: Area 7
Posts: 110
Downloads: 86
Uploads: 0
|
Hey TheDarkWraith. Great UI. I've been using it since its inception.
![]() One question about all of your new add-ons in 3.9.3. Just for instance, do we need to use both versions of the add-ons? Say, I want to use No_Contact_Colors, do I also need to enable Waypoint_Contacts_No_Color? Or is it an optional thing where you would choose one and use it like: NewUIs_TDC_3_9_3_No_Contact_Colors - Use this if you just don't want colors NewUIs_TDC_3_9_3_Waypoint_Contacts_No_Colors - Use this if you don't want contact colors on original contact and the "ghost" images Thanks, and sorry if this is confusing because I'm confused too.
|
|
|
08-04-10, 07:35 PM
|
#3 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
08-04-10, 08:15 PM
|
#4 | |
|
Ocean Warrior
![]() Join Date: Aug 2007
Location: Montreal, Canada
Posts: 2,870
Downloads: 102
Uploads: 1
|
Hey TDW, I don't know if this would be possible; but I know you mentioned earlier in this thread (dont wanna go through 300 pages to find it..) that all dials in the sub were linked to a certain function.
With this in mind, would it be possible to make the TDC in the conning tower interactive? Or would this beyond the scope of this Mod or the game itself?
__________________
Quote:
|
|
|
|
08-04-10, 08:18 PM
|
#5 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
08-04-10, 08:21 PM
|
#6 | |
|
Ocean Warrior
![]() Join Date: Aug 2007
Location: Montreal, Canada
Posts: 2,870
Downloads: 102
Uploads: 1
|
Your the man
Also, I remember back in the times of 2.0 to 2.6 or so you had one your ToDo list of making seperate throttle controles (port/starboard). Is this off the drawing board as not workable?
__________________
Quote:
|
|
|
|
08-04-10, 08:47 PM
|
#7 |
|
Black Magic
![]() |
|
|
|
08-04-10, 09:16 PM
|
#8 | |
|
Helmsman
![]() Join Date: Jan 2009
Location: Area 7
Posts: 110
Downloads: 86
Uploads: 0
|
Quote:
Makes perfect sense. I just wanted to make sure I was getting everything installed that I wanted. Thank you kind sir, and great mod.
|
|
|
|
08-04-10, 10:02 PM
|
#9 |
|
Black Magic
![]() |
The parser for the automation files is complete. Now I have to take the commands and break them down into their components: command, parameter 1, parameter 2, and time. Then finish the automation code
![]() |
|
|
08-05-10, 01:17 AM
|
#10 |
|
Black Magic
![]() |
Automation works
![]() This is going to open up a whole slew of possibilities.....I've made it so that you can define multiple scripts. All these scripts reside in a single file and are read in at game start. You will be able to select the script you want to use during the game. You'll have options to start, stop, and pause the script. You can even change scripts on the fly (say you have one running and you want to start another one now - done!).I see the following possibilities for this: - custom evasive maneuver scripts - custom navigation scripts - scripts to automate 'daily' tasks during long distance travels (run on surface 1 hr, dive, all stop, listen for sound contacts, ahead standard, surface, repeat) There's really endless possibilities for this ![]() I'm going to add the teleport commands as commands available to the scripts. This will allow you to dive when surfaced (teleport to radio or hydrophone). The script currently running is stopped when you press any key. Once a script is stopped and you want to start it again it will start from the beginning. Pause can be used to stop a script midstream and then restart where it was. This is awesome
|
|
|
08-05-10, 05:14 AM
|
#11 |
|
Watch Officer
![]() Join Date: Jul 2004
Location: Pittsburgh, PA
Posts: 342
Downloads: 54
Uploads: 0
|
I like the idea of creating a daily schedule as in dive in the morning for a trim dive, surface, crash dive auto on plane sighting ect...
__________________
|
|
|
08-05-10, 11:40 AM
|
#12 | |
|
Watch
![]() Join Date: Mar 2006
Posts: 24
Downloads: 37
Uploads: 0
|
Quote:
|
|
|
|
08-04-10, 07:28 PM
|
#13 |
|
Watch
![]() Join Date: Mar 2006
Posts: 24
Downloads: 37
Uploads: 0
|
|
|
|
![]() |
| Tags |
| dbrn, favorite, new ui |
| Thread Tools | |
| Display Modes | |
|
|
