Modding Help help w/ xnb modding on mac

Discussion in 'Mods' started by maxiner, Jan 5, 2017.

  1. maxiner

    maxiner Void-Bound Voyager

    ok so i'm very new to this modding stuff... all day i've tried to unpackage xnb files, first i tried using xnbnode with wine and following this tutorial. then i tried a basic terminal method on reddit but it's not capable with 1.1 anymore so i'm out of options. my biggest issue is following the windows tutorials, the commands are different and using wine is a struggle i'm not tech savvy

    i know modding on a mac is near to impossible, and i really want to make my own stuff for the game????? so if anyone could help me out/ give me tips that'd be great
     
    • MysticTempest

      MysticTempest Ketchup Robot

      If you have Wine already installed; that's good. Then go to the first tutorial link you posted, and get the updated version of XNBNode: http://www.mediafire.com/download/fwg3p0rmp3q2v36/xnb_node.0.2.2.7z

      Next, extract the contents of the zip file into your folder for modding. Let's call it "ModTool", as an example. And, for simplicity; let's put it under your home folder.

      After you've extracted the zip file you should have a folder called "xnb-node", and a script called "xnb_node.cmd" inside your folder, 'ModTool'.

      Now, under 'ModTool' and next to the other files. Create 2 empty folders, one named 'Packed' and the other 'Unpacked'

      This is how it should look:
      ModTool
      ├── Packed
      ├── Unpacked
      ├── xnb-node
      └── xnb_node.cmd

      Now, I generally extract all the files at once so I can have them ready whenever I need. So, go to your Steam Library. Right Click on Stardew Valley, and go down to 'Properties'.
      Then in the new window head over to the 3rd tab, 'Local Files'. From there click on 'Browse Local Files'. That'll take you directly to your Stardew Valley gamefiles.

      Copy the 'Content' folder over into the 'Packed' folder you made a little while ago.


      After that open up a terminal. It should start you in your home folder. So, type(remove the quotes for all the following commands) "cd ModTool/" and enter. (You might also be able to open up a terminal directly from the folder, but I'm not sure about that functionality on OSX.)

      Here's where you can launch Wine now. Type "wine cmd", and enter. That should change the terminal into one that looks like Windows.
      (I'm on Linux, but it should look similar to the output below. Like a Windows prompt, as in "C:\Users\...")
      ------------

      marc@Aescylon-3:~$ wine cmd
      wine: configuration in '/home/marc/.wine' has been updated.
      Microsoft Windows 5.2.3790 (1.7.18)

      Z:\home\marc>
      -------------

      From here is where you can use the commands from the tutorial.
      So, to extract you'd type "xnb_node extract Packed/ Unpacked/", and enter.
      And, then to repack "xnb_node pack Unpacked/ Packed/", and enter.

      If all done correctly, you should be able to pack, and unpack files now.
      You can also do files one at a time, but this was just a general example.

      Hope this helps some.
       
        Escutcheon likes this.
      • maxiner

        maxiner Void-Bound Voyager

        this worked like a charm thanks so much!!!!!!!!!! thank u
         
        • MysticTempest

          MysticTempest Ketchup Robot

          Ah, no prob! I'm glad I could help. ^-^
           
          • Daken3

            Daken3 Space Hobo

            Just out of curiosity. I'm really new to modding and am also using mac. I would love to simply play around with the fishing and weapon related stuff but really feel that I can't even get past step one. Read a few guides and it seems once you get to the actual coding its somewhat straight forward (sorry for babbling). As a visual learner would either of you be able to share or make a video getting through the steps you discussed above? I have tried downloading the xnb node, but it doesn't come as a zipped file or string of text or something executable (that I can see). I just have a white page with the file name and can't figure out what to do with it. Sorry for literally having no clue what to do as I haven't found much in mac modding of the xnb files thus far. Thanks! any time and effort spent reading/replying to this post are extremely appreciated!
             
            • MysticTempest

              MysticTempest Ketchup Robot

              Hey Daken3,

              I don't have a Mac; I use Linux. So screenshots or video from me might not be much help to you.


              For the basics though. In order to run XNBnode you'll need Wine: https://dl.winehq.org/wine-builds/macosx/i686/winehq-staging-2.0.pkg
              Instructions via their official wiki here: https://wiki.winehq.org/MacOS


              Wine will let you run most Windows programs; XNBnode being one of them.
              After Wine is installed; you can follow the instructions I posted earlier.

              I can try, and help if you have problems. But, my main knowledge is Linux, and knowing that OSX is pretty similar underneath the hood.
               
              • mehve

                mehve Master Chief

                @MysticTempest Thank you for taking time to write this thorough mini tutorial! I just successfully used Wine to extract a couple of SV files using XNBNode on Mac and it worked perfectly.
                 
                • MysticTempest

                  MysticTempest Ketchup Robot

                  Oh, glad to hear I could help! ^-^
                   
                  • Dorffff

                    Dorffff Poptop Tamer

                    Thanks for the tutorial! I think I've done everything properly, but I'm still getting an error when I try to run the unpacker

                    [​IMG]
                     

                      Attached Files:

                    • MysticTempest

                      MysticTempest Ketchup Robot

                      Hey Dorffff, the last time someone had that error they were using a really old version of Wine.
                      Can you type the following in Terminal so we can see which version you're using:
                      Code:
                      wine --version
                      
                      My Base install of Wine is an older, but still usable:
                      wine-1.7.18

                      While I have a secondary installation of Wine Staging; that's a bit newer, but not the most up to date:
                      wine-2.4 (Staging)

                      These both work well. Make sure yours is at least v1.7
                       
                      • Dorffff

                        Dorffff Poptop Tamer

                        Thank you MysticTempest - the issue was resolved after switching to 1.8 :party:

                        I was using an outdated version of wine and winebottler (1.6.1)
                         
                          MysticTempest likes this.
                        • Fairycake

                          Fairycake Void-Bound Voyager

                          Eek ok I've been trying to get this to work for hours and I'm having no luck. :[ I've been able to successfully use wine before for other gaming/coding programs, but I have no experience with XNB's and very little experience with Terminals. For whatever reason, I seem to be unable to get the commands to work for me. I'm including some screenshots of my attempts...anyone have any ideas? :/
                          modhelp.png modhelp2.png
                           
                          • MysticTempest

                            MysticTempest Ketchup Robot

                            Well, first off. The node.exe file stays inside the xnb-node directory. After that, close out that terminal. And, relaunch the terminal.
                            Then try the instructions I posted earlier..
                            Type in:
                            Code:
                            wine cmd
                            That should drop you to the Wine command prompt. From there, you can retry the XNB node command you were attempting.
                            Code:
                            xnb_node extract Packed/ Unpacked/
                            See if that works, or you get any new errors.
                             
                            • Fairycake

                              Fairycake Void-Bound Voyager

                              Thank you so much for responding! I had the node.exe file in both places (I had tried multiple file locations hoping for different results) so I deleted the node.exe from the ModTool folder and just kept the original node.exe in the xnb-node folder. So at this point, my ModTool folder looks like this:
                              Screen Shot 2017-06-26 at 4.59.50 PM.png
                              I then attempted to use the "wine cmd" command in Terminal again, and the results were as follows:
                              Screen Shot 2017-06-26 at 4.58.24 PM.png
                              So I tried to run the "wine cmd" command in node.exe (which I opened using the wineskin wrapper labeled "moddy") and ran into trouble again:
                              Screen Shot 2017-06-26 at 4.58.07 PM.png


                              I feel like I'm definitely missing/misunderstanding something, what exactly am I supposed to be using wine to open?
                               
                              • MysticTempest

                                MysticTempest Ketchup Robot

                                Ah okay. So, I'm not familiar with 'Moddy'. But, if you're using a wineskin wrapper. That's different than a regular installation of Wine.

                                The second picture you posted shows that Wine isn't installed system-wide. Which is why it says "command not found."

                                That means you're going to need the path to your Wineskin wrapper. Inside that folder; has the Wine binary. Either launch the terminal from in there, or grab the direct path to run the command.

                                Example:
                                Code:
                                path/to/WineskinWrapper/wine cmd
                                
                                Or, see if it has an interface like this one that lets you access the command line: http://wineskin.urgesoftware.com/tiki-index.php?page=Manual+4.5+Advanced+-+Tools

                                I'm over on Linux, so I have a direct installation of Wine.

                                Basically, you need Wine to launch the command prompt version of itself. And, then run the script "xnb_node.cmd" script. You don't touch node.exe at all. It's automatically running the node.js stuff in the xnb-node folder.
                                 
                                • Fairycake

                                  Fairycake Void-Bound Voyager

                                  Ooh ok, I just realized that "wineskin" is a third party thing and not actually wine. So I *think* I successfully downloaded and installed wine. I placed shortcuts to launch Wine and Terminal in my ModTool folder (which I have on my desktop, hopefully that's right?).
                                  foldernew.png
                                  My issue now is that the commands I'm typing into Terminal and Wine don't seem to be working. I have basically no experience in this area so I'm sure I'm making a very dumb/obvious mistake lol. Here's what both the Wine and Terminal windows look like after I try the commands:
                                  terminal.png wine.png
                                   
                                  • MysticTempest

                                    MysticTempest Ketchup Robot

                                    Ah, that's good. You have the Wine part correct. But, it looks like the terminal isn't opening in your folder.
                                    And, my "cd ModTool/" instructions were only if you put the folder under your home folder. "cd" is the change directory command.

                                    Since you have yours on your desktop. It should look more like
                                    Code:
                                    cd ~/Desktop/ModTool/
                                    , and then you can run "wine cmd" .
                                    Which you can see in your 3rd pic; now works correctly. You can tell because it says that "MS Windows 5.2" stuff, and shows you the "Z:\" prompt.

                                    From that "Z:\current\path\>" prompt you can run the XNBnode commands. It'll work after that.


                                    Note:
                                    For some slight ease of use on this last step; I made a few scripts: https://www.dropbox.com/s/iksqi7h5de4o6hl/XNBscripts.zip?dl=0
                                    Just extract the "pack.sh" & "unpack.sh" files into your 'ModTool' folder, and double click(or run) the one you want to action.
                                    They'll automatically run the 'wine cmd' command, and the command to unpack or pack depending on the script you chose to execute.
                                     
                                    • Fairycake

                                      Fairycake Void-Bound Voyager

                                      Omg you are an actual angel lolol I was finally able to get it to work! Thank you so so much for being so patient and helpful! <3 I'm currently trying to combine some furniture mods and such in photoshop, if all goes well I might try my hand at making some original stuff! :)
                                       
                                      • MysticTempest

                                        MysticTempest Ketchup Robot

                                        Ah, yea no prob! Glad I could help you get it working, ^-^

                                        Oh nice; I look forward to seeing any original stuff you might create! It's always fun seeing the new ideas shared by new modders joining the community.
                                         
                                          Fairycake likes this.
                                        • BlueEyes_nLevis

                                          BlueEyes_nLevis Orbital Explorer

                                          Are you running these commands from the wine terminal? I cannot for the life of me get this to work... Like Fairycake, I've not worked with XNBs.
                                           

                                          Share This Page