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. MysticTempest

    MysticTempest Spaceman Spiff


    Thanks for the heads up.
    Indeed, after testing, it appears removing at least one "Language" conditional allows ShopExpander to read the patched ObjectIDs again in v1.6(& v1.6.1) of Content Patcher.

    I also have a player config, true/false conditional for an extension to my mod. That works fine once at least one of the Language conditionals are removed.
    Swapping language conditionals with another hardcoded one like "Weather", also causes a failure. However, if I replace the hardcoded conditionals with player config ones; ShopExpander will happily load those.

    It appears player config conditionals are loaded quicker than the hardcoded conditionals in the latest versions of Content Patcher. While the hardcoded ones are now loaded after other mods, probably once in-game or something.
     
    • Pathoschild

      Pathoschild Tiy's Beard

      Yep, conditions which can't change in-game (like player config) should work fine since Content Patcher can apply them immediately when the game starts.
       
        MysticTempest likes this.
      • Ryuusuke

        Ryuusuke Aquatic Astronaut

        It would be great if you can use 'when' condition base on map, for example,
        "Map": "Town, ManorHouse"

        anyway, thank you for the great work.This makes modding much more easier.
        :D
         
        • Pathoschild

          Pathoschild Tiy's Beard

          @Ryuusuke Thanks for the suggestion! That's not currently possible since Content Patcher updates tokens when the day starts, but it's something I want to look into in the future.
           
          • Ryuusuke

            Ryuusuke Aquatic Astronaut

            Oh I see^^, thanks
             
            • ellerae

              ellerae Master Chief

              Hi, not sure if this is the right place but just thought I should let you know that the new version of content patcher (with latest version of SMAPI and mods) just stops my game from loading at all. I just get stuck on the loading screen once I select a save. Nothing else seems to cause the problem.
               
              • Pathoschild

                Pathoschild Tiy's Beard

                @ellerae Are you playing on Mac? If so, try reinstalling Mono; the latest MacOS update seems to break Mono until you reinstall, which affects any mods which load PNG textures.
                 
                • ellerae

                  ellerae Master Chief

                  Thank you that was exactly it!
                   
                  • opapal2

                    opapal2 Void-Bound Voyager

                    Not Working npc schedules... T.T
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      @opapal2 Schedule edits should work fine since SMAPI 2.6. The NPC will just stop moving without error if the schedule data is incorrect though, so try double-checking your edit. If you need help, come ask in #modding on the Stardew Valley Discord and we'll help you out. :)
                       
                      • LadyEleven

                        LadyEleven Void-Bound Voyager

                        OOH! I realize it's probably a ways off still (if it's manageable at all), but I'm so excited to hear that! This explains why that one last feature of Seasonal Immersion isn't replicable yet (indoor/outdoor variants). Really hope this becomes a thing someday.
                         
                        • Pathoschild

                          Pathoschild Tiy's Beard

                          Content Patcher 1.6.2 is now available!

                          Release notes:
                          • Conditions are now checked much sooner when loading a save, so early setup like map debris spawning can be affected conditionally.
                          • Fixed token subkey form not allowed in boolean fields.
                          • Updated for changes in the upcoming SMAPI 3.0.
                           
                          • Narznarz

                            Narznarz Space Hobo

                            Hello, I've been trying to build my first manifest for a content pack patch. It's for Eemiestardew's "Dutch Farm Buildings" because her original one seems to be broken. I'm only wanting to use her seasonally changing houses.xnb, Slime Hutch.xnb, and Stable.xnb but something in my manifest isn't working and I don't understand why.

                            My manifest.json reads as follows:


                            {
                            "Name": "DutchBuildings NarzPatchedPack",
                            "Author": "Eemiestardew edited by Narznarz",
                            "Version": "1.0.0",
                            "Description": "Patched for specific seasonal building selection.",
                            "UniqueID": "Eemiestardew.DutchFarmBuildings",
                            "MinimumApiVersion": "2.10",
                            "UpdateKeys": ["Nexus:1659"],
                            "ContentPackFor": {
                            "UniqueID": "Eemiestardew.ContentPatcher",
                            "MinimumVersion": "1.0.0"
                            }
                            }

                            But SMAPI (2.10.1) tells me it's a skipped mod because, "These mods could not be added to your game. DutchBuildings NarzPatchedPack 1.0 because it requires mods which aren't installed (Eemiestardew.ContentPatcher).

                            Extra note: >steamapps>common>Stardew Valley>mods>DutchBuildings NarzPatchedPack>ContentPack

                            And from there it splits off into four folders for all four seasons, plus the manifest document. Each of the seasonal files contain the same three building replacement files mentioned above.

                            Any ideas about how I can get this running right?
                             
                            • Narznarz

                              Narznarz Space Hobo

                              Nevermind! I realized I could just smash the two housing mods together and create something functional by swapping around files, while using the manifest (etc) from the other buildings mod. Whoops.
                               
                              • Pathoschild

                                Pathoschild Tiy's Beard

                              • babybird22

                                babybird22 Void-Bound Voyager

                                Hi Pathoschild

                                I am working on a Clint Marriage Mod with Content Patcher and have made some changes to the Blacksmith Map in order to achieve the desired effect:
                                With this Marriage Mod, if Clint has more than 4 hearts, he will throw away the love letter addressing to Emily which could found in his room. After that, if Clint has more than 8 hearts, the farmer will find another letter which is writing to him/her...
                                The codes regarding the change of Blacksmith Map are the followings:

                                Code:
                                {
                                         "LogName": "Blacksmith Overrides",
                                         "Action": "Load",
                                         "Target": "Maps/Blacksmith",
                                         "When": {
                                          "Language": "zh",
                                          "Hearts:Clint": "0, 1, 2, 3",
                                          },     
                                         "FromFile": "assets/Blacksmith.tbin",       
                                          },
                                         {
                                          "LogName": "Blacksmith Overrides-Emily Letter Removed",
                                          "Action": "Load",
                                          "Target": "Maps/Blacksmith",
                                          "When": {
                                          "Language": "zh",
                                          "Hearts:Clint": "4, 5, 6, 7",
                                          },
                                          "FromFile": "assets/BlacksmithRemoved.tbin",
                                         }, 
                                         {
                                         "LogName": "Blacksmith Overrides-Love Letter",
                                         "Action": "Load",
                                         "Target": "Maps/Blacksmith",
                                         "When": {
                                          "Language": "zh",
                                          "Hearts:Clint": "8, 9, 10, 11, 12, 13",
                                          },     
                                         "FromFile": "assets/BlacksmithLoveLetter.tbin",       
                                          },
                                I released this Mod recently and was informed that sometimes the farmer could not get into the Blacksmith but this could be fixed after reloading the game.
                                I guess perhaps one .tbin can't be loaded correctly in the same day that another .tbin has been loaded in morning.

                                In this regard, may I have your suggestion or some edition of my codes?
                                For your reference, I also attached my Clint Marriage Mod (sorry at this moment only Chinese version is available)
                                 

                                  Attached Files:

                                  Last edited: Jan 23, 2019
                                • Pathoschild

                                  Pathoschild Tiy's Beard

                                • curi0

                                  curi0 Scruffy Nerf-Herder

                                  Hi Pathoschild, thank you so much for all your works!

                                  I wanna ask how to replace multiple xnb files with Content Patcher? I already know how to use the EditImage and Load actions for a single file, but kinda puzzled with more than one file.

                                  Let's say I wanna change all the animals sprites from:
                                  ../Stardew Valley/Content/Animals/

                                  I already put the replacement xnb files in my CP mods folder:
                                  ../Mods/[CP]MyMods/Animals/

                                  and then use the following config in the content.json
                                  Code:
                                  ..other config
                                          // Animals
                                          {
                                              "Action": "Load",
                                              "Target": "Animals",
                                              "FromFile": "Animals/*.xnb",
                                          },
                                  ..other config
                                  
                                  Which doesn't work... So, how to do it properly?
                                   
                                  • MouseyPounds

                                    MouseyPounds Cosmic Narwhal

                                    You'll need to add separate patches for each file in your content.json. For example:

                                    Code:
                                    ...
                                            {
                                                "Action": "Load",
                                                "Target": "Animals/Pig",
                                                "FromFile": "Animals/Pig.xnb",
                                            },
                                            {
                                                "Action": "Load",
                                                "Target": "Animals/BabyPig",
                                                "FromFile": "Animals/BabyPig.xnb",
                                            },
                                    ...
                                    
                                     
                                      curi0 likes this.
                                    • curi0

                                      curi0 Scruffy Nerf-Herder

                                      I see.. I thought we could do it all at once too.. I guess it's easier to just replace the original xnb files in this case. Thank you for the answer!
                                       
                                      Thread Status:
                                      Not open for further replies.

                                      Share This Page