Modding Help Beginner's Guide to XNB Node and Graphics Editing

Discussion in 'Mods' started by cure, Mar 20, 2016.

  1. Flumme

    Flumme Subatomic Cosmonaut

    Dear @cure (and all the other people who help): THANKS! :) You are great! :cathug:

    This tutorial is incredible!
    • dinopal

      dinopal Void-Bound Voyager

      hello all! I'm trying to combine some furniture mods to use in my game and I would really appreciate some help. I've unpacked the files to get to the PNG and I've snipped and glued together the furniture I want to use from both mods I'm trying to combine. Once I'm done, I save it as a new PNG file, repack it with the yaml file one of them came with and plant it in my Stardew TileSheets folder. This is where the problem occurs for me... The merge doesn't work and I find myself with a lot of empty slots in the item spawner as well as items that are cut in the middle and merge with another item. Is that because the yaml file hasn't been modified or am I doing something wrong?
      • Voltaic123

        Voltaic123 Scruffy Nerf-Herder

        You're probably cutting and pasting them into the wrong places. You cant change the position of furniture within the tilesheet. So if you have a table from Mod A that you want to replace with a table from Mod B You have to paste Mod A's table directly on top, you cant just put it at the end of the tilesheet. Do me a favor and upload a picture of the PNG you're trying to use so we can see what you're trying to do
        • beethao001

          beethao001 Space Hobo

          Hi, I tried editing the appearance of weapons by just adding stuff onto current ones like adding axe blades to the end of a mallet. When I finish packing and playing the game, the weapons are out of alignment. I get half a weapon or even two half weapons in one frame.

          • NoiseMaker00

            NoiseMaker00 Void-Bound Voyager

            what is about some .tbin-files i get ? maybe when i extract the buildings XNBs... how could I change them ? or need I ?
            • anothersarah

              anothersarah Scruffy Nerf-Herder

              NoiseMaker, are you asking what the tbin files are and how to edit them? If so, those are map files (like the town map or even your farm). You can edit them with either tIDE or Tiled. I recommend Tiled, personally, but there may be more video-instruction for tIDE, which was used earlier in SDV's modding history.

              Whether or not you need to edit them depends on what you are trying to accomplish :) You don't need to do anything with the map files in order do retextures of different buildings or sprite colors, for example.
              • Ryuusuke

                Ryuusuke Aquatic Astronaut

                I advise to use XNBNode version 0.2.2. Version 0.2.1 sometimes damage your image while you're unaware. It will outstanding if it's light cyan color dot. It happen to me multiple times (which I manual fix it) until I think ..may be it because unpacking so I should at least inform creator. Then I just try 0.2.2 that you post and it's perfect now.
                • frootzcat

                  frootzcat Void-Bound Voyager

                  I'm getting an exception thrown when I try to unpack flooring.xnb:

                  C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:65
                                  throw e;
                  AssertionError: '\nxn' == 'XNB'
                      at Object.XnbToObject (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\converter.js:15:12)
                      at extractXnb (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:42:26)
                      at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:60:16
                      at Walker.<anonymous> (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:100:13)
                      at emitThree (events.js:110:13)
                      at Walker.emit (events.js:188:7)
                      at Object.emitSingleEvents [as emitNodeType] (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\node_modules\walk\lib\node-type-emitter.js:55:13)
                      at Walker._wLstatHandler (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\node_modules\walk\lib\walk.js:87:19)
                      at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\node_modules\walk\lib\walk.js:105:12
                      at FSReqWrap.oncomplete (fs.js:82:15)
                  Any help?
                  • Kybble

                    Kybble Void-Bound Voyager

                    I tried editing the cat (I was just doing that cuz it was an easy file), but when I repacked the edited file, it didn't update the cat at all.

                    Do you know what I could be doing wrong? I just changed its face to a lilac, but going into the game, it was the standard orange cat.
                    I did everything right with the XNB Extract method. As far as I know, there's only one cat.xnb file, so there couldn't be another cat file in another folder that would be messing with it.
                      Last edited: Dec 7, 2017
                    • Allayna

                      Allayna Pangalactic Porcupine

                      show me the files in your unpack and pack folder?
                      • Kybble

                        Kybble Void-Bound Voyager

                        I just grabbed the cat.xnb file and unpacked it. I had deleted my edit, so it's just the vanilla cat.
                        With the shipping container, for example, is that only contained in the Cursors file, or is it located in other places, too? Cuz I tried altering the container in the Cursors file just to test it, but it didn't work.
                          Last edited: Dec 8, 2017
                        • Allayna

                          Allayna Pangalactic Porcupine

                          Oh, I meant like.... share xnb file here or on dropbox or something, i can look at it and maybe see whats wrong
                          And the cursors file has alot of animation stuff in it. Like for the shipping box, it's the animation of the lid opening. The base of the box is in the spring_tilesheet, and summer, fall, winter. If you edited cursors but not the others, you will see you changes when the box is opening or closing, or standing open
                          • Kybble

                            Kybble Void-Bound Voyager

                            I have no idea what happened, but now my cat works?
                            I did a fresh install today (only moving my saves and putting them back in once everything was reinstalled). It wasn't working before, for some reason.
                            But now it's working. I haven't tested anything other than the cat. But yeah, I made it blue this time, and when I opened the game, it was blue.

                            Is there a way to find out if certain items are located in other files? So if and when I do look into modding, I don't miss anything.
                            Like how the shipping container is location in Cursors, and the tilesheets for each season.
                            • Allayna

                              Allayna Pangalactic Porcupine

                              The fresh install is the modding equivalent of 'Have you tried turning off and on again?' - it doesn't always make sense, but it works wonders.
                              And I don't know if there's any list or index of something of where a particualar 'item' is... I'd love to see if if there is. (there's so many little dodads in the cursors file UGH)
                              some broad catogries though:
                              Animated stuff, anything from the little worms in the ground to swinging doors to Alex's memory of his mom is always (i believe) in cursors.
                              Most of the UI, like arrows, boxes around text, is in cursors, but not all.
                              Enviroment stuff, like ground, bushes, trees, cliffs, water... is in the seasonal tilesheets.
                              most other stuff, like if you wanted to recolor a weapon or something, is in a file with a name that makes sense, 'weapons.xnb', 'crops.xnb'... you can usually do a search in the Content folder and find what you need.

                              And the biggest thing - if you get stumped, there's always people here and in nexus mods willing to help! Ask a question and usually someone knows, or will help you find out!
                              • llyod

                                llyod Void-Bound Voyager

                                Perhaps this isn't relevant to y'all anymore, but I got xnb-node to work with wine on Ubuntu 16.04. Here were the key steps:

                                1. Follow the directions at to install the latest stable branch of wine. I ended up with version 2.0.4.
                                  Note: I tried installing wine using good ol' apt-get but couldn't get it to work.

                                  If you're using a different distro (or macOS?), check out for the relevant instructions.

                                2. Download XNBExtract and extract it somewhere handy.
                                  Note: You really only need the xnb-node code, which is also available on github at I couldn't get that version to work. (I didn't try very hard.)

                                3. Run node.exe as follows:
                                  First, copy any relevant .xnb files to some directory, which I'll call PACKED_DIR. Suppose we want them extracted to a directory called UNPACKED_DIR. Then, run
                                  cd XNBExtract0.2.2/xnb-node && wine node.exe ./main.js extract PACKED_DIR UNPACKED_DIR
                                  bam. You extracted files should be in UNPACKED_DIR.
                                  Last edited: Jan 5, 2018
                                  BentFX likes this.
                                • BentFX

                                  BentFX Cosmic Narwhal

                                  Thank you so much llyod. I'm on Mint 18 and have been experiencing major issues unpacking xnb files. I've spent that last two weeks, in my free time, digging through pages of search results, trying to figure what year old posts are still relevant, and what ones were even relevant to begin with. Then today's search showed a new hit... BOOM!!!

                                  I can't thank you enough!

                                  EDIT: For me the key thing seems to have been getting the most recent Wine. I've been using Linux since Slackware was the only sensible choice, and have been exclusively Linux since 2006. The last time I went outside of the distro for a more recent wine build it was a horror story. WineHQ has really done a great job of making it painless, and your first step, seems to be all I needed, given that I had beaten the rest of the pipeline into shape already.
                                    Last edited: Jan 5, 2018
                                  • MysticTempest

                                    MysticTempest Ketchup Robot

                                    I see you're downloading the modified the XNBExtract that I uploaded to the StardewValley Wiki. Why aren't you using the included shell scripts? The README even mentions it. It makes thing really simple; as long as you have Wine already installed.
                                    • La_Petite_Rosalie

                                      La_Petite_Rosalie Void-Bound Voyager

                                      Hey! so I'm having a mild problem. I compiled all the favorite hair mods into 1 png and everything functions fine. However, the game excludes the last few hairs and clocks up at 88. I've tried moving the images around thinking that Stardew just isn't registering the last bits of the picture - Is this a limitation of the game and I'm just overloading the poor thing or does it have to do with the files i'm uploading? I'll be happy to upload my files if needed.
                                      • PEACHES4

                                        PEACHES4 Void-Bound Voyager

                                        I am using the XNBExtrat version and I have gone through all the steps fine until I get to repacking and merging my files together. When I look into my packed folder BOTH files are still there? do I just use the one I edited?
                                        • kirania1996

                                          kirania1996 Space Spelunker

                                          Hi, I'd like to ask is it possible to edit the png graphic without using the original file? I drew my Sebastian portrait using clip studio paint with transparent backgroun and when I tried to cut the drawing into the png file it always becomes blurred. Am I doing it wrong here?

                                            Attached Files:

                                          Share This Page