Modding:Using XNB mods

From Stardew Valley Wiki
Jump to: navigation, search

Index

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).

FAQs

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 problem
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, and Windows. 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?

Nope.

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.

Modders: 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! Always check the official mod page to see if a conversion has been officially uploaded. This list excludes mods native to Content Patcher.

Using XNB mods

Find mods

If you're looking for mods, the most popular are a good place to start.

You can find mods in a few places:

site description
Nexus Mods Most mods are released here.
(Registering an account is free, just don't choose a package when you register.)
Chucklefish mods Some mods are released here (most are also on Nexus).
Stardew Valley forums Some mods are posted directly in the forums. Some hidden gems are only here, but finding them can be a challenge.

Before you download a mod...

  • Does it work with the latest version of the game? XNB mods may be outdated and cause problems. Try checking the mod description or comments. Generally avoid any XNB mod not updated after the last game update.
  • Don't download from stardewvalleymods.net. (Mods here are usually outdated, since the site republishes mods without permission for ad revenue.)

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.

Troubleshooting

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.