Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

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

elminsterelminster Member, Developer Posts: 15,741
edited August 2017 in Troubleshooting
Note: Mac OSX Sierra users follow the steps found in this spoiler tag before trying to modify the baldur.lua file.



Before proceeding please note the security issues with this workaround outlined here
https://forums.beamdog.com/discussion/comment/832569/#Comment_832569

1. Open the terminal
2. Paste into it

sudo spctl --master-disable

3. Put in your password
4. Go to "System Preferences -> Security and Privacy
5. Click the lock at the bottom left and type in your password
6. Make sure "anywhere" is enabled




6. Launch whatever game this involves (BGEE, BG2EE, IWDEE)
7. Close the game
8. Open the terminal again
9. Paste into it

sudo spctl --master-enable

10. Go to "System Preferences -> Security and Privacy
11. (If necessary) Click the lock at the bottom left and type in your password
12. Make sure "Mac App Store and Identified Developers" is selected

Note: Make sure "Mac App Store and Identified Developers" is selected after you go through these steps.


You may now continue using the steps outlined below.


(The following steps may vary somewhat based on what system you are running)
  1. Go into your "My Documents" folder (if you are on a Mac this will be called "Documents")
  2. In it open the appropriate folder for the game you are playing (for instance "Baldur's Gate Enhanced Edition")
  3. Find the Baldur.lua file
  4. Open this file up using a Notebook, Wordpad, TextEdit, ConTEXT, or any other word processor (provided smart quotes are disabled)
  5. Add this line to the file
    SetPrivateProfileString('Program Options','Debug Mode','1')

  6. Save the file (be sure it remains a .Lua file)
  7. When you are playing the game (and are in the same screen you experience combat in) you should now be able to hit Ctrl+Space and see a black box appear (I've put a yellow box around it in the following image)


  8. Type in the appropriate code in the box and then hit enter.

    Note: As of 2.0 the old code prefix "CLUAConsole:" no longer works. You can instead just use "C:"
    An example would be

    C:CreateCreature("gibber")


You can find more information about the console (including how to enable it on version 1.3 and earlier) in the link below.

https://forums.beamdog.com/discussion/29678/about-this-forum-troubleshooting-faq#latest

Post edited by elminster on
HurricaneJuliusBorisovthespacecene89raelcariJetoratypo_tillylelag200anastiel
«1

Comments

  • cene89cene89 Member Posts: 4
    Perfect, It works!!!:) Thank you for your help!

    JuliusBorisov
  • LucasIDKn8LucasIDKn8 Member Posts: 25
    edited August 2017
    Does it matter where I add the line? For step 5?

  • DoubledimasDoubledimas Member, Moderator, Mobile Tester Posts: 1,112
    It should not matter as long as the format stays intact.

    elminsterJuliusBorisov
  • EmanonEmanon Member Posts: 5
    I'm playing planescape and this just isn't working. No console is appearing and it only pauses

    helimoen
  • elminsterelminster Member, Developer Posts: 15,741
    Emanon said:

    I'm playing planescape and this just isn't working. No console is appearing and it only pauses

    Make sure when you are editing the file you aren't using a program that has smart quotes active. So if you are on PC use something like Wordpad or CONText.

  • Luke93Luke93 Member, Mobile Tester Posts: 1,004
    Mac OS Sierra here, the procedure is not working.... I edited the file with TextEdit.....
    When I hit Ctrl+Space, nothing happens.....

  • elminsterelminster Member, Developer Posts: 15,741
    Luke93 said:

    Mac OS Sierra here, the procedure is not working.... I edited the file with TextEdit.....
    When I hit Ctrl+Space, nothing happens.....

    Make sure you have smart quotes disabled.

    Luke93
  • kauaiguykauaiguy Member Posts: 3
    Recently downloaded IWD:EE v.1.4.0, and wanted to enable the in-game console; read up on and followed all the steps and advice as given above - including the security fix - but will not work in Mac OS High Sierra 10.13.2. If anyone finds a way to make it work, please let me know! FYI, it looks like they reverted back to an .ini file marker as I was able to find icewind.ini after searching in vain for icewind.lua. I used TextEdit with smart quotes disabled, inserted the console-enabling line of code, saved and restarted IWD which then would only crash upon startup. I double-checked the code to make sure it was saved without any alterations by TextEdit (it was) but to no avail; removing the line and re-saving the .ini file allowed the game to start again normally.

  • GusindaGusinda Member Posts: 1,110
    edited January 2018
    @kauaiguy, welcome to the forum. I don't own a Mac and therefore can only make suggestions...

    I think the line you are entering may be the wrong one. In the .ini file (I thought was called baldur.ini but may be different for Mac - both PC and Android use baldur.ini), the console entry used should read:

    'Program Options', 'Debug Mode', '1',



    If you were looking for the .lua, you might have been using this instead, which wouldn't work :
    SetPrivateProfileString('Program Options','Debug Mode','1')



    If neither is the case, could you let us know the code you are using?

    Good hunting
    Gus

    JuliusBorisov
  • kauaiguykauaiguy Member Posts: 3
    Thank you for your recommendations, but unfortunately I could not make them work. There is a baldur.lua file located in the application folder, but after inserting the corrected code you listed there was no change in the gameplay meaning that the console would not show, at least from the Control->Shift command. I also tried some key variations with the Shift, Option (ALT) and Command keys, but no in-game console appeared. Inserting either variation of the code didn't appear to have any effect on gameplay. And yes, this did involve a full quitting and relaunching of the game in between each attempt.

    There was also a baldur.ini file that was located nestled deep within my Library folder (/Users/____me____/Library/Containers/com.overhaulgames.iwdee-macos/Data/Documents/Icewind Dale - Enhanced Edition/baldur.ini) but the insertion of that corrected code (and the uncorrected code, btw) caused the game to be unlaunchable until removed.

    I am continuing to play and enjoy the game as is, but am hoping that this information proves to be helpful in finding a way at some point to provide access to the in-game console for anyone playing the latest release on the Mac.

  • elminsterelminster Member, Developer Posts: 15,741
    edited February 2018
    @kauaiguy Its Ctrl+Spacebar

    What version are you running? (if you start the game it should be found either on the main screen or on the load game screen).

    If you are using an earlier version then paste this

    'Program Options', 'Debug Mode', '1',


    right below the "INSERT INTO options ROWS (" line in your baldur.ini file

    JuliusBorisovGusinda
  • kauaiguykauaiguy Member Posts: 3
    Brilliant! That finally worked, and it was a matter of having been pasted into an incorrect location, so thank you for the clarification on that. I made the adjustment to the baldur.ini file only, and it now starts up normally and the Control-->Shift command will make the console appear. Many thanks!

    p.s. - The version is 1.4.0, just to answer that question.

    GusindaJuliusBorisov
  • TwenyngeTwenynge Member Posts: 1
    I'm dying here. Followed the instructions for Mac and edited my .lua file. It seems that debug mode is enabled, as ctrl+J works to warp my party, but ctrl+space DOES NOT open the console (it also doesn't pause the game, oddly). Found another thread where someone had the exact same issue, but the thread got hijacked and no solution was posted. I usually play on iPad, but am very tired of trying to edit save games via hex editor and would like a proper console. Please help!

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 16,762
    @Twenynge Just to clarify: are you trying this on an iPad? (currently mobile versions don't fully support keyboard/console)

  • helimoenhelimoen Member Posts: 2
    Hi ! I have a MACBOOK and I was thrilled to play to BG1 again after so long... (I played it during my childhood). I have the BG1EE I think it is the 2.1.3 version

    I wanted to enter a cheat code to get more money so that I could buy better equipment, so I read your instructions, did all you said in Preference system and Terminal and found the baldur.lua file, opened it in Text Edit (Smart quotes disabled in the preferences), added the line as you said (the one with Debug Mode under Program Options, saved it. I checked the file by opening it again and there it was (the new line).
    So I opened the game and tried to activate the cheat console but nothing (I tried different things and the main one : Ctrl+ SPACE is just pausing the game)... I'm desperate !
    Help please !

  • elminsterelminster Member, Developer Posts: 15,741
    helimoen said:

    Hi ! I have a MACBOOK and I was thrilled to play to BG1 again after so long... (I played it during my childhood). I have the BG1EE I think it is the 2.1.3 version

    I wanted to enter a cheat code to get more money so that I could buy better equipment, so I read your instructions, did all you said in Preference system and Terminal and found the baldur.lua file, opened it in Text Edit (Smart quotes disabled in the preferences), added the line as you said (the one with Debug Mode under Program Options, saved it. I checked the file by opening it again and there it was (the new line).
    So I opened the game and tried to activate the cheat console but nothing (I tried different things and the main one : Ctrl+ SPACE is just pausing the game)... I'm desperate !
    Help please !

    What version of mac are you running?

  • Sharkit0Sharkit0 Member Posts: 1
    OS: macOS High Sierra 10.13.5
    Game: BGEE 1
    Version: 2.3.67.3 from STEAM

    In advance, I used the terminal workaround for Sierra.

    In Text Edit, added the following, no smart quotes enabled, to baldur.lua in documents folder for game:
    SetPrivateProfileString('Program Options','Debug Mode','1')
    Filed is saved and still in .lua format

    In game, "CTRL" has no effect, e.g.:
    "CTRL 8" on character creation does not give all 18s for stats - no effect
    "CTRL J" on primary game screen will not jump character to cursor location, only opens journal
    "CTRL Space" pauses game, no console menu appears.

    I have a mac laptop and a PC desktop. This is a mac-exclusive issue I've faced since 2016, forum posts always address one of the topics I've bolded above. Its not earth-shattering, just irritating. Any ideas?

  • anastielanastiel Member Posts: 117
    Is there more options for playing with the terminal?



  • elminsterelminster Member, Developer Posts: 15,741
    edited August 2018
    anastiel said:

    Is there more options for playing with the terminal?

    Attach your lua file here and I'll check it out.

    Post edited by elminster on
    JuliusBorisov
  • LytharwolfeLytharwolfe Member Posts: 2
    Does this work with the version of BG:EE that is available on the App Store for Macbook Air, or does it have to be the Steam version? Because I can't find any files named baldur.lua on my computer for the app store version.

  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 16,762

    Does this work with the version of BG:EE that is available on the App Store for Macbook Air, or does it have to be the Steam version? Because I can't find any files named baldur.lua on my computer for the app store version.

    The Mac App Store will very soon be updated to the 2.5 version, and this will start working for it.

  • Hurrin_StormbeardHurrin_Stormbeard Member Posts: 5
    Morning all!

    Just downloaded BG Enhanced on a new computer and am trying to get the console to work to no avail...running Windows 10Pro and have version 2.5 of BG. Don't have a .LUA file but do have a .ini one that I've tried modifying above with no luck...game doesn't crash or anything, but simply can't get the console to open up :blush:

    Help please! lol

  • GusindaGusinda Member Posts: 1,110
    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

    JuliusBorisov
  • Hurrin_StormbeardHurrin_Stormbeard Member Posts: 5
    Thanks for the response Gus!

    I've ensured that no files are hidden and the ONLY files within the ...\Documents\Bauldur's Gate - Enhanced Edition folder are the following:
    1. bpsave
    2. save
    3. Baldur.ini

    I've deleted the .ini file several times and still don't have a .lua file...the game itself seems to be running fine (except for an occasional error message in the game text box associated with the main character's name)...

    Any other suggestions would be very helpful! :smile:

  • GusindaGusinda Member Posts: 1,110
    @Hurrin_Stormbeard, with the other games working, this probably wouldn't be the solution but does you documents folder/username have any special characters in it? That might prevent saving to the folder or cause some weird errors, also what anti-virus engine are you running. try disabling for a brief period of time (disconnect of course) just to see if that creates the .lua.

    Julius has pointed to a number of vanilla .lua files so you will need to edit it; if it doesn't work, I can pass mine up.

    Gus

    JuliusBorisov
  • Hurrin_StormbeardHurrin_Stormbeard Member Posts: 5
    Thanks all,

    To answer questions:
    1. The file that Julius linked hasn't helped - still can't get the console to open up
    2. The /username file has no special characters or anything like that
    3. Running Windows Defender - disabling it doesn't seem to be affecting anything either

    If you don't mind Gus, I'll try your .lua file to see if THAT works :smiley: lol

  • elminsterelminster Member, Developer Posts: 15,741
    edited January 10
    If you are running 2.5 I'm pretty sure you shouldn't have any ini file unless you previously had a version (1.3 or lower) of BGEE installed. Like I just installed BGEE on Windows 10 myself and I have no ini file.

    I would double check by checking the game to make sure you have the right version. If its 2.5 it should appear in the top right corner of the initial game menu. If its an earlier version it might appear in the loading screen.

    Post edited by elminster on
    JuliusBorisovGusinda
  • GusindaGusinda Member Posts: 1,110
    edited January 10
    @Hurrin_Stormbeard, as @Elminister has has said, the .ini file doesn't exist in 2.x so there is something going on there... It might be that you have some old BG 1.3 stuff in the folder.

    Attached is my copy of baldur.lua. Just rename it from what it is right now to baldur.lua and place it into your 'documents' BG game folder. Make sure you aren't running the game when you do that.

    If in the end it still doesn't work, rename the
    ..\Documents\Baldur's Gate - Enhanced Edition
    to
    ..\Documents\Baldur's Gate - Enhanced Edition.old

    and start the game. This will/should create a new 'clean' folder and a new baldur.lua (and keep safe any saved games you might have). Close the game and edit the new baldur.lua.

    As the last resort, there is another method which doesn't require editing the balur.lua but it only works in 2.x (prob only 2.5 and above - not tested in earlier versions). Have a read of the instructions as you either add to your UI.MENU or replace it. This will then add a GUI button in the bottom right hand corner which will give you acceess to the console.

    Hopefully one of these will get you there.
    Gus

    Edit: Added attachment :*

    JuliusBorisov
  • Hurrin_StormbeardHurrin_Stormbeard Member Posts: 5
    Something must really be borked for me - I renamed the Baldur's Gate - Enhanced Edition as suggested. Restarted the game and it loaded fine. Closed out of the game and checked for folder/file structure and the game didn't build a new Baldur's Gate - Enhanced Edition folder at all...when I load back in it still seems to play "fine" lol

«1
Sign In or Register to comment.