BC46 / freelancer-hd-edition

Freelancer: HD Edition is a mod that aims to improve every aspect of the game Freelancer (2003) while keeping the look and feel as close to vanilla as possible.
https://www.moddb.com/mods/freelancer-hd-edition
161 stars 14 forks source link

Add clearer message for Freelancer failed to initialize saves directory error #183

Open BC46 opened 1 year ago

BC46 commented 1 year ago

Freelancer has the following error message (string id 1849):

I’m sorry, but the account name and password you provided are not valid on this server. Be sure that you typed your account name and password correctly and try again.

This error message is actually used in one instance, but it has nothing to do with the topic of the error message. In some rare cases, when Freelancer launches and it has no rights to read and/or write save files, it displays this message on startup. When clicking it away, the game simply closes. The error also sometimes occurs due to flplusplus, but the exact reason behind that is still unknown: https://github.com/BC46/freelancer-hd-edition/wiki/%22I'm-sorry,-but-the-account-name-and-password-you-provided-are-not-valid-on-this-server.%22-error-on-launch.

Since the error message that comes up is completely unrelated to the underlying issue, the piece of text has to be modified. I located it in the assembly, and it gets used at file offset 1A88C2 in Freelancer.exe: image

The unsigned long at this address can just be replaced with a custom string ID with a better error explanation, something like:

Something related to loading user data has gone wrong. If you see this message when launching the game, please make sure Freelancer has permission to read and write files. The FLSpew.txt file may yield more information.
Visit this wiki page for more info: https://github.com/BC46/freelancer-hd-edition/wiki/%22I'm-sorry,-but-the-account-name-and-password-you-provided-are-not-valid-on-this-server.%22-error-on-launch