Tutorial: How to read your SMAPI log

From Stardew Modding Wiki
Jump to navigation Jump to search

If someone's asked you to share your log and you want to find out how they know how to read it, or you're just curious to know more, read on! This is a screenshot of what a log looks like in https://smapi.io/log. Below we'll break down each section. The example covers errors mod users and mod authors both might see!

Note that you may need to open the image below in a new tab and then click on it to be able to zoom in and have it be legible.

Annotated Log Screenshot

This is a screenshot of what a log looks like in https://smapi.io/log

1: Link to Share

You can copy the log link from here and then share it with others, so they can see your parsed log. (Note that you can also copy the log link from the address bar from your browser.)

2: Mods to Update

This section lists which mods have updates, with convenient links to the mod pages. If you are having an issue with a mod, it is often suggested to update to the most recent version, as whatever bug you are encountering may already be fixed by the mod author.

3: System and Game Info

Here you see the Stardew Valley (SDV) version, the operating system, your SMAPI version, the path of the game folder, and the time SMAPI was initiated.

4: Installed Mods

This section shows all the mods installed with their name, version number, author, and number of errors in the log.

It's organized in alphabetical order, with content packs for frameworks listed under their framework. Pictured you can see "[CP] Immersive Krobus" is listed under "Content Patcher" with an indent, since Immersive Krobus is a content pack for Content Patcher (CP).

5: Messages (with filters)

This is the part of the log that shows the errors. You can toggle filters to focus your view. By default, Trace messages are hidden (note that the Trace button is red) and all other messages are shown (green buttons: Debug, Info, Alert, Warn, and Error).

5a: Mods folder

This is a useful way to see where the Mods folder is.

5b: Skipped mods

This section shows you which mods couldn't be added to the game, and provides an explanation of why. Pictured you can see that there are 2 mods that were skipped: [JA] Water Bottle and [QF] Townies Need Food!

  • [JA] Water Bottle is in 2 different folders: in Mods > [JA] Water Bottle, but also in a subfolder, Mods > [JA] New Items > [JA] Water Bottle .
    • The user needs to delete 1 copy of the mod rather than have 2, and then [JA] Water Bottle will load. It's an error that often happens when users group their mods into folders by category, but mix up the category, or if they downloaded a mega pack of a mod, as well as an individual mod that's a part of the mega pack, and installed both (for example, the PPJA collection as well as Fruits and Veggies).
  • [QF] Townies Need Food! was not loaded because it requires a mod that wasn't installed, and the mod's unique ID is shown, which is usually formatted as ModAuthor.ModName.
    • In this case, Quest Framework by PurrplingCat is not installed. The user needs to download that mod and install it, then [QF] Townies Need Food! will load.

5c: Save serializer warning

There are some mods which will show a warning for "changed save serializer". See this information copied from the PyTK mod description, authored by Routine:

"SMAPI warns that this mod 'may corrupt your save files, or make them unusable if you uninstall'. This is because PyTK accesses properties that COULD be used to change the serializer in that way, but doesn't actually change it. So despite what the warning says, your save files will not be corrupted or become unusable when using or uninstalling this mod."

5d: Patched game code

This section indicates which mods directly change the game code. These are often the framework mods that other mods depend on.

5e: No update keys

This section will show which mods don't have an UpdateKeys field in their manifest.json file. Without this information, users won't be notified by SMAPI if there's an update available. However, sometimes this is because a mod has multiple components, such as a Content Patcher (CP) pack and a Mail Framework Mod (MFM) pack, and only 1 of them has update keys. In these cases, the mod authors chose not to include update keys in both, to avoid player seeing multiple update keys for the same mod and then reporting that as an issue.

5f: Can't parse JSON file

This is an error that can occur because of an unexpected character. SMAPI shows the folder path to the mod file with the issue. Users (and mod authors!) can navigate to the json validator site, https://smapi.io/json/, and follow the instructions at that site to validate the file, and check for errors.

  • In the pictured example, the content.json for [CP] Immersive Krobus has a misplaced comma on line 15, position 4. In this case, deleting the comma will fix the error, and then the mod will load.

Other Errors Mod Authors Might See

There are a couple other common errors that mod authors may run into while modding. In this case, I'm specifying "mod author" because these errors require author intervention to fix, but mod users could implement these fixes for themselves! The underlined portions are the key clues to understanding what the error is trying to tell you, which could be what failed, where it failed, or possibly why it failed.

Map warp errors

Here are 2 different errors you might see while creating a map mod that affects warps:

Warp to Wrong Map Name - Door Warp, Vanilla Map and Warp
Warp to Wrong Map Name - Custom Map and Warp, BellsAndWhistles
When does the error happen? What are the clues in the error that tell me what this is? What's the cause? How can I fix the error?
When you try to warp In the first example, you have 3 clues: performWarpFarmer, lockedDoorWarp, and Locations.Town: these tell you the issue was from the player trying to warp, through a door, in the Town map. The game couldn't find the location you tried to warp to Double check warps you modified or created to ensure there are no typos in the location name.
In the second example, you have 2 vague clues: onFadeToBlackComplete and BellsAndWhistles.ScreenFade, which also correspond to a problem with a warp.

Map with custom tilesheets (missing tilesheet)

These 2 errors are related, and can happen when creating a map mod that has a custom tilesheet:

Missing Tilesheet Path and Not Loading Area
When does the error happen? What are the clues in the error that tell me what this is? What's the cause? How can I fix the error?
When you load the save Content Patcher (CP) has clearer wording, and so it calls out that it couldn't load the specific map, and tells you which mod the map is from. It says it couldn't load it because there was an invalid tilesheet path. It calls out the tilesheet name, and notes it couldn't be found. The error tells you there was an invalid tilesheet path Double check your assets folder to make sure the tilesheet is in there, and with the correct name.
The second error is caused by the first error. This one is noting that it couldn't load the specific location, which is associated with that specific map that wasn't loaded.

Map with custom tilesheets (directory climbing)

This error can also happen when creating a map mod that has a custom tilesheet:

Directory Climbing
When does the error happen? What are the clues in the error that tell me what this is? What's the cause? How can I fix the error?
When you load the save Content Patcher (CP) has clearer wording, and so it calls out that it couldn't load the map, and tells you which mod the map is from. It says it couldn't load it because the specific map file (in this case, tmx) has an invalid tilesheet path. It also specifically calls out directory climbing. The error tells you there was an invalid tilesheet path, and it calls out directory climbing specifically The map modding wiki has a section on this error that explains it nicely, along with how to fix it.

The map modding wiki also has a couple other example errors and potential issues to watch out for, in the Potential issues and Troubleshooting sections. Be sure to check those!

See also

If you're troubleshooting, you may also be interested in: