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 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-05-11, 12:10 PM   #1
homsikpanda
Torpedoman
 
Join Date: Dec 2010
Posts: 112
Downloads: 4
Uploads: 0
Default how to edit your keyboard (for noobs)

page 1) table of contents (you are here)
disclosure/intro
page 2) editing
page 3) config file explained

------------------------------------------
i'm sure some of you, like me, are extremely frustrated with how the keyboards are laid out in game, be it because you can't reach your favorite hot key, want to add in more hot keys, or, like me, are left handed and like to have all the keys backwards!
so, i'm going to show you how to do without the need of a mod! (this will also allow you to add keys to unused fuctions you might not have known existed)
also, as this is just a basic how-to for beginners i'm not going to get into a whole bunch of unrelated detailings ^_^ (but feel free to add in your own detailings)


NOTE, IF YOU'RE READING THIS THE TUTORIAL IS UNFINISHED! but feel free to post if you like =D

Last edited by homsikpanda; 01-08-11 at 02:48 PM.
homsikpanda is offline   Reply With Quote
Old 01-05-11, 12:10 PM   #2
homsikpanda
Torpedoman
 
Join Date: Dec 2010
Posts: 112
Downloads: 4
Uploads: 0
Default

page 2) Editing


Part 0)
first off, your config file location:
the keyboard.cfg cile can be located at silent hunter 5/data/cfg
be sure to make a copy of this for safety reasons, but if you forgot this not to worry, you can find a copy of this file in silent hunter 5/data/lnggamedata/keyboardmapping/.....you can figure out the rest from here, each keyboard type only has 1 file located in it,
also, if you're looking for an easy way to replace azerty with qwerty or vise-versa you can just copy this file and replace it in the cfg folder ^_^

part 1)
opening the file up, we're greated with this:

[Contexts]
ContextsNb=16; max contexts nb is 32
Context0=None; default - should not be changed
Context1=Game
Context2=Pause
Context3=Spectator
Context4=Console
Context5=Museum
Context6=Effects
Context7=Final
Context8=Edit
Context9=Replay
Context10=ModalMsg
Context11=AdversarialMode
Context12=DeathEffect
Context13=3DEditorMode
Context14=CharacterDialog
Context15=Bunker
[Commands]
CommandsNb=600
MaxKeyCommandsNb=170; Keys number shoud be smaller than this value (in order to accelerate the loading)
;Name = command name -> will be translated in command index
;Contexts = command context(s) as indexes -> see [Contexts] section
;MnID = menu item id associated with this command
;StringID = string id (from en_menu.txt) associated with this command
;KeyX = an entry containing <key_code>,<flags chars>,<help text id>; flags chars could be C=executed by the crew, R=repeat key, c=with control, s=with shift, m=only when mouse is captured (enabled), n=only when mouse is not captured (enabled)
;Page = <page_id>,<title_id>; associated page (only for user commands) and a title if is necessary
;HasDelayedExecution = whether the command is executed by the crew and it takes them a little time to perform the task
;CommandClass = <[Generic] | Depth | Course | Speed | ... >; used to group some commands which affect the submarine's behavior in the same way
; this is also used so that a newer command of a certain class can override a previous command of the same class in the order queue
; if not specified, the command would be of type Generic and it can't be overriden by another command


this is the basic instructions of how to understand each commands layout, we'll touch on this more in part 3, for now, just realize that it's there.
this is what the actual command looks like:

[Cmd92]
Name=Move_forward
Contexts=1,2,3,5,9,11,13,14,15
Key0=0x49,R,"I";SH5
;Key1=0x26,Rc,""
;Key2=0x26,R,""
;Key2=0x68,R,""
;Key3=0x68,Rc,""

to editit you're going to want to focus on 1 line:
Key0=0x49,R,"I";SH5
as you can see it says what letter it is (now as i've edited my keyboard already it shows up as "I" while you'res will probably show up as "W"r "Z" respectively) aswell as what the command is
to change the key you will need to do 2 things, change the actual letter, and, more importantly, change the keyboard #
letterv
Key0=0x49,R,"I";SH5
number^ (just the 2 digit number/letter after the X)
changing the letter is easy, and,honestly, not even required to be honest but it'll help you from getting confused if you decide to re-edit >.> )

to change the number we need to find the number of the letter we wish to change it to, the best/easyest way i've found to do this is to just do a search for the letter you want to change it to, in this example, lets change it to "W"
so lets search (ctrl+f then type in "W"(where W is the letter you want))(make sure you also add the quotation marks, it'll make things easyer)
and we find this:

[Cmd311]
Name=Close_sel_torpedo_tube
;Key0=0x57,,"W"
Contexts=1
HasDelayedExecution=Yes


as we can see the key line is different:
different letter v
;Key0=0x57,,"W"
^different number

so, just replace the letter/number with the one you want ^_^ (i usually just swap them so then i can still use the controls )

so you get this...

[Cmd311]
Name=Close_sel_torpedo_tube
;Key0=0x49,,"I"
Contexts=1
HasDelayedExecution=Yes



[Cmd92]
Name=Move_forward
Contexts=1,2,3,5,9,11,13,14,15
Key0=0x57,R,"W";SH5
;Key1=0x26,Rc,""
;Key2=0x26,R,""
;Key2=0x68,R,""
;Key3=0x68,Rc,""


and that's all there is to it =D you're done! ^_^ save the file and relaunch the game!.
this also works for atting keys to commands that you want to add =D
from doing a quick search every letter has a designated command (though it might not be acttually "in use" in the game) so it shouldn't be to hard to find the letter/associated keyboard #
as a note: i don't have a list of all the keyboard #/letters, but if someone wants to do one up i can post it here ^_^

also as a second note, this doesn't change the keyboard mapping appearance ingame (the f1 key) so if you adjust the keys it won't show up as being changed on this screen.

Last edited by homsikpanda; 01-08-11 at 02:45 PM.
homsikpanda is offline   Reply With Quote
Old 01-05-11, 12:11 PM   #3
homsikpanda
Torpedoman
 
Join Date: Dec 2010
Posts: 112
Downloads: 4
Uploads: 0
Default

Page 3)
homsikpanda 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 11:09 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.