Modding Discussion OLD--POST IN NEW THREAD--Mod List, Modding Guides, and General Modding Discussion

Discussion in 'Mods' started by cantorsdust, Feb 27, 2016.

Thread Status:
Not open for further replies.
  1. cpevors

    cpevors Scruffy Nerf-Herder

    Perfect. I got it downloaded, and I've had no problems navigating to the Stardew Valley direction, but for instruction, "Unpack files by using "xnb_node.cmd extract [input directory] [output directory]..." I'm a bit stumped on what to do here. I keep getting a variety of errors.

    I would like to potentially mod out a couple of typos I found in Elliott's dialogue, so I need to xnb_node.cmd extract Content\Characters\Dialogue\Elliott.xnb, but no output I've tried has allowed me to extract the files.

    Any clarification or guidance would be hugely helpful.
     
      Last edited: Feb 29, 2016
    • zipy199522

      zipy199522 Pangalactic Porcupine

      I recommend reading the modder's guide for info on editing the dialogue files. I explain everything there.
      I recomend dragging Elliot.xnb to the same directory as xnb_node.cmd, then tryping the following command in the command window.

      xnb_node.cmd extract Elliot.xnb Elliot.json

      From there you can read/edit his dialogue.

      to repack the .json file type.

      xnb_node.cmd pack Elliot.json Elliot.xnb

      then drag the repacked .xnb file and replace the old Elliot.xnb file in Content/Characters/Dialogue

      Hope that helps!
       
      • Rupert484

        Rupert484 Title Not Found

        Hey OP, not quite sure what happened, but the link to my mod in the first post is invalid. I think something went wrong when you copied and pasted it or when I had to edit my post 3 times rapidly.
        Could you please double check that it's https://mega.nz/#!AIkGlC5S!bxef3u6fLbs2PhvqTBV9Z-HEnQcAlX_gns6l3v0R3v8
        Thanks and sorry for the inconvenience.
         
        • cantorsdust

          cantorsdust Existential Complex

          Fixed, thanks.
           
          • Squelch

            Squelch Void-Bound Voyager

            Is it possible we'll be seeing butchering being modded in anytime soon?
             
            • Draivin

              Draivin Scruffy Nerf-Herder

              XnbNode Version 0.1.0
              - Now with support for Font Files.


              Warning: Breaking changes
              After some thought, I dropped the JSON file format due to some limitations, now the packer is using the YAML file format, but it should be just as easy to edit.

              If you want to keep your work up to date, I recommend that you repack all that you are working on using the previous version of XnbNode(0.0.2), put that into a folder, then extract the folder with the new version.


              Usage
              Usage: xnb_node [options] <command> <input> <output>


              Commands:

              extract <input> <output> extract XNB file or all files in directory
              pack <input> <output> pack XNB file or all files in directory

              Options:

              -h, --help output usage information
              -q, --quiet don't output files being processed
              -V, --version output the version number

              Examples:

              xnb_node extract content extracted_content
              xnb_node pack extracted_content repacked
              xnb_node -q extract content/archaeologyBuildingIndoors.xnb archaeologyBuildingIndoors.yaml

              Download
              http://www.mediafire.com/download/l4zv3cn7g6804pk/XnbNode.0.1.0.7z
               
              • cantorsdust

                cantorsdust Existential Complex

                OP updated with everything overnight. I'm super proud of the community for getting itself together so quickly for modding. Over the release weekend we developed tools for packing and unpacking files, the first mods, and the beginnings of an API. Damn fine work.
                 
                • tm080201

                  tm080201 Master Chief

                  I wonder: It's easy to edit existing assets, but has anyone yet figured out how to add new ones? Specifically, adding new haristyles/shirts without overwriting the old ones? It seems like it may be simple, but I may also be optimistic.
                   
                  • WatcherCCG

                    WatcherCCG Giant Laser Beams

                    It's possible CA might not need to really get too involved if the game is this easy to break open. He was afraid the game would be somewhat tough to crack.
                     
                    • GianTDIX

                      GianTDIX Starship Captain

                      Almost done with the guys sprites to update the old sprites overhaul. here is a preview, I will re do the females with better hairs if someone needs me to.

                      http://imgur.com/FydF1O9
                       
                      • cantorsdust

                        cantorsdust Existential Complex

                        I was going over this the other day with deathrat. What we know: Objects have an entry in Data\ObjectInformation.xnb, Furniture.xnb, Boots.xnb, Weapons.xnb, etc depending on what they are. This has an ID # and stats. This ID # corresponds to their graphics position on the associated spritesheet in Content\TileSheets\springobjects.xnb (for objects), furniture.xnb (furniture), etc. (Note that there are two springobjects.xnb, one in Content\Tilesheets and one in Content. The one in Content\Tilesheets appears to correspond to the ID #s in ObjectInformation.xnb. They diverge at position #18, daffodil, and the one in Content has a blue flower while the one in Content\Tilesheets has a yellow one.)

                        My hope is that adding an item is as simple as adding an entry in ObjectInformation.xnb with a new ID corresponding to a new sprite in springobjects.xnb. Getting it in game is not straightforward right now, but you could either edit a crafting recipe or edit your savefile to get it into your inventory.

                        I hope to give this a try later today, or maybe someone would like to do this? You would need to:
                        1. Unpack ObjectInformation.xnb, choose a suitable existing object entry to copy and modify to make unique.
                        2. Count out what the next free ID # slot would be in springobjects.xnb, and assign the object that ID #.
                        3. Unpack springobjects.xnb. Make or copy an identifiable sprite and edit springobjects.png to put in that sprite in the right ID slot.
                        4. Pack ObjectInformation.xnb and springobjects.xnb (one at a time!) and put them in.
                        5. Either then go and edit your savefile so that your inventory now contains your new item with its ID, or go back and unpack Content\Data\CraftingREcipes.xnb, add a new crafting recipe involving your item, and then give yourself said crafting recipe using the AllRecipes.dll mod for the SMAPI. Then
                        6. See if you can get your item.



                        edit: I'm stupid and didn't read your post. I believe shirts are found in Content\Characters\Farmer\shirts.xnb and hairstyles in Content\Characters\Farmer\hairstyles.xnb. There's a second shirts.xnb in Content\Characters. I'm not sure which shirts is used for sure, but the one in farmer matches the options in character creation better I think. Doublecheck that.

                        Again, hopefully it would be as easy as adding shirts on to the end of the file. Unpack the PNG, make it longer, add your shirts at the end. I don't know though. Same for hairstyles. Note that they are grayscale--hair color is added by the game.
                         
                          Last edited: Feb 29, 2016
                        • GianTDIX

                          GianTDIX Starship Captain

                          Everything related to the farmer creation is in Farmer folder as I modified some stuff like hairs they were in gray palet making them easier to customize with color inside the game. You need to make sure the gray stays and dont paint it otherwise good luck in the customization screen to fix that.
                           
                          • cpevors

                            cpevors Scruffy Nerf-Herder

                            Thanks for your help! I can't believe I missed your Google Docs guide, but I have gone back and scoured it a bit, and it's been incredibly helpful. I was able to mod both the typos I found and a few portrait changes (for fun). I greatly appreciate your guidance--and thank you to everyone who has made modding this already-wonderful game that much easier for laymen like myself.
                             
                            • Thank You Bomb

                              Thank You Bomb Void-Bound Voyager

                              I have a question. I was looking through Abigail's Sprites, and noticed there were 52 total (0 - 51), Including some blank unused sprites. These seem to correspond to the numbers listed in animationDescriptions for Abigail.

                              If I were to extend the png, extend the height in the json, add 4 more sprites as a new row, would that add sprites 53, 54, 55, 56 (referred to as 52, 53, 54, 55) usable by the animationsDescriptions file?

                              If this is not how I add more custom sprites, has anybody figured out how to yet? Thanks!
                               
                                Last edited: Feb 29, 2016
                              • cantorsdust

                                cantorsdust Existential Complex

                                Welp. I tried adding a new object, and it would appear the game crashed while adding the new texture. Error below:

                                [​IMG]

                                It would appear that you can't change the pixel size of springobjects.png without triggering that error. I think there might be a slot open at the end of the file, I'll see if I can put my sprite there and get it to work.
                                 
                                • cantorsdust

                                  cantorsdust Existential Complex

                                  Welp. I got the game to load with the new item. I had it set so that parsnips would grow them. But when it came time to harvest my parsnips, the game crashed to desktop without an error log.

                                  edit: Okay, got it working! Parsnip harvesting crashed, but straight up editing the XML of the savefile worked perfectly. Behold the first new added item to Stardew Valley, the Stinky Finger!


                                  Download with mod files, original data, and savegame below.
                                  https://mega.nz/#!UV81yJgb!460Qs0_KKu7NoRETvQDe6dhilSDMJ_Tx1cYWoit46EA
                                   

                                    Attached Files:

                                    Last edited: Feb 29, 2016
                                    zipy199522 likes this.
                                  • Draivin

                                    Draivin Scruffy Nerf-Herder

                                    Just as a side note, if you are resizing sprites, and a dimension of the sprite is a power of 2, try keeping the new dimension a power of 2.
                                     
                                    • Gabakon

                                      Gabakon Big Damn Hero

                                      Is it possible to modify the fence decay time? Infinite loop of repairing/replacing starts to get really annoying after some time.
                                       
                                      • Zoryn4163

                                        Zoryn4163 Big Damn Hero

                                        Nice work! Also, I added crash handling to SMAPI if you want to see if you could get the error from it. It logs errors to the default ErrorLogs directory. https://github.com/Zoryn4163/SMAPI/releases/tag/Alpha0.2
                                         
                                        • cantorsdust

                                          cantorsdust Existential Complex

                                          Nothing in XNB files about fence decay, unfortunately. Probably hardcoded, hopefully the API will help.

                                          Giving this a try now.

                                          edit: Nope, didn't generate a log.
                                           
                                          Thread Status:
                                          Not open for further replies.

                                          Share This Page