Help to get into the root of this problem - baldur.lua file on Windows XP
JuliusBorisov
Member, Administrator, Moderator, Developer Posts: 22,754
@Cerevant
I made a report some time ago - http://redmine.beamdog.com/issues/20954 - the options I choose are not remembered when I again start my BG2EE beta program.
It turned out that the problem involves ANY options, not only graphical ones, for example, gameplay options.
For several days, I've been testing how it works and this is what I've found.
I use it on the example of SetPrivateProfileString('Game Options','Maximum HP','1') line - exactly the same happens to any other options, including "Sprite Outlines", "Highlight Selected sprites", Greyscale on Pause etc.
I use Windows XP. This is what I do:
Before I run the Baldur.exe of the beta I open my baldur.lua file. This is what I see:
I close the baldur.lua file.
Then I run the Baldur.exe of the beta. Go into options - gameplay and turn off the Max HP on level up option.
Click Done and Back.
Then I minimize the game and open the baldur.lua file. This is what I see now:
I close the baldur.lua file, open the minimized game, click Back and Quit.
Then I open the baldur.lua file again.
I close the baldur.lua file.
As you see, my choice is remembered.
Then I run the Baldur.exe. After getting to the main menu, I minimize the game and open the baldur.lua file.
Suddenly, the choice has been forgotten and the game has returned to the default option. I close the baldur.lua file, open the minimized game, click Options and of course see the Max HP on level up option turned ON.
So, it looks like every time I run the Baldur.exe, all lines in the baldur.lua file become as they were when the game was downloaded, and all options turn to default.
It basically doesn't let me save any options, including turning off "Sprite Outlines", "Highlight Selected sprites".
Do you have any ideas?
If you google "LUA file windows xp" you can see some pages describing some problems with lua. files working on Windows XP.
I made a report some time ago - http://redmine.beamdog.com/issues/20954 - the options I choose are not remembered when I again start my BG2EE beta program.
It turned out that the problem involves ANY options, not only graphical ones, for example, gameplay options.
For several days, I've been testing how it works and this is what I've found.
I use it on the example of SetPrivateProfileString('Game Options','Maximum HP','1') line - exactly the same happens to any other options, including "Sprite Outlines", "Highlight Selected sprites", Greyscale on Pause etc.
I use Windows XP. This is what I do:
Before I run the Baldur.exe of the beta I open my baldur.lua file. This is what I see:
I close the baldur.lua file.
Then I run the Baldur.exe of the beta. Go into options - gameplay and turn off the Max HP on level up option.
Click Done and Back.
Then I minimize the game and open the baldur.lua file. This is what I see now:
I close the baldur.lua file, open the minimized game, click Back and Quit.
Then I open the baldur.lua file again.
I close the baldur.lua file.
As you see, my choice is remembered.
Then I run the Baldur.exe. After getting to the main menu, I minimize the game and open the baldur.lua file.
Suddenly, the choice has been forgotten and the game has returned to the default option. I close the baldur.lua file, open the minimized game, click Options and of course see the Max HP on level up option turned ON.
So, it looks like every time I run the Baldur.exe, all lines in the baldur.lua file become as they were when the game was downloaded, and all options turn to default.
It basically doesn't let me save any options, including turning off "Sprite Outlines", "Highlight Selected sprites".
Do you have any ideas?
If you google "LUA file windows xp" you can see some pages describing some problems with lua. files working on Windows XP.
0
Comments
Try to rename baldur.ini or move it somewhere else.
Didn't help. I even tried to delete the whole "Baldur's Gate 2 - Enhanced Edition" folder from My documents (so that it could be created again) but it didn't help either.
@cmk24
Amazingly, but that didn't help as well, even in the read-only file as soon as I ran the game for the second time all the options went to default.
Question: if you quit, and change a setting in baldur.lua, then load the game, are those settings recognized?
Just tested it. I changed the setting in baldur.lua, saved it then loaded the game - and nope, it changed back again, without recognizing my changing.
I have to add, that for the 1.3 version, any change in baldur.ini works and I haven't experienced anything similar pre-beta.
(Technical detail: if there is a Baldur.ini, 2.0 will try to recreate those settings before creating Baldur.lua)
Also try: rename Baldur.ini (hang on to a copy)
I'm Sorry.
But, but!!! CAN YOU BELIEVE THAT WHEN I CHANGED SETTINGS IN THE BALDUR.INI (for example, 'Game Options', 'Maximum HP', '0',) IN ADDITION TO THE BALDUR.LUA, IT WORKS!
I had to add the following lines in the Baldur.ini:
'Graphics', 'Greyscale On Pause', '0',
'Graphics', 'Use Sprite Outlines', '0',
'Graphics', 'Use Character Highlights', '0',
'Game Options', 'HP Over Head', '0',
AND NOW I'VE GOT IT TO WORK!
@Cerevant
I've tried to play with it a bit and these are the results:
1. After I manually change and or add lines into the baldur.ini, these changes are shown in the game and are always recognized. Changing the Baldur.lua is not needed here.
2. If I change something in the game, then close it (at this point I can open the Baldur.lua and see that the changes are there) and run again, the changes are not recognized.
3. If I change something in the game, then close it, manually change the lines in the Baldur.ini, and run the game again, the changes are not recognized.
4. If I remove or rename the Baldur.ini file, I can't make my game recognize the changes.
5. I had to add missing lines into the Baldur.ini (without the "SetPrivateProfileString" phrase, just the following text).
Now, could you tell me why others didn't go through the same situation? Why did this situation happen? How can I break the game's dependability on the baldur.ini file so that I could have a situation everyone else has - the changes are recognized from the baldur.lua file?
For whatever reason, the game is not able to read your Baldur.lua, so it is creating a new one based on Baldur.ini. Then it writes out the new Baldur.lua which for some reason it can't find.
Now the puzzle goes to the devs to figure out why...
From the Beamdog Client, right-click and choose "open game location". That will show you which directory the game is in.
Start / Run / cmd.exe
Click on the upper left icon, choose properties, Layout, window size height 100
Then at the propmpt, type "cd" followed by the path you found for the game,
Type baldur.exe
Then screen cap / copy what is in the console window
Also, after editing your baldur.ini file did you check to see these lines were in the lua file - your statement above says they were recognised in-game but doesn't mention if they were in the file
'Graphics', 'Greyscale On Pause', '0',
'Graphics', 'Use Sprite Outlines', '0',
'Graphics', 'Use Character Highlights', '0',
'Game Options', 'HP Over Head', '0',
(I don't have xp so not certain on the above, e.g. does xp wordpad hide the extension)
I'll report on your guesses later, probably closer to Monday.
The full file:
SetPrivateProfileString('Program Options','Active Campaign','0')
SetPrivateProfileString('Program Options','Double Byte Character Support','0')
SetPrivateProfileString('Program Options','Drop Capitals','1')
SetPrivateProfileString('Program Options','Path Search Nodes','32000')
SetPrivateProfileString('Program Options','Disable Cosmetic Attacks','1')
SetPrivateProfileString('Program Options','Volume Music','40')
SetPrivateProfileString('Program Options','Volume Voices','100')
SetPrivateProfileString('Program Options','Volume Ambients','40')
SetPrivateProfileString('Program Options','3D Acceleration','1')
SetPrivateProfileString('Program Options','Volume SFX','80')
SetPrivateProfileString('Program Options','Translucent Shadows','1')
SetPrivateProfileString('Program Options','Font Name','')
SetPrivateProfileString('Program Options','Maximum Frame Rate','30')
SetPrivateProfileString('Program Options','Sprite Mirror','0')
SetPrivateProfileString('Program Options','Tooltips','60')
SetPrivateProfileString('Program Options','Volume Movie','90')
SetPrivateProfileString('MOVIES','LOGO','1')
SetPrivateProfileString('MOVIES','INTRO15F','1')
SetPrivateProfileString('Fonts','Zoom','75')
SetPrivateProfileString('Fonts','ja_JP','MEIRYO')
SetPrivateProfileString('Fonts','zh_CN','SIMSUN')
SetPrivateProfileString('Fonts','ru_RU','PTSERIF')
SetPrivateProfileString('Fonts','uk_UA','PERMIAN')
SetPrivateProfileString('Fonts','ko_KR','NANUM')
SetPrivateProfileString('Window','Full Screen','1')
SetPrivateProfileString('Window','Maximized','0')
SetPrivateProfileString('Graphics','renderer','Intel(R) HD Graphics 4600')
SetPrivateProfileString('Graphics','Backend','0')
SetPrivateProfileString('Graphics','version','OpenGL version 4.2.0 - Build 10.18.10.3355 - build XXXX')
SetPrivateProfileString('Graphics','Use Character Highlights','1')
SetPrivateProfileString('Graphics','vendor','Intel')
SetPrivateProfileString('Graphics','Zoom Lock','0')
SetPrivateProfileString('Graphics','Scale UI','1')
SetPrivateProfileString('Graphics','Hardware Mouse Cursor','1')
SetPrivateProfileString('Graphics','Use Sprite Outlines','1')
SetPrivateProfileString('Graphics','Greyscale On Pause','1')
SetPrivateProfileString('Game Options','Render Actions','0')
SetPrivateProfileString('Game Options','Duplicate Floating Text','1')
SetPrivateProfileString('Game Options','Terrain Hugging','0')
SetPrivateProfileString('Game Options','Critical Hit Screen Shake','1')
SetPrivateProfileString('Game Options','Always Dither','1')
SetPrivateProfileString('Game Options','Tiles Precache Percent','100')
SetPrivateProfileString('Game Options','Journal Popups','1')
SetPrivateProfileString('Game Options','Subtitles','1')
SetPrivateProfileString('Game Options','Mouse Scroll Speed','36')
SetPrivateProfileString('Game Options','Weather','1')
SetPrivateProfileString('Game Options','Last Save SOA','000000013-Blayde')
SetPrivateProfileString('Game Options','Color Circles','1')
SetPrivateProfileString('Game Options','3E Thief Sneak Attack','0')
SetPrivateProfileString('Game Options','Suppress Extra Difficulty Damage','0')
SetPrivateProfileString('Game Options','Effect Text Level','63')
SetPrivateProfileString('Game Options','Attack Sounds','1')
SetPrivateProfileString('Game Options','Render Explored Map','0')
SetPrivateProfileString('Game Options','Selection Sounds Frequency','3')
SetPrivateProfileString('Game Options','Show Message Box Hint','1')
SetPrivateProfileString('Game Options','Nightmare Bonus XP','0')
SetPrivateProfileString('Game Options','Locator Feedback Level','3')
SetPrivateProfileString('Game Options','Over Confirm Everything','0')
SetPrivateProfileString('Game Options','Filter Games','1')
SetPrivateProfileString('Game Options','Combat UI','1')
SetPrivateProfileString('Game Options','Infravision','1')
SetPrivateProfileString('Game Options','Nightmare Mode','0')
SetPrivateProfileString('Game Options','Hotkeys On Tooltips','1')
SetPrivateProfileString('Game Options','Difficulty Level','2')
SetPrivateProfileString('Game Options','Render Travel Regions','0')
SetPrivateProfileString('Game Options','Auto Pause Center','1')
SetPrivateProfileString('Game Options','No Difficulty Based XP Bonus','1')
SetPrivateProfileString('Game Options','HP Over Head','0')
SetPrivateProfileString('Game Options','Extra Feedback','0')
SetPrivateProfileString('Game Options','Pausing Map','0')
SetPrivateProfileString('Game Options','Story Mode','0')
SetPrivateProfileString('Game Options','Cleric Ranger Spells','1')
SetPrivateProfileString('Game Options','Auto Pause State','1165')
SetPrivateProfileString('Game Options','Command Sounds Frequency','2')
SetPrivateProfileString('Game Options','GUI Feedback Level','5')
SetPrivateProfileString('Game Options','Maximum HP','1')
SetPrivateProfileString('Game Options','Message Box Top','116')
SetPrivateProfileString('Game Options','Keyboard Scroll Speed','37')
SetPrivateProfileString('Game Options','Quick Item Mapping','1')
SetPrivateProfileString('Game Options','Area Effects Density','100')
SetPrivateProfileString('Game Options','Memory Level','1')
SetPrivateProfileString('Game Options','Tutorial State','1')
SetPrivateProfileString('Game Options','Nightmare Bonus Gold','0')
SetPrivateProfileString('Game Options','Show Character HP','1')
SetPrivateProfileString('Game Options','Bored Timeout','3000')
SetPrivateProfileString('Game Options','Show Learnable Spells','1')
SetPrivateProfileString('Game Options','Confirm Dialog','0')
SetPrivateProfileString('Game Options','Ranged Weapon Switching','1')
SetPrivateProfileString('Game Options','All Learn Spell Info','0')
SetPrivateProfileString('Game Options','Footsteps','1')
SetPrivateProfileString('Game Options','Environmental Audio','1')
SetPrivateProfileString('Game Options','Classic Selection Circles','0')
SetPrivateProfileString('Game Options','Heal Party on Rest','1')
SetPrivateProfileString('Multiplayer','Disable Banters','1')
SetPrivateProfileString('Multiplayer','Enable Chat Menu','1')
You can also try setting it to 141
Closing the game, changing it to 141, loading the game shows Weapon Unusable and Enemy Sighted selected. But I still get paused when hit.
edit: okay, weird. I delete my old baldur.ini, no change. I delete both .ini and .ula and I'm no longer paused when hit. Here's what was created after I played (no options changed by me)
SetPrivateProfileString('Graphics','renderer','Intel(R) HD Graphics 4600')
SetPrivateProfileString('Graphics','version','OpenGL version 4.2.0 - Build 10.18.10.3355 - build XXXX')
SetPrivateProfileString('MOVIES','LOGO','1')
SetPrivateProfileString('MOVIES','INTRO15F','1')
SetPrivateProfileString('Fonts','ko_KR','NANUM')
SetPrivateProfileString('Fonts','uk_UA','PERMIAN')
SetPrivateProfileString('Fonts','zh_CN','SIMSUN')
SetPrivateProfileString('Fonts','ja_JP','MEIRYO')
SetPrivateProfileString('Fonts','Zoom','112')
SetPrivateProfileString('Fonts','ru_RU','PTSERIF')
SetPrivateProfileString('Program Options','Volume Music','40')
SetPrivateProfileString('Program Options','Active Campaign','0')
SetPrivateProfileString('Program Options','Volume SFX','80')
SetPrivateProfileString('Program Options','Tooltips','15')
SetPrivateProfileString('Program Options','Volume Ambients','40')
SetPrivateProfileString('Program Options','Volume Voices','100')
SetPrivateProfileString('Program Options','Path Search Nodes','32000')
SetPrivateProfileString('Program Options','Maximum Frame Rate','30')
SetPrivateProfileString('Program Options','3D Acceleration','1')
SetPrivateProfileString('Program Options','Sprite Mirror','0')
SetPrivateProfileString('Program Options','Volume Movie','90')
SetPrivateProfileString('Program Options','Translucent Shadows','1')
SetPrivateProfileString('Program Options','Drop Capitals','1')
SetPrivateProfileString('Program Options','Font Name','')
SetPrivateProfileString('Window','Full Screen','1')
I change the options to what I like, try again, and the pause on hit is gone.
Here's the new .ula
SetPrivateProfileString('Graphics','Scale UI','1')
SetPrivateProfileString('Graphics','Hardware Mouse Cursor','1')
SetPrivateProfileString('Graphics','vendor','Intel')
SetPrivateProfileString('Graphics','Use Character Highlights','1')
SetPrivateProfileString('Graphics','Backend','0')
SetPrivateProfileString('Graphics','version','OpenGL version 4.2.0 - Build 10.18.10.3355 - build XXXX')
SetPrivateProfileString('Graphics','renderer','Intel(R) HD Graphics 4600')
SetPrivateProfileString('Graphics','Greyscale On Pause','1')
SetPrivateProfileString('Graphics','Use Sprite Outlines','1')
SetPrivateProfileString('MOVIES','LOGO','1')
SetPrivateProfileString('MOVIES','INTRO15F','1')
SetPrivateProfileString('Window','Full Screen','1')
SetPrivateProfileString('Window','Maximized','0')
SetPrivateProfileString('Program Options','Volume Movie','90')
SetPrivateProfileString('Program Options','Active Campaign','0')
SetPrivateProfileString('Program Options','Tooltips','15')
SetPrivateProfileString('Program Options','Font Name','')
SetPrivateProfileString('Program Options','3D Acceleration','1')
SetPrivateProfileString('Program Options','Volume Voices','100')
SetPrivateProfileString('Program Options','Disable Cosmetic Attacks','1')
SetPrivateProfileString('Program Options','Sprite Mirror','0')
SetPrivateProfileString('Program Options','Translucent Shadows','1')
SetPrivateProfileString('Program Options','Volume Ambients','40')
SetPrivateProfileString('Program Options','Path Search Nodes','32000')
SetPrivateProfileString('Program Options','Drop Capitals','1')
SetPrivateProfileString('Program Options','Cloud Saves Enabled','0')
SetPrivateProfileString('Program Options','Maximum Frame Rate','30')
SetPrivateProfileString('Program Options','Volume Music','40')
SetPrivateProfileString('Program Options','Volume SFX','80')
SetPrivateProfileString('Fonts','ja_JP','MEIRYO')
SetPrivateProfileString('Fonts','uk_UA','PERMIAN')
SetPrivateProfileString('Fonts','Zoom','112')
SetPrivateProfileString('Fonts','zh_CN','SIMSUN')
SetPrivateProfileString('Fonts','ko_KR','NANUM')
SetPrivateProfileString('Fonts','ru_RU','PTSERIF')
SetPrivateProfileString('Game Options','Maximum HP','1')
SetPrivateProfileString('Game Options','Extra Feedback','0')
SetPrivateProfileString('Game Options','Show Learnable Spells','1')
SetPrivateProfileString('Game Options','Hotkeys On Tooltips','1')
SetPrivateProfileString('Game Options','Bored Timeout','3000')
SetPrivateProfileString('Game Options','Tutorial State','1')
SetPrivateProfileString('Game Options','Infravision','0')
SetPrivateProfileString('Game Options','Render Actions','0')
SetPrivateProfileString('Game Options','Difficulty Level','2')
SetPrivateProfileString('Game Options','Weather','1')
SetPrivateProfileString('Game Options','Confirm Dialog','0')
SetPrivateProfileString('Game Options','Command Sounds Frequency','2')
SetPrivateProfileString('Game Options','Critical Hit Screen Shake','1')
SetPrivateProfileString('Game Options','Memory Level','1')
SetPrivateProfileString('Game Options','Area Effects Density','100')
SetPrivateProfileString('Game Options','Quick Item Mapping','1')
SetPrivateProfileString('Game Options','Combat UI','1')
SetPrivateProfileString('Game Options','Tiles Precache Percent','100')
SetPrivateProfileString('Game Options','No Difficulty Based XP Bonus','1')
SetPrivateProfileString('Game Options','Ranged Weapon Switching','1')
SetPrivateProfileString('Game Options','Render Explored Map','0')
SetPrivateProfileString('Game Options','Show Message Box Hint','0')
SetPrivateProfileString('Game Options','Message Box Top','500')
SetPrivateProfileString('Game Options','Classic Selection Circles','0')
SetPrivateProfileString('Game Options','Cleric Ranger Spells','1')
SetPrivateProfileString('Game Options','3E Thief Sneak Attack','0')
SetPrivateProfileString('Game Options','Selection Sounds Frequency','3')
SetPrivateProfileString('Game Options','Over Confirm Everything','0')
SetPrivateProfileString('Game Options','Nightmare Bonus XP','0')
SetPrivateProfileString('Game Options','Show Character HP','1')
SetPrivateProfileString('Game Options','GUI Feedback Level','5')
SetPrivateProfileString('Game Options','Suppress Extra Difficulty Damage','0')
SetPrivateProfileString('Game Options','All Learn Spell Info','0')
SetPrivateProfileString('Game Options','Filter Games','1')
SetPrivateProfileString('Game Options','Auto Pause Center','1')
SetPrivateProfileString('Game Options','Pausing Map','0')
SetPrivateProfileString('Game Options','Render Travel Regions','0')
SetPrivateProfileString('Game Options','Effect Text Level','63')
SetPrivateProfileString('Game Options','Nightmare Mode','0')
SetPrivateProfileString('Game Options','Color Circles','1')
SetPrivateProfileString('Game Options','Environmental Audio','1')
SetPrivateProfileString('Game Options','Nightmare Bonus Gold','0')
SetPrivateProfileString('Game Options','Auto Pause State','1153')
SetPrivateProfileString('Game Options','Mouse Scroll Speed','40')
SetPrivateProfileString('Game Options','Heal Party on Rest','1')
SetPrivateProfileString('Game Options','Journal Popups','1')
SetPrivateProfileString('Game Options','Always Dither','1')
SetPrivateProfileString('Game Options','Footsteps','1')
SetPrivateProfileString('Game Options','Attack Sounds','1')
SetPrivateProfileString('Game Options','Story Mode','0')
SetPrivateProfileString('Game Options','Duplicate Floating Text','1')
SetPrivateProfileString('Game Options','Terrain Hugging','0')
SetPrivateProfileString('Game Options','Subtitles','1')
SetPrivateProfileString('Game Options','Keyboard Scroll Speed','37')
SetPrivateProfileString('Game Options','Locator Feedback Level','3')
SetPrivateProfileString('Game Options','HP Over Head','0')
SetPrivateProfileString('Multiplayer','Enable Chat Menu','1')
SetPrivateProfileString('Multiplayer','Disable Banters','1')
So it seems it was picking up something from my old .ini file (even when it was called baldur.bak) when creating the .ula, that didn't go away no matter if the old .ini file was still there or not. Hopefully I provided enough info to troubleshoot this.
Unsure if this works under Windows XP.
Yes, those lines are in the baldur.lua file. I have disabled the hide function but still switching oprions in the game isn't remembered the next time I run the game.
The game appears to be able to load options from an existing baldur.ini or create the home folder if it doesn't exist yet, but it can't access an existing baldur.lua for read operations. (Tested on Windows 7)
"Baldur's Gäte II - Enhanced Edition" to engine_name = "Baldur's Gate II - Enhanced Edition"