Modding Help Not able to pack .xnb

Discussion in 'Mods' started by atomicdarling, Jan 13, 2018.

  1. atomicdarling

    atomicdarling Space Hobo

    Hi! I'm working on my first mod, a dialogue expansion.

    I was able to convert the .xnb files I needed to .yml using EXNB and xnb_node. I then edited the files with Notedpad++. I was very careful about formatting.

    Now when I attempt to pack the .yml into .xnb... nothing happens.

    1. Using EXNB I put the files to be packed into the Yaml/png folder as instructed, then run the batch file.
    2. It tells me there are no files found in the folder to be converted.
    3. So, I edited the batch file, adding a third check to its process (easily undone and reverted) to check specifically for .yml instead of .yaml (even though it shouldn't matter, I think).
    4. Then I ran it again and it said the files were converted, but no files appeared in the XNB folder
    5. I attempted instead ot run the xnb_node manually by opening Powershell...
    6. Powershell tells me that it can't be run even after formatting the command as it instructs
    I'm really at a loss. It would suck to have gotten this far and have to give up. Somebody please help.
    • ricewatah

      ricewatah Master Chief

      while i was researching how to make xnb mods i found [this pretty useful guide] on how to pack and unpack xnb files using just xnb node and command prompt. it will walk you through the steps in both extracting and packing your xnb and .yaml files. i hope it helps.
      • atomicdarling

        atomicdarling Space Hobo

        Hey! I tried that walkthrough which made some things a lot clearer, but I'm still running into issues.

        I have my xnb_node.cmd, app folder and the .yml file I've been testing all in the Stardew Valley folder at the moment. I'm still not getting any .xnb file output. HEre's what the cmd prompt is telling me:

        C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley>xnb_node.cmd pack MarriageDialogueHarvey.yml MarriageDialogueHarvey.xnb
        C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:65
                        throw e;
        TypeError: Cannot read property 'valueType' of undefined
            at WriterResolver.write (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\writer.js:227:23)
            at DictionaryWriter.write (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\writer.js:80:28)
            at WriterResolver.write (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\writer.js:230:27)
            at ObjectToXnb (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\converter.js:115:20)
            at packXnb (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:52:25)
            at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:60:16
            at applyOrRecurse (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:86:9)
            at Command.<anonymous> (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\main.js:28:9)
            at Command.listener (C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\app\node_modules\commander\index.js:301:8)
            at emitTwo (events.js:100:13)
        • DungeonRyu

          DungeonRyu Subatomic Cosmonaut

          Last edited: Jan 15, 2018
        • ricewatah

          ricewatah Master Chief

          i think the problem is that you aren't giving xnb node a place to put your file and it doesn't really know what to do. instead, you should make two folders inside of the stardew directory and name them something like "input" and "output". "input" will be where you put your edited file, and "output" will be where your edited file will be made into an xnb.

          after making your folders, you need to put your edited .yaml into "input" and run command prompt as you did originally in order to get to the stardew directory (so: cd c:\program files (x86)\steam\steamapps\common\stardew valley). then, run the command: xnb_node.cmd pack input output

          afterwards, you should find your new xnb file inside of your "output" folder when you check it :)
          • atomicdarling

            atomicdarling Space Hobo

            I updated to this version from 2.1 and tried it again. Sadly nothing.

            I tried this method once before updating xnb_nod and twice after... Still nothing :cry:


            Tried changing the .yml to .yaml just to see if it would make a difference... tried again and it gave me the same message as in the first post for every attempt after whether formatted for the folders or the specific filename. I'm really at a loss about what I'm doing wrong.
            • ricewatah

              ricewatah Master Chief

              the only other things i can think of are either uninstalling xnb node and then reinstalling it because it may not be correctly installed. if that's not the case, it might be the file you're trying to pack that is the problem. is the file itself a .yaml or have you named it .yaml? try copy+pasting a dialogue xnb from your content folder and putting it into the "input" folder and then in command prompt running: xnb_node.cmd extract input output

              if that works (meaning in your output file is a .yaml), it's not xnb node, but the file.
              • DungeonRyu

                DungeonRyu Subatomic Cosmonaut

              • atomicdarling

                atomicdarling Space Hobo

                This seems to be the case and I feel dumb for not checking earlier. I unpacked a random file just to repack it and it worked fine. Guess time to go through my files with a fine tooth comb and see where I messed up and why it won't convert. :facepalm::rip:

                Share This Page