Need help for keybinding please

Started by r4ky, September 17, 2015, 08:11:01 AM

Previous topic - Next topic

r4ky

Hi, (well i apologize for my bad english, it's not my native language.)

I try to keybinding a key that isn't listed in the keybind section in-game so i try to edit xml in Core folder : Mods\Core\Language\French\DefInjected\KeyBinding.xml
and same folder with my language but it don't seem to work ...

The key i want to edit is in Order so on ingame keybind it's called "Control:Misc" in english i think

the xml is like this :
  <!-- Misc (re-used) -->
 
   <Misc1.label>Divers 1</Misc1.label>
   <Misc2.label>Divers 2</Misc2.label>
   <Misc3.label>Divers 3</Misc3.label>
   <Misc4.label>Divers 4</Misc4.label>
   <Misc5.label>Divers 5</Misc5.label>
   <Misc6.label>Divers 6</Misc6.label>
   <Misc7.label>Divers 7</Misc7.label>
   <Misc8.label>Divers 8</Misc8.label>
   <Misc9.label>Divers 9</Misc9.label>
   <Misc10.label>Divers 10</Misc10.label>
   <Misc11.label>Divers 11</Misc11.label>
   <Misc12.label>Divers 12</Misc12.label>

and as you can see there is only 12 Misc but i have 20 ingame so i try to creat this to see if it was just another misc after Misc12 :
   <Misc13.label>Divers 13</Misc13.label>
   <Misc14.label>Divers 14</Misc14.label>
but it don't seem to work ^^ i think it's because game don't know what is misc13 cmd so i think i need to make ingame cmd to be Misc13 but i really don't know how to i didn't find an xml like this and i'am not sure it has to be edited in a xml files ^^

so if someone is able to help me ...

Thanks for your time.

Thanks

edit : i have also try yo modify this xml : Core\Defs\KeyBindingDefs\KeyBindings.xml

and add this :


  <KeyBindingDef ParentName="MiscKeyBinding">
    <defName>Misc13</defName>
    <label>Misc 13</label>
    <defaultKeyCodeA>W</defaultKeyCodeA>
  </KeyBindingDef>
 
  <KeyBindingDef ParentName="MiscKeyBinding">
    <defName>Misc14</defName>
    <label>Misc 14</label>
    <defaultKeyCodeA>X</defaultKeyCodeA>
  </KeyBindingDef>
 
but it still don't work at all ^^

ty

Fluffy (l2032)

The top file is just a translation file, it provides labels in different languages but does nothing on its own.

The bottom one I'm less sure about, however I'm fairly sure that to have a keybinding work, you have to edit the xml for the thing you want it to do. I.e. for designators like hunt, cancel etc: defs/designatordefs, for buildings it's defs/thingdefs/building_xxx, and so forth.