So I have been trying to make a maple tree drop hazelnuts all year long and I am not getting it. Could someone make a simple content mod for me that makes them drop all year round please? I'm not a content maker, just someone that loves this game.
Use the files from the "example" folder, update the content.json to this: [{ "TreeType": 2, "ShakeOff": 408 }] Then update the manifest.json to this: { "Name": "[TSM] All Year Hazelnuts", "Author": "NCarigon", "Version": "1.0.0", "Description": "Makes Hazelnuts shake off maple trees all year.", "UniqueID": "NCarigon.AllYearHazelnutsTSM", "MinimumApiVersion": "2.11.2", "ContentPackFor": { "UniqueID": "NCarigon.TreeShakeMod" } }
Put those two files in a new folder in your Mods folder, such as "Mods\[TSM]AllYearHazelnuts".
So...I tried what you suggested and this is what SMAPI says:
[SMAPI] Skipped mods [SMAPI] -------------------------------------------------- [SMAPI] These mods could not be added to your game. [SMAPI] - [TSM]AllYearHazelnuts because parsing its manifest failed: Newtonsoft.Json.JsonReaderException: Can't parse JSON file at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\[TSM]AllYearHazelnuts\manifest.json. This doesn't seem to be valid JSON. Technical details: Unexpected character encountered while parsing value: ?. Path '', line 0, position 0. at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86 at StardewModdingAPI.Toolkit.Framework.ModScanning.ModScanner.ReadFolder(DirectoryInfo root, DirectoryInfo searchFolder, Boolean useCaseInsensitiveFilePaths) in E:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Framework\ModScanning\ModScanner.cs:line 161
I don't have any experience with this so I was wondering if you know what I could be doing wrong?
My manifest looks like this:
{ "Name": "[TSM] All Year Hazelnuts", "Author": "NCarigon", "Version": "1.0.0", "Description": "Makes Hazelnuts shake off maple trees all year.", "UniqueID": "NCarigon.AllYearHazelnutsTSM", "MinimumApiVersion": "2.11.2", "ContentPackFor": { "UniqueID": "NCarigon.TreeShakeMod" } }
Is it because I'm using Notepad? I've used it for all my other edits of JSON files, and I checked, and it was saved as a JSON file. I don't know what I'm doing wrong, and I was curious if you did.
Without getting too technical, it looks like the example files I provided are mistakenly encoded as "UTF8 with BOM" (instead of "UTF8") which is a format that the JSON parser within Stardew mods doesn't like. You should be able to correct that by just making new text files in notepad, naming them the same as the other files, and copying the same content into them. If you have a more advanced text editor, such as Notepad++, it can convert between formats which would also correct the issue.
I'm not sure what that means, I use notepad++, the save as type is JSON file. What is UT8 option? It's not listed. Do you mean saving it as .txt file then changing the extension as .json in the file explorer?
Sorry to bother you, but I just wanted to let you know you have spelled the UniqueID of the mod "NCarigon.TreeShakMod". I fixed it on my end, so I'm good. The only reason I discovered this is because I made a lil content pack for this mod for myself.
16 comments
Thank you for your consideration.
[{
"TreeType": 2,
"ShakeOff": 408
}]
Then update the manifest.json to this:
{
"Name": "[TSM] All Year Hazelnuts",
"Author": "NCarigon",
"Version": "1.0.0",
"Description": "Makes Hazelnuts shake off maple trees all year.",
"UniqueID": "NCarigon.AllYearHazelnutsTSM",
"MinimumApiVersion": "2.11.2",
"ContentPackFor": {
"UniqueID": "NCarigon.TreeShakeMod"
}
}
Put those two files in a new folder in your Mods folder, such as "Mods\[TSM]AllYearHazelnuts".
[SMAPI] Skipped mods
[SMAPI] --------------------------------------------------
[SMAPI] These mods could not be added to your game.
[SMAPI] - [TSM]AllYearHazelnuts because parsing its manifest failed:
Newtonsoft.Json.JsonReaderException: Can't parse JSON file at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\[TSM]AllYearHazelnuts\manifest.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: ?. Path '', line 0, position 0.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
at StardewModdingAPI.Toolkit.Framework.ModScanning.ModScanner.ReadFolder(DirectoryInfo root, DirectoryInfo searchFolder, Boolean useCaseInsensitiveFilePaths) in E:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Framework\ModScanning\ModScanner.cs:line 161
I don't have any experience with this so I was wondering if you know what I could be doing wrong?
My manifest looks like this:
{
"Name": "[TSM] All Year Hazelnuts",
"Author": "NCarigon",
"Version": "1.0.0",
"Description": "Makes Hazelnuts shake off maple trees all year.",
"UniqueID": "NCarigon.AllYearHazelnutsTSM",
"MinimumApiVersion": "2.11.2",
"ContentPackFor": {
"UniqueID": "NCarigon.TreeShakeMod"
}
}
and your example manifest looks like this:
{
"Name": "[TSM] Example",
"Author": "NCarigon",
"Version": "1.0.0",
"Description": "Example usage for Tree Shake Mod.",
"UniqueID": "NCarigon.ExampleTSM",
"MinimumApiVersion": "2.11.2",
"ContentPackFor": {
"UniqueID": "NCarigon.TreeShakeMod"
}
}
Is it because I'm using Notepad? I've used it for all my other edits of JSON files, and I checked, and it was saved as a JSON file. I don't know what I'm doing wrong, and I was curious if you did.