Issue [SOLVED] SMAPI cannot load a mod because "it's an empty folder"

spice_cabinet

Newcomer
Hi there! I'm sort of new to modding, but I am especially new to making my own mods. My first test project involves replacing in-game portraits with edited ones.
My test mod has nothing but the content.json, manifest.json, and a folder labeled "assets" that contains a single PNG file that I've edited (I just changed the colors on Lewis' portrait for the test). The assets folder is being read as empty by SMAPI, but there is the PNG file in there. Here is the SMAPI log: https://smapi.io/log/8e92d6fa60094e5cb03d9da3b2f53576 , and I've also attached screenshots.
Others have had this issue as well, and it was presumably solved by removing duplicate folders. I have combed through my Mods folder and the Stardew Valley folder, and have not found any duplicates. I have also tried renaming the assets folder (updating the content.json path as well), in case there was a hidden duplicate somewhere that I wasn't seeing. This did not work either.
I will include the code in the content.json file as well. It was lifted directly from the SDV modding wiki, with some edits to match the paths of the files I am trying to affect.
It is able to find the "Portraits/Lewis" location just fine (where Lewis' regular portraits are stored in the game files), but "assets/Lewis-Portraits" isn't working, because SMAPI thinks the "assets" folder is empty.

content.json code:
{
"Format": "2.3.0",
"Changes": [
{
"Action": "EditImage",
"Target": "Portraits/Lewis",
"FromFile": "assets/Lewis-Portraits"
},
]
}
Screenshot 2024-11-30 043147.png
Screenshot 2024-11-30 043211.png
Screenshot 2024-11-30 043909.png


Thanks in advance for any help you provide!!!
 

Lyndsoob

Newcomer
Hi, so I just spent literal hours trying to figure out this same exact issue and it turns out my content.json & manifest.json files were not actually json files, but txt files instead. So if you haven't already, I would recommend checking that. An easy way is to press "View" at the top, then "Show > File name extensions". If it says "content/manifest.json.txt" just delete the ".txt" and press "Yes" on the pop-up. Hopefully this helps you!
 

spice_cabinet

Newcomer
Hi, so I just spent literal hours trying to figure out this same exact issue and it turns out my content.json & manifest.json files were not actually json files, but txt files instead. So if you haven't already, I would recommend checking that. An easy way is to press "View" at the top, then "Show > File name extensions". If it says "content/manifest.json.txt" just delete the ".txt" and press "Yes" on the pop-up. Hopefully this helps you!
THANK U SMMMMMM THIS SAVED ME FOREVER
I had to do that, plus include the file type in the code and it worked

For those who may be having the same problem, here's what my code looks like now, the highlighted bit is what I changed:
image_2024-12-13_192526534.png

Try that, in addition to Lyndsoob's comment :] thanks again!!!
 
Top