Modding Discussion Migrating XNB mods to Content Patcher packs

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

  1. Moragaine

    Moragaine Existential Complex

    Minervamaga, I'm not having problems with it, the mod works fine on my beta game. Destroyerofsocks is the one who couldn't get it to work on his non-beta game. I had the original mod before I opted-in to the beta and may have had some of the old files still hanging around..
     
    • Ailsaek

      Ailsaek Subatomic Cosmonaut

      I just read through the entire thread and didn’t see it, is anyone working on Mi’s Victorian interior mod?
       
      • hwayunhae

        hwayunhae Big Damn Hero

        I made a content patcher version of Ali's Fairy Buildings, including the two buildings by lightlytoasted, you can find them here.

        IIRC, Mi already put up a Custom Furniture patch on their page at the Nexus, but AFIK the interiors themselves are a full replacement. I can make a patch. Give me about 3 minutes half an hour.

        edit: okay, more like 2 hours. but it's done.
        If there's anything wrong with the file, let me know.

        Hosted on Mediafire because the file was too big for the forums.
        Mi's Classy Victorian Interiors - 4.66MB

        EDIT 2: Fixed link version that is working in 1.2.31.
         
          Last edited: May 7, 2018
          flameofnight likes this.
        • D.Grey

          D.Grey Void-Bound Voyager

          I have tried to correct a few wrong link in this page, but i can't do that. Probably only an administrator can do it. I don't know.
           
          • paradigmnomad

            paradigmnomad Scruffy Nerf-Herder

            You can either post here or send me a DM with what needs changed and I'll fix it. I did a lot of the editing late at night so there's bound to be errors.
             
            • Danee_H

              Danee_H Void-Bound Voyager

              I'm having an error (I just changed the color for purple at config.json):
              [ContentPatcher] Error loading content pack 'Mi's Classy Victorian Interiors'. Technical details:
              Newtonsoft.Json.JsonReaderException: Can't parse JSON file at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\[CP] Mi's Classy Vicotorian Interiors\content.json. This doesn't seem to be valid JSON.
              Technical details: After parsing a value an unexpected character was encountered: ". Path 'Changes[0].FromFile', line 16, position 2.
              at StardewModdingAPI.Framework.Serialisation.JsonHelper.ReadJsonFile[TModel](String fullPath) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Serialisation\JsonHelper.cs:line 82
              at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 57
              at ContentPatcher.ModEntry.LoadContentPacks() in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 169
               
              • Seyph

                Seyph Title Not Found

                @hwayunhae, it seems you're missing commas at the end of each "FromFile" line. You might also want to check out your Language conditions.
                 
                  hwayunhae likes this.
                • tera415

                  tera415 Void-Bound Voyager

                  Mod: Dashshund dog replacer (with and without hotdog bun)
                  I decided t try and make a content patcher so please tell me if I did it right. Original mod https://www.nexusmods.com/stardewvalley/mods/156/?tab=posts
                  This is an unofficial update. The author can freely upload this to their page or ask it to be taken down.
                   

                    Attached Files:

                    RainbowPantuflas likes this.
                  • destroyerofsocks

                    destroyerofsocks Aquatic Astronaut

                    Moragaine, I figured out the difference between the original mod and your version.

                    The original mod has four different xnb files to overwrite: FarmHouse2, FarmHouse2_marriage, and farmhouse_tiles in Content/Maps folder, and farmhouse_tiles in Content folder.

                    It looks like the Content JSON file for your mod only overwrites the first two files, FarmHouse2 and FarmHouse2_marriage.

                    I made a copy of your mod, added the other two files, edited the content file to Action:Load them the same way, and it works perfectly for me now! And I learned something, too.
                     

                      Attached Files:

                    • hwayunhae

                      hwayunhae Big Damn Hero

                      Something as simple as a bunch of missing commas. Sorry I didn't catch it earlier, when I playtested it for myself I was using the one where I had caught that error, but I forgot to update the .zip.
                      Not sure what's going on with the languages parameter, so I removed those lines from this version. So unfortunately, this is English only until I get a bit more used to CP.

                      EDIT: correcting link to latest fixed version

                      [CP] Mi's Victorian Furniture 1.0.2 (English)
                       
                        Last edited: May 7, 2018
                      • demideerling

                        demideerling Void-Bound Voyager

                        Hi thank you for converting the furniture but I think something went wrong? I used the link you put and got this

                        Error loading content pack 'Mi's Classy Victorian Interiors'. Technical details: Newtonsoft.Json.JsonReaderException: Can't parse JSON file at C:\Program Files (x86)\Steam\SteamApps\common\Stardew Valley\Mods\[CP] Mi's Classy Vicotorian Interiors\content.json. This doesn't seem to be valid JSON. Technical details: Unexpected character encountered while parsing value: {. Path 'Changes[5].When.Language', line 129, position 16. at StardewModdingAPI.Framework.Serialisation.JsonHelper.ReadJsonFile[TModel](String fullPath) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Serialisation\JsonHelper.cs:line 82 at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 57 at ContentPatcher.ModEntry.LoadContentPacks() in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 169
                         
                        • D.Grey

                          D.Grey Void-Bound Voyager

                          Attached Files:

                        • Moragaine

                          Moragaine Existential Complex

                          Thank you! This will be very helpful for me to figure out doing this in the future.
                           
                            iselia likes this.
                          • Ailsaek

                            Ailsaek Subatomic Cosmonaut

                            I got this error too. I’m going to try opening it up in BBEdit.
                             
                            • hwayunhae

                              hwayunhae Big Damn Hero

                              I'm not sure what's going wrong here. When I run it in my game (SDV 1.2.31) it works. I'll go over the contents file again and make sure I didn't accidentally miss a number or something similarly stupid.

                              @demideerling @Ailsaek

                              I'm not sure how I managed to not catch this (probably because I was looking for the reason within the contents of my json files themselves).

                              If you're experiencing the error while trying to use the purple color, (and only then) this SHOULD fix your error. the name of the file folder was missing a pluralization, which I didn't notice when I first copied over the original folders into my assets folder. >.<

                              Please let me know if this causes any further issues.

                              Version 1.0.2
                               
                                Last edited: May 7, 2018
                              • demideerling

                                demideerling Void-Bound Voyager

                                Oh @hwayunhae It probably has something to do with the fact I'm playing on the multiplayer beta- which is 1.3.9?
                                 
                                • Umeneko

                                  Umeneko Void-Bound Voyager

                                  first attempt and i seem to have done something wrong


                                  [19:50:56 ERROR ContentPatcher] Error loading content pack 'Unofficial Waddles'. Technical details:
                                  Newtonsoft.Json.JsonReaderException: Can't parse JSON file at F:\SteamLibrary\steamapps\common\Stardew Valley\Mods\[CP] Unofficial Waddles\content.json. This doesn't seem to be valid JSON.
                                  Technical details: After parsing a value an unexpected character was encountered: {. Path 'Changes[0]', line 10, position 11.
                                  at StardewModdingAPI.Framework.Serialisation.JsonHelper.ReadJsonFile[TModel](String fullPath) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Serialisation\JsonHelper.cs:line 82
                                  at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 57
                                  at ContentPatcher.ModEntry.LoadContentPacks() in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 169

                                  This is an update for myself, as i've been unable to contact the original author as to why they deleted the mod

                                  Edit: made changes and cleaned up the files, same error
                                   

                                    Attached Files:

                                    Last edited: May 7, 2018
                                  • paradigmnomad

                                    paradigmnomad Scruffy Nerf-Herder

                                    I loaded up your file because I was curious why it wasn't working. Each block of code can only support one `From` and one `To` Area file. You'll have to do them individually if you want this conversion to work properly. It also looks like you're missing an } at the bottom according to Sublime.
                                     
                                    • MysticTempest

                                      MysticTempest Ketchup Robot

                                      Line 9 should have a comma after the parentheses.

                                      And, line 14; right after your bracket should be another parentheses.
                                      I'd recommend moving the final bracket and parentheses to new lines for readability. But, all you really need are those 2 tweaks.
                                       
                                      • Umeneko

                                        Umeneko Void-Bound Voyager

                                        Edited the attachment with the changes, same error, much confusion.
                                         

                                        Share This Page