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

Reply
 
Thread Tools Display Modes
Old 10-21-11, 03:31 PM   #1
tekniq
Swabbie
 
Join Date: Apr 2010
Posts: 6
Downloads: 41
Uploads: 0
Default [REL] SH3 Auto Watch Officer mod (v.0.3)

My first contribution to the Subsim community, made it for myself but after all you guys shared with me it didn't seem fair to keep it only for myself.
I know this problem has been tried to solve before, but with a little extra effort i tried to make it so that it could work for all setups out there.
Only limited testing i'm afraid, only Win XP! would like to know if this works for your setups, esp. Vista, Win7.
Read Documentation for usage.
Maybe some off you don't like it and think its lame. Then don't use it.

Feedback very welcome.

http://www.gamefront.com/files/20910...3AutoWOv0.3.7z

Quote:
SH3AutoWO - SH3 Auto Watch Officer mod (v.0.3) Beta 10-21-2011, At this time only tested on XP SP3, LSH3v5, Macgui F and GWX.
-----------------------------------------------

THE PROBLEM
You're cruising across the Atlantic at high time-compression making your way to your assigned quadrant. You make regular hydrophone checks every 2 hours or so just to listen if some prey is stumbling on your path. Your crew won't get fatigued because their morale is outstanding!, except for the Watch Officer. Every time you resurface you have to drag him up from his bunk onto the bridge to join the rest of the watch crew like he's supposed to!

Some say it's a bug, other more diehard people say its a feature so you check up on your crew more often and spend more time listening whats going on around you.
Me personally i think it becoming annoying and consider it a bug.

To get rid of the problem i was looking and reading around SubSim.com for a solution but didn't find any. The bug is hard coded in the game, can't be fixed, others gave a go but it wouldn't work on all the different mods, gui's, hacks, resolutions etc.

So I decided myself to have a go to mod it, well it's really not a mod of any sort just a little AutoIt macro that simulates key-presses and mouse-moves. You can call it cheating! I did try to make it a little clever so it can work on all the different setups out there.


HOW IT WORKS
The macro works pretty simple, its a little program "SH3AutoWO.exe" that runs in the background and captures the press of a new key (default "v"), It then presses "s" for surface the boot, F7 for crew management, waits till the bright yellow star (or some other marker) appears above the bridge to indicate the boot is surfaced, drags the Watch Officer from his bunk to the bridge, switches back to the map with F5 and increases time-compression again if you want to.


INSTALLATION
Just extract "SH3AutoWO.exe" and "SH3AutoWO.ini" into your SilentHunterIII root game folder. You can also put them in a folder inside "MODS" and enable them with JSGME. You can then create a shortcut to "SH3AutoWO.exe".


RUNNING
By default when you run "SH3AutoWO.exe" it starts the macro and the game ("sh3.exe") up for you. If you don't want this for some reason for example if you start the game with SH3Commander set "AutoStartSH3 = 0" in the .ini file. You then have to start and exit the macro and the game separately. If your .exe is named differently (eg. SH3GWX.exe) change "SH3ExeName = SH3GWX.exe" in .ini.

The rest of the .ini file shouldn't need to be changed unless your having problems or you have/want different keys bindings, then see TROUBLE.


IN GAME CONFIG
The supplied config works for me with DX9HiResFix 1280x1024, LSHV5.1 and MuiGui F mods. If you have something similar maybe it will work for you, probably not. Start a game go to periscope depth and press "v" to surface ("s" for surface still works as it did). If your surfaced and your Watch Officer isn't on the bridge it didn't work. Don't worry you just need to show the macro where to look and click.

To do so: Go to periscope depth (p), then to crew-managment (F7) and surface the boot again (s). Notice that the area around the bridge changes, like the yellow star above the bridge, you need to show the macro a marker so that it knows when the boot is surfaced. Its not practical to make a config for every setup, so you have to do it yourself.

Follow these 4 steps exactly:
1. Surface the boot, Go to crew-managment and point your mouse exactly at the yellow star above the bridge (you could also use another distinquishing marker here). Press CTL+ALT+v. You should hear a beep, now the position of the marker is recorded.

2. Point your mouse at the position your Watch Officer should come from (top-left bow crew compartment). Press ENTER, you should hear another beep to indicate the step is done. The color of the marker in Step 1 is now recorded also.

3. Point you mouse at the position on the bridge your Watch Officer should go. Press ENTER, another beep.

4. Now input how many times you want to increase time-compression when the macro will resurface for you. If you’re cruising at high time compression and come to the crew-managment page time-compression will probably drop to 32x, so if you want to continue your cruise at 128x for example, time-compression should be increased 2x when you get back to the map. Press the "+(Add) Key" on the numeric keypad twice or more. You will hear another beep each time. Press ENTER. If you don't want extra time-compression back just press ENTER without pressing the +-key. Now its 3 times a beep to let you know you are finished.

If you screw up, just start again at step 1.

Try surfacing again, go back to the navmap, increase TC, periscope depth and resurface (press "v"). Hope it works now.


TESTING & FEEDBACK
Only tried on WIN XP SP3, LSH, Macgui F and GWX. If other systems work or don't work for you please put leave your feedback on Subsim.com



Tekniq
10-21-2011



TROUBLESHOOTING
If you still have problems or glitches there are a few things you can change in the .ini file:

- At release I've only tested this mod on WinXP SP3. If you use Vista or Win7 maybe you can try setting "Admin Rights" and "XP compatibility mode" on the .exe's. i really don't know more about this.

- Resolution? The macro has to know the correct resolution of the game to get the right coordinates. First it will look if it is overridden in the "SH3AutoWO.ini" file: ";ResX = 1280" and ";ResY = 1024" (note by default these are commented out). Didn't find any then it will look in the "d3d9.cfg" file if you have this hires-mod (You should). If it still can't find a setting it will assume you have 1024x768 as in stock SH3. If you have another hires-mod figure out its resolution and try to add these settings in the inifile "SH3AutoWO.ini".

- I want another key for auto-resurfacing? Change "AutoWoKey=v" into what you like and isn't used in the game. If you change this key the config combination CTL+ALT+AutoWoKey changes too. Also you could for example use SHIFT-v by adding a "+" and setting "+v" but in testing i had some problems with SHIFT combinations.

- My Mod/Gui uses different key-presses for surface, map, crew-managment etc? You can change them here too. Note for special keys like F7 you have use to add Curly brackets or special names like: {F7} and {NUMPADADD}. Look it up in AutoIt documentation.

- If you think the macro moves to fast between key-presses and before the screens change, thus mistiming things: increase delay between key-presses: "Delay = 100" its in ms.

- SurfaceTimeout = 30 is how many seconds the macro waits in the crew-managment page till the boot surfaces. If something goes wrong it just quits it waiting cycle after this time thus not waiting forever. If you are surfacing at 1x TC it could take a lot longer then this but then you should use normal surface "s" anyway.

DEFAULT INI
"SH3AutoWO.ini"
-----------------------
[]
;SH3AutoWO - SH3 Auto Watch Officer mod (v.0.3) Beta 10-21-2011

;this is the AutoWO surface key that you can choose
AutoWoKey=v
;the other keys depend on the game and or mod you use
SurfaceKey=s
MapStationKey={F5}
CrewstationKey={F7}
TimeCompKey={NUMPADADD}
;set you resolution here if its not detected right
;ResX = 1280
;ResY = 1024
;set to zero to not start sh3.exe at the same time
AutoStartSH3 = 1
;this file wil be run if you choose autostart
SH3ExeName = sh3.exe
;seconds before macro stop waiting for surface
SurfaceTimeout = 30
;delay beteen keypresses in ms.
Delay = 100
;--------Values Below are setup by the in game config by pressing "CTL+ALT+<Above AutoWoKey>", see SH3AutoWO.txt---------
TriggerColor=00FEED55
TriggerX=643
TriggerY=66
FromX=747
FromY=371
ToX=525
ToY=98
TcIncrement=2
tekniq is offline   Reply With Quote
Old 10-21-11, 04:38 PM   #2
vienna
Navy Seal
 
Join Date: Jun 2005
Location: Anywhere but the here & now...
Posts: 7,713
Downloads: 85
Uploads: 0


Default

Much appreciated! I'm going to give it a try; about time to get the WO out of his bunk and on his feet...
vienna is offline   Reply With Quote
Old 10-21-11, 04:52 PM   #3
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Thanks Tekniq for sharing .
In case you missed this h.sie also has a patch for this and other bugs in SH3 that are applied direct to the exe file permanetly patching it.
Can be found here http://www.subsim.com/radioroom/showthread.php?t=174225.
Your method has a great workaround to the problem and some great out of the box thinking.
look forward to seeing any future fixes you come up with
reaper7 is offline   Reply With Quote
Old 10-21-11, 05:14 PM   #4
Kafka BC
Planesman
 
Join Date: Jan 2010
Location: Halifax, Nova Scotia
Posts: 197
Downloads: 163
Uploads: 0
Default

Quote:
Originally Posted by reaper7 View Post
Thanks Tekniq for sharing .
In case you missed this h.sie also has a patch for this and other bugs in SH3 that are applied direct to the exe file permanetly patching it.
Can be found here http://www.subsim.com/radioroom/showthread.php?t=174225.
Your method has a great workaround to the problem and some great out of the box thinking.
look forward to seeing any future fixes you come up with
From what I understand h.sie's patch is only for copies of the game that didn't come with Starforce copy protection, so this will be very useful for people with other versions that did.

I'll give it a try.
__________________
Ah, for just one time I would take the Northwest Passage
To find the hand of Franklin reaching for the Beaufort Sea
Tracing one warm line through a land so wide and savage
And make a Northwest Passage to the sea.

- Stan Rogers (1949-1983)
Kafka BC is offline   Reply With Quote
Old 10-21-11, 06:10 PM   #5
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Kafka BC View Post
From what I understand h.sie's patch is only for copies of the game that didn't come with Starforce copy protection, so this will be very useful for people with other versions that did.

I'll give it a try.

Yes that is true, a very good point. And an excellent addition for thise with starforce or steam version of the sim.

Last edited by reaper7; 10-22-11 at 11:59 AM.
reaper7 is offline   Reply With Quote
Old 10-21-11, 08:37 PM   #6
Fish In The Water
Prince of
the Sea


SUBSIM
Welcome
Committee

 
Join Date: Jul 2009
Location: Watching over U-253
Posts: 3,527
Downloads: 98
Uploads: 2
Default

Quote:
Originally Posted by reaper7 View Post
Thanks Tekniq for sharing .
In case you missed this h.sie also has a patch for this and other bugs in SH3 that are applied direct to the exe file permanetly patching it.
Can be found here http://www.subsim.com/radioroom/showthread.php?t=174225.
Your method has a great workaround to the problem and some great out of the box thinking.
look forward to seeing any future fixes you come up with
Quite agree...

I use the h.sie patch, but this is still a very interesting idea. Thanks very much for sharing and I too look forward to any future applications this may have. Thanks again!
__________________
"The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people are so full of doubts." - Bertrand Russell.


Fish In The Water is offline   Reply With Quote
Old 10-22-11, 02:14 AM   #7
SquareSteelBar
Sea Lord
 
Join Date: May 2006
Location: U-73
Posts: 1,638
Downloads: 632
Uploads: 0
Default

Quote:
Originally Posted by Kafka BC View Post
From what I understand h.sie's patch is only for copies of the game that didn't come with Starforce copy protection...
That's not right.
SquareSteelBar is offline   Reply With Quote
Old 10-22-11, 02:54 AM   #8
HW3
Navy Seal
 
Join Date: Apr 2005
Location: Gresham Oregon
Posts: 6,575
Downloads: 458
Uploads: 0


Default

Quote:
Quote:
Originally Posted by Kafka BC
From what I understand h.sie's patch is only for copies of the game that didn't come with Starforce copy protection...

That's not right.
You are quite correct SquareSteelBar, h.sie's patch works just fine with my original release SH3 disk, Starforce and all.

__________________


"Some ships are designed to sink...others require our assistance." Nathan Zelk
HW3 is offline   Reply With Quote
Old 10-22-11, 05:22 AM   #9
Kafka BC
Planesman
 
Join Date: Jan 2010
Location: Halifax, Nova Scotia
Posts: 197
Downloads: 163
Uploads: 0
Default

Quote:
Originally Posted by HW3 View Post
You are quite correct SquareSteelBar, h.sie's patch works just fine with my original release SH3 disk, Starforce and all.

When did that change? I haven't read all of the stickied thread, but early on when h.sie started work on it, he stated that it was for the Starforce free version, which left people wandering where they could get a replacement .exe and associated files so they could try it.

In either case, I would still like to try this version. I don't know anything about them, but this macro idea sounds like it has potential and possibilities for other areas besides the watch officer.

And I applaud tekniq's effort.
__________________
Ah, for just one time I would take the Northwest Passage
To find the hand of Franklin reaching for the Beaufort Sea
Tracing one warm line through a land so wide and savage
And make a Northwest Passage to the sea.

- Stan Rogers (1949-1983)
Kafka BC is offline   Reply With Quote
Old 10-22-11, 06:36 AM   #10
HW3
Navy Seal
 
Join Date: Apr 2005
Location: Gresham Oregon
Posts: 6,575
Downloads: 458
Uploads: 0


Default

I'm not sure when it did change but, just found out about it recently, and it does work. I'm looking forward to the wolfpacks they are working on. They are in Alfa testing on those.
__________________


"Some ships are designed to sink...others require our assistance." Nathan Zelk
HW3 is offline   Reply With Quote
Old 10-22-11, 08:18 AM   #11
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Currently 5 different versions of sh3.exe are supported, and it would be easy to add more, if necessary.

Thanks anyway for your work, tekniq, even if there is already a solution.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 10-23-11, 12:27 PM   #12
tekniq
Swabbie
 
Join Date: Apr 2010
Posts: 6
Downloads: 41
Uploads: 0
Default

Hey,

Really great that someone finally found a hardcode solution! Should be alot nicer than my workaround solution. Thanks for pointing it out to me. Going to try it out.
tekniq is offline   Reply With Quote
Old 10-23-11, 12:40 PM   #13
VONHARRIS
Konteradmiral
 
Join Date: Apr 2010
Location: Greece
Posts: 1,992
Downloads: 300
Uploads: 0
Default

Thank you for that.
My PC refused to run h.sie patch for some unknown reason!
I will try it.

Edit
Question: I want to start the game with Commander. So do I run this macro first and then commander or the other way around?
Thank you.
VONHARRIS is offline   Reply With Quote
Old 10-23-11, 01:55 PM   #14
tekniq
Swabbie
 
Join Date: Apr 2010
Posts: 6
Downloads: 41
Uploads: 0
Default

It doesn't really matter. Just start the macro before starting the game, Before SH3Commander or before you click start in sh3commander. If you forget you could also just ALT-Tab and start it while the game is running.

Set "AutoStartSH3 = 0" in the .ini file with notepad so not to start the game without SH3commander.

When finished playing exit the macro by right-clicking on it in the system tray.

Note:
The CTL+ALT+v config should only need to be done once or when changing Gui, mod, resolutions etc.
tekniq is offline   Reply With Quote
Old 10-24-11, 12:33 AM   #15
VONHARRIS
Konteradmiral
 
Join Date: Apr 2010
Location: Greece
Posts: 1,992
Downloads: 300
Uploads: 0
Default

Thank you for replying.
VONHARRIS is offline   Reply With Quote
Reply


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 02:58 AM.


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