Help needed for use user_bindings (Key binding)

"Key Rebinding: We encourage your input!

For the past month we’ve been going into the depths of our code base, tearing out and rewiring a bunch of the infrastructure. As a result of that work we now are on the path to having a unified input system, which will in turn allow for rebinding of almost all inputs in the game! This work is still in progress, so there’s no UI available for it yet, but you can begin mucking around with this early by adding your own “user_bindings” to your user_settings.json, using what’s in stonehearth.json as a reference. These keybinds will work both for in-game and UI events, and we will develop this outwards to support a wide range of control input types over time."

Can you give me a prototype of this file ?
i am not a user on the json file and this stuff… Sorry (.net user:p)

i am check this forum with the word user_bindings but find nothing very accurate.
a list of all possibility for example

thanks

1 Like

Example of how to use it (click on the link):

The currently bindable actions are in the stonehearth.json file, you need to copy them and paste them in the user_settings.json file, but writing “user_bindings” instead of “bindings”.

You can open the json file with any text editor, like Notepad.

For example, in stonehearth.json there’s:

"bindings": {
      "citizen:manager": {
         "combo1": "c", 
         "combo2": ""
      }, 
      "vision:xray:toggle": {
         "combo1": "x", 
         "combo2": ""
      }, 
      "vision:slice:toggle": {
         "combo1": "\\", 
         "combo2": ""
      }, 
      "town:overview": {
         "combo1": "i", 
         "combo2": ""
      }, 
(more keybindings)
...

You would add them in the user_settings.json like this:

{
	"user_id" : "cfb2e056-0a85-11e7-a3a9-f8cab8643ca9",
	"user_bindings" : {
      		"citizen:manager": {
        		 "combo1": "c", 
        		 "combo2": ""
      		}, 
      		"vision:xray:toggle": {
        		 "combo1": "x", 
        		 "combo2": ""
      		}, 
      		"vision:slice:toggle": {
         		"combo1": "\\", 
         		"combo2": ""
      		}, 
      		"town:overview": {
         		"combo1": "i", 
         		"combo2": ""
      		}
	},
	"enable_auto_save" : false,
(more user settings)
...

And then change the hotkeys to whatever you want.

3 Likes

thanks. i set my user files for azerty keyboad :
“user_bindings” : {
“cam:pan:left” : {
“combo1” : “q”,
“combo2” : “left”
},
“cam:pan:back” : {
“combo1” : “s”,
“combo2” : “down”
},
“cam:pan:fwrd” : {
“combo1” : “z”,
“combo2” : “up”
},
“cam:pan:right” : {
“combo1” : “d”,
“combo2” : “right”
},
“cam:orb:right” : {
“combo1” : “e”,
“combo2” : “shift+right”
},
“cam:orb:up” : {
“combo1” : “shift+z”,
“combo2” : “shift+up”
},
“cam:orb:left” : {
“combo1” : “a”,
“combo2” : “shift+left”
},
“cam:orb:down” : {
“combo1” : “shift+s”,
“combo2” : “shift+down”
}
},

now when i press the z key (azerty) i have my move screen but this too :
the désignate zones show up …

i cant find this key z or w in the stonehearth.json

can you help me ?

I think it is this one:

"zone:menu": {
         "combo1": "", 
         "combo2": ""
      }

sorry not working…

Which key are you using instead of z? (To prevent the zones from appearing, you’ll need to assign it a different key).

I tried with zone:menu and it is the one you were referring to. Did you miss a comma somewhere, perhaps?

2 Likes

if i set this
"zone:menu" : {
“combo1” : “y”,
“combo2” : “”
}

its works… i have the y for shortcut
but this :
“zone:menu” : {
“combo1” : “”,
“combo2” : “”
}
i have the z by default. so not working :stuck_out_tongue:

If you leave it blank, it will pick the ones from stonehearth.json, which are the defaults.
We don’t have a way to override them with nothing at the moment. Although the one on stonehearth.json doesn’t mention the z, threre might be a bug anyway.

I’ll call @Carl_Quinn to take a look at it.

Edit: Issues have been addressed, probably in the next Alpha we’ll have a way to remove keybindings / cancel default bindings if we use the same key that was assigned to them.

1 Like