View Full Version : Automation
Trevally.
08-14-10, 11:28 AM
Big thanks to TDW for this new feature in hid UI mod.:yeah:
I am still trying to create one. Here is what I have so far:-
[AS]
patrol
[CATEGORY]
Search on patrol
[COMMANDS]
Set_Time_Compression,1,0,0,0,0,0,0
Activate_Radar_Station,0,0,0,0,0,0,5 (this does not work)
Wait,0,0,0,0,0,0,2
Radar_turn_on,0,0,0,0,0,0,0
Radar_set_continuous_sweep_mode,0,0,0,0,0,0,60
Radar_toggle_range,0,0,0,0,0,0,60
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,60
Ahead_slow,0,0,0,0,0,0,0
Activate_Hydrophone_Station,0,0,0,0,0,0,2 (this does not work)
Wait,0,0,0,0,0,0,2
Hydrophone_normal_sweep,0,0,0,0,0,0,90
Report_nearest_sound_contact,0,0,0,0,0,0,10
Rise_whole_periscope,0,0,0,0,0,0,6
Activate_Scope_Station,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,2
Sweep_Scope,0,0,360,120.0,0,0,1
Report_nearest_visual_contact,0,0,0,0,0,0,1
Leave_Scope_Station,0,0,0,0,0,0,0
Lower_whole_periscope,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,10
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
Surface,0,0,0,0,0,0,60
Ahead_standard,0,0,0,0,0,0,5
Return_to_course,0,0,0,0,0,0,5
Activate_NavMap_Station,0,0,0,0,0,0,15
Set_Time_Compression,512,0,0,0,0,0,0
Wait,0,0,0,0,0,0,9000
Leave_NavMap_Station,0,0,0,0,0,0,0
Loop,2,0,0,0,0,0,0
[COMMANDS_END]
I have not been at this for very long but I was wondering what others are automating?
Also any tips would be great:DL
Edit: To make your own or use automations you need TDW UI Mod v4.03 or higher.
Open your SilentHunter5\Date\Automation folder.
Create new text document and open it. You should also open TDW_Automation to get a list of commands to use.
Start with:-
[AS]
enter script name here
[CATEGORY]
enter category name here
[COMMANDS]
enter your first command here
take a new line for each command
[COMMANDS_END] to finish
; at start of line stops it form being used (handy if tou are testing)
every thing you need to know is in the TDW_Automation.SHA
Once you are finished save the text file as .SHA (select save as and under typr choose all then add .SHA to the file name)
TheDarkWraith
08-14-10, 11:31 AM
from the TDW_Automation.SHA file:
; 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
Trevally.
08-14-10, 11:36 AM
Thanks TDW, i should pay more attention:salute:
TheDarkWraith
08-14-10, 11:54 AM
Thanks TDW, i should pay more attention:salute:
you did give me some good ideas for commands to add though :up: I should add a hydrophone station command that will place you in front of the hydrophone station and another command to sweep the hydrophone like I did for the scope. Should do the same for radar :DL
Trevally.
08-14-10, 12:05 PM
Thanks TDW that would be great.
At this stage:-
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,60
I wanted the camera to view the sub during the dive but the boat wont dive as it says "crew still on deck". Any way around this anyone?
TheDarkWraith
08-14-10, 12:09 PM
Thanks TDW that would be great.
At this stage:-
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,60
I wanted the camera to view the sub during the dive but the boat wont dive as it says "crew still on deck". Any way around this anyone?
you need to be below decks for the periscope depth. Hmm, I should let you pass parameter 1 a value of 1 as to teleport if you're not below decks :hmmm:
Trevally.
08-14-10, 01:04 PM
I swapped the comands over and this time I could watch the boat go to Periscope depth.
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,0
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
The next stage was to listen, so far so good. two contacts.
Next was goto scope station - this did not work, I was stuck on the external camera.:hmmm:
TheDarkWraith
08-14-10, 01:21 PM
I swapped the comands over and this time I could watch the boat go to Periscope depth.
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,0
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,2
The next stage was to listen, so far so good. two contacts.
Next was goto scope station - this did not work, I was stuck on the external camera.:hmmm:
yes because you went to external cam from the camera on next unit. Give the command 'Toggle_free_camera'
Krauter
08-14-10, 01:22 PM
I still can't get mine working :(
TheDarkWraith
08-14-10, 01:32 PM
I still can't get mine working :(
then I would suggest turning the user option on for Automation debugging, enabling script debugging in your \Documents\SH5\cfg\main.cfg file and see what it tells you at game start.
Krauter
08-14-10, 01:35 PM
I did lol.. can't understand what it is telling me
TheDarkWraith
08-14-10, 01:41 PM
I did lol.. can't understand what it is telling me
post a screenshot
Krauter
08-14-10, 01:44 PM
Aye sir, I ill post one when I do another try :)
I think it has to do with the t value that you were telling me about, yet from what I've tried it doesnt matter if I set it to 0, delete it or set it from a value of 0.1 all the way to 899
BowfinSS287
08-14-10, 02:31 PM
here is one i built...starts on surface...boat goes to 28 meters
then does a hydrophone check for 5 mins, then comes to
periscope depth and does a 360 search....then surfaces
[AS]
Bowfin_Hydrophone_Check
[CATEGORY]
Surfaced
[COMMANDS]
Set_Time_Compression,1,0,0,0,0,0,0
Ahead_full,0,0,0,0,0,0,10
Periscope_depth,0,0,0,0,0,0,40
Set_new_depth_relative,18,0,0,0,0,0,30
Ahead_slow,0,0,0,0,0,0,2
Hydrophone_normal_sweep,0,0,0,0,0,0,300
Ahead_full,0,0,0,0,0,0,10
Periscope_depth,0,0,0,0,0,0,30
Ahead_slow,0,0,0,0,0,0,5
Rise_whole_periscope,0,0,0,0,0,0,5
Activate_Scope_Station,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,2
Sweep_Scope,0,0,360,120.0,0,0,1
Leave_Scope_Station,0,0,0,0,0,0,1
Lower_whole_periscope,0,0,0,0,0,0,1
Ahead_standard,0,0,0,0,0,0,5
Surface,0,0,0,0,0,0,0
[COMMANDS_END]
TheDarkWraith
08-14-10, 02:36 PM
here is one i built...starts on surface...boat goes to 28 meters
then does a hydrophone check for 5 mins, then comes to
periscope depth and does a 360 search....then surfaces
excellent. I see most everyone is figuring out how to make their own scripts :D
I do have one question:
Periscope_depth,0,0,0,0,0,0,40
Set_new_depth_relative,18,0,0,0,0,0,30
why don't you just issue the command 'Set_new_depth,28,0,0,0,0,0,70'?
you can also do away with the Wait command and tack a 2 onto the end of Activate_Scope_Station. Would accomplish same thing.
BowfinSS287
08-14-10, 02:46 PM
the reason i set my depth this way, was to stop the crash dive
from activating....is there a better way to do this ?
thanks for tip.....i'll lose the wait command
TheDarkWraith
08-14-10, 02:48 PM
crash dive from activating? How? Try the Set_new_depth command, it should work perfectly.
BowfinSS287
08-14-10, 02:53 PM
i also use MightyFine Crew Version: 1.2....
***NOTE 2***
The Crash dive command has a problem and does not trigger the crash dive script, so my crash dive behaviors will not trigger. I have included an optional workaround that uses the set depth command to trigger crash dive. Using that option, changing depth via the dive gauge will trigger a crash dive if the boat is on the surface, no matter what depth you click, so use with caution.
TheDarkWraith
08-14-10, 02:59 PM
well if you're not triggering the crash dive with the way you have the commands now you shouldn't with just the one command I mentioned. Both commands you're using use the 'Set_depth' command of the game. So you should be fine.
BowfinSS287
08-14-10, 03:44 PM
i used the Set_new_depth command and it activated the crash dive alarm
but when i use the two commands together
Periscope_depth,0,0,0,0,0,0,40
Set_new_depth_relative,18,0,0,0,0,0,30
i can get around this action...i bet it has something to do with all my mods
you name it......i have it.....:DL
TheDarkWraith
08-14-10, 03:48 PM
i used the Set_new_depth command and it activated the crash dive alarm
but when i use the two commands together
Periscope_depth,0,0,0,0,0,0,40
Set_new_depth_relative,18,0,0,0,0,0,30
i can get around this action...i bet it has something to do with all my mods
you name it......i have it.....:DL
interesting :hmmm: Well thankfully I added the new command Set_new_depth_relative then :DL
BowfinSS287
08-14-10, 04:00 PM
yes that command saved the day....keep adding things:D
Krauter
08-14-10, 04:06 PM
Tried taking Screenies of the Debug window with Ctrl+f11 and then print screen.. no go.. how do I do this? :hmmm:
TheDarkWraith
08-14-10, 04:10 PM
Tried taking Screenies of the Debug window with Ctrl+f11 and then print screen.. no go.. how do I do this? :hmmm:
I use a program called Snag-It 7 to capture stuff like that. What does it basically say?
TheDarkWraith
08-14-10, 04:28 PM
Well I get a series of messages when I open the game and then more when I actually load a mission/campaign.. I will put those on here when I load up the game again gimme a sec
Edit: class TDWAutomation._init_:Exception! Current file in use C:\Ubisoft\SilentHunter5\data\Automation\Krauters_ Automation.SHA
there's the key. You have a problem with your .SHA file. Send it to me I'll look it over.
Krauter
08-14-10, 04:33 PM
I just blended (well copied and pasted) my files into yours, and now the automation works completely fine. Except for one thing. Everything is rushed.
For example with my scripts of pre-surface action:
[AS]
Miscellaneous
[CATEGORY]
Pre-Surface Actions
[COMMANDS]
Ahead_one_third,0,0,0,0,0,0,5 ; ahead 1/3 bell
Report_nearest_sound_contact,0,0,0,0,0,0,1 ; report the nearest sound contact detected.
Double_knuckle_port,0,0,0,0,0,0,5 ; 90 degree turn to port followed by a short straight run followed by another 90 degree turn to port
Double_knuckle_port,0,0,0,0,0,0,15 ; 90 degree turn to port followed by a short straight run followed by another 90 degree turn to port
Double_knuckle_starboard,0,0,0,0,0,0,5 ; 90 degree turn to starboard followed by a short straight run followed by another 90 degree turn to starboard
Double_knuckle_starboard,0,0,0,0,0,0,0.5 ; 90 degree turn to starboard followed by a short straight run followed by another 90 degree turn to starboard
Hydrophone_normal_sweep,0,0,0,0,0,0,2 ; perform normal sweeps on hydrophone
Periscope_depth,0,0,0,0,0,0,1 ; go to periscope depth.
Rise_whole_obs_periscope,0,0,0,0,0,0,0.5 ; fully raise the obs scope
Activate_Scope_Station,1,0,0,0,0,0,0.5 ; activates a scope station where x = the scope station number (0=attack, 1=obs, 2=UZO)
Sweep_Scope,1,0,360,30,0,0,0.5 ; sweep the scope from a start of y degrees to an end of z degrees
Leave_Scope_Station,0,0,0,0,0,0,2 ; leaves the scope station and returns to bridge
Surface,0,0,0,0,0,0,1 ; surface the boat ;
Ahead_standard,0,0,0,0,0,0,1 ; ahead standard bell
[COMMANDS_END]
Everything is rushed, My double Knuckles are commanded one after the other, not 5 seconds after the command had been EXECUTED (not uttered) like I thought. Same with the Periscope sweep. Order Periscope depth, immediately gone to Obs Periscope and then I've completed the sweet way before the scope has even broken the surface..
TheDarkWraith
08-14-10, 04:40 PM
I just blended (well copied and pasted) my files into yours, and now the automation works completely fine. Except for one thing. Everything is rushed.
For example with my scripts of pre-surface action:
[AS]
Miscellaneous
[CATEGORY]
Pre-Surface Actions
[COMMANDS]
Ahead_one_third,0,0,0,0,0,0,15 ; ahead 1/3 bell
Report_nearest_sound_contact,0,0,0,0,0,0,15 ; report the nearest sound contact detected.
Double_knuckle_port,0,0,0,0,0,0,90 ; 90 degree turn to port followed by a short straight run followed by another 90 degree turn to port
Double_knuckle_port,0,0,0,0,0,0,90 ; 90 degree turn to port followed by a short straight run followed by another 90 degree turn to port
Double_knuckle_starboard,0,0,0,0,0,0,90 ; 90 degree turn to starboard followed by a short straight run followed by another 90 degree turn to starboard
Double_knuckle_starboard,0,0,0,0,0,0,90 ; 90 degree turn to starboard followed by a short straight run followed by another 90 degree turn to starboard
Hydrophone_normal_sweep,0,0,0,0,0,0,15 ; perform normal sweeps on hydrophone
Periscope_depth,0,0,0,0,0,0,45 ; go to periscope depth.
Rise_whole_obs_periscope,0,0,0,0,0,0,0 ; fully raise the obs scope
Activate_Scope_Station,1,0,0,0,0,0,8 ; activates a scope station where x = the scope station number (0=attack, 1=obs, 2=UZO)
Sweep_Scope,1,0,360,30,0,0,2 ; sweep the scope from a start of y degrees to an end of z degrees
Leave_Scope_Station,0,0,0,0,0,0,5 ; leaves the scope station and returns to bridge
Surface,0,0,0,0,0,0,30 ; surface the boat ;
Ahead_standard,0,0,0,0,0,0,0 ; ahead standard bell
[COMMANDS_END]
try the changes in yellow above.
Krauter
08-14-10, 04:59 PM
Those worked exceptionally well.. Now I just have to fix up the other commands so that they're all not executed right away.
Trevally.
08-14-10, 07:33 PM
Ok here is the one ive been working on for patroling
[AS]
patrol
[CATEGORY]
Search on patrol
[COMMANDS]
Set_Time_Compression,1,0,0,0,0,0,0
Wait,0,0,0,0,0,0,15
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,0
Toggle_free_camera,0,0,0,0,0,0,5
Camera_on_next_unit,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,45
Toggle_free_camera,0,0,0,0,0,0,0
Ahead_slow,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,0
Set_Time_Compression,2,0,0,0,0,0,0
Hydrophone_normal_sweep,0,0,0,0,0,0,60
Report_nearest_sound_contact,0,0,0,0,0,0,0
Knuckle_starboard,0,0,0,0,0,0,0 (this forces me down to 24m)
Wait,0,0,0,0,0,0,90
Hydrophone_normal_sweep,0,0,0,0,0,0,60
Report_nearest_sound_contact,0,0,0,0,0,0,0
Rise_whole_periscope,0,0,0,0,0,0,6
Activate_Scope_Station,0,0,0,0,0,0,0
Periscope_depth,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,15
Sweep_Scope,0,0,360,120.0,0,0,1
Report_nearest_visual_contact,0,0,0,0,0,0,1
Leave_Scope_Station,0,0,0,0,0,0,0
Lower_whole_periscope,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,10
Toggle_free_camera,0,0,0,0,0,0,0
Camera_on_next_unit,0,0,0,0,0,0,0
Wait,0,0,0,0,0,0,5
Set_Time_Compression,1,0,0,0,0,0,0
Ahead_full,0,0,0,0,0,0,5
Surface,0,0,0,0,0,0,0
Return_to_course,0,0,0,0,0,0,5
Wait,0,0,0,0,0,0,45
Ahead_standard,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,10
Leave_NavMap_Station,0,0,0,0,0,0,0
Surface,0,0,0,0,0,0,0
Captains_bed_view,1,0,0,0,0,0,5(wake me if there are any contacts:yawn:)
Activate_NavMap_Station,0,0,0,0,0,0,60
Set_Time_Compression,512,0,0,0,0,0,0
Wait,0,0,0,0,0,0,18000
Leave_NavMap_Station,0,0,0,0,0,0,0
Loop,2,0,0,0,0,0,0
[COMMANDS_END]
This is all working well. Captains bed does not though.
As new commands are added this automation feature by TDW will be amazing.
What is everyone else using automation for?
TheDarkWraith
08-14-10, 07:46 PM
Knuckle_starboard,0,0,0,0,0,0,0 (this forces me down to 24m)
Wait,0,0,0,0,0,0,90
Captains_bed_view,1,0,0,0,0,0,5(wake me if there are any contacts:yawn:)
I have to add a new command for teleporting yet so yes the captain's bed won't work.
There's really no reason to use the Wait command like you're doing. Take that 90 on the end of wait and place it as the end parameter of the Knuckle_starboard then delete the Wait command. It will do the same thing and you'll have one less command to worry about in your script.
It's a good thing you brought the knuckles up. I have to make new commands for them because the stock commands exhibit this bug you mention. Any other emergency commands I should make since I'll be making new commands tomorrow for Automation?
On the sweep scope I'm going to take one of the available parameters and make it toggle whether the crew reports to you when a contact is spotted while sweeping. That way it's like the crew is actually doing something (well your XO at least). There really is endless possibilities with Automation.......
Trevally.
08-14-10, 08:01 PM
Thanks again I will sort that.
As for new commands the teleporting would really great.
As before more stations with sweep features.
Some control over the camera movement (if poss)
Not sure on this but if the script could react to information gained ie:-
I am patroling on surface as part of script and aircraft is spotted. Automate then issues command-
x1 time sclae
battle stations
ahead full
Dive 50m
DavyJonesFootlocker
08-14-10, 10:16 PM
Erm, how do you make custom scripts?
BowfinSS287
08-14-10, 10:39 PM
i found another problem that i can't explain why it happens
but i found a way around it....here is what happens
i want this script to run 12 times,but when i use the Loop,12,0,0,0,0,0,0
command....all works fine but the 2nd time around the Sweep_Scope,x,y,z,zz,0,0,t
exits the station b4 it has completed the 360 scan....so to fix this
i just copied the script 12 times within the same file and dropped the
loop command.....now it works fine
this new feature is really great....starting to feel like i have a crew
thanks TDW
TheDarkWraith
08-15-10, 04:44 AM
i found another problem that i can't explain why it happens
but i found a way around it....here is what happens
i want this script to run 12 times,but when i use the Loop,12,0,0,0,0,0,0
command....all works fine but the 2nd time around the Sweep_Scope,x,y,z,zz,0,0,t
exits the station b4 it has completed the 360 scan....
you shouldn't have to do that, that's what the loop command is for....I think I know why this is happening and I'll fix it.
Freelanca
08-15-10, 06:53 AM
i found another problem that i can't explain why it happens
but i found a way around it....here is what happens
i want this script to run 12 times,but when i use the Loop,12,0,0,0,0,0,0
command....all works fine but the 2nd time around the Sweep_Scope,x,y,z,zz,0,0,t
exits the station b4 it has completed the 360 scan....so to fix this
i just copied the script 12 times within the same file and dropped the
loop command.....now it works fine
this new feature is really great....starting to feel like i have a crew
thanks TDW
yeah I have the same problem as well when looping, I wasn't sure if it was just my PC chugging along :DL but good to hear a fix is on the way. DARK to rescue again lol.
Krauter
08-15-10, 01:03 PM
TDW; how would I package my scripts into folders so that they don't conflict with yours (ie: Like how I packaged them earlier, the game just ignored them completely).
Also, How do I upload onto subsim?
TheDarkWraith
08-15-10, 01:20 PM
TDW; how would I package my scripts into folders so that they don't conflict with yours (ie: Like how I packaged them earlier, the game just ignored them completely).
Also, How do I upload onto subsim?
open notepad and copy your script code into it. Save as a .SHA file in the \data\Automation folder.
Krauter
08-15-10, 07:41 PM
I was just wondering because I wanted to release some scripts I've created to see if there would be any interest in the population to create more.
Trevally.
08-16-10, 10:29 AM
Hi Krauter
I would be interested in what you have written.
I was just wondering because I wanted to release some scripts I've created to see if there would be any interest in the population to create more.
Yes Please:yeah:
sentenc3
08-16-10, 11:34 AM
I was just wondering because I wanted to release some scripts I've created to see if there would be any interest in the population to create more.
:yeah::yeah::yeah::yeah::yeah:
Trevally.
08-16-10, 01:09 PM
Here is my search on patrol script from the first page.
It now works quite well.
[AS]
patrol
[CATEGORY]
Search on patrol
[COMMANDS]
Set_Time_Compression,1,0,0,0,0,0,0
Get_depth_under_sub_keel,0,0,0,0,0,0,2
Periscope_depth,0,0,0,0,0,0,0
Toggle_free_camera,0,0,0,0,0,0,5
Camera_on_next_unit,0,0,0,0,0,0,45
Toggle_free_camera,0,0,0,0,0,0,0
Ahead_slow,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,0
Set_Time_Compression,2,0,0,0,0,0,0
Hydrophone_normal_sweep,0,0,0,0,0,0,60
Report_nearest_sound_contact,0,0,0,0,0,0,0
Knuckle_starboard,0,0,0,0,0,0,90
Hydrophone_normal_sweep,0,0,0,0,0,0,60
Report_nearest_sound_contact,0,0,0,0,0,0,0
Rise_whole_periscope,0,0,0,0,0,0,6
Activate_Scope_Station,0,0,0,0,0,0,0
Periscope_depth,0,0,0,0,0,0,30
Sweep_Scope,0,0,360,120.0,0,0,1
Report_nearest_visual_contact,0,0,0,0,0,0,1
Leave_Scope_Station,0,0,0,0,0,0,0
Lower_whole_periscope,0,0,0,0,0,0,10
Toggle_free_camera,0,0,0,0,0,0,0
Camera_on_next_unit,0,0,0,0,0,0,5
Set_Time_Compression,1,0,0,0,0,0,0
Ahead_full,0,0,0,0,0,0,0
Surface,0,0,0,0,0,0,0
Return_to_course,0,0,0,0,0,0,45
Ahead_standard,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,10
Leave_NavMap_Station,0,0,0,0,0,0,0
Surface,0,0,0,0,0,0,0
Activate_NavMap_Station,0,0,0,0,0,0,60
[COMMANDS_END]
Note that I have used cameras to view the dive and surface.
At he moment this may cause you to end up swimming when script ends.
If it does you can teleport back to the bridge using UI commands.
Adding the double surface at the end was due to my sub being stuck at 7m for some reason.
TheDarkWraith
08-16-10, 07:30 PM
fixed the looping problem with Sweep_scope. I've also 'beefed up' Sweep_scope:
parameter 5 will determine the options below:
# available options (parameter 5):
#
# 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 script on contact spotted
# bit 5 = abort script on contact spotted
you have to do bitwise addition (you can use the calculator in Windows to do this - set it to Binary mode and enter the bit pattern wanted (1 for enabled and 0 for disabled) and then click on decimal to get your number to put into parameter 5)
i.e.: we want bit 0, bit 1, and bit 4. This would be 10011 in binary. This would equal 1 + 2 + 16 = 19. Parameter 5 would be 19.
Sweep_scope,0,0,360,90.0,19,0,5
So depending on how you set the options you can have the scope sweeping and reporting every new contact every time it spots one by locking it and unlocking it.
Krauter
08-16-10, 07:42 PM
How would you guys like me to release the current scripts? just Copy and paste onto a post? Or Upload the document they're written on? I currently do not know how to upload files to subsim, nor do I own a filefront account.
Also, how do I package the mod so that it does not overwrite TDWs Scripts?
data\Automation\KrautersScripts.SHA?
TheDarkWraith
08-16-10, 07:47 PM
Also, how do I package the mod so that it does not overwrite TDWs Scripts?
data\Automation\KrautersScripts.SHA?
sounds and looks good to me.
Krauter
08-16-10, 07:52 PM
OK, how do I upload them to subsim.com?
TheDarkWraith
08-16-10, 07:53 PM
OK, how do I upload them to subsim.com?
you have to contact Neal or a moderator and ask to be added to the list of allowed people to upload to Subsim.
Krauter
08-16-10, 08:13 PM
Cheers, waiting for permission now
Freelanca
08-16-10, 09:56 PM
fixed the looping problem with Sweep_scope. I've also 'beefed up' Sweep_scope:
parameter 5 will determine the options below:
# available options (parameter 5):
#
# 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 script on contact spotted
# bit 5 = abort script on contact spotted
you have to do bitwise addition (you can use the calculator in Windows to do this - set it to Binary mode and enter the bit pattern wanted (1 for enabled and 0 for disabled) and then click on decimal to get your number to put into parameter 5)
i.e.: we want bit 0, bit 1, and bit 4. This would be 10011 in binary. This would equal 1 + 2 + 16 = 19. Parameter 5 would be 19.
Sweep_scope,0,0,360,90.0,19,0,5
So depending on how you set the options you can have the scope sweeping and reporting every new contact every time it spots one by locking it and unlocking it.
This sounds awesome!!!
I had an idea and was wondering if it was possible to do for the lazy skipper ( IE, me)to add pause game on sound contact spotted. Say on a patrol I wanted to go and make some lunch or have a shower I could come back and see game is paused and then set up my solution. :D
TheDarkWraith
08-16-10, 10:19 PM
This sounds awesome!!!
I had an idea and was wondering if it was possible to do for the lazy skipper ( IE, me)to add pause game on sound contact spotted. Say on a patrol I wanted to go and make some lunch or have a shower I could come back and see game is paused and then set up my solution. :D
yes that is possible. This would be perfect for those 'hard core' people who only play at 1TC all game. I'll add it to my list of commands to add.
Freelanca
08-16-10, 10:34 PM
yes that is possible. This would be perfect for those 'hard core' people who only play at 1TC all game. I'll add it to my list of commands to add.
Thanks TDW. Im loving the addition of automation in SH5. Before this I was using my Logitech g15 keyboard to do macros for alot of my automation but this has taken it to the next level. :up:
Krauter
08-16-10, 10:37 PM
One weird bug I have to report.. your one Automation script of Long Distance Travel Script is acting weird.. When I activate the script it brings me to Ahead Standard, to All Stop back to Ahead Standard and again to All Stop. However, after I manually order Ahead Standard the script resumes as normal..
:hmmm:
TheDarkWraith
08-17-10, 07:14 AM
One weird bug I have to report.. your one Automation script of Long Distance Travel Script is acting weird.. When I activate the script it brings me to Ahead Standard, to All Stop back to Ahead Standard and again to All Stop. However, after I manually order Ahead Standard the script resumes as normal..
:hmmm:
you're saying the script freezes at some point? If so, exactly where? could be a bug in my code. I'll look at it and run it in game.
Krauter
08-17-10, 10:10 AM
Well see the problem is it just pauses at the beginning, to be precise the first order does not issue.. to get the script running I had to order ahead standard myself.. then the script ran perfectly
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.