What's new in SMAPI 3.7

SMAPI 3.7 is now available!

Here's a quick recap of the main changes; see the release notes for a full list of changes. Feedback or questions are welcome!


Heuristic compatibility rewrites

Background:
When SMAPI loads a mod, it rewrites broken mod code if possible. That's used to fix mods broken in a game/SMAPI update, and to make mods work crossplatform (since otherwise most mods would only work for the OS they were compiled for).

SMAPI has specific rewrite rules to handle those cases. For example, Stardew Valley 1.3 changed Game1.tileSize from a field to a constant; so SMAPI has a rewrite rule that rewrites that specific field reference into a constant.

What changed in 3.7:
This release adds heuristic rewrites, which can fix broken mod code automatically without specific rewrite rules. There are three supported cases in 3.7:

  • A method reference broken due to new optional parameters (fixed by injecting the default values).
  • A field replaced by an equivalent property.
  • A field replaced by an equivalent constant.

That means mods will often be compatible automatically with game updates or on Android, without needing a specific rewrite rule in SMAPI to handle what broke.


Simpler duplicate-mod errors

SMAPI 3.7 changes how disabled mods are tracked, so it can show a less confusing error when you have multiple copies of a mod:


Harmony attributes now work crossplatform

Harmony lets SMAPI and some advanced mods change game code directly. Previously only the code API worked crossplatform, since SMAPI couldn't rewrite type references in custom attributes. Harmony attributes now work crossplatform too, thanks to a pull request by spacechase0.


PathUtilities for modders

SMAPI 3.7 adds a PathUtilities class for modders, which simplifies working with file and asset paths. That's particularly useful for normalizing asset names for comparison, which mod authors often needed to do manually before.


'Rewrite in parallel' option removed

SMAPI 3.6 added an experimental 'rewrite in parallel' option (disabled by default), which allowed faster startup time when you have many mods installed. Unfortunately that caused intermittent and unpredictable errors when enabled, so it's removed in SMAPI 3.7.


Refactored core

I reorganized and refactored the SMAPI core to partly decouple it from the game structure, so it's easier to update for future game releases.


Smaller improvements and fixes

3.7 includes several other improvements and fixes (notably a fix for the map tile rotation bug when you return to title); see the release notes for a full list.

By becoming a patron, you'll instantly unlock access to 100 exclusive posts
2
Polls
98
Writings
By becoming a patron, you'll instantly unlock access to 100 exclusive posts
2
Polls
98
Writings