Skip to content

Can't get the CLUA console to Work (Read Only Folder)

I can't get the CLUA console to work, I've tried everything. It seems that my Baldur's Gate II folder in My Documents is read only and I can't get it to change no matter what I've tried. I've done console commands, deleting it and recreating the folder, heck I've uninstalled and reinstalled to see if that works and nothing.

I'm really at my wits ends with this. Does anyone have a solution?

Comments

  •  TheArtisan TheArtisan Member Posts: 3,277
    I can't tell if you're unable to get the cheat console to activate or if your commands aren't working.

    1) If you can't access the console, as in, Ctrl+Space doesn't work, then you've put DebugMode=1 in the wrong place. You need to add it to the baldur.lua file, not baldur.ini.

    2) Cheat commands for BG:EE no longer use CLUAConsole. It's simply C: e.g. C:CreateItem("sw1h01")
  • NightsongNightsong Member Posts: 19
    I know all of this. What my problem is, very simply, is that the entire folder is read only, which means every time my game starts up the lua file resets. When I'm talking about console commands, I'm talking computer console commands to try and change the folder from read only. I'm not sure I'm even doing that right, but I'm doing what little information I've been able to find about people who have the same problem I have.
  •  TheArtisan TheArtisan Member Posts: 3,277
    Can you disable Read-only from the 'Properties' tab?
  • NightsongNightsong Member Posts: 19
    I've tried that, and when I do it the read only property resets itself. Every time, with everything I have also mentioned I've tried.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    edited January 2017
    Nightsong said:

    I've tried that, and when I do it the read only property resets itself. Every time, with everything I have also mentioned I've tried.

    Please note that all folders in Windows are displayed as read-only. That doesn't mean all files inside the folder are read-only.

    If the checkbox in the properties window is what you're trying to change, then you will have no success. Can you provide any additional clarification on the read-only status of the file?
    JuliusBorisov
  • elminsterelminster Member, Developer Posts: 16,315
    edited January 2017
    Make sure you are using a program like wordpad, notepad++ or ConTEXT to edit the file (only use MS word if you disable smart quotes).
    JuliusBorisov
  • NightsongNightsong Member Posts: 19
    I'm not sure how to prove it's read only, but I'm pretty sure it is. Every time I try to edit the file it resets itself to default ie all changes made to the file reset to what it was when first installed. Settings and all.

    I have used wordpad to make the changes.
  • Grond0Grond0 Member Posts: 7,305
    Presumably you don't have the game open when you make changes? If you did then settings would revert to those currently being used in the game.
  • NightsongNightsong Member Posts: 19
    I don't have the game open.
  • Grond0Grond0 Member Posts: 7,305
    As Troodon80 said the file itself should not be read only, though the folder will be. You should see that in the properties for the file as in this screenshot.

    If the LUA file is read only then that is a windows problem rather than anything to do with the game.
  • NightsongNightsong Member Posts: 19
    The lua file says it's not read only. Yet it keeps changing back to 'normal', so I'm assuming it's a folder problem.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    edited January 2017
    I am assuming you're editing the LUA file first and it's not just the game that keeps resetting it (i.e. so window position and size options are never saved even without being edited)?

    What are you using to edit the LUA file? Can you attach your edited LUA file here for review—we can check to ensure there are no errors (such as line feed issues). You can use the upload button in the comment box toolbar to attach your file, as displayed here:

  • lroumenlroumen Member Posts: 2,508
    Try copying the file to desktop change it there, then paste it back into its folder. That seemed to help me in my windows 10 install.
  • NightsongNightsong Member Posts: 19
    It says 'that type of file is not allowed' when I try to attach the .lua file. As I said before I am using wordpad to make the changes.
  • NightsongNightsong Member Posts: 19
    And I think it's the game that might be resetting it, since when I open the game the option for it to resize the ui to the screen size keeps being deselected.
  • Grond0Grond0 Member Posts: 7,305
    You can just copy and paste the contents of the lua file into a post as text.

    From your last post it sounds as though you can successfully edit the file (i.e. it's not read only), it's just that some options change subsequently. You could check easily whether that's caused by the game or not, e.g. change the lua file, turn computer off and on and check file is still as you changed it, open and close game and check whether file has now changed. If opening the game is causing changes in the file it would be helpful to know what those changes are.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    I'm guessing it's either a line feed issue (less likely given that it's Wordpad) or a line is missing the proper quote marks, commas, or parentheses. If so, then the game will, indeed, reset the file.

    You can either zip the file up (assuming you have WinZip, WinRAR, 7-Zip, or some other application capable of archiving/compressing), or, as Grond0 said, you can simply copy and paste the contents of the file into the comment box and post that.
  • NightsongNightsong Member Posts: 19
    edited January 2017
    'Program Options', 'Debug Mode', '1',
    SetPrivateProfileString('Fonts','uk_UA','PERMIAN')
    SetPrivateProfileString('Fonts','ru_RU','PTSERIF')
    SetPrivateProfileString('Fonts','ja_JP','MEIRYO')
    SetPrivateProfileString('Fonts','Zoom','112')
    SetPrivateProfileString('Fonts','zh_CN','SIMSUN')
    SetPrivateProfileString('Fonts','ko_KR','NANUM')
    SetPrivateProfileString('Game Options','HP Over Head','0')
    SetPrivateProfileString('Game Options','Combat UI','1')
    SetPrivateProfileString('Game Options','Command Sounds Frequency','2')
    SetPrivateProfileString('Game Options','Auto Pause State','0')
    SetPrivateProfileString('Game Options','Journal Popups','1')
    SetPrivateProfileString('Game Options','Filter Games','1')
    SetPrivateProfileString('Game Options','Bored Timeout','3000')
    SetPrivateProfileString('Game Options','Effect Text Level','62')
    SetPrivateProfileString('Game Options','Over Confirm Everything','0')
    SetPrivateProfileString('Game Options','Critical Hit Screen Shake','1')
    SetPrivateProfileString('Game Options','Show Message Box Hint','1')
    SetPrivateProfileString('Game Options','Heal Party on Rest','0')
    SetPrivateProfileString('Game Options','Environmental Audio','1')
    SetPrivateProfileString('Game Options','Last Save SOA','000000000-Auto-Save')
    SetPrivateProfileString('Game Options','Ranged Weapon Switching','0')
    SetPrivateProfileString('Game Options','Message Box Top','96')
    SetPrivateProfileString('Game Options','Suppress Extra Difficulty Damage','0')
    SetPrivateProfileString('Game Options','Subtitles','1')
    SetPrivateProfileString('Game Options','Cleric Ranger Spells','1')
    SetPrivateProfileString('Game Options','Keyboard Scroll Speed','36')
    SetPrivateProfileString('Game Options','Mouse Scroll Speed','40')
    SetPrivateProfileString('Game Options','Auto Pause Center','1')
    SetPrivateProfileString('Game Options','Render Actions','0')
    SetPrivateProfileString('Game Options','Show Learnable Spells','1')
    SetPrivateProfileString('Game Options','3E Thief Sneak Attack','0')
    SetPrivateProfileString('Game Options','Nightmare Bonus Gold','0')
    SetPrivateProfileString('Game Options','Quick Item Mapping','1')
    SetPrivateProfileString('Game Options','Tutorial State','1')
    SetPrivateProfileString('Game Options','Attack Sounds','1')
    SetPrivateProfileString('Game Options','No Difficulty Based XP Bonus','1')
    SetPrivateProfileString('Game Options','Show Character HP','1')
    SetPrivateProfileString('Game Options','GUI Feedback Level','5')
    SetPrivateProfileString('Game Options','Selection Sounds Frequency','3')
    SetPrivateProfileString('Game Options','Maximum HP','1')
    SetPrivateProfileString('Game Options','Weather','1')
    SetPrivateProfileString('Game Options','All Learn Spell Info','0')
    SetPrivateProfileString('Game Options','Extra Feedback','0')
    SetPrivateProfileString('Game Options','Pausing Map','0')
    SetPrivateProfileString('Game Options','Render Explored Map','0')
    SetPrivateProfileString('Game Options','Always Dither','1')
    SetPrivateProfileString('Game Options','Locator Feedback Level','3')
    SetPrivateProfileString('Game Options','Render Travel Regions','0')
    SetPrivateProfileString('Game Options','Confirm Dialog','0')
    SetPrivateProfileString('Game Options','Footsteps','1')
    SetPrivateProfileString('Game Options','Classic Selection Circles','0')
    SetPrivateProfileString('Game Options','Color Circles','0')
    SetPrivateProfileString('Game Options','Tiles Precache Percent','100')
    SetPrivateProfileString('Game Options','Difficulty Level','2')
    SetPrivateProfileString('Game Options','Area Effects Density','100')
    SetPrivateProfileString('Game Options','Duplicate Floating Text','1')
    SetPrivateProfileString('Game Options','Hotkeys On Tooltips','1')
    SetPrivateProfileString('Game Options','Memory Level','1')
    SetPrivateProfileString('Game Options','Infravision','0')
    SetPrivateProfileString('Game Options','Nightmare Bonus XP','0')
    SetPrivateProfileString('Game Options','Terrain Hugging','0')
    SetPrivateProfileString('MOVIES','REST','1')
    SetPrivateProfileString('MOVIES','LOGO','1')
    SetPrivateProfileString('MOVIES','RESTINN','1')
    SetPrivateProfileString('MOVIES','INTRO15F','1')
    SetPrivateProfileString('Multiplayer','Disable Banters','1')
    SetPrivateProfileString('Multiplayer','Enable Chat Menu','1')
    SetPrivateProfileString('Window','Full Screen','1')
    SetPrivateProfileString('Window','Maximized','0')
    SetPrivateProfileString('Language','Text','en_US')
    SetPrivateProfileString('Program Options','Drop Capitals','1')
    SetPrivateProfileString('Program Options','Sprite Mirror','0')
    SetPrivateProfileString('Program Options','Volume Ambients','40')
    SetPrivateProfileString('Program Options','Volume Music','40')
    SetPrivateProfileString('Program Options','Disable Cosmetic Attacks','0')
    SetPrivateProfileString('Program Options','Volume Voices','100')
    SetPrivateProfileString('Program Options','Path Search Nodes','32000')
    SetPrivateProfileString('Program Options','Volume Movie','90')
    SetPrivateProfileString('Program Options','Translucent Shadows','1')
    SetPrivateProfileString('Program Options','Maximum Frame Rate','30')
    SetPrivateProfileString('Program Options','Volume SFX','80')
    SetPrivateProfileString('Program Options','Tooltips','15')
    SetPrivateProfileString('Program Options','Font Name','')
    SetPrivateProfileString('Program Options','3D Acceleration','1')
    SetPrivateProfileString('Program Options','Active Campaign','0')
    SetPrivateProfileString('Graphics','Greyscale On Pause','1')
    SetPrivateProfileString('Graphics','vendor','Intel')
    SetPrivateProfileString('Graphics','Zoom Lock','0')
    SetPrivateProfileString('Graphics','version','OpenGL version 4.4.0 - Build 20.19.15.4463 - build XXXX')
    SetPrivateProfileString('Graphics','Hardware Mouse Cursor','1')
    SetPrivateProfileString('Graphics','renderer','Intel(R) Iris(TM) Graphics 540')
    SetPrivateProfileString('Graphics','Scale UI','1')
    SetPrivateProfileString('Graphics','Backend','0')
    SetPrivateProfileString('Graphics','Use Nearest Neighbour Scaling','0')
    SetPrivateProfileString('Graphics','Use Sprite Outlines','1')
    SetPrivateProfileString('Graphics','Use Character Highlights','1')
    SetPrivateProfileString('Graphics','Show Black Space','1')

  • NightsongNightsong Member Posts: 19
    wait I think I'm seeing my problem here
  • NightsongNightsong Member Posts: 19
    Nope neither fixes that I worked changed anything, trying changing 'Program Options', 'Debug Mode', '1', to SetPrivateProfileString('Program Options', 'Debug Mode', '1',) in the same place, didn't work. Then moved it to the location where the other program options were, didn't work. I'm out of ideas.
  • Grond0Grond0 Member Posts: 7,305
    edited January 2017
    Nightsong said:

    Nope neither fixes that I worked changed anything, trying changing 'Program Options', 'Debug Mode', '1', to SetPrivateProfileString('Program Options', 'Debug Mode', '1',) in the same place, didn't work. Then moved it to the location where the other program options were, didn't work. I'm out of ideas.

    You've got some extra spaces in your line above - try
    SetPrivateProfileString('Program Options','Debug Mode','1')
    Troodon80JuliusBorisov
  • NightsongNightsong Member Posts: 19
    omfg that did it.
  • NightsongNightsong Member Posts: 19
    I'm so angry and yet relieved
  • lroumenlroumen Member Posts: 2,508
    It was the extra comma at the end. That meant the command was unfinished. Spaces should not matter.
    Grond0Troodon80JuliusBorisov
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    For future reference, if you need to add or change another option, remember that it's
    SetPrivateProfileString('Program Options', 'Debug Mode', '1')rather than
    'Program Options', 'Debug Mode', '1',The latter worked up until version 1.3. As of 2.0, SetPrivateProfileString took over and we stopped using SQL. Spaces or tabs to not matter. :-)
    JuliusBorisovNightsong
Sign In or Register to comment.