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. Baka-Alpaca

    Baka-Alpaca Big Damn Hero

    I'm... at my wit's end. I know this should be super simple, but I can't get cursors to replace. I am abysmal at java, and I just wanted to replace like, the cat icon, dog icon, and horse icon to match the in-game ones I edited. I'll be trying to replace scarecrows next, but my faith in myself is waning...

    It keeps telling me that my content.json is not a valid JSON file, and there's something supposedly wrong in the 8th line, but I can't remotely figure out what.

    This is my error:

    [​IMG]


    {
    "Format": "1.0",
    "Changes": [
    {
    "Action": "EditImage",
    "Target": "LooseSprites/Cursors",
    "FromFile": "assets/cat.png"
    "ToArea": { "X": 161, "Y": 194, "Width": 13, "Height": 11 },
    },

    {
    "Action": "EditImage",
    "Target": "LooseSprites/Cursors",
    "FromFile": "assets/dog.png"
    "ToArea": { "X": 178, "Y": 191, "Width": 13, "Height": 13 },
    },

    {
    "Action": "EditImage",
    "Target": "LooseSprites/Cursors",
    "FromFile": "assets/horse.png",
    "ToArea": { "X": 194, "Y": 191, "Width": 12, "Height": 14 },
    },
    ]
    }


    What am I doing wrong? ;o; please help...
     
    • Pathoschild

      Pathoschild Tiy's Beard

      @Baka-Alpaca You're missing a comma at the end of the "FromFile" line for the cat and dog. :)
       
      • Baka-Alpaca

        Baka-Alpaca Big Damn Hero

        @Pathoschild I caught that after I posted (but thank you!), but it still gives me the error ;; I don't know what's wrong.

        edit: oh for lord's sake, I was editing the wrong content file... I made lots of back-ups... OTL !!!

        Thank you so much tho, I really appreciate the ease of my psyche ;v;
         
        • peppier

          peppier Intergalactic Tourist

          Okay so I have Content patcher in my folder and I'm trying to start up the game but SMAPI is still skipping over them
           
          • Pathoschild

            Pathoschild Tiy's Beard

          • hatmouse

            hatmouse Subatomic Cosmonaut

            Pathoschild likes this.
          • peppier

            peppier Intergalactic Tourist

            here
             

              Attached Files:

            • hwayunhae

              hwayunhae Big Damn Hero

              peppier, do those two files have manifest.json in their folders? that's what your error message says is missing. If they do, please upload what the manifest.json files contain, as there may be an error preventing SMAPI from reading them.
               
              • peppier

                peppier Intergalactic Tourist

                Attached Files:

              • peppier

                peppier Intergalactic Tourist

                it does have it my friend looked it over as well and said that it didn't make sense
                 
                • Pathoschild

                  Pathoschild Tiy's Beard

                  @peppier Can you upload your SMAPI log to log.smapi.io (see instructions there)? I need more details than that screenshot shows.
                   
                  • Allayna

                    Allayna Pangalactic Porcupine

                    So, is there a way to add a new file with content patcher? working on converting my map edits to Content patcher, and I have a new tilesheet it uses.
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      @Allayna Target doesn't need to match an existing game file, so you can add new files too.

                      If you add the map as a .tbin file through Content Patcher, it will automatically detect tilesheets relative to your map file and load those too. There are two limitations though:
                      • Custom map tilesheets may cause an error when loading a save. That's fixed in SMAPI 2.6-beta.8.
                      • Map tilesheets with a seasonal prefix (like spring_X) won't work due to an issue in the game's seasonal logic. I'll be proposing a change to the game code to fix that, but in the meantime you can work around it by adding a seasonal "Action": "Load" patch for the tilesheet and leaving out the seasonal prefix in the name.
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        hwayunhae likes this.
                      • hwayunhae

                        hwayunhae Big Damn Hero

                        Hmm. Is it possible for similar logic to work with .tmx files, if one is using TMX loader alongside Content Patcher?
                         
                        • Pathoschild

                          Pathoschild Tiy's Beard

                          Not currently; I'll need to look into what that would involve.
                           
                          • CrowFX

                            CrowFX Void-Bound Voyager

                            Question. Which order the "Action" commands of "Load", "EditData" or "EditImage" goes first?

                            So let's say I have one mod that uses whole xnb to edit dialogues, but also want another mod that edits the same file but this one with EditData.

                            For the first mod, I created a "Load" content.json (and also the manifest.json consequently), the second mod is just merely added to mods folder.

                            Which one that gets loaded first and get overwritten by the other?
                             
                            • Pathoschild

                              Pathoschild Tiy's Beard

                              @CrowFX "Load" always happens first, then any "EditData" or "EditImage" patches are applied in the order they're listed.
                               
                                CrowFX and Kuriiyo like this.
                              • Suppeedi

                                Suppeedi Scruffy Nerf-Herder

                                Hey, so, after getting goaded by a friend I did actually jump on the beta, ahahaha...

                                Can tell you that my farmer base mods are working A-OK!...

                                But now my shirt and skincolor additions arent. ^^;

                                Considering that BEFORE I installed the Stardew, SMAPI and Content Patcher betas, these were working fine, I'm not sure why they're not, NOW.

                                Surprisingly, my hairstyle additions still work, despite also adding to the files.. (none of these replace images, they add to them.)

                                This is basically what my content.json has:
                                 
                                • Pathoschild

                                  Pathoschild Tiy's Beard

                                  @Suppeedi can you come ask on Discord? I'll need to ask some questions and run some tests to find the issue, and it'll be much easier over chat than forum posts. :)
                                   
                                  Thread Status:
                                  Not open for further replies.

                                  Share This Page