Author Topic: Binding keys to game functions v0.114  (Read 6737 times)

Offline lagomorph129

  • Newbie Mark II
  • *
  • Posts: 15
Binding keys to game functions v0.114
« on: April 02, 2017, 12:23:09 am »
I've really been enjoying the update, but I've reached a cap on my shield gen's and would like to re-position the less relevant ones. I can't seem to find the scrap function in the menus, but is there a way I can bind that to the [delete] key? I don't see it as a predefined function in the inputmappings.dat, and I wouldn't know how to find that function. Additionally, the multiple letters of the [delete] key confuse me in terms of what to put as the actual binding.

Offline lagomorph129

  • Newbie Mark II
  • *
  • Posts: 15
Re: Binding keys to game functions v0.114
« Reply #1 on: April 02, 2017, 01:03:26 am »
Well, I found the input definitions. I tried copying the format in the inputmappings.dat in the PlayerData folder, but I soon realized that opening the game reset it to the way it was before I modified it. I take it I'll have to make an .xml to force these settings through. What would be a good resource for learning how to work that magic?  ;D

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Binding keys to game functions v0.114
« Reply #2 on: April 02, 2017, 07:35:42 am »
Whoops, sorry, I should have put that button in under the Commands menu. Which you could do but I'm guessing recompiling a C# dll is beyond what you'd like to do for this ;)

PlayerData/inputmappings.dat _is_ the right place for changing the keys for an existing bind. But you can't define new binds there.

Since this behavior is already implemented by the main input handler, though, you can add a bind to that existing behavior very simply:

1) In  GameData/Configuration/InputAction/KDL_InputActions.xml
2) Add this at the bottom (before </root>) :

Code: [Select]
  <input_action name="ScrapUnits"
              display_name="Scrap"
              description="~*~"
              dll_name="AIWarExternalCode"
              type_name="Arcen.AIW2.External.Input_MainHandler"
              default_key="Delete"
  >
  </input_action>

This will be overwritten the next time we update that file, but that bind will probably be present in our update. If you wanted to make a similar one and avoid the overwriting you could put it in a mod in the XMLMods folder.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline lagomorph129

  • Newbie Mark II
  • *
  • Posts: 15
Re: Binding keys to game functions v0.114
« Reply #3 on: April 02, 2017, 08:26:15 am »
Thanks a heap :P