Skip to content

Can't edit Baldur.lua file to enable console commands

Lazlo_ArcadiaLazlo_Arcadia Member Posts: 73
Every time I try to edit the Baldur.lua file it does not save the changes, almost as if I didn't have WRITE privs (only READ privs). However I've already checked the file and it is clearly marked as having full control.

I've attempted to edit the file multiple times. Then i save the changes, close Notepad ++ and reopen the file (without going into BGII: EE in between) and my changes are gone.

I've run out of ideas on what could be doing this.

Comments

  • Lazlo_ArcadiaLazlo_Arcadia Member Posts: 73
    UPDATE: it is BG II: EE it self that is over writing the file. WTF!? I updated the .lua and hard saved it under the FILE dropdown (instead of the save disk icon). Closed the program and reopened it. So far so good. So I left the program open, launched BGII: EE and flipped back to Notepad ++ which is now giving an error that another program has modified the file.

    BTW - the only mod i'm running is EEKeeper
  • Lazlo_ArcadiaLazlo_Arcadia Member Posts: 73
    What about this, what if I update the .lua file and then chance it to a read only file so the game cant force change it back?
  • GusindaGusinda Member Posts: 1,917
    @Lazlo_Arcadia, the EE series use the .lua to hold various info like saved game name, console use etc, so I would change the attribute to read only.

    What sort of changes are you trying to make?
    You could try something like:
    - Edit file and save as .txt (that way you don't have to continually rewrite everything).
    - Backup your old .lua
    - Copy a new one as .lua (from the .txt)
    Make sure that you don't have BG open when making any changes.
    I have heard of Anti-virus programs getting in the way as well. Perhaps turn yours off while you make the changes, then turn it back on. If that works, you can make an exclusion for your AV.

    Gus
  • Lazlo_ArcadiaLazlo_Arcadia Member Posts: 73
    I'm trying to add the line of code to the Baldur.lua file to allow for Console Commands. I've tried using both notepad and notepad ++. BG2:EE is not open when I make the changes (nor anything else). I've submitted this as an official bug report to tech support and they requested more info (my initial write up on it was really bad actually).

    I've also attempted to edit the file while the game was open in the background. Same results.

    I'm definitely open to ideas
  • GusindaGusinda Member Posts: 1,917
    @Lazlo_Arcadia, if you tried Notepad first, just make sure the file you are editing is actually baldur.lua and not baldur.lua.txt (with a hidden extension). The default for Notepad is to add the .txt extension. You can check by right clicking the file and check properites. This has happened before, more then once, including me... I now always show ay extension but rarely edit with Notepad (fan of Notepad++). I might add that 'save as' for Notepad++ places the file in your Documents Folder (unless you have specified another one). Just have a quick look in the Documents folder to make sure it isn't hiding there.

    Editing the file while the game is open in the background will only result in a no save of the edits. The game will write over baldur.lua with the state of the game as it was open then closed.

    Not sure how you went with the AV, but here is another idea. Take the file out of the '..\Documents\Baldur's Gate - Enhanced Edition' folder then edit it. Copy it back and run the game.

    Gus
  • Lazlo_ArcadiaLazlo_Arcadia Member Posts: 73
    All excellent ideas and I appreciate the feed back. I actually fixed the issue yesterday.

    I uninstalled the game, deleted both the documents folder and the steamaps folder and did a full reinstall from scratch. Fortunately I was not far into the game (I did this for both BG:EE and BGII:EE) and now both are running without issue.
Sign In or Register to comment.