SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-26-12, 04:22 PM   #1
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default [REL] SH3 Long Patrol Script!

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


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! ). 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. 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 ) 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

Link V1.1
http://www.mediafire.com/?gb7x1zuyia72i0n
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve

Last edited by Rubini; 05-09-12 at 09:14 AM.
Rubini is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Đ 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.