Stardew XNB Hack is a simple one-way XNB unpacker for Stardew Valley.
It supports every Stardew Valley asset type, is very easy to update for game changes, and is quick at unpacking many files at once, but it sacrifices almost everything else to achieve that. For most users, xnbcli is recommended instead.
Stardew XNB Hack | xnbcli | XNBExtract | |
---|---|---|---|
Supported asset types | ✓ images ✓ maps ✓ dictionary data ✓ font texture ✓ font XML data ✓ structured data |
✓ images ✓ maps ✓ dictionary data ✓ font textures ✓ font XML data ❑ structured data |
✓ images ✓ maps ✓ dictionary data ✓ font textures ❑ font XML data ❑ structured data |
Export formats | ✓ .png for images✓ .tbin for maps✓ .json for data (CP-compatible) |
✓ .png for images✓ .tbin for maps❑ .json for data (wrapped format) |
✓ .png for images✓ .tbin for maps❑ .yaml for data |
Supported platforms | ✓ Windows ✓ Linux¹ ✓ Mac¹ |
✓ Windows ✓ Linux ✓ Mac |
✓ Windows ❑ Linux ❑ Mac |
Supported operations | ✓ unpack ❑ pack |
✓ unpack ✓ pack (uncompressed) |
✓ unpack ✓ pack |
User-friendly | ❑ run in Visual Studio ❑ unpack Content folder❑ no command line |
✓ run script ✓ unpack specific files ✓ command line |
✓ run script ✓ unpack specific files ✓ command line |
Maintainable | ✓ simple hack, easy to update | ❑ complex | ❑ complex, closed-source |
Sample unpack time (full Content folder) |
≈0m 40s | ≈6m 5s | ≈2m 20s |
License | MIT | GPL | n/a |
¹ Some sprite font textures can't be unpacked on Linux/Mac, but all other assets unpack fine.
- Install the latest version of SMAPI. (The unpacker uses the SMAPI toolkit.)
- Open the
.csproj
project file in Visual Studio. - Click Build > Build Solution. (If it doesn't find the Stardew Valley folder automatically, see custom game path in the mod build package readme.)
- See the compiled files in the project's
bin
folder.
Just run StardewXnbHack.exe
(or click Debug > Start without debugging in Visual Studio) to
unpack with the default options. This will export the files to a Content (unpacked)
folder in the
game folder.