Sign in to follow this  

[Request]Shared keybinds across different tools

Recommended Posts

In Wurm Unlimited we cannot bind the same key to different actions without applying a modifier key.  This makes sense and I do not wish to change it as a whole.  However, I would like to be able to use the same key without modifiers when specific tools must be equipped in order to perform actions. 


Example of current scenario:

Shovel + key = Dig

Pickaxe + key + shift = Mine

Rake + key + ctrl = Farm


Example of requested scenario:

Shovel + key = Dig

Pickaxe + key = Mine

Rake + key = Farm


If possible, please make the tools become the modifier so that keys may be shared among the tools.  Thank you.


P.S.  If there is a mod that is capable of doing this, please direct me to it.

  • Like 1

Share this post

Link to post
Share on other sites

I'd be more in favor of a few "magic" actions i.e. make "gather" also cut down non-fruit trees, chop up logs, mine straight, dig etc.


In the meantime, what you could do is write a few different text files containing the various binds you wish to use for different activities. For example, you could have one for farming, and one for woodcutting.


bind r harvest
bind f farm
bind v sow


bind r cut_down
bind f chop_up
bind v pick_sprout

save them to (wurmroot)/configs/default/something.txt (on windows wurm root would be C:\Users\Your_username\.wurm) and type "exec farming.txt" in the F1 console before you go woodcutting.

You can even take it to the next level and 'bind y "exec woodcutting.txt" '.


that's assuming "exec" is available on Wurm Unlimited.


Edit for some useful info: "dump binds" will output all your binds preceded by "bind", so you can copy the output of that command in a file like 'default_binds.txt' and run this to get all your 'regular' binds back.

You can also call exec from these files, that would allow you to have "nested" binds. Just be careful not to accidentally cause a recursive loop.

Edited by gabars
Readability, then more info

Share this post

Link to post
Share on other sites

The "exec" command is available in Wurm Unlimited.  I use it on a constant basis, switching between various bindings depending on what I am doing.


The Wurmpedia page on Quickswitch hotkeys explains things in details and has some additional samples of how to set up your files.  This is very similar to how I have mine set up.

  • Like 2

Share this post

Link to post
Share on other sites

Great idea!   I would think that from a database point of view - it makes sense to assign hotkeys to a tool :



d = dig 

f = flatten


Rake Equipped:

f = tend

h = harvest


Not a tough mod to write.  Shim the keypress event and if-exist lookup the actions in the mod_keybinds.txt file (for example).  Writing a nice little gui would be a nice thing to add in V2.

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this