SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

SMAPI prints error about steam not being loaded

jahangmar opened this issue ยท 3 comments

commented

Describe the bug
SMAPI prints the following error message to the console:
Oops! Steam achievements won't work because Steam isn't loaded. You can launch the game through Steam to fix that.
This should not be an error since I intentionally launch my game this way. Therefore, I request that this message will be printed as a warning instead (at most). Having error messages like that can hide real issues/errors.
I think if a user starts their game without steam and steam isn't loaded, they (should) know that steam achievements won't work.

To Reproduce
Start the game without the steam launcher:
/home/user/.local/share/Steam/steamapps/common/Stardew Valley/StardewValley

commented

That's because it's an exception thrown by the game:

[22:26:28 ERROR game] System.InvalidOperationException: Steamworks is not initialized.
   at Steamworks.InteropHelp.TestIfAvailableClient()
   at StardewValley.SDKs.SteamHelper.Initialize() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\SDKs\SteamHelper.cs:line 140

SMAPI just catches the error and shows a friendlier message.

commented

The message you posted above is printed as TRACE for me: https://smapi.io/log/xHfF8q38
The log also shows the problem because everything works as expected but there is still this red error message.

commented

That's because SMAPI intercepted the error, replaced it, and logged the original message as TRACE.

For most players, disabling Steam achievements is unintentional and can be frustrating due to the potential to waste hours of work trying to get an achievement. Just like if achievements were a mod, one mod can show an error because it's broken even though everything else is working fine.