The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2013-07-08 18:30:56

largestherb
Member
From: england
Registered: 2013-05-27
Posts: 381

the castle doctrine hotkeys~

remembered that i did this and i find it quite useful, so maybe some others might, too!

it comes configured for 1024x768 and i have only tested it in windowed mode, but i imagine it is fine in fullscreen.
common resolution for players here seemed to be 1920x1080, but i have a 16:10 monitor stuck at 1680x1050 so i can't help with the coordinates for that, but it is easy to find them if you take a screenshot and can figure out autoit3 (pretty simple) smile

xtJTakD.png

written in autoit3 in about four minutes. hot keys bound by default to 1, 2, 3, 4, 5, 6, 7, 8. ~ F2 closes the script.
maybe i'll stop being lazy and remember enough autoit to make it pause instead of closing, so you can use your number keys in other windows without having to rerun the script tongue

download: https://www.dropbox.com/s/wx0qrqkodkwm7 … otkeys.rar ~
virus scans: jotti.org ~ virscan.org
feel free to not trust it and compile the script yourself, i will not be offended!

i have included the source file (which can also be found below) and a compiled executable for those who do not have/want autoit installed.

and also here is a quick dumb video of me committing suicide on top of a chihuahua. http://youtu.be/Kb8-tbG_Nvs

; the castle hotkeyn by largestherb for all your 1024x768 castle doctrine hot key needs.
$title = "castle keys"
autoitsetoption("mousecoordmode", 0)

HotKeySet("{F2}", "request_end")

HotKeySet("1", "one")
HotKeySet("2", "two")
HotKeySet("3", "three")
HotKeySet("4", "four")
HotKeySet("5", "five")
HotKeySet("6", "six")
HotKeySet("7", "seven")
HotKeySet("8", "eight")

Local $i = 0
While $i <= 10
   Sleep(100000)
WEnd

; buttans
func one()
   local $pos = MouseGetPos()
   MouseClick("left",860, 220, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func two()
   local $pos = MouseGetPos()
   MouseClick("left",860, 290, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func three()
   local $pos = MouseGetPos()
   MouseClick("left",860, 360, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func four()
   local $pos = MouseGetPos()
   MouseClick("left",860, 430, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func five()
   local $pos = MouseGetPos()
   MouseClick("left",930, 220, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func six()
   local $pos = MouseGetPos()
   MouseClick("left",930, 290, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func seven()
   local $pos = MouseGetPos()
   MouseClick("left",930, 360, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

func eight()
   local $pos = MouseGetPos()
   MouseClick("left",930, 430, 1, 0)
   MouseMove( $pos[0] , $pos[1] , 0)
endFunc

; end
func request_end()
   Exit
endfunc

Last edited by largestherb (2013-07-08 18:36:30)

Offline

#2 2013-07-10 09:17:17

LockNess
Member
Registered: 2013-07-02
Posts: 8

Re: the castle doctrine hotkeys~

I would definitely love that feature built inside TCD. I'm playing on Mac, your solution is not working for me ...
I guess we can expect it later, for the polish time !?

Offline

#3 2013-07-10 09:35:10

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: the castle doctrine hotkeys~

Obviously, this is not hard to do on my end.

However, I've been avoiding it because I'm concerned about the UI for it.  I wouldn't want to add more numerical overlays to those backpack slot (cluttered).  On the other hand, it's bad UI for it to be invisible.  Of course, since there's no dangerous consequence to picking a tool, I could just let players press random numbers to learn the slot mappings.  Or maybe just show the hotkey mappings in the tool tips?

Offline

#4 2013-07-10 09:53:33

ukuko
Member
Registered: 2013-04-06
Posts: 334

Re: the castle doctrine hotkeys~

Listing the shortcut in the tooltip would suffice!

I do think it would make more sense if the slots were numbered like so:

1,2
3,4
5,6
7,8

Offline

#5 2013-07-10 11:53:39

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: the castle doctrine hotkeys~

Oh, do you?!

I can imagine no one agreeing about the right numbering order.

Offline

#6 2013-07-10 13:32:20

ukuko
Member
Registered: 2013-04-06
Posts: 334

Re: the castle doctrine hotkeys~

We will have to resort to a duel.

Offline

#7 2013-07-10 18:27:05

largestherb
Member
From: england
Registered: 2013-05-27
Posts: 381

Re: the castle doctrine hotkeys~

redifineable!

Offline

#8 2013-07-12 03:52:13

LockNess
Member
Registered: 2013-07-02
Posts: 8

Re: the castle doctrine hotkeys~

jasonrohrer wrote:

However, I've been avoiding it because I'm concerned about the UI for it.  I wouldn't want to add more numerical overlays to those backpack slot (cluttered).

I suggest no graphical modification of the UI -- only a highlighting text that would appear when you move the mouse cursor over the slots. And of course easily redefineable (a key.cfg text file somewhere not too far...).

Offline

Board footer

Powered by FluxBB 1.5.8