Skip to content

BALDUR.LUA - SOLUTION TO USING CHEAT CONSOLE (RESOLVES FILE OVERWRITE BUG). BG 1 ENHANCED EDITION.

Guys,
For those who cannot use the console command (Ctrl+Space) because the game keeps overwriting baldur.lua....
------------------
THE SOLUTION
------------------
1. Open BG, then close out of the game completely. This is just to get a clean copy of baldur.lua with default values.

2. Open baldur.lua with any text editor (it doesn't matter). Add this line at the very top:
SetPrivateProfileString('Program Options','Debug Mode','1')

3. Now, the key step.
MAKE BALDUR.LUA READ ONLY!!!! Right click->Properties->Check "Read Only" box.

Done.

Read Only blocks the game from updating the file. So simple.

PS. This worked for me, but if the file is still getting overwritten, just make the whole directory read only.

PPS. File is located here: %userprofile%\documents\Baldur's Gate - Enhanced Edition\Baldur.lua

Comments

  • Wise_GrimwaldWise_Grimwald Member Posts: 3,837
    Thanks for this. I couldn't understand why it kept reverting back. It never used to!
  • GraionDilachGraionDilach Member Posts: 579
    The game shouldn't revert player changes, but I can imagine the cloud save feature of Steam/GoG Galaxy restoring the config file from the cloud during game startup. If that's the case, it worths a try to start the game, Alt-Tab out from the main menu, do the edits in the file, close the game and let the cloud save feature upload the now-edited configuration.

    Making Baldur.lua read-only prevents unlocking cinematics, making the entire folder read-only prevents creating saves.
  • racecar777racecar777 Member Posts: 2
    @Wise_Grimwald....Glad the tip could help! That reminds me....I need to play Bauldur's Gate again.
  • Wise_GrimwaldWise_Grimwald Member Posts: 3,837
    edited September 2021
    The game shouldn't revert player changes, but I can imagine the cloud save feature of Steam/GoG Galaxy restoring the config file from the cloud during game startup. If that's the case, it worths a try to start the game, Alt-Tab out from the main menu, do the edits in the file, close the game and let the cloud save feature upload the now-edited configuration.

    Making Baldur.lua read-only prevents unlocking cinematics, making the entire folder read-only prevents creating saves.

    You are right about the cinematics being locked. Upon leaving Candlekeep the screen froze. I made the lua file readable and no problem. However lua changed. I've saved lua as Baldur.txt so that I can save it as Baldur.lua if and when required.

    Will now investigate your suggestion.

    I have only had this problem since installing Avast anti-virus so am wondering if that is the problem.
  • GraionDilachGraionDilach Member Posts: 579
    edited September 2021
    My experience with Avast! was bad 13 years ago already. I successfully managed to confuse my system and Avast! entirely back then via lending the PC to my mother, getting a simpler virus which it couldn't detect which I then deleted off manually through looking up the filenames and what virus they are associated with, Safe mode and System Restore. It worked but Avast! then popped up that it is missing something every startup.

    Simpler times, simpler viruses.

    If this matters to you, I work as a sysadmin for a major IT supplier providing IT for Fortune 500 clients and we rely on Windows Defender as the standard antivirus solution for all the company Windows workstations used internally and for reaching client environments. Microsoft made a good work on Windows Defender these days and it's on par with the rest (and definitely better than Avast).
    Wise_Grimwald
  • Wise_GrimwaldWise_Grimwald Member Posts: 3,837
    edited September 2021
    I think that you are right. I will be uninstalling shortly. It has caused a number of problems, this being a lesser one. It thinks Baldur's Gate is a virus!!

    I have just discovered that the line:
    SetPrivateProfileString('Program Options','Debug Mode','1')
    was not deleted but moved to a different place in the lua file.
    That is weird!!
    Post edited by Wise_Grimwald on
Sign In or Register to comment.