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 > Silent Hunter 4: Wolves of the Pacific
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-28-19, 08:36 PM   #1
Joe S
XO
 
Join Date: Jan 2002
Posts: 409
Downloads: 28
Uploads: 0
Default how to change torpedo firing key

I had to reload SHIV on an old computer because I could not get it to run with
win 10. I managed to find all the custom sounds and graphics that I had installed but I want to de-activate the "enter" or "return" key that fires the torpedoes, so that torpedoes can only be fired by pressing the red button on the torpedo panel.

Can anyone tell me how to do it?
thanks!
Joe s
Joe S is offline   Reply With Quote
Old 09-29-19, 12:25 AM   #2
MrMojok69
Loader
 
Join Date: Feb 2014
Posts: 81
Downloads: 78
Uploads: 0
Default

Try using this:

https://www.subsim.com/radioroom/dow...o=file&id=4715

Using this you can make a mod that you then throw into \Silent Hunter Wolves of the Pacific\Mods like you would any other mod, and activate with JSGME. It's how I made the <enter> key be for returning to 1x time compression, like in SH3.
MrMojok69 is offline   Reply With Quote
Old 09-29-19, 04:46 AM   #3
von Zelda
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default To Deactivate Enter Key

Quote:
Originally Posted by Joe S View Post
I want to de-activate the "enter" or "return" key that fires the torpedoes, so that torpedoes can only be fired by pressing the red button on the torpedo panel.
Can anyone tell me how to do it?
thanks! Joe s
Simply changed by editing the Commands file.

Depending on the SH4 version and mega mod you're using, I'd suggest you first locate the "Commands" file under the Data/cfg/ pathway. Copy and paste this file (which is a microsoft write file) to another area of your computer so that you can save and work on it without accidentally messing up the original file.

Using the search feature in MS Write, type in "fire_torpedo" and hit "find next" to search. In my "Commands" file, I find [Cmd313] Name=Fire_torpedo and [Cmd345] Name=WP_Fire_torpedo. You'll probably find the same ones since they're a holdover from SH3.

Notice, on one of the [Cmds], you'll see a "Keystroke" line included which looks like this:

[Cmd313]
Name=Fire_torpedo
Ctxt=1
Key0=0x0D,,"Enter"

This command fires torpedoes with the Enter key. I've not tried this but it should work if you wish to completely delete the Enter button from firing torpedoes. Simply delete the keystroke line from the above example or easier & better yet, place a ";" (semicolon) in front of the keystroke command line as follows.

[Cmd313]
Name=Fire_torpedo
Ctxt=1
;Key0=0x0D,,"Enter"

Save your edited Commands file and rename it Commands v2 or what ever you want to call it. Next, you'll need to replace the original Commands file in the game with your new Commands v2 file.

There are several ways to do this: (1) edit the original file within SH4 as we've done above, (2) rename the original commands file and leave it within the Cfg folder and then paste the newly created Commands file into Cfg and then rename it by removing the v2 notation or (3) create a new Mod, assuming you have other mods and use the Generic Mod Enabler.


If you want to create a new Mod for your new Commands file. First, create a new folder and name it "Commands Menu Mod v2". Under Commands Menu Mod v2, create a new folder called "Data" then under Data, create a new folder called "Cfg" Then paste your new Commands v2 file into the Cfg folder. Next, in the Cfg folder, remove the v2 from the Commands file name: Commands v2 becomes just Commands because your new mod will not work with v2 notation. Next, copy and paste your new Mod into the Mods folder within SH4 and enable with the Generic Mod Enabler.

All that remains is testing to see if it all works.

Note, I changed my [Cmd313] to fire torpedo with shift+Enter key as follows.

[Cmd313]
Name=Fire_torpedo
Ctxt=1
Key0=0x0D,s,"shift+Enter"

Previously, I used ctrl+Enter until I accidentally fired a torpedo by mistake. The following edit is for CTRL+Enter:

[Cmd313]
Name=Fire_torpedo
Ctxt=1
Key0=0x0D,c,"ctrl+Enter"

Also note, you can still use the red button to fire even if you use CTRL+ENTER or SHIFT+ENTER

Long winded I know, but I hope this is helpful.
  Reply With Quote
Old 09-29-19, 07:16 AM   #4
Joe S
XO
 
Join Date: Jan 2002
Posts: 409
Downloads: 28
Uploads: 0
Default

Thanks everyone for your help!
I do not have any "mega" mods, only some sound effects and the bearing indicator, nor do I have the JSGME mod. Will try to change the "enter" command manually. I remember doing it many years ago when SH IV and the mod first came out, but that was a long long time ago!

I will back up the folder, just in case I screw something up!
Joe S
Joe S is offline   Reply With Quote
Old 09-29-19, 09:20 AM   #5
von Zelda
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default Changing Additional Keystrokes

Quote:
Originally Posted by Joe S View Post
I will back up the folder, just in case I screw something up!
Joe,
Adding and/or editing keystrokes in the Commands file is very simple. Using a keystroke is much faster than using several movements and clicks of the mouse.

Let me list some that I added or edited in addition to fire torpedo:
Attack Map
Navigation Map
Toggle Radar Antenna (up or down)
Follow Sound Contact
Report Sound Contact
Cycle Bow Tubes
Cycle Aft Tubes
Report Weather
Report Depth under Keel
Toggle TDC on/off
Toggle Torpedo Auto Load
Toggle Damage Team
Toggle Recharge
Radar Depth
Target ID
Report Range to end
Report Time to end
Man AA Guns
Man Deck Guns
Fire at Will
Plot Course on Navigation Map
Return to Course
Toggle Battle Stations
Report Nearest Visual Contact

Let me know if you're interested in adding any of the above; I can guide you to the correct Cmd #'s.

Last edited by von Zelda; 09-29-19 at 10:05 AM.
  Reply With Quote
Old 09-29-19, 10:05 AM   #6
Joe S
XO
 
Join Date: Jan 2002
Posts: 409
Downloads: 28
Uploads: 0
Default

Thanks Von Zelda!

I appreciate your help with this. I did all this years ago but have no recollection as to how it was done.

My first priority is to fix (deactivate) the Torpedo firing key.
after that, I would like to explore whether there are dormant features in SHIV that can be activated, which we had in SH III. If I remember correctly, in SHIII we can direct the sonar operator to following a merchant ship or warship, and we can get a report of depth charges in the water. Target ID and range to end would be useful also.
Thanks!
Joe S
Joe S is offline   Reply With Quote
Old 09-29-19, 10:36 AM   #7
von Zelda
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default here are some Cmd #s

Quote:
Originally Posted by Joe S View Post
direct the sonar operator to following a merchant ship or warship, and we can get a report of depth charges in the water. Target ID and range to end would be useful also.
Report Nearest Sound Contact is Cmd482
Report Nearest Warship Contact is Cmd483
Follow Nearest Sound Contact is Cmd485
Follow Nearest Warship Contact is Cmd486

Estimated Range to Contact is Cmd487
Precise Range to Contact is Cmd488
I tried estimated range command but was not successful and gave up. In addition to hydrophone, needs the Sonar upgrade to be installed for sure.

Range to Course End is Cmd259
Time to Course End is Cmd258

I'm not aware of any command to Report Depth Charges.
Let me know when you need Key Codes and I'll try to provide help.

I need Cmd codes for Toggling the Position Keeper Button On & Off; and for toggling torpedo speed or for torpedo speed from slow to fast; if anyone out there knows of these.
  Reply With Quote
Old 09-29-19, 12:36 PM   #8
jimmbbo
Run silent, run deep
 
jimmbbo's Avatar
 
Join Date: Jun 2016
Posts: 225
Downloads: 59
Uploads: 0
Default

Quote:
Originally Posted by von Zelda View Post
Joe,
Adding and/or editing keystrokes in the Commands file is very simple. Using a keystroke is much faster than using several movements and clicks of the mouse.

Let me know if you're interested in adding any of the above; I can guide you to the correct Cmd #'s.
Some time ago I changed torpedo firing to CTRL ENTER - easy peasy! Since the ENTER key is adjacent to the TC key on my keyboard it cured the aggravation of shooting fish into an empty ocean every three or four sessions.

IMO many of those actions are begging for keystroke alternatives. Is a list of commands published on SS and are they as straightforward as the torp firing edit?
jimmbbo is offline   Reply With Quote
Old 09-29-19, 02:53 PM   #9
von Zelda
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by jimmbbo View Post
Some time ago I changed torpedo firing to CTRL ENTER.... IMO many of those actions are begging for keystroke alternatives. Is a list of commands published on SS and are they as straightforward as the torp firing edit?
Joe S, in his initial post, asked for a way to delete the Enter key from firing a torpedo; leaving him only the red fire button on both scopes and the UZO to use. While I have never done that, I suggested in my post 3 the edit to [Cmd313] in the Commands file that would most likely work for him. That being the elimination of the keystroke line or the placement of a ";" at the very beginning of the keystroke line.

I also suggested the alternative edits to [Cmd313] that would make "CTRL+ENTER" or "SHIFT+ENTER" the keystroke to fire torpedoes. Over the years of playing SH3 & SH4, I have numerous accidental firing of torpedoes with both ENTER and CTRL+ENTER; so, I have recently gone to SHIFT+ENTER which is less likely to give me said problem.

In my post 5, I listed 24 additional keystrokes that I use that I don't think are included in the stock game, while some of them but not all, have probably been added to the various mega-mods. I use Webster's GFO and I know that he edited his keyboard functions to include a good number of them.

In my post 7, I listed a few CMD #s that relate to Joe S later post. I did not list the keystroke edits because they will depend on what keys are available to add or edit, which depends on your particular mega-mod and/or any previous edits to your Commands file. Many of the keystrokes are holdovers from SH3 and SH3 mega-mods that were used by the developers and moders in SH4.

You asked if there was a list of commands published on SubSim and are they as straightforward as the change to the ENTER command. To my understanding, there is no list published by SubSim. I've come across one other SH4 player that published an excel file of his fairly extensive list of his keystrokes. You can easily see a list of the commands by opening up a Commands file under this path: SH4 Wolves of the Pacific/data/Cfg/Commands and reading the list. The easy part is that they are all named and fairly self-explanatory. The hard part in making major modifications is know which keys are empty or which keys you can easily switch around to make the keyboard more playable.

I began editing of my Commands file after installing Webster's GFO mod. He had already made additions and edits to his Commands file and its layout pretty much followed SH3 which I was quite familiar with. Webster also left many of the non-used or edited keystrokes in tact by placing ";" in front of them so I had a fairly complete list of numerical keystrokes to use.

For example, ;Key0=0x0D,,"Enter" for instance. Key0=0x0D is the actual "enter" key's numeric number. The empty 2 commas ,, in the middle shows that it is not in combination with shift or control or other modifier. The last part, "Enter" is the name of the key. And the ; in front of the full text ;Key0=0x0D,,"Enter" means delete, disable or do not use in this program. Key0=0x0D,,"Enter" means use the enter key in this program.

If one adds a lower case c between the 2 comas such as Key0=0x0D,c,"CTRL+Enter" This becomes the combination control + enter. If it was Key0=0x0D,s,"SHIFT+Enter" It is now the combination of shift + enter.

You start by making 1 or 2 adds or edits at a time and then going to one of the sub-school missions to try it out. If it works, save that file, make some notes of what you did and go on to another add or edit. In each case, save every good file with a new version number and then go on to some future changes. I'm up to version 7.9

Most of you already know this stuff, and this is quite simple stuff compared to what some of you do, but maybe there's one or two of you that will learn something new. I know this is a windy reply but I hope it is helpful.
  Reply With Quote
Old 09-29-19, 04:06 PM   #10
von Zelda
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default Report Maximum Fuel Range

Did some research and learned something new.

Open Commands file and go to [Cmd 257] and just add Key0=0x47,s,"SHIFT G" and nothing else.

This is a holdover from SH3 but somehow renamed and unused in SH4 as Report Time to Turn. There is no button for the mouse to select and it actually reports maximum fuel range in the game. My Gato's max range was highest right on 10 knots.

[Cmd257]
Name=Report_time_to_turn
Ctxt=1
MnID=0x3F250002
Key0=0x47,s,"SHIFT G"

If anyone finds a Command or Cmd # for the Position Keeper button, please let me know.
  Reply With Quote
Reply

Thread Tools
Display Modes

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 12:48 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.