Skip to content

BUG: Unchangable and unlisted key bindings in Baldur's Gate Enhanced Edition 2.x (BGEE 2.x)

psycrospsycros Member Posts: 34
Since the 2.0 update there seem to be some unlisted key bindings that are making it impossible to re-bind certain keys. You can try to re-map them, but on the binding list they won't show the key you actually chose. However when you return to the game and mouseover the function you just bound it WILL show what you picked - but it might not actually work. An example:

Page Up makes the log window bigger by default and Page Down makes it smaller. These functions aren't listed anywhere among the key bindings on the Assign Keys screen. When I try mapping Page Down to Inventory it shows "N" instead of "Page Down" as the bound key. However, when I mouse over the Inventory button in-game it says "Page Down - Inventory" but Page Down still only makes the log window smaller.

Certain other keys will re-bind even when it doesn't display the correct key in Assign Keys. For example, you can assign something to the Right Arrow and the Assign Keys binding will say "O" but in-game the button is properly labeled "Right - [button function]" on mouseover and actually performs the function you assigned it.

I'm almost certain that the original Baldur's Gate had some of these same issues. Being left-handed I couldn't really enjoy the game back in the day, which is why I was so happy when someone told me the Enhanced version had fixed this problem. Yet somehow..here we are again :( We need to see all the keyboard functions shown on the Assign Keys screen and it should be possible to remap all of them except maybe a console key or ESC. To be honest, I don't understand why we can't have CTRL+[key] combos as well but I'd be happy just to get back what I had in the previous version of BGEE!
Post edited by psycros on

Comments

  • [Deleted User][Deleted User] Posts: 0
    edited June 2016
    The user and all related content has been deleted.
  • Mr2150Mr2150 Member Posts: 1,170
    edited June 2016
    All key bindings are saved in the keybindings table that's stored in BGEE.lua (you can extract it from NI).

    From what I can gather the last number in each line represents the key pressed. EG 105 is I for Inventory, 106 is J for Journal.... etc. You should be able to export and edit the file, and it should be possible to override these with an M_*.lua file too, however you would need to know the correct number for PgUp/PgDn etc

    I would also guess that the CTRL + [key] combos are prevented as many of them are already used for debug mode.
    Post edited by Mr2150 on
  • psycrospsycros Member Posts: 34
    Mr2150 said:

    All key bindings are saved in the keybindings table that's stored in BGEE.lua (you can extract it from NI).

    From what I can gather the last number in each line represents the key pressed. EG 105 is I for Inventory, 106 is J for Journal.... etc. You should be able to export and edit the file, and it should be possible to override these with an M_*.lua file too, however you would need to know the correct number for PgUp/PgDn etc

    I would also guess that the CTRL + [key] combos are prevented as many of them are already used for debug mode.

    I have no idea idea what "NI" is or how to extract anything from it. LUA is some kind of script language or something, right? If you could provide a little more detail I'd really appreciate it..I'm not a modder and I only dabbled in programming.
  • Mr2150Mr2150 Member Posts: 1,170
    edited June 2016
    Sorry! I've not messed around with key bindings myself but this should get you heading in the right direction.

    NI is NearInfinity... You can use it to browse and edit the game files and settings, so be careful - any changes you make directly in NI itself will be final. If you mess up when editing NI you may be forced to do a full reinstall. Fortunately, NI offers the option to extract files and edit them which gives you a safety net. You need to download it to your game folder: LINK

    Once that's done, load NI and in the left-hand pane you will see lots of file types. Under LUA you will find a file called BGEE. Clicking it will bring up the file in the right hand pane.

    You have a few options now, but the easiest two are probably these:
    • I'd recommend to export BGEE.lua to your override folder so you can then use a text editor to make any changes. These changes are effectively hard-coded and override the games default copy of BGEE.lua
      If you mess up, all you need to do is delete the BGEE.lua copy in your override and it will reset everything ... and the game will instead use the default unedited BGEE.lua

      OR

    • Have a look at this thread. The approach used by @Dee in the thread is very similar to what you would want to do with the key bindings, so you should be able to adapt the approach to change the key bindings in some way.

    The keybindings table is a lua table, this is the start of it...

    keybindings = { { { 1, 1, 'Inventory', "ASSIGN_KEYS_PAGE_INVENTORY", '', 0, 105 }, { 2, 1, 'Character Record', "ASSIGN_KEYS_PAGE_CHARACTERINFORMATION", '', 0, 114 }, { 3, 1, 'Return To Game', "ASSIGN_KEYS_PAGE_RETURNTOGAME", '', 0, 103 }, { 4, 1, 'Journal', "ASSIGN_KEYS_PAGE_JOURNAL", '', 0, 106 }, { 5, 1, 'Map', "ASSIGN_KEYS_PAGE_AREAMAP", '', 0, 109 }, { 6, 1, 'Wizard Spells', "ASSIGN_KEYS_PAGE_MAGESPELLS", '', 0, 119 }, { 7, 1, 'Priest Spells', "ASSIGN_KEYS_PAGE_PRIESTSPELLS", '', 0, 112 }, { 8, 1, 'Options', "ASSIGN_KEYS_PAGE_OPTIONS", '', 0, 111 }, { 9, 1, 'Character Arbitration', "ASSIGN_KEYS_PAGE_CHARACTERARBITRATION", '', 0, 99 } },

    The last number represents the key that is bound, I believe. The text in quote marks refers to string you see in the keybinding window of the game (so don't change that). There looks to be around 200 keybindings that can be set.
  • psycrospsycros Member Posts: 34
    Thanks a bunch for the detailed and clear info..I will let you know if and how I manage to overcome Beamdog's, errr, "undocumented feature".
  • psycrospsycros Member Posts: 34
    edited December 2016
    Had no luck with trying to put in new keyboard codes. I extracted the BGEE.LUA which I think dumped a million files into Override. I searched up ASCII charts but couldn't even find the decimal codes for buttons like Page Down. Any time I did change codes all it did was crash the game at start up. Why oh why did Beamdog go backwards with so many things in v2.0? And why haven't we gotten any more patches in six months???
Sign In or Register to comment.