SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Beta: error when loading local XNB file

Pathoschild opened this issue ยท 1 comments

commented

When a mod loads a local .xnb asset file, SMAPI incorrectly adds an extra .xnb extension:

ContentLoadException: Error loading "SMAPI\cat.desertobelisk\assets\markerTiles.xnb". File not found. ---> System.IO.FileNotFoundException: Error loading "Content\SMAPI\cat.desertobelisk\assets\markerTiles.xnb.xnb". File not found.

See:

commented

The error happens because the mod does this internally:

this.helper.Content.GetActualAssetKey("assets/markerTiles") + ".xnb"

That's not necessary since GetActualAssetKey returns the internal key understood by any of the game's content managers. While it would previously work due to implementation details, adding a .xnb extension was never needed or recommended. With the content core rewrite in beta 15, doing that no longer works since the asset key now includes the extension.

I'll mark this invalid since it was never a supported use case, but I'll keep an eye out for any other mods that did that. :)