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 Cosmos Killer

    @andiluxe Nope. Here are my exact steps, in case I'm doing something different:
    1. Deleted the Content folder and verified game integrity, so I have no non-vanilla files.
    2. Installed CJB Cheats Menu, Console Commands, Content Patcher 1.6.4, and Slime Hutch Winery 1.0.3.
    3. Ran the game briefly to generate config.json files.
    4. Edited Slime Hutch Winery's config.json and changed the exterior color:
      Code:
      {
        "Interior Only": "false",
        "Interior Color": "standard",
        "Interior Layout": "standard",
        "Exterior Color": "Black2"
      }
      
    5. Launched the game.
    6. Started a new save file and skipped intro.
    7. Ran these SMAPI commands:
      Code:
      world_clear farm everything
      player_add object 390 500
      player_add name "Refined Quartz" 10
      player_add name "Iridium Bar" 1
      player_setmoney 10000
      
    8. Set the time to 9am and warped to Robin's shop.
    9. Bought a Slime Hutch:
      upload_2019-3-14_21-18-2.png
      upload_2019-3-14_21-18-24.png
    10. Warped home and slept twice.
    11. Clicked through Marlon's event.
      upload_2019-3-14_21-19-39.png
    12. Went inside the Slime Hutch, seems to work fine.
      upload_2019-3-14_21-20-22.png
    13. Saved and exited the game.
    14. Relaunched and reloaded. Everything still seems to be okay.
    Everything looks fine to me, no errors in the SMAPI log.
     
    • andiluxe

      andiluxe Big Damn Hero

      @Pathoschild
      Well... I guess this is good news. It means it works for everyone who downloads it from Nexus. I can't figure out why it won't work for me, but maybe it's an interaction with something else. Do you recognize the error mine was throwing?

      https://log.smapi.io/15YJjC0Q
       
      • Pathoschild

        Pathoschild Cosmos Killer

        @andiluxe Does it still happen if you remove all mods except Content Patcher and Slime Hutch Winery? If so, can you...
        1. try the steps I listed above;
        2. type patch summary into the SMAPI window and press enter;
        3. and post a new log?
         
        • Pathoschild

          Pathoschild Cosmos Killer

          Content Patcher 1.6.5 is now available!

          Release notes:
          • Fixed EditData allowing field values containing / (which is the field delimiter).
          • Fixed error with upcoming SMAPI 3.0 changes.
          • Fixed some broken maps in Stardew Valley 1.3.36 not detected.
          • Fixed typo in some errors.
          • Internal rewriting to support upcoming features.
           
          • andiluxe

            andiluxe Big Damn Hero

            @Pathoschild
            Is it possible to add support for TimeOfDay tokens? i'm thinking just "day, night" (for some lights).
             
            • Wessolf

              Wessolf Void-Bound Voyager

              Hello, I have to say that there was a weird conflict with this mod and NPCMapLocations. The following happened for me:

              [SMAPI] Multiple mods want to provide the 'LooseSprites\map' asset (Content Patcher, NPC Map Locations), but an asset can't be loaded multiple times. SMAPI will use the default asset instead; uninstall one of the mods to fix this. (Message for modders: you should usually use StardewModdingAPI.IAssetEditor instead to avoid conflicts.)

              Could I ask for some help on the matter? I've already contacted the creator of the NPC Map Locations mod, so I'm not sure what happened here.
               
              • Pathoschild

                Pathoschild Cosmos Killer

              • Wessolf

                Wessolf Void-Bound Voyager

                Ah, I didn't realize it might've been from Elle's Dirt and Cliff retexture. Thanks for the help!
                 
                • andiluxe

                  andiluxe Big Damn Hero

                • Pathoschild

                  Pathoschild Cosmos Killer

                  @andiluxe That's a bug in the Linux/Mac version of SMAPI. You can install the SMAPI 3.0 alpha to fix it:
                  1. Go to the SMAPI releases page on GitHub.
                  2. On the top release, look under 'Assets'.
                  3. Find the download that starts with Z_PREVIEW_ and has the highest version number after that (not necessarily the one that appears first in the list).
                   
                    andiluxe likes this.
                  • Savertin

                    Savertin Void-Bound Voyager

                    @Pathoschild
                    I read through your github issues and found one that implies that in future updates a locational condition might be added to the content patcher. I was wondering if it would be possible to add something like a game time condition (eg. from 10:00 till 12:00 ingame). I wanted to use something like that to reflect a NPC schedule, because I know that the NPCs are at specific places on specific times based on their programmed schedule. I wanted to use this to eg. give NPCs working clothes (like Shane or Sam while working at Joja) or to have them tell you specific dialouge based on the place they're at or for a specific time of the day. Will something like that be possible with upcoming releases?
                     
                    • Pathoschild

                      Pathoschild Cosmos Killer

                      It might be possible in the future, but that'll require some major changes to Content Patcher. The main focus for now is on tokens which only change when the day starts.
                       
                      • MissCoriel

                        MissCoriel Subatomic Cosmonaut

                        I won't lie but you can kind of already do that with CP if you know how to work schedules.. perhaps we need a more detailed wiki entry on it. You can set that certain places they stand at certain times have specific dialogue instead of what's on their normal dialogue file. Then you add it in to their schedule... you COULD use CP to change that once in a while depending on what's going on in the world.
                         
                        • Pathoschild

                          Pathoschild Cosmos Killer

                          I've been thinking of creating a GitHub wiki for Content Patcher that everyone can edit, so we can have a gentler intro than the technical README and cover common tricks too.
                           
                          • Savertin

                            Savertin Void-Bound Voyager

                            @MissCoriel
                            Thanks for the hint. For Dialouges this might be a possible solution (even if you have to be very precise with your positioning and stuff AND there are mods which change the NPC schedule :/).
                            So, if I base my Additions on the Vanilla schedules, they might not work with e.g. Stardew Valley Expanded.
                             
                            • MissCoriel

                              MissCoriel Subatomic Cosmonaut

                              SVE changes everything.. you can't really help that. I actually have no intention of supporting it with all the drastic changes it made. It's not a bad mod in the least, don't get me wrong, But it is honestly something I will never use and not everyone uses it. You CAN make replacements to it's schedule but that's in a line somewhere I don't like to go.
                               
                              • Pathoschild

                                Pathoschild Cosmos Killer

                                Content Patcher 1.7 is now available!

                                Release notes:
                                • Added new tokens:
                                  • HasReadLetter: whether the player has opened a given mail letter.
                                  • HasValue: whether the input argument is non-blank, like HasValue:{{spouse}}.
                                  • IsCommunityCenterComplete: whether all bundles in the community center are completed.
                                  • IsMainPlayer: whether the player is the main player.
                                • Tokens can now be nested (like Hearts:{{spouse}}).
                                • Tokens can now be used almost everywhere (including dynamic token values, condition values, and Fields keys).
                                • Tokens with multiple values can now be used as placeholders.
                                • Tokens from config.json can now be unrestricted (AllowValues is now optional).
                                • Improved input argument validation.
                                • Added support for new asset structures in the upcoming Stardew Valley 1.4.
                                • Fixed incorrect error text when dynamic/config tokens conflict.
                                • Fixed config schema issues logged as Debug instead of Warning.
                                • Removed support for the condition value subkey syntax (like "Relationship": "Abigail:Married" instead of "Relationship:Abigail": "Married"). This only affects one content pack on Nexus, which has already been updated.
                                Update note for mod authors: Changing your format version to 1.7 or later changes the ConfigSchema field behavior:
                                • AllowValues is no longer required. If you omit it, the config field will allow any value.
                                • If you omit Default, the default is now blank instead of the first AllowValues value.
                                 
                                  pepoluan likes this.
                                • pepoluan

                                  pepoluan Big Damn Hero

                                  Oohh, I must go back and edit all those .xnb conversions I did, because I've been lax in including the "Default" field ... :cautious:

                                  That said, there's still support for "token:value": "true/false" in the "When" clause, right?

                                  (Although, if I may be frank, I'd suggest changing that to "token==value" syntax; much clearer and kinda inline with most programming languages.)

                                  (Also, a regex match would be awesome, e.g. "token=~<some_regex>" eheheh :giggle:)
                                   
                                  • Pathoschild

                                    Pathoschild Cosmos Killer

                                    @pepoluan Existing content packs should work fine, since the ConfigSchema behavior only changes when you update their Format field to 1.7 or later. (It's a good idea to keep them up-to-date though.)

                                    Yep, the "token:input" syntax still works in When keys. The reason it doesn't use operators like "==" is that it's an input argument (i.e "call the Relationship token with 'Abigail' as the input argument") rather than a comparison ("is Relationship equal to 'Abigail'). I do want to support more complex logic like regex in the far future though.
                                     
                                      pepoluan likes this.
                                    • pepoluan

                                      pepoluan Big Damn Hero

                                      I see. Thanks for the explanation!

                                      I'll still go out and edit them anyways, just in case someone decided to replace "1.6" with "1.7" and cause themselves a lot of grief.. :D

                                      Ahh, gotcha. So internally it's related to an internal mechanism...

                                      You can preprocess it, though... replace "==" with ":" ;)

                                      But in any case, not a big deal for me :)
                                       
                                      Thread Status:
                                      Not open for further replies.

                                      Share This Page