View Single Post
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