Modding:Using XNB mods

From Stardew Valley Wiki
Jump to navigation Jump to search


XNB mods are an older type of mod and are no longer recommended. SMAPI can't validate them for compatibility. Use XNB mods at your own risk, or see alternatives using Content Patcher.

An XNB mod replaces some of your game's .xnb files to change the game (unlike newer mods that go in your Mods folder).


What are XNB mods?

XNB mods work by replacing your game's data files (which have a .xnb extension). For example, let's say you want to change Abigail's portraits; you can replace Content/Portraits/Abigail.xnb with a modded version to do it. (See editing XNB files for more info on the XNB format.)

Why are they discouraged?

XNB mods have a lot of limitations, often conflict with each other, usually break when the game updates, are hard to install and remove, etc.

Consider only using SMAPI mods and content packs. These have several benefits over XNB mods:

feature XNB mods SMAPI mods SMAPI content packs
ease of installation ✘ different for every mod ✓ drop into Mods
ease of uninstallation ✘ manually restore original files ✓ remove from Mods
update checks ✘ none ✓ automatic alert in SMAPI console
compatibility checks ✘ none ✓ incompatible mods are disabled before they cause problems
compatibility list is regularly updated with updates and workarounds
mod compatibility ✘ each file can only be replaced once ✓ almost universal ✓ high
translation support ✘ difficult to translate ✓ built-in translation API (depends on the content pack)
game compatibility ✘ broken by most game updates ✓ SMAPI automatically rewrites many mods for compatibility
open-source mods are updated quickly

Do they work on Linux, Mac, Windows, or consoles?

XNB mods work equally on Linux, Mac, Windows, and Android. Consoles aren't supported.

Can they corrupt my save?

Yes, but it's uncommon. Make sure you back up your save files occasionally, and remove any custom content before uninstalling an XNB mod. In most cases, you can fix save corruption by undoing the last save.

Do they disable Steam achievements?


Alternatives using Content Patcher

Content Patcher is a SMAPI mod that makes XNB-like changes with all the benefits of SMAPI content packs. Many XNB mods have a Content Patcher equivalent, or have been updated unofficially to use it. Consider using these instead where available.


  • When migrating XNB mods, only use Action: Load if you actually need to replace the whole file (e.g., portrait mods). Don't use Action: Load for dialogue mods or to change a small part of a file!
  • See Migrating XNB mods to Content Patcher packs on the official forums for more info about creating conversions.

Using XNB mods

Find mods

See Find mods on the Getting Started page.

Install mods

Installation is different for each mod; check its mod description for details. But in general:

  1. Download the XNB mod and unzip it somewhere (not in your game folder!).
  2. It should contain some .xnb files.
  3. Find your game folder.
  4. Replace the existing .xnb files under Content with the ones from the mod. Make sure you replace the correct files! There are different files with the same name (like Content/Data/hats.xnb and Content/Characters/hats.xnb), and replacing the wrong file will cause in-game errors or crashes.

Uninstall mods

Either restore the original files that mod replaced (hope you kept track!), or reset your game files.


Reset content files

If you know which mod caused the problem, uninstall it.

If you're not sure, the simplest option is:

  1. reset your game files;
  2. reinstall each XNB mod one by one;
  3. test after each install to make sure it didn't cause problems.

Other issues

See Modding:Player Guide/Troubleshooting for more suggestions.