Binds To Change Binds



  • So, if this has been covered before, my google-fu was too weak to find it. Forgive me if the solution to this is already floating out there.

    I have a problem: I like different keybind layouts for different weapons. For example, on the longsword I like the reg OH more than the alt OH, and on the norse sword I like the alt OH more than the reg OH. And I prefer to have my slashes (reg and alt) on mousewheel up and mousewheel down, but you can’t hold mousewheel up/down for projectiles, so if I pull out a bow I want my reg slash back on LMB.

    I would like very much to create bindings for the number keys that change my other bindings. That way, instead of opening up my keybinding menu any time I change from MaA to knight (or god forbid, archer) all I have to do is press a button. Is there any wizardry I can perform to do this? I know you can bind console commands to buttons, so… is there a console command to bind game commands to buttons?

    Edit: Figured it out! I thought the commands in the ini (like GBA_Shove) were the commands the game used to make your character do things, but they’re actually aliases for the game commands, and the game commands themselves are below that. So for example, the console command setBind Five “setBind Six doShove” will make pressing ‘5’ make pressing ‘6’ do a shove. Beautiful.



  • Bindings=(Name="P",Command="AltPrimary1 | AltPrimary2")
    Bindings=(Name="O",Command="MainPrimary1 | MainPrimary2")
    Bindings=(Name="AltPrimary1",Command="SetBind LeftMouseButton GBA_AltAttack0 | GBA_SpectatorNext")
    Bindings=(Name="AltPrimary2",Command="SetBind RightMouseButton GBA_AltAttack1")
    Bindings=(Name="MainPrimary1",Command="SetBind LeftMouseButton GBA_Fire | GBA_SpectatorNext")
    Bindings=(Name="MainPrimary2",Command="SetBind RightMouseButton GBA_AltFire | GBA_SpectatorNext")
    

    Something along the lines of the above is how you could lay it out. You’ll obviously have to edit this to how you want it as this is just an example using LMB and RMB for slash and overhead respectively. Just a note, GBA_Altfire is a normal overhead and GBA_StartStab is for stab. If you run into problems, paste what you come up with and tell me the exact issue.



  • This is my command for putting the alternate overhead on LMB. Sorry about all the extraneous fields you left out of your’s, Chivalry was determined to put them back in.

    Bindings=(Name="AltOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_AltAttack1 | GBA_SpectatorNext",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    )
    
    ```This is what my LMB looks like after this command is called (by pressing 6, in this case).
    

    Bindings=(Name=“LeftMouseButton”,SecondaryKey=,Command="GBA_AltAttack1 ",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=“KBFlag_Utility|KBFlag_Weapon”,FriendlyName=“SpectateNext|SecondaryAttack”)



  • this might be exactly what i was looking for.

    if im understanding correctly, you can bind 1 and 2 to change binds so that whenever you change your weapon, you can have the overhead swings in the same direction, right?

    if you dont mind, can you post a config lines that would accomplish this?



  • I have them on 5,6,7,8 with 1,2,3,4 are still weapon select, since I’m less concerned about what particular weapon I have out and more about what particular class I’m playing. Here are my complete config changes:

    Bindings=(Name="Five",SecondaryKey=,Command="RegOnLMB | AltOnZero | SlashOnMWU",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="Six",SecondaryKey=,Command="RegOnZero | AltOnLMB | SlashOnMWU",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="Seven",SecondaryKey=,Command="RegOnZero | AltOnMWU | SlashOnLMB",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="Eight",SecondaryKey=,Command="RegOnMWU | AltOnZero | SlashOnLMB",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="RegOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_AltFire | GBA_SpectatorNext",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="RegOnZero",SecondaryKey=,Command="SetBind Zero GBA_AltFire",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="AltOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_AltAttack1 | GBA_SpectatorNext",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="AltOnZero",SecondaryKey=,Command="SetBind Zero GBA_AltAttack1",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="RegOnMWU",SecondaryKey=,Command="SetBind MouseScrollUp GBA_AltFire | GBA_SpectatorZoomIn",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="AltOnMWU",SecondaryKey=,Command="SetBind MouseScrollUp GBA_AltAttack1 | GBA_SpectatorZoomIn",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="SlashOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_Fire | GBA_SpectatorNext",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    Bindings=(Name="SlashOnMWU",SecondaryKey=,Command="SetBind MouseScrollUp GBA_Fire | GBA_SpectatorZoomIn",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    

    Basically, make commands (for example, my RegOnLMB) that do the keybinding you want. Then, as part of the button to change your bind, call those commands. For example, if you play longsword/norsesword knight (hey, that’s me!) and you want your overheads to come from the right using LMB to activate, you would set it up like this:

    Bindings=(Name="One",SecondaryKey=,Command="GBA_SwitchWeapon1 | RegOnLMB")
    
    Bindings=(Name="Two",SecondaryKey=,Command="GBA_SwitchWeapon2 | AltOnLMB")
    
    Bindings=(Name="RegOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_AltFire | GBA_SpectatorNext")
    
    Bindings=(Name="AltOnLMB",SecondaryKey=,Command="SetBind LeftMouseButton GBA_AltAttack1 | GBA_SpectatorNext")
    ```Now when you press 1, you will pull out your longsword and LMB will do regular overheads. And when you press 2, you will put out your norse sword and LMB will do alternate overheads.


  • Thanks! but where is the command that binds the ‘switching keybinds’ to a command?



  • I’m a little confused by what you mean. You put these commands inside your UKDGame.ini with a text editor, not with the chivalry console, if that’s the confusion. I was using the console at first to test the syntax on the go, but you don’t want to try this using the console. It’d be a nightmare, if it’s even possible.



  • @DSMatticus:

    I’m a little confused by what you mean. You put these commands inside your UKDGame.ini with a text editor, not with the chivalry console, if that’s the confusion. I was using the console at first to test the syntax on the go, but you don’t want to try this using the console. It’d be a nightmare, if it’s even possible.

    To use the console, use the “setbind” command.

    Bindings=(Name="Five",SecondaryKey=,Command="RegOnLMB | AltOnZero | SlashOnMWU",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False,Flag=,FriendlyName="Unknown")
    
    

    Becomes

    setbind Five "RegOnLMB | AltOnZero | SlashOnMWU"
    

    Double quotes are necessary to keep all three commands as part of that one bind.

    Just a general FYI, you can also create separate text files with functions that can be bound to keys too. The functions can only contain console commands.


Log in to reply