RELEASED Content Patcher *

Loads content packs that change the game's images and data without replacing XNB files.

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

    Pathoschild Tiy's Beard

    @tenthousandcats When loading a temporary event map, the game uses the festival content manager which SMAPI can't intercept. That's fixed in the upcoming Stardew Valley 1.3; I'll add it to Content Patcher's known issues in the meantime. Sorry about that!
     
    • tenthousandcats

      tenthousandcats Subatomic Cosmonaut

      @Pathoschild oooh, I see. Thank you so much for taking a look!
       
      • Pathoschild

        Pathoschild Tiy's Beard

        Content Patcher 1.3.1 is now available!

        Release notes:
        • Added more detailed info to patch summary command.
        • Improved error handling for image edits.
        • Fixed unnecessary warnings when a patch is disabled.
        • Fixed error when a content pack's config.json has invalid keys.
         
        • Pathoschild

          Pathoschild Tiy's Beard

          Last edited: Apr 24, 2018
        • Suppeedi

          Suppeedi Scruffy Nerf-Herder

          ....Hrm... not worth downloading if you're not doing the beta, I guess?
           
          • Pathoschild

            Pathoschild Tiy's Beard

            @Suppeedi Nope. The mod's download page will offers two versions until Stardew Valley 1.3 is released.
             
            • Allayna

              Allayna Ketchup Robot

              Having an odd problem... I've made map edits that include adding the ladder tilesheet for use on the maps. On 2 out of the 5 maps I've done this on, CP gives an error on them
              The '..\spring_ladder.png' tilesheet couldn't be loaded. Tilesheet paths must be a relative path without directory climbing (../).
              except this makes no sense, as the ladder files are in the directory above the maps folder by default. And it has no problem with 3 out of the 5 maps I've done this too.

              Here's the full log. https://log.smapi.io/LUtunK0c
              Here's my CP mod - https://www.dropbox.com/s/rtk328kmlam9lws/CP Expanded Maps.7z?dl=0
               
              • Pathoschild

                Pathoschild Tiy's Beard

                Hi @Allayna. SMAPI doesn't allow ../ because the game folder structure is different per platform, and because it's very easy to accidentally have a path that only works on your own computer. The preferred way is to keep the tilesheet in the same folder as the map, like the game itself does. Also, there's no spring_ladder file in the game or in your content pack; is that from another mod?
                 
                • Allayna

                  Allayna Ketchup Robot

                  its the vanilla file in the content folder, that the vanilla maps use. there is one for each season. I've added that tilesheet to some of my edited maps. My edited maps have been able to call the tilesheet when I replace the vanilla map files or use xnb loader. And again, Smapi and/or the mod is only having issues with 2/5 of my maps that call the tilesheet
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    @Allayna SMAPI deliberately prevents directory climbing. That's why you get the error with Content Patcher (which loads files through SMAPI) but not as an XNB mod (which isn't validated).

                    There's definitely no spring_ladder.xnb file by default:
                    upload_2018-4-28_10-47-46.png

                    The ladder files are added by the Backwoods and Bus Stop Tweaks mod. That means your mod won't work correctly for any player that doesn't have that installed too.
                     
                    • SarahSyna

                      SarahSyna Subatomic Cosmonaut

                      I've been trying to make a Content Patcher version of some seasonal buildings, but I can't get them to work at all because I keep getting the "can't parse/not a valid json" error no matter what I do. I copied the json files from pre-made ones, even, just to see if it worked, but no good. The other CP mods are working fine.

                      These are the mods that I can't get working, and this is the SMAPI log. I would super appreciate help here, I've no idea what's going wrong.
                       
                      • MysticTempest

                        MysticTempest Spaceman Spiff

                        It looks like you're missing a lot of commas; both in the manifest.json, and the content.json files.

                        EDIT:
                        And, you're missing the closing parentheses and commas after the "When" fields.

                        2nd Edit:
                        Here try this fixed set of files. It has the previous fixes, plus some minor other typo fixes.
                         

                          Attached Files:

                          Last edited: May 2, 2018
                          SarahSyna likes this.
                        • SarahSyna

                          SarahSyna Subatomic Cosmonaut

                          MysticTempest likes this.
                        • Rosalie

                          Rosalie Cosmic Narwhal

                          hello! i am trying to migrate my XNB mods into CP, but they aren't showing up in game. there's no errors from SMAPI; they just... aren't replacing. i think i missed some pathing somewhere but i can't figure out where ^^;

                          link to folder
                           
                          • MysticTempest

                            MysticTempest Spaceman Spiff

                            The "FromFile" section should look like this. You don't need that first part, "Cute Valley - Pink/".
                            Code:
                            "FromFile": "assets/craftables/Craftables.png"
                            
                             
                              Rosalie likes this.
                            • Rosalie

                              Rosalie Cosmic Narwhal

                              thank you! that's so simple it's almost embarrassing lmao

                              one more question, how do i find the exact X Y coordinates so i don't need to swap the entire sheet?
                               
                              • ShneekeyTheLost

                                ShneekeyTheLost Master Astronaut

                                The x/y coordinates are in pixels, so you'll need to use an editor for the .jpg that can count your pixels for you, typically counted from the top left corner.
                                 
                                  Rosalie likes this.
                                • MysticTempest

                                  MysticTempest Spaceman Spiff

                                  No prob! ^-^

                                  As ShneekeyTheLost mentioned. Best way to do that would be to consult your preferred image editor. I personally use: https://www.gimp.org/

                                  Opening up the tilesheet, and zooming in until you're at single pixel levels. Then following the cursor will let you know.
                                  See how I have it set to a single pixel, and am in the top left corner of the rectangle that encompasses the "Lightning Rod"?
                                  You can count manually, or even easier; the bottom of the screen has the coordinates displayed for you.

                                  Example screenshot:

                                  Example.png

                                   
                                    Rosalie likes this.
                                  • Rosalie

                                    Rosalie Cosmic Narwhal

                                    thank you both very much ^_^
                                     
                                    • hwayunhae

                                      hwayunhae Pangalactic Porcupine

                                      May I suggest on a future update, perhaps adding a new type of action: Append.
                                      Specifically for mods that add new hairstyles, clothes, etc... that would merge the content being patched in to the very end of the file, so that all the multiple different clothing/hair mods can be used together?
                                       
                                        HopeWasHere likes this.
                                      Thread Status:
                                      Not open for further replies.

                                      Share This Page