Log in

View Full Version : [REL] Automated Scripts ~ Sit Back And Be Captain!


Krauter
08-18-10, 12:24 PM
Krauters Automated Scripts for Silent Hunter 5

V0.1 ~ First Release!

Note: You need to be/have:

Patched to Version 1.2 of Silent Hunter 5

Multiple UIs for SH5 With TDC and Automation by TheDarkWraith (version 4.0+ only).

http://www.subsim.com/radioroom/showthread.php?t=166093 <--- TheDarkWraiths New UIs Mod

As of v0.1 (readme)

Welcome to Krauters Automated Scripts v0.1


This is my first try at a Mod and hopefully will help me expand to bigger and better ideas.

Seeing the unlimited possibilities that the Automation Function of TDW's NewUIs Mod opened up made me stop and think that I could maybe help contribute to teh community by writing and developping scripts to use in tandem with his Mod.

Following in this Mod are 8 scripts.

The first 4 (Emergency Evasion Tactics family) Revolve around the fact that if your sub is suddenly in the grip of Asdic. You run this script to hopefully get out of that Sonar coverage and run quietly to safety. The difference between Tactics 1 through 4 is that Tactics 1 and 2 involve a Knucle to Port (Tactic 1) or Starboard (Tactic 2). Tactics 3 and 4 add the feature of going deeper and firing off decoys (if available) with another turn Starboard (Tactic 3) or Port (Tactic 4)

Following the Emergency Evasion Scripts is the Evasion Script (I know generic names.. any help naming functions or if you see something better just let me know!) Are for when you know that you've just done something that will lead you to being detected, or are in a situation where there is a high probability you will be detected. The first is the Post Torpedo Launch, Escorts Present. As the name implies it is to be used after you've fire a torpedo, or a spread be it the case, and gets you to a deeper depth and a sufficient distance away from the point where you fired the torpedo. The script is designed so that you end up on the same course, just not in the same position or depth.

The second Evasion script is the Depth charge Evasion script. Basically a short evasion script used to get away from depth charges if you are a deep enough depth (75M+).

The Next script is the Pre-Surface Actions. Basically what it does is instead of doing all the little cautionary steps necessary to surface out of harms way yourself, this Script does it for you. Basically makes you do two spiral turns port and then starboard to check your baffles with Hydrophones and then comes up to Periscope depth to do a quick sweep of the Observation Periscope before surfacing and resuming course at Ahead Standard.

Finally the last Script, and one, I hope, will be most usefull to people, is the Hydrophone Bearing Plotter Script which, combined with the Hydrophone Plotter Utility by Gutted, will help you plot the Contacts Course, Speed, AOB and help you plot an intercept course based on the information gathered.

To find more about the Hydrophone Bearing Plotter please go to the following link.

http://www.subsim.com/radioroom/downloads.php?do=file&id=1711

Thank you for trying out this Mod! Any and all feedback is wanted and needed!

Cheers! And good hunting.

Krauter

Download v0.1 at: http://www.subsim.com/radioroom/downloads.php?do=file&id=2768

reaper7
08-18-10, 12:54 PM
Thanks Krauter :up:

sentenc3
08-18-10, 12:57 PM
We'll try ... thank you very much for the good work:salute:

Turtle01
08-18-10, 01:29 PM
same here, thank you very much for your work !
:up:

Greets
Turtle

Krauter
08-18-10, 01:32 PM
Please forgive me if you spot any problems in the Scripts.

This is my first attempt to Mod the game :)

If you see anything that needs tweaking or changing or fixing. Do me a favor and Please! Do not hesitate to PM me or post in this thread the problem that you see. I will do my best to fix the problem and get the script working properly.

Also, if anyone has any suggestions for scripts to be added, or any historical data that could help me find new ideas, don't hesitate to post it here or PM me :)

Cheers,

Krauter

reaper7
08-18-10, 01:45 PM
My better half, would like a script that turns SH5 off after X hours. :haha:

Krauter
08-18-10, 01:48 PM
:haha: fortunately for you're Kaleun half I don't think I could create a script with that capability :rotfl2:

Trevally.
08-18-10, 03:04 PM
Thanks Krauter

raven1309
08-20-10, 05:25 AM
Hi Krauter

I tried your mod and it works fine except the pre surface automation it is set to go peri depth and then uses obs scope but to use obs scope you have to go to snorkel depth otherwise the scope wont go above the water line:03:

raymond6751
08-20-10, 05:38 AM
Great idea. Thanks.

How about a script that takes care of the crew morale? I get tired of touring the boat and doing the same old chat to try and keep them happy.

DavyJonesFootlocker
08-20-10, 06:35 AM
Can you script something for the AA gunners to react automatically?

John Channing
08-20-10, 10:37 AM
Great idea. Thanks.

How about a script that takes care of the crew morale? I get tired of touring the boat and doing the same old chat to try and keep them happy.

You mean like this?

http://www.subsim.com/radioroom/downloads.php?do=file&id=1568

JCC

raymond6751
08-20-10, 06:14 PM
Your instructions readme give information but it doesn't say how to implement the scripts.

I have installed it with Jonesoft's Mod enabler, but nothing is available in the interface to activate anything.

Kindly explain.

TheDarkWraith
08-20-10, 06:17 PM
Your instructions readme give information but it doesn't say how to implement the scripts.

I have installed it with Jonesoft's Mod enabler, but nothing is available in the interface to activate anything.

Kindly explain.

press the 'gears' icon on the top left bottom bar to bring up Automation (you have to be using my UIs mod to get Automation). You should be able to figure it out from there.

raymond6751
08-20-10, 06:19 PM
You mean like this?

http://www.subsim.com/radioroom/downloads.php?do=file&id=1568

JCC

I don't know. For some reason you can be sarcastic with people. If I want to find out how yours works, I have to 'find the original' and read that. If I'm too lazy to do that...

Lazy? What about attitude? Why do something halfway?

John Channing
08-20-10, 09:28 PM
By doing something "halfway" are you refering to your apparent inability to notice whose mod that actually was (not mine) or are you refering to you not bothering to read all the way to the bottom of the brief download description where it says EDIT: This has been reverted to the original version due to issues.

Is that what you mean by doing things halfway?

You asked about a script that removes the Morale issue. I provided a link to an already existing mod that does that quite nicely.

I stopped expecting manners here shortly after the release of Silent Hunter 5, but I don't expect to be attacked for trying to help.

Noted for future reference.

JCC

DavyJonesFootlocker
08-20-10, 09:39 PM
I just love the internet. Such colourful folks.:D:D

Krauter
08-22-10, 01:18 PM
Let's all just sit back and relax please :) There is no need for any fighting while we all share the common goal of SubSimming.

Now sorry for the absence, I was away from my Home PC and thus could not alter any files..

Hi Krauter

I tried your mod and it works fine except the pre surface automation it is set to go peri depth and then uses obs scope but to use obs scope you have to go to snorkel depth otherwise the scope wont go above the water line

The problem here is that I altered my game files so that the obs. Scope is long enough to break the water line. Thank you for pointing out that not all have this benefit :).

Great idea. Thanks.

How about a script that takes care of the crew morale? I get tired of touring the boat and doing the same old chat to try and keep them happy.

As John pointed out there are a few Mods out there that take care of the morale issue. Among them is the one located in the link he posted. But my suggestion by far is the MightyFineCrew Mod, which gives you some animation for the crew and also gets rid of the crew problem.

Your instructions readme give information but it doesn't say how to implement the scripts.

I have installed it with Jonesoft's Mod enabler, but nothing is available in the interface to activate anything.

Kindly explain

As TDW also pointed out. In his mod there is a 'Gears' icon located in the top right corner. Click that and the Automation window will come up giving you a list of options.

There will be three columns. Click on one 'group' in the left side column(I've tried to group some scripts together to make it easier and faster to find the one you're looking for) and a list of available scripts will appear in the middle column. Click the one that you want to use or have available for quick access and click the arrow button (the single if you only want one, or the 'double' if you want all the available scripts in the middle window to use). After that the selected script will appear in the right column. Click on the script you want and click play (it will go from red background to green).

Please note, if you don't have v. 4.0 or higher of TheDarkWraiths New UIs Mod (link on the top of the first post) you will not be able to use this Mod as it is basically an add-on feature to his mod.

Cheers

Krauter

raymond6751
08-22-10, 06:04 PM
By doing something "halfway" are you refering to your apparent inability to notice whose mod that actually was (not mine) or are you refering to you not bothering to read all the way to the bottom of the brief download description where it says

Is that what you mean by doing things halfway?

You asked about a script that removes the Morale issue. I provided a link to an already existing mod that does that quite nicely.

I stopped expecting manners here shortly after the release of Silent Hunter 5, but I don't expect to be attacked for trying to help.

Noted for future reference.

JCC

You are correct. I apologize. I should not have assumed it was your mod.

To err is human...

raymond6751
08-22-10, 06:06 PM
As TDW also pointed out. In his mod there is a 'Gears' icon located in the top right corner. Click that and the Automation window will come up giving you a list of options.

There will be three columns. Click on one 'group' in the left side column(I've tried to group some scripts together to make it easier and faster to find the one you're looking for) and a list of available scripts will appear in the middle column. Click the one that you want to use or have available for quick access and click the arrow button (the single if you only want one, or the 'double' if you want all the available scripts in the middle window to use). After that the selected script will appear in the right column. Click on the script you want and click play (it will go from red background to green).

Please note, if you don't have v. 4.0 or higher of TheDarkWraiths New UIs Mod (link on the top of the first post) you will not be able to use this Mod as it is basically an add-on feature to his mod.

Cheers

Krauter

Thanks Krauter.

John Channing
08-22-10, 06:58 PM
You are correct. I apologize. I should not have assumed it was your mod.

To err is human...

I guess that make me devine!

:D

JCC

Krauter
08-22-10, 07:50 PM
Lol Oh Lord..

Does anyone have any suggestions or comments as to what needs to be fixed/changed in this Mod?

Webster
08-23-10, 10:07 AM
very nice

might i sugest you keep the turn sequence in the same order instead of reversing starboard and port for 3 & 4 ?

i find it would be easier to remember which direction im going in if 1 & 3 turn to one side but 2 & 4 turn to the other side

Krauter
08-23-10, 12:31 PM
very nice

might i sugest you keep the turn sequence in the same order instead of reversing starboard and port for 3 & 4 ?

i find it would be easier to remember which direction im going in if 1 & 3 turn to one side but 2 & 4 turn to the other side

Thank you for the suggestion Webster :)

I'm afraid I don't understand what you mean though :( Do you mean (for example Tactic 3) Turn to Port and then ANOTHER turn to port instead of starboard?

The reason I made the reverse turn was to get you back onto the same heading you were on before you executed the command. However if you, or anyone thinks that this is not necessary, I will change it immediately.

KarlKoch
08-23-10, 12:36 PM
Thank you for the suggestion Webster :)

I'm afraid I don't understand what you mean though :( Do you mean (for example Tactic 3) Turn to Port and then ANOTHER turn to port instead of starboard?

The reason I made the reverse turn was to get you back onto the same heading you were on before you executed the command. However if you, or anyone thinks that this is not necessary, I will change it immediately.

No, i think he means that you have tactic 1 to starboard, 2 to port, 3 to starboard again and 4 to port. I assume those 4 tactics are about the same in pairs of two.
So in a list it should looke like:
- starboard
- port
- starboard
- port

instead of;
- starboard
- port
- port
- starboard

Krauter
08-23-10, 12:50 PM
The way I have it set up is:

Tactic 1: Knuckle Port
Tactic 2: Knuckle Starboard

Tactic 3: Knuckle Port (and then another to Starboard)
" " " " 4: Knuckle Starboard (and then another to Port)

KarlKoch
08-23-10, 12:56 PM
(and then another to Starboard)
(and then another to Port)

That might have been the confusing part. ;)

Krauter
08-23-10, 01:02 PM
aah :)..

the whole point that I was going for was to get you back on your original heading with the second set of tactics

TheDarkWraith
08-23-10, 01:06 PM
there are new commands coming to Automation. I hope to have a new version released here soon. IRAI is consuming most of my time currently.

mobucks
08-24-10, 09:06 PM
I was watching star trek the next generation (uh, definate submarine influence i noticed, they go silent, fire spreads, and generally talk like they are on a fleetboat) and one of the captains said"Initiate evasion sequence blahzeblah"

anyway i read that you were looking for suggestions, so thats an idea for one. maybe too sci-fi ey?

"Initiate evasion sequence hard port!"

DavyJonesFootlocker
08-24-10, 09:29 PM
Man, I wish there was a script to have the XO compute a firing solution and all I have to do is fire.:hmmm:

TheDarkWraith
08-25-10, 08:06 PM
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 :D 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.

TheDarkWraith
08-26-10, 10:25 AM
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 ;)

Trevally.
08-26-10, 10:32 AM
This is great news TDW:yeah:

TheDarkWraith
08-26-10, 11:13 AM
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
http://www.subsim.com/radioroom/picture.php?albumid=305&pictureid=2970

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:
http://www.subsim.com/radioroom/picture.php?albumid=305&pictureid=2971

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.

TheDarkWraith
08-26-10, 12:57 PM
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

Trevally.
08-26-10, 02:13 PM
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

TheDarkWraith
08-26-10, 02:15 PM
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 :up:

Trevally.
08-29-10, 04:35 PM
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

THE_MASK
08-29-10, 05:10 PM
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 etcNice , is there a teleport function in the automated scripts ? Teleport to inside sub first maybe .

Trevally.
08-29-10, 06:08 PM
:hmmm: 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.

TheDarkWraith
08-29-10, 07:07 PM
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

:yeah: 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

Abd_von_Mumit
09-14-10, 12:44 AM
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).

DavyJonesFootlocker
09-14-10, 05:36 AM
Cool:salute:

Krauter
09-14-10, 06:23 AM
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

TheDarkWraith
11-13-10, 10:56 AM
Here is his automated scripts updated by me for v5.0.0 of the UIs mod (I'm releasing these on his behalf for compatibility reasons): http://www.filefront.com/17510032/Krauters-Scripts-Updated-by-TDW.7z/

Sammi79
12-17-10, 07:28 AM
Hi all,

I've been trying to write a navigation script to sail from Kiel docks to Heligoland via the canal. Using TDWs real navigation addon mod, plotting waypoints is not an option so I thought it would be nice to script some basic mundane navigation orders to avoid having to pilot all the way down the canal, with the idea to maybe expand orders to other locations, Scapa, channel, return routes etc...

I wrote the SHA and SHN files in notepad following the detailed instructions, and it worked. Took me half a day trial and error with absolute coodinates to get the sub to pass the canal gates safely. I then extended the route all the way down the canal and out to Heligoland. The first time I ran it it got 3/4 through then for some reason 2 of the navigation instructions got missed and the sub promptly ran aground. When I checked the file in notepad, 2 instructions had been moved to the end of the file. I cut and pasted back into the correct order, changed some numbers then ran again.

Ever since, every time I try to run the script a message in the message box says 'Navigation Script Stopped' I have tried to restore the files to their original working state but foor some reason - maybe my syntax is bad and I'm blind - It won't work.

Here are the file contents :-

"S79s Navigation Scripts.SHA"

[AS]
Sail canal to Heligoland
[DESCRIPTION]
Sail Kiel Canal to Heligoland
[DESCRIPTION_END]
[CATEGORY]
Navigation Orders
[SUBCATEGORY]
Orders from Kiel
[COMMANDS]
Navigate_from_file,0,0,S79_Nav_Kiel2Helg,0,0,0,0
[COMMANDS_END]

"S79_Nav_Kiel2Helg.SHN"

[TITLE]
Navigation Script
[TITLE_END]
[DESCRIPTION]
Order Sail to Heligoland
[DESCRIPTION_END]
[PRECONDITION]
0,0,0
[PRECONDITION_END]

1216250,6525540,-1,9999,9999,9999,1,None
(30+ similar route instructions)
947570,6503300,-1,1,0,0,1,None

If anyone can see anything obviously wrong please let me know. I know the co-ordinates are good but the script won't run. Is there a maximum size for the SHN files?

:06:

TheDarkWraith
12-17-10, 08:41 AM
There is no maximum size restriction.

you have PM from me about this :DL

Trevally.
12-17-10, 10:07 AM
@ Sammi79,

I have done some work with these. If you need any help, let me know:up:

Sammi79
12-17-10, 03:09 PM
Ok, I think I fixed it now, the last waypoint (the stop order) needs to be a distance away from the previous one, I.e. not in exactly the same place. or something like that. maybe.

Anyway thanks for the help, I can continue testing now :salute:

TheDarkWraith
12-17-10, 03:25 PM
Ok, I think I fixed it now, the last waypoint (the stop order) needs to be a distance away from the previous one, I.e. not in exactly the same place. or something like that. maybe.

Anyway thanks for the help, I can continue testing now :salute:

You cannot specify a speed of 0 in the navigation scripts

Sammi79
12-18-10, 07:09 AM
Thankyou TheDarkWraith, that was probably the original problem. In that case I guess I have to give an 'All Stop' command in the SHA file after the Navigate_from_file command? Still there are problems. Where is the debug information found? When the message box says "script stopped" it dosn't indicate why, Is it in a log file somewhere? I have enabled modding+debugging in main.cfg as per your instruction.

Also I have found that sometimes, the script does not run as it should. It says 'script started' and turns green in Automation then fails to follow the waypoints - the Navigator sometimes calls out every single course change, Oher times he is completely silent. It seems to work fine @32 TC but if I leave it @1 TC it invariably runs aground before maneuvering to the first waypoint. Any ideas why this is?

Trevally.
12-18-10, 08:47 AM
missing waypoints can happen if they are too far apart. If you use precision setting for the long ones it helps. Otherwise, just add one between the leg that causes the problem.

@tc 32 it works due to wave, wind etc having no effect on your boat. You can notice this in bad weather at TC1 your boat will not be able to use radar as you keep ducking under. At tc32 this does not happen. So its the same for pitch and roll causing you to miss.

Remember that the target area between precision and non precicion is different. Non = 100m target area. Preciosion is 50m.

For no call outs, this is a save reload bug.