SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Loading XNB from mod folder on Mac fails with wrong path

Pathoschild opened this issue ยท 3 comments

commented

When you use the content API added in #257 to load an XNB in the game folder, it fails on MacOS with this error:

Microsoft.Xna.Framework.Content.ContentLoadException: Stardewponics failed loading content asset 'assets/greenhouse.xnb' from ModFolder.
---> Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.
---> System.IO.FileNotFoundException: Content/../Mods/Stardewponics/assets/greenhouse.xnb
---> System.IO.DirectoryNotFoundException: Could not find a part of the path "/Applications/Stardew Valley.app/Contents/Resources/Mods/Stardewponics/assets/greenhouse.xnb".

Specifically, it's looking for the file in the wrong place:

File is at: /Applications/Stardew Valley.app/Contents/MacOS/Mods/Stardewponics/assets/greenhouse.xnb
Searched:   /Applications/Stardew Valley.app/Contents/Resources/Mods/Stardewponics/assets/greenhouse.xnb
commented

Temporary fix:
Open up terminal and go into the Stardew Valley.app location. (This may vary)
~$ cd /Applications/Stardew\ Valley.app/
Create a symlink to the Mods folder in the Resources folder:
~$ ln -s ../MacOS/Mods Contents/Resources/Mods

commented

For reference, here are the paths on MacOS (GOG version):

content: /Applications/Stardew\ Valley.app/Contents/Resources/Content/
game:    /Applications/Stardew\ Valley.app/Contents/MacOS/
commented

Fixed in develop for the next SMAPI release.