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

    MouseyPounds Cosmic Narwhal

    I can't think of a way to do that purely through Content Patcher. A SMAPI mod could clear the ID from eventsSeen.
     
    • MissCoriel

      MissCoriel Phantasmal Quasar

      Would be nice to beable to be in one mod.. but what's the solution
       
      • Pathoschild

        Pathoschild Tiy's Beard

        When troubleshooting a patch, I suggest using patch summary in the SMAPI console to see if there are errors/warnings for the patch. In this case:
        • You shouldn't include .xnb in the Target field.
        • Enabled isn't a valid condition (unless you defined a custom config.json field with that name). If you want to use the built-in Enabled field, that should be outside the When block.
        Otherwise what you have should work fine.

        Unfortunately not with Content Patcher. You would need to create a SMAPI mod, add the event through SMAPI's content API, and clear the ID from eventsSeen when you want it to repeat as MouseyPounds mentioned.
         
        • coldazrael

          coldazrael Existential Complex

          Shouldn't include the xnb? Most of my conversions always got .xnb on it and it works just fine :/ There are some without it though. What seems to be the difference anyway? I always thought they worked just fine until now o_O
          As about the enabled I used it wasn't build in, and yes, it is already defined in configschema.

          To be frank, I never touched the console command even a bit xD I mean to type something on it. I guess I'll have to try that on for now.

          Edit :
          Failed condition :/ I have no idea why it fails on a save that's already completed the community center..
           
            Last edited: Aug 24, 2018
          • Pathoschild

            Pathoschild Tiy's Beard

            @coldazrael The Target field should be the asset name. The filename in your Content folder does contain the asset name, but they're different things. For example, the filename "Content/Data/Achievements.de-DE.xnb" has asset name Data/Achievements with language code de. Content Patcher will automatically normalise it in some cases, but I suggest not including it to be safe. See common fields in the readme for more info.

            If you still need help getting that patch to work:
            1. load the game until the furniture you're trying to change is visible;
            2. enter patch summary in the SMAPI console;
            3. upload your SMAPI log (see instructions on that page) and post a link here.
             
            • coldazrael

              coldazrael Existential Complex

              Hmm.. I see I see. In a nutshell, perhaps it means to play safe I guess :)

              here you go : https://log.smapi.io/aWZgA6Ev
               
              • Pathoschild

                Pathoschild Tiy's Beard

                @coldazrael Can you post a zip of your content pack here?
                 
                • coldazrael

                  coldazrael Existential Complex

                  Since that content pack is personal use only, I'm afraid that I'm not going to post it here. But it hangs in your inbox :D
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    @coldazrael Your content pack works fine for me. According to the patch summary you posted, you finished all the Community Center bundles but don't have the 'Community Center complete' flag set. That seems to be a game bug; I'm not sure how that happened unless you finished it through a mod. That doesn't only affect Content Patcher; the game itself won't consider the community center complete (e.g. you won't see the community upgrade option in Robin's menu).
                     
                    • coldazrael

                      coldazrael Existential Complex

                      I see it right now lol
                      [​IMG]

                      Well, at least I can substitute it with combined ccBoilerRoom, ccBulletin, ccBulletinThankYou, ccCraftsRoom, ccFishTank, ccVault, ccPantry. Not much different anyways.
                      May I have the full list of the flags though? It seems you didn't put alot of flags example in your github, so I thought the flags were limited o_O.
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        @coldazrael Looks like that'll appear without the flag thanks to a multiplayer change, since it also checks Game1.MasterPlayer.hasCompletedCommunityCenter().

                        The Content Patcher readme covers the most useful flags, but there's no full list. The flags are defined by the game, there are well over 200 of them, and many are very specialised. The flags your current player has are listed by patch summary though.

                        (Edit: also, you can't apply a patch if all of those flags are set. If you specify multiple values for a condition, it'll match if any of the values match.)
                         
                        • coldazrael

                          coldazrael Existential Complex

                          Alright, I'm not going to be greedy for all those flags o_O So ill just get straight to the point, is there any flag for house upgrades?
                           
                          • MissCoriel

                            MissCoriel Phantasmal Quasar

                            I have made a new weapon using content patcher.. it works and everything.. However I tried to make an event to receive it after certain conditions are met in the mail but It now tells me my content.json is invalid. Perhaps I am doing something wrong?
                            Code:
                            {
                                "Format": "1.4",
                                "Changes": [
                                    {
                                      "Action": "EditImage",
                                      "Target": "Tilesheets/weapons",
                                      "FromFile": "assets/lustbring.png",
                                      "ToArea": { "X": 80, "Y": 96, "Width": 16, "Height": 16 },
                                  
                                    },
                                    {
                                        "Action": "EditData",
                                        "Target": "Data/Weapons",
                                        "Entries": {
                                            "53": "Lustbringer/The blade is made from concentrated lust./150/200/2/10/5/2/0/-1/-1/0/.5/6",
                                            }
                                    }
                                    {
                                        "Action": "EditData",
                                        "Target": "Data/Mail",
                                        "Entries": {
                                            "Lustbringer": "Dear, @^^ You have proven your worth to hold a weapon suitable to the Futanari Goddess herself.^ Take it and know that the world's lust is in your hands. ^ ^ -Anonymous %item object 53%%",
                                            }
                                        }
                            
                                    {
                                        "LogName": "Lustbringer",
                                        "Action": "EditData",
                                        "Target": "Data/Events/Farm",
                                        "Entries": {
                                            "4129995/f Robin 2500/f Abigail 2500/f Haley 2500/f Penny 2500/f Pam 2500/f Emily 2500/f Leah 2500/x Lustbringer": "null",
                                            }
                                    }
                            
                                ]
                            }
                            The first two parts work.. even used it in a test game. I just need to figure out why the letter and event are not working.
                             
                              Last edited: Aug 26, 2018
                            • coldazrael

                              coldazrael Existential Complex

                              @MissCoriel
                              I believe the fellows here will be easier to do the troubleshoot if you post the code? :/
                               
                              • MissCoriel

                                MissCoriel Phantasmal Quasar

                                Oops! Fixed.

                                This is a small part of my larger project. Since I'm still learning I been doing it in parts.
                                 
                                • coldazrael

                                  coldazrael Existential Complex

                                  Jaysus o_O
                                  @MissCoriel
                                  Um yeah, I suppose I understand why you didn't post the codes in the first time. Certainly a... large project indeed. xD
                                  So in the end it seems nothing to do with the CP itself eh? Messing with data is quite complicated though -.- Especially the mails and events.
                                   
                                  • Pathoschild

                                    Pathoschild Tiy's Beard

                                    Not that I know of.

                                    (We're discussing this in #modding on the Stardew Valley Discord, for the record.)
                                     
                                    • Pathoschild

                                      Pathoschild Tiy's Beard

                                    • coldazrael

                                      coldazrael Existential Complex

                                      Another question..
                                      Is it possible to make the content patcher could patch the pngs or xnbs from the other mods?

                                      If it's possible could I make this sort of request? :D You know, it could be useful to make a content patcher that replaces the tractor sprite from tractor mod, for example...
                                       
                                      • Pathoschild

                                        Pathoschild Tiy's Beard

                                        @coldazrael That's only possible for mods that load assets in a certain way. It won't work for the Tractor Mod tractor (though you can patch its garage that way).
                                         
                                        Thread Status:
                                        Not open for further replies.

                                        Share This Page