Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity and saving/loading issues #338

Open
ghost opened this issue Nov 29, 2023 · 10 comments
Open

Case sensitivity and saving/loading issues #338

ghost opened this issue Nov 29, 2023 · 10 comments

Comments

@ghost
Copy link

ghost commented Nov 29, 2023

Judging from other issue reports that have been created in the past, there seems to be a common issue related to case-handling with the game files. I have installed F2CE on an unmodified copy of the GOG version of Fallout 2, with every relevant directory and file lowercased by default (namely, critter.dat, master.dat, patch000.dat, the contents of 'data' and 'sound' being all lowercased also).

When I try saving a game, I get an "Unable to save game" error, with the following debug logs being output on the console screen:

LOADSAVE: Save name: SAVEGAME\SLOT01\SAVE.DAT
LOADSAVE: Save function #0 data size written: 0 bytes.
LOADSAVE: Save function #1 data size written: 4 bytes.
LOADSAVE: Save function #2 data size written: 2784 bytes.

Saving ".SAV" map.ARTEMPLE.SAV saved.
AUTOMAP: Saving AutoMap DB index 126, level 0

LOADSAVE: ** Error writing save function #3 data! **

LOADSAVE: Restoring save file backup...

LOADSAVE: Erasing save(bad) slot...

LOADSAVE: Erasing save(bad) slot...

I've tried many variations on the case of the directories and the files I've mentioned above, along with keeping the relevant sections in fallout2.cfg updated, but to no avail. I'm unaware if there are any specific difficulties involved in making F2CE wholly case-insensitive, but shouldn't we at least make sure that the GOG version of the game be supported out of the box, since that's how many users have obtained the game?

(BTW, I've encountered the same issue when installing F1CE on the GOG version of Fallout 1, but was able to get everything to work with some tinkering around with the filenames.)

(I'm also currently running the latest git version as of the writing of this message on a Debian system.)

@bit-hack
Copy link

bit-hack commented Dec 6, 2023

This issue looks a LOT like the same issue I had with fallout1-ce.
I opened a pull request for fallout1-ce which fixes that issue: alexbatalov/fallout1-ce#119
If I get time I could try to reproduce this and port that fix over to fallout2-ce.

@ghost
Copy link
Author

ghost commented Dec 7, 2023

Thanks a lot for your answer! It appears that your solution is enough to solve the problem. I found the compat_makepath(basePath, drive, dir, NULL, NULL); function call at line 26 in src/file_find.cc of the F2CE source. Following your example, I added the compat_resolve_path(basePath); function call right after it. After having compiled and tried out the game, I could finally save and load the game without any issues. This fix should definitely be added to the latest source.

@SomeTroglodyte
Copy link

at line 26 in src/file_find.cc

Works perfectly, thanks. I would add that after an attempt with the broken code it is advisable to delete the sav files from the maps folder, otherwise you could start fresh games with dead ants in the trial caves...

@savegame
Copy link

is it merged to master?

@SomeTroglodyte
Copy link

nope

@savegame
Copy link

thank anyway, i'll try use fix described here

@SomeTroglodyte
Copy link

In case a ubuntu 22.04 / x64 - compatible binary helps:
fallout2-ce.zip

@defname
Copy link

defname commented Apr 23, 2024

Thanks a lot for your answer! It appears that your solution is enough to solve the problem. I found the compat_makepath(basePath, drive, dir, NULL, NULL); function call at line 26 in src/file_find.cc of the F2CE source. Following your example, I added the compat_resolve_path(basePath); function call right after it. After having compiled and tried out the game, I could finally save and load the game without any issues. This fix should definitely be added to the latest source.

Your fix works perfectly for me. (GOG version)
Thanks a lot

@yamzee
Copy link

yamzee commented Apr 29, 2024

Had an issue where I was unable to save (Error saving! Unable to save!), I tried fixing the path to data like in fallout1-ce (using upper case in the cfgs), but no luck. So then, I tried deleting the SAVEGAME folder and having the game remake it upon saving, no luck. Adding compat_resolve_path after compat_makepath and after recompiling there was no issue.

Game now saves and loads just fine. Should a PR be made for this?

@driftsignal
Copy link

driftsignal commented May 5, 2024

for linux gog install in v1.2 saving worked for innoextract method and heroic game launcher install. v1.3 save fails and compat_resolve_path(basePath); addition in src/file_find.cc fixes again, but it is now after compat_makepath(basePath, drive, dir, nullptr, nullptr); line.

issue addressed in PR #369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants