Skip to content

How to Enable the console in BGEE/SoD/BG2EE in version 2.0 and later

2»

Comments

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,714
    Are you sure about the folder's location? C - users - user - Documents?
  • GusindaGusinda Member Posts: 1,915
    @Hurrin_Stormbeard, is there any chance you could provide some screen shots? Have a look in your game's folder (where baldur.exe lives) and open the file 'engine.lua' (text file). It should have a line which by default, reads:

    engine_name = "Baldur's Gate - Enhanced Edition"

    It is the name of the folder which is created in the documents folder. If it doesn't look the same, then look for the name of the folder that is in "Folder Name".

    Was the game running when you renamed the folder (it shouldn't be)? If so, try running it again. Also, make sure that you are actually in your documents folder. When in Windows Explorer, select the 'documents' shortcut rather than navigating to the known folder. I 'move' my documents folder to a safer location on a separate drive but some files/folders are created in the old documents area. Worth a try.

    Gus
    JuliusBorisov
  • The .lua is the file that I "borrowed" from you Gus :smile: I'm guessing that my system is simply "borked"...I can't get the console to work in ANY of the games (though they all open and play - except for Neverwinter NIghts EE anyway).
  • GusindaGusinda Member Posts: 1,915
    @Hurrin_Stormbeard, I am guessing that the picture provided is after you have renamed the folder to .old and run the game to create a new folder. If this is the case, then the game is not creating the default folder:

    new folder looks like it is:
    Documents\Baldur's Gate Enhanced Edition
    ... so missing the ' - '
    ... or it isn't using this Documents folder at all and creating the saved game folder elsewhere. What you could do is set a search in motion for baldur.lua across the system and see how many come up and where they are located. If you double click in the 'Document' shortcut (located in two shortcuts above Baldur's Gate shortcut in the picture, do you get a 'Baldur's Gate - Enhanced Edition' folder in that location as well and does it look the same?

    Could you also have a look at 'engine.lua' in your game's folder where baldur.exe is and make sure that default folder is correct.

    Gus
    JuliusBorisov
  • Erb69Erb69 Unconfirmed, Member Posts: 1
    I had same issue with Baldur.lua. It turns out it was in the root of my C drive & not My Documents folder. In my other PC it was in the Documents folder. Search your C drive for Baldur.
    GusindaJuliusBorisov
  • MorkfelMorkfel Member Posts: 27
    Just a tip, close out of the game before editing the file.

    If you edit the file and save it, then close and reopen the game, the game overwrites your changes on close and undoes them.

    Didn't see it mentioned in this thread.
    elminsterJuliusBorisov
  • TressetTresset Member, Moderator Posts: 8,262
    @morningstar your comment here was caught by the forum's automated spam filter. I have restored it and verified you so that this should not happen again.
    elminsterJuliusBorisov
  • GusindaGusinda Member Posts: 1,915
    @morningstar, hi and welcome to the forum.

    Would you be able to give a couple more details about your problem? What system (OS) you are using and what version of which game.

    Thanks
    Gus
    JuliusBorisovelminster
  • TressetTresset Member, Moderator Posts: 8,262
    It seems like @morningstar turned out to be a tricky spambot. Damn things...
    elminster
  • FridareyFridarey Member Posts: 1
    Hi all

    Just in case anyone who's unable to activate console reads this far:

    Just spend half an hour trying things and scratching my head before realising I was editing the wrong Baldur.lua. I was in an old version of my Documents folder which had been left in place since OneDrive moved all my user stuff to the cloud. As soon as I edited the file in the OneDrive location everything worked.

    I know, noob error ;) Still, if it helps anyone else I get karma back x
    elminsterJuliusBorisovGusinda
  • PSTer770PSTer770 Member Posts: 12
    edited August 2019
    For me, using the PST 2009 DVD version, with windows 7 Professional, 64-bit, there is no planescape folder or .lua file in the C:/Users/adminstrator/mydocuments folder, even searching my whole system doesn't find ANY .lua files, period.
  • elminsterelminster Member, Developer Posts: 16,315
    PSTer770 wrote: »
    For me, using the PST 2009 DVD version, with windows 7 Professional, 64-bit, there is no planescape folder or .lua file in the C:/Users/adminstrator/mydocuments folder, even searching my whole system doesn't find ANY .lua files, period.

    Have you launched the game?
  • PSTer770PSTer770 Member Posts: 12
    edited August 2019
    elminster wrote: »
    PSTer770 wrote: »
    For me, using the PST 2009 DVD version, with windows 7 Professional, 64-bit, there is no planescape folder or .lua file in the C:/Users/adminstrator/mydocuments folder, even searching my whole system doesn't find ANY .lua files, period.

    Have you launched the game?

    I've played the game, yes. I'm currently on day 5 in Sigil, but are you saying it's only there while the game is actually running? Just tried that now, still not there.
  • elminsterelminster Member, Developer Posts: 16,315
    edited August 2019
    PSTer770 wrote: »
    elminster wrote: »
    PSTer770 wrote: »
    For me, using the PST 2009 DVD version, with windows 7 Professional, 64-bit, there is no planescape folder or .lua file in the C:/Users/adminstrator/mydocuments folder, even searching my whole system doesn't find ANY .lua files, period.

    Have you launched the game?

    I've played the game, yes. I'm currently on day 5 in Sigil, but are you saying it's only there while the game is actually running?

    Nope just that in the case of EE games it might not immediately appear there when the game is first installed (can't remember).

    However, I gather that you are playing the original PST (if you are playing a 2009 version you are playing the original game). There is no console on the original game. The folder that the game is installed in probably has an .ini file where some settings can be changed.
    JuliusBorisov
  • PSTer770PSTer770 Member Posts: 12
    Maybe I can just use near infinity to do it instead. I'm not really interested in cheating (that much) just I need stats for certain dialog choices and found out the hard way that you only gain an attribute point to add for the highest level in the highest class you've achieved- when you achieve it. So, no more from switching from thief to fighter, and gaining a level.

    Otherwise, two other things-I also want to find out where all the items are, so I don't miss anything (I remember you could bring up the coords with your cursor somehow) and maybe more experience, as it can be hard to find enemies that will get you up faster.
  • elminsterelminster Member, Developer Posts: 16,315
    @Troodon80 Would EEkeeper work with the original pst?
  • MalbusMalbus Member Posts: 1
    Gusinda wrote: »
    Hi @Hurrin_Stormbeard and welcome to the forum.

    The EEs 2.x and above all use the baldur.lua and there should be no .ini file. You would need to start the game first to generate the file, and it is located in you Documents folder within what ever game you are running. The this case, I assume it is BG1EE.

    ..\Documents\Baldur's Gate - Enhanced Edition

    It is likely that the extension is hidden and if you unhide extensions (options in Explorer), you would get a better view. A common problem is that if you use Windows Notepad to edit the file, it attaches a .txt at the end when save. Unhiding the extensions would allow you to check that (you could also look at the properties).

    When editing, this is the linr you need to insert:

    SetPrivateProfileString('Program Options','Debug Mode','1')

    It can be placed anywhere in the file as the game will rewrite the file on closing. You cannot edit the file when the game is running. If you do, the settings will not be saved.

    Hope that helps
    Gus


    Thank Jebus! This was my issue. Never thought to check the file extention and was wondering why my changes wouldn't stay!!

    TYVM!
    JuliusBorisovelminsterGusinda
  • elminsterelminster Member, Developer Posts: 16,315
    Yea just a heads up for anyone with issues related to this. I'm not involved in providing support for these products anymore. If you are having an issue tag @JuliusBorisov
  • PapaGyntherPapaGynther Member Posts: 1
    Hi, I know I'm a bit late but I hope this still gets updated. I'm playing on windows 10 and I'm trying the enable the console for SoD but when I paste the
    SetPrivateProfileString('Program Options','Debug Mode','1')
    line and boot the game nothing happens and when I quit the game the line disappears
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,714
    Hi, I know I'm a bit late but I hope this still gets updated. I'm playing on windows 10 and I'm trying the enable the console for SoD but when I paste the
    SetPrivateProfileString('Program Options','Debug Mode','1')
    line and boot the game nothing happens and when I quit the game the line disappears

    Add the Documents - BGEE folder to your Antivirus' exclusions and make sure the file is not read-only.
  • Magnus_GrelichMagnus_Grelich Member Posts: 361
    Hi, a bit late, I know... but I'm screwed from the starting line, since there appears to be no such folder as 'My documents'. I'm using a PC with Windows 10, and the interface is terrible.
    I'm trying to reach the Baldur.Iua file through the beamdoglibrary folder instead, since I can't find any other way. Please can you help me out here?
  • DoubledimasDoubledimas Member, Mobile Tester Posts: 1,286
    @Magnus_Grelich if you start up the game, it should create such a folder and accompanying .lua-file in My Documents. If not, antivirus is usually the culprit in preventing the folder from being created in the first place.
  • Magnus_GrelichMagnus_Grelich Member Posts: 361
    @Doubledimas Well I've been playing it for a while now, so it should exist. I just don't know how to get there through windows 10, because it's dreadful. Windows Defender is my antivirus, since AVG and Avast are no longer what they were, though I don't see how that would cause the problem.

    I need it because the game somehow made my bronze sphere disappear, and that's gonna be a bad time.
  • DoubledimasDoubledimas Member, Mobile Tester Posts: 1,286
    Bronze sphere? Are you playing Baldur's Gate of Planescape: Torment?
  • Magnus_GrelichMagnus_Grelich Member Posts: 361
    Planescape, but I was directed to here from the other thread. I don't get any of this, why do people have to make this so complicated?
  • Magnus_GrelichMagnus_Grelich Member Posts: 361
    @Doubledimas Sorry, forgot to tag you in response.
  • NattNatt Member Posts: 4
    Hello, I'm playing on a MAC and it's impossible for me to add the cheating console. I've followed the process described here above, but the only effect when I do cntle + space bar is to pause the game... I'm desperate because I am stuck in the game because of a bug and I need to unblock the situation !!
    Please see my file enclosed.

    Thanks for your help....

    PS: I can only send it on the forum when zipped...
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,714
    Your file had some odd symbols there: "SetPrivateProfileString('Program Options','Debug Mode’,’1’)"

    I changed them to the correct symbols.
    elminsterGusinda
  • St. AndrewSt. Andrew Member Posts: 86
    Where can I find an item database to use with this? I'm trying to create the graveyard key from faheed in ToB since it didn't appear in inventory and/or vanished
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,714
    St. Andrew wrote: »
    Where can I find an item database to use with this? I'm trying to create the graveyard key from faheed in ToB since it didn't appear in inventory and/or vanished

    The best way would be to use Near Infinity for that. https://forums.beamdog.com/discussion/30593/new-versions-of-nearinfinity-available/p1

    To spawn the key (enable the console first):

    C:CreateItem("PLOT17B",1)
Sign In or Register to comment.