Difference between revisions of "Client Key Bindings"

From Wurmpedia
Jump to navigation Jump to search
(Remove a bunch of outdated stuff. Include current default files)
Line 1: Line 1:
 
[[Main Page]] :: [[Client Key Bindings]]
 
[[Main Page]] :: [[Client Key Bindings]]
  
==Introduction==
+
== Introduction ==
  
The autorun.txt file defines the key bindings used by Wurm. The file should be in the directory you specified when you ran wurm for the first time. This is the directory containing the packs directory. Everything in the autorun.txt file will be automatically executed when Wurm is started. If you ever mess up this file and need to reset it to the default values, just delete it and restart wurm.
+
Key bindings are defined in the keybindings.txt file, which is automatically updated if you rebind keys while playing. Other commands that should be run on update can be put in autorun.txt.
  
==How to bind a command to a key==
+
=== Default files ===
  
Open the autorun.txt file in your favorite text editor. Add a line in the following format:
+
<pre>[autorun.txt]
bind <key> <command>
+
toggle keyboard_hints
where <key> is the key event and <command> is the command as defined below.
+
</pre>
 
 
For example:
 
bind <key> <Action>
 
 
 
<p>eg bind {{key|x}} move_forward</p>
 
  
==New Bind file ==
+
<pre>[keybindings.txt]
<pre>
 
// If you ever manage to mess up this file, just delete it, and wurm with
 
// replace it with a new one.
 
// <------------------------------------------------------------------------>
 
// Default movement keys. Allows both WASD and arrow key movement
 
// You can bind these keys to any KeyEvent.VK_* key
 
// (see http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/KeyEvent.html)
 
 
bind w move_forward
 
bind w move_forward
 
bind s move_back
 
bind s move_back
Line 31: Line 19:
 
bind e turn_right
 
bind e turn_right
 
bind x autorun
 
bind x autorun
bind z center_view
+
bind c center_view
  
 
bind up move_forward
 
bind up move_forward
Line 43: Line 31:
 
bind end turn_down
 
bind end turn_down
  
// Misc keys
+
// Stance selects
bind enter toggle_chat
+
bind NUMPAD0 STRAFE
bind t toggle_chat
 
bind tab next_tab
 
bind f11 "screenshot"
 
bind f12 "quit"
 
 
 
// Window toggles
 
bind f1 "toggle console"
 
bind f2 "toggle skills"
 
bind f3 "toggle inventory"
 
bind f10 "toggle gui"
 
 
 
// Toolbelt
 
bind 1 activate_tool1
 
bind 2 activate_tool2
 
bind 3 activate_tool3
 
bind 4 activate_tool4
 
bind 5 activate_tool5
 
 
 
// Fightmoves
 
bind F4 "fightmove1"
 
bind F5 "fightmove2"
 
bind F6 "fightmove3"
 
bind F7 "fightmove4"
 
bind F8 "fightmove5"
 
bind F9 "cmd 340"
 
 
 
// Stances
 
 
bind NUMPAD1 "cmd 294"
 
bind NUMPAD1 "cmd 294"
 
bind NUMPAD2 "cmd 297"
 
bind NUMPAD2 "cmd 297"
Line 82: Line 43:
 
bind NUMPAD9 "cmd 306"
 
bind NUMPAD9 "cmd 306"
  
 +
// Window toggles
 +
bind F1 "toggle console"
 +
bind F2 "toggle skills"
 +
bind F3 "toggle inventory"
 +
bind F4 "toggle stats"
  
// Some various toggles we want to enable
+
// Other function keys
toggle keyboard_hints
+
bind F5 "say /sleep"
// toggle stats
+
bind F6 "say /time"
</pre>
+
bind F7 "say /weather"
==F1 Console==
+
bind F8 "say /fl"
If you type commands directly into the [[Console]] while in-game now, they get saved automatically.
+
//bind F9 ""
 +
bind f10 "toggle gui"
 +
bind f11 "screenshot"
 +
bind f12 "quit"
 +
 
 +
// Toolbelt
 +
bind 1 activate_tool1
 +
bind 2 activate_tool2
 +
bind 3 activate_tool3
 +
bind 4 activate_tool4
 +
bind 5 activate_tool5
  
==Little Tips ==
+
// Misc keys
Add:
+
bind enter toggle_chat
<pre>
+
bind t toggle_chat
// Window toggles
+
bind tab next_tab
bind f1 "toggle console"
 
bind f2 "toggle skills"
 
bind f3 "toggle inventory"
 
bind k "toggle skills"
 
bind i "toggle inventory"
 
bind ` "toggle stats"
 
// Change "`" to whatever you prefer, it's just below the escape key on most keyboards though.
 
 
</pre>
 
</pre>
<p>to autorun.txt so you can use ' {{key|I}} ' for inventory etc, much easier than using the function keys. {{smiley}}</p>
 
  
 +
=== Customization ===
  
start by adding the following line to keep things organized, then make all your changes under that:
 
<pre>
 
// user defined
 
</pre>
 
this one adds a function key to open statistics:
 
<pre>
 
bind f4 "toggle stats"
 
</pre>
 
some peoples clients are missing the screenshot command:
 
<pre>
 
bind f11 "screenshot"
 
</pre>
 
 
the following opens windows when the client loads:
 
the following opens windows when the client loads:
 
<pre>
 
<pre>
Line 123: Line 80:
 
toggle stats
 
toggle stats
 
</pre>
 
</pre>
This stops JK chat from loading when the game starts (But sometimes someone gets in a message before it takes effect. Placing it at the top of the file may help.):
+
 
 +
This stops JK chat from loading when the game starts (But sometimes someone gets in a message before it takes effect. Placing it at the top of the file may help.)
 
<pre>
 
<pre>
 
say /kchat
 
say /kchat
 
</pre>
 
</pre>
the following lines can be changed so that they no longer work by adding "//":
 
<pre>
 
bind t toggle_chat
 
toggle keyboard_hints
 
</pre>
 
so they should look like:
 
<pre>
 
// bind t toggle_chat
 
// toggle keyboard_hints
 
</pre>
 
the 1st one makes the enter key the only key that focuses (makes active) on the message box
 
  
the 2nd one removes the text at the top of the screen like "F1: console"
+
You could add this to know how much sleep bonus you have when you log in:
 
 
you could add this to know how much sleep bonus you have when you log in:
 
 
<pre>
 
<pre>
 
say /sleep
 
say /sleep
 
</pre>
 
</pre>
 
this would work best at the bottom of the file I think.
 
this would work best at the bottom of the file I think.
 
Here's another few useful little commands:
 
<pre>
 
bind f5 "say /sleep"
 
bind t "say /time"
 
</pre>
 
  
 
The new IRC Commands:
 
The new IRC Commands:

Revision as of 08:15, 22 November 2008

Main Page :: Client Key Bindings

Introduction

Key bindings are defined in the keybindings.txt file, which is automatically updated if you rebind keys while playing. Other commands that should be run on update can be put in autorun.txt.

Default files

[autorun.txt]
toggle keyboard_hints
[keybindings.txt]
bind w move_forward
bind s move_back
bind a move_left
bind d move_right
bind q turn_left
bind e turn_right
bind x autorun
bind c center_view

bind up move_forward
bind down move_back
bind left turn_left
bind right turn_right
bind page_up autorun
bind page_down center_view
bind insert strafe
bind home turn_up
bind end turn_down

// Stance selects
bind NUMPAD0 STRAFE
bind NUMPAD1 "cmd 294"
bind NUMPAD2 "cmd 297"
bind NUMPAD3 "cmd 312"
bind NUMPAD4 "cmd 291"
bind NUMPAD5 "cmd 303"
bind NUMPAD6 "cmd 309"
bind NUMPAD7 "cmd 288"
bind NUMPAD8 "cmd 300"
bind NUMPAD9 "cmd 306"

// Window toggles
bind F1 "toggle console"
bind F2 "toggle skills"
bind F3 "toggle inventory"
bind F4 "toggle stats"

// Other function keys
bind F5 "say /sleep"
bind F6 "say /time"
bind F7 "say /weather"
bind F8 "say /fl"
//bind F9 ""
bind f10 "toggle gui"
bind f11 "screenshot"
bind f12 "quit"

// Toolbelt
bind 1 activate_tool1
bind 2 activate_tool2
bind 3 activate_tool3
bind 4 activate_tool4
bind 5 activate_tool5

// Misc keys
bind enter toggle_chat
bind t toggle_chat
bind tab next_tab

Customization

the following opens windows when the client loads:

toggle skills
toggle inventory
toggle stats

This stops JK chat from loading when the game starts (But sometimes someone gets in a message before it takes effect. Placing it at the top of the file may help.)

say /kchat

You could add this to know how much sleep bonus you have when you log in:

say /sleep

this would work best at the bottom of the file I think.

The new IRC Commands:

Irc [Server] [Port]

Ircsay [Msg]

Irc [Server] [Port]: This opens the IRC windows in the provided server and port, Heavenly place by Default.

Ircsay [Msg]: Says the given text in the IRC, could be used to auto identify your self by pressing F7

bind f7 "ircsay /identify *password*

Could also be used to Auto-Load the irc once the game starts by adding

irc

In the autorun.txt file

Note: the Brackets [] aren't needed in the commands, it can just be.

ircsay hey guys

Another command is exec, it's useful for loading a sequence of commands from a text file, among other things...

It could be used like this...

bind F7 "exec irc.txt"

irc.txt could have the following in it...

ircsay /identify PASSWORD
ircsay /join #town
ircsay Hey guys.

For more information about the new IRC commands, visit the Setting up IRC in the client page.