Hey there, lolesch here with a new problem I could not find any info about out there...
So I was working on UI elements and I thought about the keybindings possibilities to control these menus. When I hit "I" it opens my Inventory and so on.
They are preset here: ...\MEDIA\KEYMAPPING\KEYBIND.DAT
[KEYBINDS]
[KEYBIND]
<STRING>NAME:QUICKSAVE
<TRANSLATE>DISPLAYNAME:Quick Save
<STRING>KEY:F11
<STRING>MODIFIERKEY:CTRL
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[/KEYBINDS]and you can easily add whatever you want.
[KEYBINDS]
[KEYBIND]
<STRING>NAME:MapToggle
<TRANSLATE>DISPLAYNAME:Map toggle (Center)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapToggleLeft
<TRANSLATE>DISPLAYNAME:Map toggle (Left)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapToggleRight
<TRANSLATE>DISPLAYNAME:Map toggle (Right)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHold
<TRANSLATE>DISPLAYNAME:Map hold (Center)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHoldLeft
<TRANSLATE>DISPLAYNAME:Map hold (Left)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHoldRight
<TRANSLATE>DISPLAYNAME:Map hold (Right)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[/KEYBINDS]
source:
map keybinds mod by Jaex
So far so good! Now as you can see Jaex left out the "<STRING>KEY: "
They show up in the settings with "NA" values and you have to set the key on your own.
I figured out that the mod crashes when things are double set (conflict between old and new keybinds) so I assume leave them blank is a good point here.
Now to the problem: ignoring the just sayed I WANT TO preset four new Keybindings with the "arrow keys" and I cant get them set up. I've tested the following spellings:
left arrow
left_arrow
LEFT ARROW
LEFT_ARROW
arrow left
arrow_left
37 (Javascript Code wich is used in the local save file for keybinding changes you do - located here: ...\My Games\Runic Games\Torchlight 2\KeyBindings.DAT)
The result is always the same, it only shows the first letter or number (so javascript has to be wrong here) .... HELP!
Back to the UI element: Under "Logic" you can find the KeybordInput objets with these parameters:
[BASEOBJECT]
[PROPERTIES]
<STRING>DESCRIPTOR:Keyboard Input
<STRING>NAME:Left
<INTEGER64>ID:687351159822867062
<INTEGER64>PARENTID:6264640040022118013
<STRING>KEYS:37
<STRING>KEY BINDING:LEFT_ARROW
[/PROPERTIES]
[CHILDREN]
[/CHILDREN]
[/BASEOBJECT]Has anyone used them already and how? I've linked them within my logic and AFTER setting my keybindings from "NA" to arrows (YES, in game its possible!!!) they work fine.
Is there another code for arrow keys I dont know about?
cheerio
lolesch