Log in

View Full Version : [REL] SH3 Long Patrol Script!


Rubini
03-26-12, 04:22 PM
Updated 07/05/2012 V1.1
SH3_LongPatrol_Script v1.1 by Rubini

Changelog v1.1:
- few script refinements
- added return to previous script boat speed (ahead standard or ahead slow) after unpause.
- adjusted the image search frequency (the script will be much more smart to detect images now)
- fixed enemy image recon detection (.bmp and coord.); task forces will now be detected too.
- added TC control on the fly! (not more needed to adjust it on the .ini)
- added keyboard key behaviour press (pause game&script or only script) on the fly!
- added new image recon for fog sighted (16x) (for H.sie&Stieblerīs mod users)
- added player configurable image recon for any GUI, adjustable on .ini file!
- added submerged and surfaced time length factors adjustables by player on .ini (LGN1 requestion)
- adjusted the actions time length (they are almost the same now for any TC)
- added player configurable dive time for shallow or deep hydro checks on .ini and on the fly (J0313 suggestion)

All these new features are explained on the .ini

To the new configurable image recon feature work you need to replace the four .bmp with yours own (GUI related) and adjust the coordenates on .ini (resolution related). For WideScreen basic GUI users it will work out of the box, no work needed.

Please, let me know any issue or suggestion about this script.
Good hunting!
Rubini.
==================================================
Basic key commands for the script v1.1:
(Note that the script will work out of the box without any adjust, just left it with default values if you want to).

Pause/Break=> pause/unpause the script (the same as old version)
Alt+Pause/Break=> reset script (the same as old version)
Crt+Alt+Pause/Break=> exit app (the same as old version)

Advanced key commands for the script v1.1:
(All these commands works on the fly, I mean, with the game and script running, not need to pause or go out of the game or from scrip).

Alt+1=> force TC=128 (game&script)
Alt+2=> force TC=256 (game&script)
Alt+5=> force TC=512 (game&script)
Alt+0=> force TC=1024 (game&script)

Alt+7=> force hydrocheck depth to ~25m
Alt+8=> force hydrocheck depth to ~50m
Alt+9=> force hydrocheck depth to ~75m

Alt+k=> toggle between "any command key press will pause the game&script" or "only will pause the script"

Alt+x=> snorkel up/down with sound

=====================================
=====================================
Original readme
SP 26/03/2012
SH3_LongPatrol_Script v1.0a by Rubini
(dropped v1.0 because it was showing a debug window for test purposes. But other than this one, its exactly the same)


What is this?

The script executes a sequential chain of crew commands to allow better contact search during long patrol trips. It is not aimed for departure from harbors, for full of actions moments... really, just for long patrols moments. Itīs some sort of "macro" but a complex and smart one.

The other goal (perhaps the main goal) is to free you, the player, from that boring long patrol trips in front of your computer...you can now make something more with your RL between actions in Sh3 while your crew performs a smart search! (although I had added some options for the ones that wants to make more routinely duties like hydro checks, etc. See below)


How it was built?

Using AutoHotkey, a freeware powerful computer language for macros, scripts and also for games. Take a look there:http://www.Autohotkey.com (http://www.Autohotkey.com)


How it works?

The script is compiled in an .exe (virus free!) that also calls for Sh3.exe itself. The script start paused, so you can use (unpause it) at any time (or never! :DL). You can pause again, reset or even exit it at any time too. It uses "only one" key: PAUSE/BREAK (pause/unpause script), ALT+PAUSE/BREAK (reset script), Crtl+ALT+PAUSE/BREAK (exit app)


What exactly it does?

Script resumed sequence:

1. NavMap

2. Ahead standard

3. TC to 128, 256, 512 or 1024 (player choice on ini)

4. Surface for visual/radar search, for 4 to 8hrs (depends on TimeCompression)

5. Ahead slow

6. Dive to 32 to 70m (depends on TimeCompression)

7. Hydrophone search for 1 to 2hrs (depends on TimeCompression) - The player can do this by yourself adjusting this parameter on the ini file.

8. PD for pre surface check for 30 to 60min (depends on TimeCompression) - The player can do this by yourself adjusting this parameter on the ini file.

9. Loop!

Also you can enable reports during the cycles, like weather, visual and sound contacts, send radio patrol reports, etc. All customizable on ini.

The script also can pause the game and the script automatically when contacts were made, even for distant convoys radio contacts (this last one isnīt allowed on stock game!!!). These are made by image recon, and for now, only works for WideScreen1360x768 using the basic WS GUI. See here: http://www.subsim.com/radioroom/showthread.php?t=166094 (http://www.subsim.com/radioroom/showthread.php?t=166094). So if you donīt use this GUI you can disable this option on ini, the imagerecon will not work at all. (but not really necessary to disable it).

The script adds yet the missing snorkel sound up/down by pressing ALT+x. Note that the sound will be played even if you donīt have snorkel. So use it accordingly. The snorkel sound is on the data\sound and can be edited as you like.

Also a lot others smart (well, a try :DL ) controls and checks, like start the Sh3.exe, check if the game is running, check active window, smart keyboard - script will pause at any key pressing with few exceptions ; some keys are used also by the script like ALT, SHIFT, etc - send beep feedbacks, etc.

The code uses complex programming routines to not interfere with the game performance. I have Win7 64 bits, I52500, GTX560, 8GB ram and the scripts run at back without ANY problem or slowdown.


Installation ?

JSGME ready. The files needs to be in the same directory (except the snorkel sound obviously)


Usage ?

Just double click on the SH3_LongPatrol_Script.exe (or create a shortcut for it on yout desktop). It will start the Sh3 game and the script (you can also start the script and the game alone if you want, see the ini file).

Goes to Sh3 normally and when you are at open sea, plot you route and press PAUSE/BREAK once to start the script (a beep will play). You can be at any position, under or below water, at any speed, at any TC. The script will adjust for its settings and the patrol routine will start.

If you want to do anything in the middle of the script patrol just press the desired key (your own commands_xxx.cfg ones) - a beep will sound - and the script will pause at that point; do what you want (anything). When done, press PAUSE/BREAK again and the script will continue from that point. If you changed to much thing (direction, change deep position, etc) could be a good idea to reset and start the script again (ALT+PAUSE/BREAK, PAUSE/BREAK). Beeps will sound specifically for each script action (pause, reset, etc).

If a contact was achieve the in game TC will drop accordingly yours settings on Main.cfg (it is in the folder where Sh3 save the games/careers, etc). I suggest to adjust the Main.cfg for airplanes, ships and radio contacts to zero or 1 (one if you uses WS GUI). Not really necessary, but fit better the idea to go out for your RL and when return, any contact made by crew will be there waiting you.
This point ahead (a contact made) is up to you. You can go to it or just ignore it pressing again the PAUSE/BREAK once or twice (one beep unpaused, two beeps paused) and go on.

Seems complicated but it is not. Itīs easy (only one key), if you made something wrong just reset and restart the script on the fly! Easy as cake.
The option to exit the app (CRTL+ALT+PAUSE/BREAK) isnīt to be used because, again, if you are in doubt/troubles just reset it. It will not start again unless you press PAUSE/BREAK and so on.

I guess that ppl need to play a bit with it to get secure and confident about its use.


Remarks and tips:

1. The ini file settings are auto explicative, pay attention.

2. The script canīt read anything from the game. The contact pauses are made by image recon. I provided them for WS 1360x768 basic users. If you use any other GUI the imagerecon routine pixels address and reference images needs to be redone. Itīs easy but you need to have that GUI and I only have my own modded game for now. I can show how to make it if someone is interested.

3. A workaround for the imagerecon is to set yours contacts to zero (pause) on main.cfg file. This will works correctly and very well with the script.

4. Anyway the minimum recommended for SH3 serious game for airplanes, ships and radar contacts is 1 (main.cfg again).

5. The script adds a small icon on the task bar when it is running. When closed, the icon goes out too. Right click it o see some options.

6. Stieblerīs heavy fog warnning, IIRC, drops the TC for 16 and this can mess with the script. I suggest to not use it or we can also ask to Stiebler to allow an option to drop it to 1 or 0 (pause) at once.

7. As a first try, after have the game running just play a bit with that "only one key". Pause, unpause, reset, and exit (if exit needs to alt+ tab and then restart the script again). Press some in game keys to see how the script pauses. And so on. Dont fear, its just a smart macro that has only crew commands. It will not save, delete, load or copy anything.


Credits:

TDW for the initial idea on SH5 and Privateer for suggested the use of 3rd part softers.

That is it!
Hopes that it could be useful for you too.
If you try it, post feedbacks .

Good hunting!
Rubini.
=================================================
Link V1.0a
http://www.mediafire.com/?6v1fa3d0f9ygipi (http://www.mediafire.com/?6v1fa3d0f9ygipi)

Link V1.1
http://www.mediafire.com/?gb7x1zuyia72i0n (http://www.mediafire.com/?gb7x1zuyia72i0n)

reaper7
03-26-12, 05:50 PM
That is it!
Hopes that it could be useful for you too.
If you try it, post feedbacks .

Good hunting!
Rubini.
=================================================
Link:
http://www.mediafire.com/?u398ud17f6k5wm5 (http://www.mediafire.com/?u398ud17f6k5wm5)

Download and it works perfectly so far, very nice addition to Sh3 :salute:

Rubini
03-26-12, 06:14 PM
Download and it works perfectly so far, very nice addition to Sh3 :salute:
Thanks reaper7!:up:

Rubini
03-26-12, 06:25 PM
Uhhh...just noticed that this version is showing a window with all the variables used by the script.
This was just for debug purposes.:damn:
Already reuploaded a version without this (v1.0a).
Sorry!:D

reaper7
03-26-12, 06:31 PM
Uhhh...just noticed that this version is showing a window with all the variables used by the script.
This was just for debug purposes.:damn:
Already reuploaded a version without this (v1.0a).
Sorry!:D

:haha: was wondering what I was meant to do with them :O:

Rubini
03-26-12, 06:36 PM
:haha: was wondering what I was meant to do with them :O:
LOL!:rotfl2:
Let me know if some more odd things happens!:88)

Madox58
03-26-12, 07:55 PM
Nice work Mate.
:salute:

You really didn't need to credit me though.
:)

Rubini
03-26-12, 09:25 PM
Nice work Mate.
:salute:

You really didn't need to credit me though.
:)
But if you didnīt have post replies and insights about that softers i never had start to look at them...and was a nice surprise, i learned a lot, was a revival for me (have had good knowledge on Basic and Cobol - Iīm old, ok! - 20-25 years ago.) This was one of the mods that I most liked to do.:up:

Magic1111
03-27-12, 04:03 AM
Hi Rubini!

Two questions please:D:

1.) Does your Script work with Widescreen MaGUI from here (http://174.123.69.202/~subsimc/radioroom/showthread.php?t=175278)?

2.) Does your Script work in connection with SH3-Commander and how? :hmmm: Because the SH3-Commander .exe starts automatically the SH3.exe.

Best regards,
Magic

Rubini
03-27-12, 11:51 AM
Hi Rubini!

Two questions please:D:

1.) Does your Script work with Widescreen MaGUI from here (http://174.123.69.202/~subsimc/radioroom/showthread.php?t=175278)?

2.) Does your Script work in connection with SH3-Commander and how? :hmmm: Because the SH3-Commander .exe starts automatically the SH3.exe.

Best regards,
Magic

1. the script works with any Sh3 installation. Just the imagerecon is GUI specific, but itīs optional on the ini. Use zero on your main.cfg for airplanes, ships and radio contacts for best results.

2. Not a problem, this is also optional on the ini, then launch the script first.:up:

Wolfstriked
03-27-12, 12:47 PM
Rubini,genius idea and love that you can set it to pause game when enemy is sighted.Just an issue I am having is sometimes I press pause/break key and nothing happens.Also,I set to flank speed and press P/B and it goes to nav map,TC goes up but it stays at flank speed damaging the engines.

LGN1
03-27-12, 03:43 PM
Hi Rubini,

I've tested the script. Works very well. Very nice work :up: Thanks.

Just one small question: Is the snorkel depth command used at any time? I've seen it in the command list, but I don't know when it is used :hmmm:

Regards, LGN1

vienna
03-27-12, 05:35 PM
2. Not a problem, this is also optional on the ini, then lunch the script first.:up:


I've downloaded but have not yet tried the mod. One question: is it required to have lunch or can I skip this part? I've been trying to lose a few pounds... :D

...

Rubini
03-27-12, 09:34 PM
Rubini,genius idea and love that you can set it to pause game when enemy is sighted.Just an issue I am having is sometimes I press pause/break key and nothing happens.Also,I set to flank speed and press P/B and it goes to nav map,TC goes up but it stays at flank speed damaging the engines.
I will try to help to clarify how the script sequence works and the best scenario to use it. I guess that these type of replies can be useful for all:

1. You can always use/make the script running in background because in truth It will never start to send key press unless you press the PAUSE/BREAK. So, again, it will not do anything until you press PAUSE/BREAK. And will stop to send things when you press any key, PAUSE/BREAK or reset/exit the script.

2.All the time that you press PAUSE/BREAK the script will toggle pause. If UNPAUSE is sent, then it will do these things (it do more things when you play PAUSE/BREAK, it will do different things when PAUSE, but these are what matters here for UNPAUSED state):

Go NavMAP, <== Here your second reply, edited: Wolfstiked!
Return to couse,
TC=1
TC=Player setting on ini (128/256/512/1024)
Go to main LOOP script

The above is necessary because the PAUSE/BREAK is also used to put the script on the rails again. See, we canīt know what each ppl will do when he pause the script. Then it needs to have a "small" restart all time that ppl unpause it.

Also look that I donīt put the speed ahead standart on the above, so it will continues with your choosed speed until find a spped command inside the script. The main motive is that we have different speeds inside the script (for surfaced and for submerged). But see below what you can do...

3. You always can change speed and plot waypoints with the mouse at any time! Donīt forget this ! In truth you can send any command with the mouse during the script execution, but some will result in strange things...This is why i made the script pause at any key press, but allowed the mouse to be used. I guess that you can get my point.;)

4. When you alt tab, the script and the game pauses. Just press PAUSE/BREAK and the SH3 will maximize and the script will unpause automatically. Usefull for some situations.

5. If you change the TC with the mouse the script will be messed, as it follow its own time, not the game time. So, both must stay at the "same music". If you want to change in game the TC, pause the script before it.

6. Dont forget: If in trouble, just reset the script (it will be also paused) with ALT+PAUSE/
BREAK

7. The PAUSE/BREAK will be always work (with feedback beep/beeps)...if not, check if the script is really running at background...:03:

Rubini
03-27-12, 09:44 PM
Hi Rubini,

I've tested the script. Works very well. Very nice work :up: Thanks.

Just one small question: Is the snorkel depth command used at any time? I've seen it in the command list, but I don't know when it is used :hmmm:

Regards, LGN1
No, it is not. I put there on the ini a bit more commands than I used. Also note that if you follow the directions on the ini file you can add any command or variables (options) on the ini. I made this way for future updates, new scripts, etc. The routine that i made to read the ini is too powerfull, we can have a million of options/commands there that the script will understand and will be ready to use them.:up:

Rubini
03-27-12, 09:46 PM
I've downloaded but have not yet tried the mod. One question: is it required to have lunch or can I skip this part? I've been trying to lose a few pounds... :D

...

Ops...! My bad. I donīt know if you noticed but iīm always revising my posts and always editing them beacuse I have a very poor english and a small degree of dislexia to write things on the keyboard ( and manually too!):damn::DL

irish1958
03-28-12, 08:04 AM
Ops...! My bad. I donīt know if you noticed but iīm always revising my posts and always editing them beacuse I have a very poor english and a small degree of dislexia to write things on the keyboard ( an manually too!):damn::DL
I have the same problem and English is my native language. Perhaps, it is due to our mutual field of study.
Thanks for your great work on SH3.

J0313
03-28-12, 09:01 AM
This is great work my friend. Awesome job! Between you, Hsie and Stiebler, you guy's have made SH3 my favorite subsim. There are some questions I have regarding this mod of yours but it will have to wait until I get home from work and I can collect my thoughts. This really has more potential than is on the surface I think and I hope that you continue tinkering with it.:rock:

vienna
03-28-12, 12:32 PM
Ops...! My bad. I donīt know if you noticed but iīm always revising my posts and always editing them beacuse I have a very poor english and a small degree of dislexia to write things on the keyboard ( and manually too!):damn::DL


Not a worry, Rubini; I was just teasing you a bit. I also have to go back and tweak my posts quite often because I also have to deal with a bit of dyslexia and find it hard to deal with keyboards; I still have not been able to learn how to touch-type (BTW, a comedian recently commented on how cruel the person was who named a reading disorder that affected letter order "dyslexia"). I have a further problem with keyboards because I am old enough to have started typing on the much older manual (mechanical) typewriters that required a good bit of finger pressure to activate; hence, when I type I have a tendency to hit the keys rather hard, which often annoys others who may be nearby. In trying to compensate, I sometimes hit the keys too softly and do not get the letter(s) to appear. This is a particular bother since, in my work, I have had to type on many different keyboards of varying sensitivities...

Your English is fine and better than some of the native-born people I have had to deal with, including some people I have worked with who have college degrees. Thanks again for the great mods!... :yeah:

LGN1
03-28-12, 02:41 PM
No, it is not. I put there on the ini a bit more commands than I used. Also note that if you follow the directions on the ini file you can add any command or variables (options) on the ini. I made this way for future updates, new scripts, etc. The routine that i made to read the ini is to powerfull, we can have a million of options/commands there that the script will understand and will be ready to use them.:up:

Thanks for the reply, Rubini :up:

Any plans for releasing the source code so that others can get some inspiration :D

Once again, great work!

Regards, LGN1

Rubini
03-28-12, 03:49 PM
I have the same problem and English is my native language. Perhaps, it is due to our mutual field of study.
Thanks for your great work on SH3.
Thanks irish...and good to know that we have something more in common!:up:


Not a worry, Rubini....
Your English is fine and better than some of the native-born people I have had to deal with, including some people I have worked with who have college degrees. Thanks again for the great mods!... :yeah:
Almost all my english skills i learnned here in this forum along of these 7 years!:DL

Rubini
03-28-12, 04:05 PM
This is great work my friend. Awesome job! Between you, Hsie and Stiebler, you guy's have made SH3 my favorite subsim. There are some questions I have regarding this mod of yours but it will have to wait until I get home from work and I can collect my thoughts. This really has more potential than is on the surface I think and I hope that you continue tinkering with it.:rock:
This is a good point. This really has a lot of more potential; for example we can add sound to almost any command on sh3 by key press (SH5 have this feature as stock). By imagerecon others iterations&scripts can be fired and so on.:up:

Thanks for the reply, Rubini :up:

Any plans for releasing the source code so that others can get some inspiration :D

Once again, great work!

Regards, LGN1
The source code will be usefull only for AutoHotkey/Autoit fellows, as it is very complex at first for ppl that don't have programing experience. What I should like to see is others script proposals...if we have some new idea/consense about a new good script i can make it in few minutes now that i have the necessary knowledge.:up:

Anyway I can release the souce code in a near future...let's wait for more feedbacks(good or not so good:DL) first.

Borgneface
03-30-12, 01:08 PM
Salute! Rubini,
Your mod is exactly what I have been expecting for a long time! :yeah:
Before I start doing anything...Just one small quaestion: Is it compatible with GWX as well as SH3?
I am enclined to think it is, but with my luck, I could be completely wrong :doh:....
Last, Can I install it and staart using it at any timze (in the middle of a patrol)?

Merci

Rubini
03-30-12, 02:19 PM
Salute! Rubini,
Your mod is exactly what I have been expecting for a long time! :yeah:
Before I start doing anything...Just one small quaestion: Is it compatible with GWX as well as SH3?
I am enclined to think it is, but with my luck, I could be completely wrong :doh:....
Last, Can I install it and staart using it at any timze (in the middle of a patrol)?

Merci
Yes, and yes!

-You can start it and never used it (never unpaused it).

-If in use (scripting unpaused and running) you can pause (PAUSE/BREAK key) at any moment and do what you want. Then unpause again (PAUSE/BREAK key again) and go.

-If in use but paused, have did a lot of things by yourself, i then suggest you to reset the script (ALT+PAUSE/BREAK key) before unpause again (PAUSE/BREAK key), and so on.:up:

DrJones
04-04-12, 01:57 PM
Hey Rubini,
great work...that is raelly something i have mist in sh3.

Thanks a lot and best Regards

DrJones

Canovaro
04-12-12, 01:53 AM
Sounds like a great idea and will try!
Thanks for all the work!

LGN1
04-20-12, 02:38 PM
Hi Rubini,

would it be possible to make the time how long the boat is submerged adjustable via the ini file? This would allow the player to adapt the script for early-war patrols (most time surfaced) and late-war patrols (most time spent submerged).

Regards, LGN1

Rubini
04-20-12, 03:50 PM
Hi Rubini,

would it be possible to make the time how long the boat is submerged adjustable via the ini file? This would allow the player to adapt the script for early-war patrols (most time surfaced) and late-war patrols (most time spent submerged).

Regards, LGN1

Yes, it is possible. I 'm using a version with some more few goodies:

- the TC is adjustabe on the fly (from 128 to 1024)
- corrections on convoy detection, now task forces are also detectable
- added Stiebler's Fog warning 16x detection,
- added player's on the fly choice to pause (script & game) on detections
- some code improvements

I can add your suggestion too, no problem...but my damn busy RL whith so much work and so few free time...soon I hope.:up:

GT182
04-21-12, 09:34 PM
File not there.... http://www.mediafire.com/error.php?errno=320

Rubini
04-21-12, 10:06 PM
File not there.... http://www.mediafire.com/error.php?errno=320
Tried few minutes ago and itīs there. Try again!:up:

J0313
05-07-12, 07:18 AM
I enjoy this mod very much. Yesterday I had to go to the coast of Florida and this mod got me through that long trip. I would like to know if you have the updated version available that you talk about in post #28. I would like to have it. Also How do you make to where you can dive the boat deeper during the sonar checks when the script is running?

Rubini
05-07-12, 10:00 AM
I enjoy this mod very much. Yesterday I had to go to the coast of Florida and this mod got me through that long trip. I would like to know if you have the updated version available that you talk about in post #28. I would like to have it. Also How do you make to where you can dive the boat deeper during the sonar checks when the script is running?

Hi J0313,

Thanks by the feedback!
The new version is already ready on my HD :D ... I promisse that I will find a time to release it soon. The more important new feature, IMO, is that the image recon routine is now adjusted by the user making this routine also available for any GUI.
Anyhow, I didn't understood what you mean here "Also How do you make to where you can dive the boat deeper during the sonar checks when the script is running?" Can you explain again?

J0313
05-07-12, 12:26 PM
I am sorry that i was a little vague. What I mean is When the script is running and the boat dives for a hydro-check, it dives to around 20 meters. I would like it to dive to around 35 to 40 meters. Sorry about not being to clear on that. I am not very patient when it comes to typing.

Rubini
05-07-12, 01:04 PM
Here the addtions and fixes for the next version:

1. refined the "IFs" on main loop, refined the entire code a bit more
2. added TC=0 for Anykey and Break
3. adjusted uboat speed accordingly when unpause (for surfaced and submerged state)
4. adjusted the image search frequency (the script will be much more smart in detect images now)
5. fixed enemy image recon detection (.bmp e coord.), task forces will now be detected too.
6. added TC control on the fly! (not more needed to adjust it on the .ini)
7. added keyboard key behaviour press (all paused or not) on the fly!
8. added new image recon for fog sighted (16x) (for H.sie&Stieblerīs mod users)
9. added player configurable image recon for any GUI!
10. added submerged and surfaced time length factors adjustables by player (LGN1 requestion)
11. adjusted the actions time length (they are almost the same now for any TC)
12. added player configurable dive time for shallow or deep hydro checks (J0313 suggestion)
Soon!:up:

Rubini
05-07-12, 01:07 PM
I am sorry that i was a little vague. What I mean is When the script is running and the boat dives for a hydro-check, it dives to around 20 meters. I would like it to dive to around 35 to 40 meters. Sorry about not being to clear on that. I am not very patient when it comes to typing.

Ok, now I understood. I will add this feature on the new upcoming version as it is really a good idea. Thanks by the suggestion!:up:

Rubini
05-07-12, 02:44 PM
Sorry for followed posts.:D

-Here the complete keyboard control keys for the upcoming version.
-Note that it will work normally with default values.

Pause/Break=> pause/unpause the script (the same as old version)
Alt+Pause/Break=> reset script (the same as old version)
Crt+Alt+Pause/Break=> exit app (the same as old version)


-The below is for advanced users or for guys that want to tweak the script.
-All these commands works on the fly, I mean, with the game and script running, not need to pause or go out of the game or from script

Alt+1=> force TC=128 (game&script)
Alt+2=> force TC=256 (game&script)
Alt+5=> force TC=512 (game&script)
Alt+0=> force TC=1024 (game&script)

Alt+7=> force hydrocheck depth to ~25m
Alt+8=> force hydrocheck depth to ~50m
Alt+9=> force hydrocheck depth to ~75m

Alt+k=> toggle between "any command key press will pause the game&script" or "only will pause the script"


-All the others new features described in the above posts are defined on the .ini only.

Rubini
05-07-12, 05:45 PM
Me again, sorry!

Version 1.1 released.
Link available on the first post.

Please read the readme...the script is now very complex (but yet very easy to use). Let me know any problem. If someone needs more explanations on how adapt it to any GUI image recon just ask.

IMHO, using the script without the image recon is just half use of itīs power.

Good hunting!:up:

J0313
05-08-12, 06:32 PM
Hello Rubini. I downloaded the new version this morning. I am having trouble with it though. I installed it just like the old version but now I cant get the parameters to open up so I can change them. The script runs though. Any thoughts on this. I use SH3 Com so I start the game through that than alt-tab out and start the patrol script.

Rubini
05-08-12, 07:54 PM
Hello Rubini. I downloaded the new version this morning. I am having trouble with it though. I installed it just like the old version but now I cant get the parameters to open up so I can change them. The script runs though. Any thoughts on this. I use SH3 Com so I start the game through that than alt-tab out and start the patrol script.

Check your script mod installation. All the adjustable parameters are in the file SH3_Script_v1.1.ini that must be on your SH3 root directory. Open it with the notepad and edit the parameters as you like. Let me know if you solve your problem or not.

J0313
05-09-12, 07:11 AM
I figured it out. Thank you for helping me. I dont know what I was thinking. I was a little tired from work. When I make my return trip from the East Coast of the US I will let you know how everything works out.

J0313
04-05-13, 06:58 AM
Originally Posted by J0313
Hello Rubini. I was wondering if you could help me out. I am totally lost on how to use the image recon feature. I dont understand the instructions. I am not very computer literate. I have used the script ever since you released it and I never bothered with the image recon becouse I dont understand it. I use Magui 3.4 in 1920 x 1080. I know that sounds weird but for some reason I dont need the widescreen version. The regular version works just fine on my screen. Nothing is streched or out of place. I do use the hires fix along with it. I just change the d3d9 CFG and the main CFG in the SH III folder in my documents to 1920 x 1080.
So if you have a way to help me then I would appreciate it. But if you cant then I understand. Thank you Rubini and keep up the good work.

Rubini
04-05-13, 06:02 PM
Originally Posted by J0313
Hello Rubini. I was wondering if you could help me out. I am totally lost on how to use the image recon feature. I dont understand the instructions. I am not very computer literate. I have used the script ever since you released it and I never bothered with the image recon becouse I dont understand it. I use Magui 3.4 in 1920 x 1080. I know that sounds weird but for some reason I dont need the widescreen version. The regular version works just fine on my screen. Nothing is streched or out of place. I do use the hires fix along with it. I just change the d3d9 CFG and the main CFG in the SH III folder in my documents to 1920 x 1080.
So if you have a way to help me then I would appreciate it. But if you cant then I understand. Thank you Rubini and keep up the good work.
Hi J0313,

Thanks again to use this mod! And thanks to post feedbacks here.
I will reply yours questions in some hours as i had a really heavy busy RL day. I also will try to send you a beta of my last version in use, itīs finished , just not released. Stay tunned. :up:

Rubini
04-05-13, 11:39 PM
Quote:
Originally Posted by J0313
How do I change the default surface speed to ahead one third. I like to conserve fuel. Right now I am running a Type 9D2 with the 10th Flotilla and I have to go all the way to GR 93. Loooong Trip! Thanks Rubini. I already addded it to the commands.

Below a link for an updated version that have now commands for change the surface cruise speed (to better fuel consume on long trips if needed). Thanks J0313 by the idea!:rock:

usage:
-You can change the script surface speed by pressing:
ALT+q= ahead slow
ALT+w= ahead one thrird
ALT+e= ahead standard.

No need to change anything at the .ini file, just use the new "SH3_LongPatrol_Script_v1.1surfspeed.exe" instead the old one, and these new commands will be disposable.

-Note that if you reset the script in game (ALT+Pause/break) the surface speed will return to "ahead standard" again, so adjust it as you like again "on the fly", and so on.
- you can change this at any time , it will not hurt anything than the surfaced speed of the script.:up:

SH3_LongPatrol_Script_v1.1surfspeed.exe link:
http://www.mediafire.com/?ofggjfffuf7h9td
__________________

der_marc
04-06-13, 10:03 AM
Hi,

i tested today your version 1.1 of the Long Patrol Script
and found a certain strange behaviour on my XXI:
Everytime the sub dives it wents down to far below 120m.
It depends on the ALT+7 to ALT+9, on the first one it is
going down to 120m to 130m on the last one 190 to 220m.
After a while the sub comes up to the desired depth of 25 or 75m.
Maybe its just me, but this looks strange to me.

Before you wonder, my XXI is a "little" faster then the normal XXI, but
that should not change the diving depth in such a extrem manner.

Any idea what could be wrong?

Is there a option in the ini to switch back on radar after diving?

I am playing without gwx or any other big mods, just stock sh3 :arrgh!:.

Greetings

Rubini
04-06-13, 11:09 AM
Hi,

i tested today your version 1.1 of the Long Patrol Script
and found a certain strange behaviour on my XXI:
Everytime the sub dives it wents down to far below 120m.
It depends on the ALT+7 to ALT+9, on the first one it is
going down to 120m to 130m on the last one 190 to 220m.
After a while the sub comes up to the desired depth of 25 or 75m.
Maybe its just me, but this looks strange to me.

Before you wonder, my XXI is a "little" faster then the normal XXI, but
that should not change the diving depth in such a extrem manner.

Any idea what could be wrong?

Is there a option in the ini to switch back on radar after diving?

I am playing without gwx or any other big mods, just stock sh3 :arrgh!:.

Greetings

Thanks to try the mod mate!
I never tested it with type XXI, but yes the dive depth is time related (so speed ralated) as we have not a command to put the uboat at a specific depth (just changing the dials with the mouse). This is why this is a sensible feature on the mod. In the .ini you have a default setting for this "time" diving:

divefactor=1.0 ;will define the depth for hydrocheck, you can add any positive decimal number, suggested interval from 0.35 to 1.5 (will result in 25 to 75m deep, almost equal for any TC). Note that this is more sensible than others settings, so try it at very small steps. Adjustable on the fly by Alt+7(0.39), Alt+8(1.0). Alt+9(1.5)

If the deafult is too shallow rise the number, if it is too deep lower the number.:up:

Now about the radar. I didnīt add any radar command to the script because it can make you more easy to be detected. But I can make it and optional. Let me know what command key you use to start the radar in continuous sweep that i will add this feature (optional) to the script in some minutes. Can you then teste it for me?:hmm2:

Edited: anyway you always can just turn on the radar and continues the script. It will be only turned off when you desire it and so on.

der_marc
04-06-13, 11:31 AM
Hi,

thank you for your fast answer :-)

I will try to experiment with the numbers a little bit to get a good depth :-)

And i use CTRL + R for Continius Radar Sweep

Rubini
04-06-13, 11:51 AM
Hi,

thank you for your fast answer :-)

I will try to experiment with the numbers a little bit to get a good depth :-)

And i use CTRL + R for Continius Radar Sweep
I will update the script in some minutes with the radar feature. Stay tunned!

Rubini
04-06-13, 02:05 PM
Here it is:
http://www.mediafire.com/?3xsz0b1106r2bk9 (http://www.mediafire.com/?3xsz0b1106r2bk9)
( also adds the below line at the botton of your SH3_Script_v1.1.ini file - your Radar_continuous_sweep key command):
Radar_continuous_sweep=^{r}

usage:
- ALT+r will toggle the radar (continuous sweep) on/off for the script ( a beep will be listen: nl one=on, accute one=off). The default is off.

Notes:
- when script is reseted (Alt+Pause/break) it goes back to default (off)
- by stock sh3 limitation annimations/particles arenīt executed from a high TC. So if the radar have extensible antenna it will not be raised (antenna) in high TC, but the radar will be turnned on/off accordingly.
- the yesterday changes - scrit cruise speed - is also on this fix.

Have fun and let me know any issue.:up:

EDIT: forgot to say that you need to add this line at the botton of your SH3_Script_v1.1.ini file (your Radar_continuous_sweep key command):
Radar_continuous_sweep=^{r}

J0313
04-06-13, 08:37 PM
Thanks for this Rubini. If I can throw some more ideas your way I will. I use Anvarts DFant flags and pennants and FM30 up/down. Will the radar addition mess with the commands for those? I will try the version with surface speed tomorrow and I will give you some feed back. Thanks again Rubini.

Rubini
04-06-13, 09:36 PM
Thanks for this Rubini. If I can throw some more ideas your way I will. I use Anvarts DFant flags and pennants and FM30 up/down. Will the radar addition mess with the commands for those? I will try the version with surface speed tomorrow and I will give you some feed back. Thanks again Rubini.
Hi J0,
The SH3 LP script is full of surprises, a lot of things can be done with it, so letīs find more and more usefull ideas!:up:

And as any feature of the script, itīs simple presence will not mess with anything in the game. We can use all or only one of its feature. Anyway, no, the radar feature will not mess with Anvarts mods (I also use them). We just need to be sure about the correct command to be used in the script to it works correctly. Think on the script as a complex and smart Macro, so, it will , in the end, just send key commands for the game. We can make complete (and complex) uboat routines with this tool. Just this.:up:

der_marc
04-07-13, 05:57 AM
Hi,
i tested the radar feature and it works very well :-)

Thanks :-)

Rubini
04-07-13, 07:14 AM
Hi,
i tested the radar feature and it works very well :-)

Thanks :-)
Thanks by the feedback der_marc!
Note that Sh3 (at least at my game) turns off the radar each time it goes submerge. What i made on the radar routine was to add a flag that if you choose to enable the radar on the routine it will then be called each time it goes surfaced again and again. If you choose to disable the feature, then the flag will sinalize to not more call it when surfaced. So, to it works ok, is necessary that your game disable the radar at once when submerged. I donīt know if the game make this action by default to all radars and uboat types. Hopes that so!:up:

der_marc
04-07-13, 09:42 AM
Hi Rubini,

the game does that to all my tested (only two) subs (XXI, VII42) and
even to a normal sub in heavy weather when ever the sub shortly got washed over with water.
So your routine to regulary activate the radar is perfect for my play style.
When i get near the shores radar is off, but so the LPS :)

So thank you for your fast response! :up:

And "Gute Jagd!"

Greetings
Marc

raymond6751
04-07-13, 12:59 PM
Love the concept. Great work.

J0313
04-11-13, 12:56 AM
So far so good Rubini. The ahead one third works great for my long trips.

LGN1
07-30-14, 01:44 PM
Hi Rubini,

would it be possible to create a script that just presses the left mouse button every x seconds for y in-game hours?

I'm asking because this would solve one annoying issue with all real-navigation mods: the helmsman does not hold course. By creating a fixed compass dial and using the script one could place the mouse pointer over the intended course and the script would give the course command every x second and thus, the u-boat would keep its course. This would be a great help for all players using real-navigation.

Regards, LGN1

Rubini
07-30-14, 04:30 PM
Hi LGN1,

How are you mate?

Yes itīs easy to make it i guess . The script can send direct course orders from time to time, no need to do a mouse click. I never used the real navigation so I really donīt know exactly how it works. Anyhow, I cant recall well if itīs possible in Sh3 a direct course order ... anyway the script also can make mouse clicks but i also never tried it. When I return to my house I will look to the sh3 commands at first. Letīs talk about it.

JeromeHeretic
07-31-14, 05:33 AM
Rubini please can you upload somewhere the original scripts? I like to do my own modification and don't want create whole scripts new.

BTW: You wrote, that you are not able set the depth.
IMHO there is a method (but it is depended on resolution and GUI) how to do it. Let's imagine, that we have original SH3 design with 1024*768 resolution.
You can click for depth on gauge in right bottom part of screen somewhere about 2 o'clock. And what happen depend on gauge switch. (i don't have game runing now, i get numbers from my memory, so maybe i don't remember it correctly, but you can see a way of my thinking) In one case it can mean depth about 17 meters and when switched to second gauge it means depth about 160 meters. Not perfect, but usable as "shallow mode" and "deep mode". (But switch for deep mode is sure dead for class II subs)
Just an idea, maybe you like it...

BigWalleye
07-31-14, 06:19 AM
Rubini please can you upload somewhere the original scripts? I like to do my own modification and don't want create whole scripts new.

BTW: You wrote, that you are not able set the depth.
IMHO there is a method (but it is depended on resolution and GUI) how to do it. Let's imagine, that we have original SH3 design with 1024*768 resolution.
You can click for depth on gauge in right bottom part of screen somewhere about 2 o'clock. And what happen depend on gauge switch. (i don't have game runing now, i get numbers from my memory, so maybe i don't remember it correctly, but you can see a way of my thinking) In one case it can mean depth about 17 meters and when switched to second gauge it means depth about 160 meters. Not perfect, but usable as "shallow mode" and "deep mode". (But switch for deep mode is sure dead for class II subs)
Just an idea, maybe you like it...

That is how SH3Speech controls depth, heading, rudder and speed. Yes, it is resolution-dependent. But once you set it up for your screen rez, it is fast and much more precise and reproducible than mouse-and-eyeball. Have to have a 1-bit variable that keeps track of the state of each gauge (shallow/deep, etc.). Will Autohotkey scripts support that?

Leitender
07-31-14, 07:08 AM
Hi Rubini,

...I'm asking because this would solve one annoying issue with all real-navigation mods: the helmsman does not hold course...

...This would be a great help for all players using real-navigation.

Regards, LGN1

Hi LGN1,

in my understanding of the game itīs the helmsman who takes care about the right course if you are ordering him a course by using the "set course" tool on the nav map. Having done this, the helmsman will correct the simulated offset caused by wind and waves and will keep the course.

If you use the compass to set course by yourself, itīll be you who is responsible for the right course, and therefore youīll have to compensate the offset by your own. So if you like to play with realistic settings, e.g. without automatic uboat position display (i.e. real navigation), you also have to play without time compression.

Consequently, you will have enough time to correct the course, although you will still have an offset, depending on the exactness of your corrections. The Atlantic is not a kindergarden :03:

Greetings

Rubini
07-31-14, 11:57 AM
Hi guys,
At first excuse me by bad english ... is frequently difficult to me to say exactly what I intend...

If I understood well, looking at what Leitender said, seems that isnīt necessary any script work.

Anyway yesterday at night I took a look at the sh3 commands one more time and it not have a direct course order - itīs just possible by dial click.
IIRC, the awesome Sh3 voice commander mod have made a successful work on dial clicks, so the idea is really plausible.

Autohotkey can simulate mouse clicks&mouse movement but itīs a bit complex and resolution&GUI dependent to work correctly in this case.

@JeromeHeretic:
I never released the sh3 script because I yet work on it . I have more two updates never released and it have now more than 1000 lines of code, uboat files modifications for new 3d effects and career final fate effects.
It becomes very complex and is always very hard to any modder to adjust a mod for all sh3 GUI&files variations that we have. I have not more the necessary free time. Perhaps one day...:up:

BigWalleye
07-31-14, 03:36 PM
Hi guys,
At first excuse me by bad english ... is frequently difficult to me to say exactly what I intend...

If I understood well, looking at what Leitender said, seems that isnīt necessary any script work.

Anyway yesterday at night I took a look at the sh3 commands one more time and it not have a direct course order - itīs just possible by dial click.
IIRC, the awesome Sh3 voice commander mod have made a successful work on dial clicks, so the idea is really plausible.

Autohotkey can simulate mouse clicks&mouse movement but itīs a bit complex and resolution&GUI dependent to work correctly in this case.

It's more than plausible. A while back, I used AutoIT to create a patrol script for SH3. It takes the sub on a zigzag course with dives for hydrophone checks every 2 hours. This involves course changes and dives to 30m, or 20m in shallow areas. The mouse-click depth setting worked fine. Unfortunately the keyboard capture from AutoIT got overridden by the keyboard handler from SH3Speech. I would rather have voice command than automation, so out went AutoIT scripts. But it certainly is feasible.

I see where you are headed with the Wandering Helmsman idea, which injects a random uncertainty in sub position that increases over time. This could be used in a very simple Real Nav function. But I would like to be able to do Real Nav the way it is done in SH5. There, as in RL, the navigator makes a sighting every 6 hours (conditions permitting) and gives the skipper an estimated position. I don't have a problem calculating my own position, but that was what the navigator was supposed to do, not the skipper. If I turn off sub position on the chart, do you know of any way to determine the true position of the boat?

ferg
08-06-17, 08:56 AM
I love the idea of this mod. I really would like to use it, but Pause does nothing while I'm in Silent Hunter III.

Alt-Pause and and Ctrl-Alt-Pause both work as described, but Pause isn't detected by the script. If I press it from my Windows 10 desktop, Pause works fine and the script sends its key presses.

This is an old thread, but I am hopeful that someone will help me get this working. Any suggestions appreciated.

Kendras
08-08-17, 10:56 AM
A very cool mod resurfacing ! :yeah:

That's this kind of mod I always wanted !

:Kaleun_Applaud:

ferg
08-09-17, 03:12 AM
I solved my problem. It turns out it was caused by SH3 running with administrator privileges. Windows was blocking it because AutoHotkey wasn't elevated. Running the script as administrator solved the problem.

:up: