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

    @staarfruit Yep, TileSheets/crops should be correct. Try this:
    1. Launch your game and play until some crops are visible.
    2. Enter this command in the SMAPI console:
      Code:
      patch summary
    3. Upload your SMAPI log (see instructions on that page) and post a link here.
     
    • staarfruit

      staarfruit Pangalactic Porcupine

      Here you go, I was gonna take all my other mods out to make the log easier to read, but I figured I should leave them in just in case there's a conflict somewhere I'm not seeing. https://log.smapi.io/UVvN2pad
       
      • Pathoschild

        Pathoschild Tiy's Beard

        @staarfruit Try targeting TileSheets/crops instead of Content/TileSheets/crops. (I'll change Content Patcher in a future version to show a warning if the path starts with 'Content', since that's usually an error.)
         
        • staarfruit

          staarfruit Pangalactic Porcupine

          @Pathoschild Oh wow, I feel kinda stupid. Whoops, sorry for bothering you, lol, but thank you for taking the time to help me, I appreciate it. :)
           
          • Pathoschild

            Pathoschild Tiy's Beard

            No worries, glad to help! It's good to see which things are confusing, so I can make them more clear in future versions. :)
             
              staarfruit likes this.
            • Pathoschild

              Pathoschild Tiy's Beard

              The next version adds warnings for common mistakes in the patch summary result to help with troubleshooting:
              [​IMG]
               
                staarfruit likes this.
              • MouseyPounds

                MouseyPounds Cosmic Narwhal

                So I have an odd situation that leads to a half-baked feature request. I'm working on a Fence replacer mod and the various game files that need to be modified have filenames like 'Fence1', 'Fence2', etc. While I could use those same strings for fence type configuration, I'd rather use more descriptive configuration options (e.g. "wood, stone, iron, hardwood") so that it is easier for the player.

                But this means that I can't easily use Tokens to simplify the number of patch commands since their is no direct relationship between those values and the filenames. Thus I have a bunch of essentially duplicated patch entries where the only difference is the filename for the "Target" and the appropriate "When" condition to use it. If there was some sort of Token Alias that maps 'wood' to 'Fence1' so that I could just do something like '"Target": "LooseSprites\{{Alias_FenceType}}.png" that would be extremely useful for this mod.

                I'm not sure of the syntax (perhaps an "Alias" entry in the ConfigSchema definition) or if this has more general use than this one specific case, but I figured I'd throw it out there since it occurred to me.
                 
                • hatmouse

                  hatmouse Phantasmal Quasar

                  Have you considered using a configuration file for that? Then they can just select the material they want to use in that (or turn versions on/off, depending on your setup), and that value is just another token in your main setup.

                  Edit- I see you mentioned that specifically and somehow I missed it *ponder* I guess I didn't follow, after all! I thought I got what you were asking, but it seems like you could use multiple tokens in the name...

                  Edit Remastered Edition - Oh, I see. You're only replacing one of the fences, and the user is selecting which one to replace. Sorry my confusion :)
                   
                    Last edited: Jul 27, 2018
                  • MouseyPounds

                    MouseyPounds Cosmic Narwhal

                    The problem is the token is the exact text of the configuration option. This is great when I have control of the filenames -- the user picks a flower type of "yellow" and the content patch references "FromFile: assets/flower_{{FlowerType}}.png" which gets translated to "assets/flower_yellow.png". But the game's filenames are Fence1, Fence2, Fence3, and Fence5 and those are extremely unintuitive options to give to a user. I want to be able to have the user configuration still be "wood, stone, iron or hardwood" and then have that somehow mapped into the FenceX filenames. LIke I said, it's a probably a niche usage, but it was frustrating to setup on this mod.
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      @MouseyPounds Thanks for the suggestion! Something like this has some intriguing possibilities:
                      Code:
                      "CustomConditions": [
                         {
                            "Name": "FenceTarget",
                            "Value": "Fence1",
                            "When": { "FenceType": "Wood" }
                         }
                      ]
                      
                      Which would let you do this:
                      Code:
                      {
                         "Action": "Load",
                         "Target": "LooseSprite/{{FenceTarget}}.xnb",
                         "FromFile": "assets/fence_{{FenceType}}.png"
                      }
                      
                      That would complicate Content Patcher's validation logic though. I won't add this in next week's Content Patcher 1.4 release, but I think it's worth considering for a future version if there are more use cases for it.
                       
                      • Pathoschild

                        Pathoschild Tiy's Beard

                        Content Patcher 1.4-beta.8 is now available! (For Stardew Valley 1.3 beta only. This should be the last update before the Stardew Valley beta ends next week.)

                        Release notes:
                        • Added warnings for common mistakes in patch summary result.
                         
                        • Seyph

                          Seyph Scruffy Nerf-Herder

                          Hello, back with another feature request. Although, I don't know if this would be Content Patcher specific, or just SMAPI (possibly the latter). What I'm hoping for is a feature that lets you be able to put your mods into subfolders (à la The Sims), and still get loaded, in order to better organize them. Using Content Patcher, it's easy to go crazy with downloading a lot of packs, and then before you know it, your mods folder starts looking like a hoarder's house, but digital. :oops:
                           
                          • Allayna

                            Allayna Ketchup Robot

                            something that might be nice is an 'OR' function...
                            for example, in my mod I've got a replacement for all 5 farm types. It would be nice to have a config to either turn them ALL on, or choose individually.
                            The contnet loading the farms would be like this

                            {
                            "Action": "Load",
                            "Target": "Maps/Farm",
                            "FromFile": "assets/Farm.tbin",
                            "WhenEither": {
                            "AllFarms": "true",
                            "Farm":"true"
                            }
                            },
                            {
                            "Action": "Load",
                            "Target": "Maps/Farm_Combat",
                            "FromFile": "assets/Farm_Combat.tbin",
                            "WhenEither": {
                            "AllFarms": "true",
                            "WildernessFarm": "true"
                            }
                            },

                            so they could just turn them all on if they want, or choose 3 out of the 5 for instance, without have to turn them all on if they want them all
                             
                            • Zosa

                              Zosa Cosmic Narwhal

                              i would love subfolders, more than half of my mods are just visual ones that don't get moved about while the other half get traded in and out depending on the season and character, it would be nice not to wade through twenty mods every time i want to make it rain a little more often :rofl:
                               
                              • Pathoschild

                                Pathoschild Tiy's Beard

                                Thanks for the suggestion! I think it's worth considering, but I'm not sure which approach would be most intuitive yet. The SMAPI thread would be best place to propose it though (since SMAPI is what handles loading the content packs).

                                It's something I've thought about recently too. I think WhenEither might be too specialised (e.g. what if you want (X and Y) or Z?), but I was considering something like this for complex conditions:
                                Code:
                                "When": {
                                   "Query": "hasSeenEvent:(14 AND 15) OR relationship.shane:(engaged OR married)"
                                }
                                
                                That wouldn't be in the next releases, but if there's interest I could look into it for a future release.
                                 
                                • Allayna

                                  Allayna Ketchup Robot

                                  yeah, and/or statements, thats what i was thinking!
                                   
                                  • Undertalelover2003

                                    Undertalelover2003 Void-Bound Voyager

                                    quick question:
                                    If i had 2 mods that changed someones dialogue would they both work or would they both cancel themselves out?
                                     
                                    • Pathoschild

                                      Pathoschild Tiy's Beard

                                      @Undertalelover2003 Depends what they change. Some of their changes might overwrite each other, so you'd probably see some dialogues from both.
                                       
                                        Undertalelover2003 likes this.
                                      • Undertalelover2003

                                        Undertalelover2003 Void-Bound Voyager

                                        Thanks
                                         
                                        • Pathoschild

                                          Pathoschild Tiy's Beard

                                          Content Patcher 1.4 is now available!

                                          Release notes:
                                          • Updated for Stardew Valley 1.3 (including multiplayer support).
                                          • Added new conditions:
                                            • DayEvent (check if there's a festival or wedding today);
                                            • HasFlag (check if the player has received a letter by ID or has a mail flag set);
                                            • HasMod (check if another mod is installed, e.g. for automatic compatibility patches);
                                            • HasSeenEvent (check if the player has seen a given event ID);
                                            • Hearts:<NPC> (check the relationship type for a specific NPC);
                                            • Relationship:<NPC> (check the relationship type for a specific NPC);
                                            • Spouse (check the current player's spouse name).
                                          • Added support for deleting entries via EditData.
                                          • Added warnings for common mistakes in patch summary result.
                                          • Fixed case sensitivity issues in some cases.
                                           
                                            hatmouse and Seyph like this.
                                          Thread Status:
                                          Not open for further replies.

                                          Share This Page