Page 1 of 1

Long hotkeys

Posted: Tue Aug 20, 2013 1:48 am
by khonkhortisan
I'm using numpad for movement. I never run, though if I would, I would use numpad dot first. I moved all my hotkeys from the numbers to the numpad. The hotkeys are written right-aligned, and go much past the left side of the icons at both 32px and 64px.
I changed "[A]+[S]+Keypad +" to "ASK+" by changing game/engines/te4-1.0.4.teae/engine/KeyBind.lua to read

Code: Select all

if ctrl then sym = "C"..sym end
if shift then sym = "S"..sym end
if alt then sym = "A"..sym end
if meta then sym = "M"..sym end
sym = string.gsub(sym,"Keypad ","K")
This is a hack, and not the correct way to fix it. However, a visual change like this "offlines" the game, even when compressed again. Maybe hotkeys should bounce sideways like other text does when oversize.
Image
Image

Re: Long hotkeys

Posted: Tue Aug 20, 2013 1:54 pm
by Crim, The Red Thunder
Or just adopt his ASK labels into maingame. Certainly fits better. And having ctrl and alt versions of talents be right there on your movement keys, might actually be rather efficient.

Re: Long hotkeys

Posted: Sun Aug 25, 2013 11:35 pm
by khonkhortisan
I couldn't get an addon to over/superload engine/KeyBind.lua, so I just resized the hotbar so I could still tell what everything was (12x5)
Now my game is validated again and somewhat usable.
Image

Re: Long hotkeys

Posted: Wed Sep 11, 2013 7:08 am
by khonkhortisan
I made it into a one-liner for the Lua Console

Code: Select all

game.engine.KeyBind.formatKeyString2=game.engine.KeyBind.formatKeyString;game.engine.KeyBind.formatKeyString=function(...)return string.gsub(string.gsub(string.gsub(string.gsub(string.gsub(game.engine.KeyBind.formatKeyString2(...),"%[C]%+","C"),"%[S]%+","S"),"%[A]%+","A"),"%[M]%+","M"),"Keypad ","K")end
and the antidote

Code: Select all

game.engine.KeyBind.formatKeyString=game.engine.KeyBind.formatKeyString2;game.engine.KeyBind.formatKeyString2=nil
...woohoo, it works as an addon!
http://te4.org/games/addons/tome/short-hotkeys

Re: Long hotkeys

Posted: Wed Sep 11, 2013 5:53 pm
by Zireael
That's great!

Re: Long hotkeys

Posted: Wed Sep 25, 2013 12:46 pm
by darkgod
done