Changes

Jump to navigation Jump to search
collapse xnbcli section, move xnbcli-related note into it
Line 6: Line 6:  
===What are XNB files?===
 
===What are XNB files?===
 
The game stores data, maps, and textures in a compressed format with the <samp>.xnb</samp> file extension inside its <samp>Content</samp> folder. For example, Abigail's portrait shown during dialogue is from <samp>Content\Portraits\Abigail.xnb</samp>. Unpacking that file gives you an <samp>Abigail.png</samp> like this:<br />[[File:Modding - creating an XNB mod - example portraits.png]]
 
The game stores data, maps, and textures in a compressed format with the <samp>.xnb</samp> file extension inside its <samp>Content</samp> folder. For example, Abigail's portrait shown during dialogue is from <samp>Content\Portraits\Abigail.xnb</samp>. Unpacking that file gives you an <samp>Abigail.png</samp> like this:<br />[[File:Modding - creating an XNB mod - example portraits.png]]
  −
(When using xnbcli, you may get an extra <samp>Abigail.json</samp> file. That's only used to convert it back into an <samp>.xnb</samp> later, and you generally won't need to change it.)
      
===How do I get my changes in the game?===
 
===How do I get my changes in the game?===
Line 25: Line 23:  
{{github|Pathoschild/StardewXnbHack#readme|StardewXnbHack}} is an open-source and crossplatform tool for unpacking XNB files. It can't pack files back into <samp>.xnb</samp>, but you [[Modding:Content Patcher|rarely need to]].
 
{{github|Pathoschild/StardewXnbHack#readme|StardewXnbHack}} is an open-source and crossplatform tool for unpacking XNB files. It can't pack files back into <samp>.xnb</samp>, but you [[Modding:Content Patcher|rarely need to]].
   −
Here's how:
+
To unpack files:
    
# [[Modding:Player Guide/Getting Started|Install SMAPI]].
 
# [[Modding:Player Guide/Getting Started|Install SMAPI]].
Line 35: Line 33:     
===xnbcli===
 
===xnbcli===
{{github|LeonBlade/xnbcli#readme|xnbcli}} is an open-source and crossplatform tool for packing and unpacking XNB files. It can't unpack XNB files containing data models (like <samp>Data\FishPondData</samp> or <samp>Data\Movies</samp>), and you'll need to edit data files manually to work with mods like Content Patcher.
+
{{github|LeonBlade/xnbcli#readme|xnbcli}} is an open-source and crossplatform tool for packing and unpacking XNB files.
 +
 
 +
This supports XNB files for other games too, but it can't handle some files specific to Stardew Valley. [[#StardewXnbHack|StardewXnbHack]] is recommended instead.
 +
 
 +
{{collapse|content=
 +
Special notes:
 +
* It can't unpack XNB files containing data models (like <samp>Data\FishPondData</samp> or <samp>Data\Movies</samp>); use [[#StardewXnbHack|StardewXnbHack]] if you need those.
 +
* You'll need to edit unpacked data files manually to work with mods like Content Patcher.
 +
* When unpacking an image with xnbcli, you'll get extra <samp>.json</samp> file next to the image. That's only used to convert it back into an <samp>.xnb</samp> later, and you generally don't need to change it.
   −
Here's how:
+
To unpack files:
    
<ol>
 
<ol>
Line 93: Line 99:  
* If you get unrecognized command on Windows:
 
* If you get unrecognized command on Windows:
 
*# Make sure you didn't download the source code zip by mistake. If the folder path refers to "master", it's the wrong one!
 
*# Make sure you didn't download the source code zip by mistake. If the folder path refers to "master", it's the wrong one!
 +
}}
    
==Pack game files==
 
==Pack game files==
translators
8,446

edits

Navigation menu