Modding Discussion Migrating XNB mods to Content Patcher packs

Discussion in 'Mods' started by Pathoschild, Mar 5, 2018.

Thread Status:
Not open for further replies.
  1. pepoluan

    pepoluan Star Wrangler

    The mod you want to convert seems to be simple XNB replacements.

    In essence, you need to tell CP to replace the game's XNB with those replacements.

    First, prepare the working directory. Call it "[CP] NorisuFireChickens".

    In it, create a directory "assets" containing 4 subdirectories (in accordance with the variants provided by the original mod). Each subdirectory contains the 2 XNB file for that particular variant.

    In the "[CP] NorisuFireChickens", create the "manifest.json" file and "content.json" file.

    Here's the guide for creating a manifest.json file.

    Here's the guide for creating a content.json file.

    In essence, you want to provide an option, let's call it "Variant", where the values can be one of the 4 variants as provided by the original mod, then let CP select the proper "replacer" file using its "token" ability, e.g.:

    {
    "Action": "EditImage",
    "Target": "Animals/BabyVoid Chicken",
    "FromFile": "assets/{{Variant}}/BabyVoid Chicken.xnb"
    }


    See the {{Variant}} there? It will be replaced by whatever the value of "Variant" is inside the config.json file (CP will automatically create a config.json file if one does not exist.)

    (Do the same for the "non-baby" target).
     
    • Tinkaa

      Tinkaa Intergalactic Tourist

      Hello there, I've encountered a bug with the CP Version of A Toned Down Stardewvalley. The vanilla tree's show up behind the modded version, is there any way to fix that? And also configure the tree's, since the option is available in Eemie's Map recolor (which is based on that)?[​IMG]
       
      • meerkat823

        meerkat823 Void-Bound Voyager

        Hey just wondering are you planning to make flo Marriageable or no?
         
        • Bondzgurl

          Bondzgurl Intergalactic Tourist

          Thank you so much for the links and basic guide :3 The extra links in the Wiki are being super helpful, I'm hopeful that I'll figure it out! Will keep updated.

          edit: still, 2ish hours later, still modding illiterate! Everything in all these pages are making me even more confused.
           
            Last edited: May 12, 2019
          • pepoluan

            pepoluan Star Wrangler

            Does it come from this post?

            I think the problem is that the mod "Overlays" the new images, hence causing the vanilla tree to appear where the modded trees were specifying transparency.

            Inside content.json, find the portion marked "//Trees" and replace all "PatchMode" from "Overlay" to "Replace".

            Tell me if it fixes the problem, because I'm not using that mod.
             
            • pepoluan

              pepoluan Star Wrangler

              Try making it, then zipping the mod, and upload it somewhere. I'll check where you went wrong and provide suggestions.
               
              • pepoluan

                pepoluan Star Wrangler

                Your request gave me the desire to try updating the mod altogether, since it seems the mod is no longer compatible with SDV 1.3, judging from the last commenter on that mod. (Edit: That said, it seems the commenter copied the mod to the wrong place; however I am in no way will try applying the mod by replacing the proper files, as I have created one myself -- read on).

                Rather than starting from the mod itself, though, I just took the idea of cleaning up & repathing and edited the map files myself, resulting in a mod that is totally my creation, just inspired by the "Cleaner Barns and Coops" mod.

                Attached is my idea of cleaning up and blocking animals from wandering into the following locations:
                • Door nook
                • Square in front of door nook
                • General area around the hopper -- also cleaned up
                  • This should allow you to put things there without fear of being trampled and destroyed by animals.
                  • Warning: I am not sure how it will interact with Robin doing upgrading of the Coop / Barn -- some tests might be necessary
                Feel free to try the attached mod, and please report back to me of any quirks/glitches. If all is well, I'll release the mod here & in NexusMods.

                EDIT: This mod is now available in the "Releases" forum (<== click)
                 
                  Last edited: May 13, 2019
                • Moragaine

                  Moragaine Existential Complex

                  @pepoluan A suggestion: use .tbins rather than .xnbs in your content packs, it makes for easier updating. I can't say that I've ever had a problem with animals destroying chests or machines in barns or coops. However, the maps do look really nice! Everything loads correctly - I did have enough different saves to do all the building versions.
                   
                    Last edited: May 12, 2019
                    hatmouse and pepoluan like this.
                  • pepoluan

                    pepoluan Star Wrangler

                    Huh? We can load .tbin files directly??

                    Ookay, that's news to me. Or I might be a bit too ignorant about the CP ability :facepalm: ... Let me take another look at that and "un-xnb" the tbin files...

                    Anyways, thanks for the kind words! Yeah, I also never had experiene with animals destroying things in barns & coops... but just in case, it seemed to be a good (and easily implementable) idea anyways :D
                     
                    • Moragaine

                      Moragaine Existential Complex

                      I think it's safe to say there we're all learning here.. :nuruwink:
                       
                        pepoluan likes this.
                      • minervamaga

                        minervamaga Pangalactic Porcupine

                        I'll have to manually patch the trees like I do in Eemie's. The exterior changes of ATDSV are identical to Eemie's except for the buildings, so I'm planning to remove all of the non-building things from the sheets in the future. Just need to make time for it. In the meantime you can use Eemie's + ATDSV and set ATDSV to InteriorOnly.
                         
                        • Tirazi

                          Tirazi Space Spelunker

                          Would it be possible for someone to convert Baechu's most recent profiles into SMAPI?

                          Someone has converted their portraits of the 12 marriage candidates (https://community.playstarbound.com...ent-patcher-packs.141577/page-88#post-3323500), but they haven't converted any of their others. It may be a little hard to navigate because the website is in Korean, but if you have google chrome, you should be able to have a rough translation by right clicking the page and clicking "translate to English". (Or clicking the button next to the bookmarks star.)​

                          You might also need a Naver, Facebook or Line account to access the site, so if it's too much of a hassle, don't worry about it. :)

                          These are the links:

                          Thank you!
                           
                            Last edited: May 12, 2019
                            SleepyzTime likes this.
                          • KanekiZero

                            KanekiZero Intergalactic Tourist

                            I made a Content Pack for this two Portrait Mods and it really took me time to finish it Lol.
                             

                              Attached Files:

                              Last edited: May 13, 2019
                            • KanekiZero

                              KanekiZero Intergalactic Tourist

                            • Bondzgurl

                              Bondzgurl Intergalactic Tourist

                              I have zipped the files for you, I will be completely honest, I really doubt I did this right at all haha.

                              I also uploaded my SMAPI log from trying to run the mod, with nothing else but Content Patcher installed.
                              https://log.smapi.io/S56Jud0q

                              Hope I'm at least close?
                               

                                Attached Files:

                                Last edited: May 14, 2019
                              • SpringsSong

                                SpringsSong Scruffy Nerf-Herder

                                Took a quick peek - there was a missing comma at the end of the "Action": "EditImage" line, that's why the load failed.
                                 
                                • Kourah

                                  Kourah Master Chief

                                • Bondzgurl

                                  Bondzgurl Intergalactic Tourist

                                  omg, thanks lol, will try again!

                                  something so small, so necessary. Much like life anymore!!!

                                  update: Fixed this, but SMAPI is still telling me the manifest.json file is invalid? https://log.smapi.io/nNwn1txW

                                  Update 2: I DID IT! Uploaded Zip file in next comment for anyone who would like to use it!
                                   
                                    Last edited: May 14, 2019
                                  • Bondzgurl

                                    Bondzgurl Intergalactic Tourist

                                    Here is the mod I /finally/ managed to convert, and will convert the rest of the colours, now that I am aware of what I was doing wrong.

                                    It's all the commas...
                                     

                                      Attached Files:

                                    • Bondzgurl

                                      Bondzgurl Intergalactic Tourist

                                      The whole mod, with all 4 colours! Managed to condense it into one zip file, one content, one manifest. Celebrating with some frozen yogurt now!
                                       

                                        Attached Files:

                                        Last edited: May 15, 2019
                                      Thread Status:
                                      Not open for further replies.

                                      Share This Page