RELEASED [SMAPI] Xnb Loader 1.1.10

Safely load custom xnb files without touching your Content directory!

  1. Midaychi

    Midaychi Scruffy Nerf-Herder

    XNBloader seems to work properly with that alpha build of smapi. Only oddity I ran into was with Karmylla's Immersive Map Edits. For some reason, the changed adventurer's guild fails to load through XNB unless you also copy the weapons.xnb from the base directory of Karmylla's mod and paste it into the maps sub folder.

    May not even be xnbloader related, even though it only errors when done through xnbloader and not through vanilla.

    etc etc.

    ERROR SMAPI] Entoarox Framework crashed when loading asset 'Maps\AdventureGuild'. SMAPI will use the default asset instead. Error details:
    StardewModdingAPI.Framework.Exceptions.SContentLoadException: Entoarox Framework failed loading content asset '..\XnbLoader\ModContent\Maps\AdventureGuild' from ModFolder. ---> Microsoft.Xna.Framework.Content.ContentLoadException: The 'weapons' tilesheet couldn't be loaded relative to either map file or the game's content folder.
     
    • Entoarox

      Entoarox Oxygen Tank

      Another issue in SMAPI by the looks of things, @Pathoschild !!!!!
       
        13akoors likes this.
      • Entoarox

        Entoarox Oxygen Tank

        And why are you not trying the vanilla tilesheet finding mechanic in the first place? :S
         
        • Pathoschild

          Pathoschild Tiy's Beard

          You replied to a draft I accidentally posted for moment before I could double-check things. ;)

          The vanilla logic finds tilesheets relative to the map folder, which SMAPI does too. If Karmylla's Immersive Map Edits had included a weapons.xnb tilesheet next to the AdventureGuild.xnb map, it would have loaded just fine. The vanilla logic isn't enough, because modded maps often reference a generic tilesheet like spring_outdoorsTileSheet.xnb without copying it into their local folder (which is good; otherwise any mod edits to the generic tilesheets wouldn't appear in custom maps). That's why SMAPI also searches the content folder using the relative path too, but clearly that logic should be improved.

          The upcoming SMAPI 1.15.4 is all about improving the new content API. When I finish moving this weekend, I'll release a second alpha with improvements to the tilesheet-finding logic using Karmylla's Immersive Map Edits as a test case. :)
           
          • Entoarox

            Entoarox Oxygen Tank

            The problem is that its looking for Content/ModContent/Maps/weapons, and not like it should Content/Maps/weapons...
            Tilesheets that arent found relative to the xnb itself should be found relative to Content/Maps/ at all times, because that is where they should be for xnb mods.
             
            • Pathoschild

              Pathoschild Tiy's Beard

              As I said. ;)
               
              • Midaychi

                Midaychi Scruffy Nerf-Herder

                When using XNBloader with Longevity, and while you have NPC art replacements loaded through XNB loader, it looks like if an NPC gets checked for DNPCC and there's no corresponding file in DNPCC for them, it defaults to the vanilla files.

                This wouldn't be a problem, normally, except this seems to overwrite XNBloader's redirects and go directly to the content folder for these NPCs.
                 
                • Entoarox

                  Entoarox Oxygen Tank

                  Take it up with the longevity author, nothing XnbLoader can do about it since its on their end.
                   
                  • Pathoschild

                    Pathoschild Tiy's Beard

                    I looked into it, and it's a bit more complicated. The game's logic for tilesheets boils down to this:
                    • If the location is indoors or the desert, or the image path contains path or object, load it from the Content folder.
                    • Otherwise load it from Content\Maps with a seasonal prefix.
                    In the case of Karmylla's Immersive Map Edits, it's an indoor tilesheet so it's under Content rather than Content/Maps, and there's no weapons.xnb file in the vanilla game content folder. I just released SMAPI 1.15.4 alpha 2 which fixes the tilesheet logic accordingly.
                     
                    • Pathoschild

                      Pathoschild Tiy's Beard

                      SMAPI 1.15.4 alpha 2 is now available for Linux/Mac/Windows. This fixes issues with some custom maps loaded through Advanced Location Loader or XNB Loader.

                      @Midaychi Can you try Karmylla's Immersive Map Edits with this version to see if the problem still happens?
                       
                      • Midaychi

                        Midaychi Scruffy Nerf-Herder

                        I've basically dumped xnbloader at this point so I'd have to reinstall from scratch to try.
                         
                        • Midaychi

                          Midaychi Scruffy Nerf-Herder

                          I backed up my old version and made a fresh install, with that smapi and the 1.8 xnb loader and the latest framework, and I installed the immersive map edits mod soely through xnbedit stock and straight without modification to its structure, and it seems to find the weapons.xnb just fine now.
                           
                            13akoors likes this.
                          • General Chaos

                            General Chaos Pangalactic Porcupine

                            When you say XNB 1.8 do you mean the current 1.1.1? I do not see a 1.8 XNB loader.
                             
                            • 13akoors

                              13akoors Scruffy Nerf-Herder

                              Entoarox Framework is 1.8. Midaychi probably was either mixing the numbers up, or just assumed that XNBLoader and Framework share the same number. I'd assume he used the 1.1.1 version
                               
                              • Midaychi

                                Midaychi Scruffy Nerf-Herder

                              • Karmylla

                                Karmylla Space Kumquat

                                Hey!!! It appears the festival maps don't load via XnbLoader!
                                Is this fixable?
                                 
                                  anothersarah likes this.
                                • Entoarox

                                  Entoarox Oxygen Tank

                                  log please
                                   
                                  • Karmylla

                                    Karmylla Space Kumquat

                                    So sorry, I completely forgot to add the log! Here you go :)
                                     

                                      Attached Files:

                                    • Entoarox

                                      Entoarox Oxygen Tank

                                      The redirects are being applied by XnbLoader, if they still dont show up then this is a issue with SMAPI and you need to contact @Pathoschild as there is some CM missing in its hooks.
                                       
                                      • Pathoschild

                                        Pathoschild Tiy's Beard

                                        @Entoarox @Karmylla Fixed in the latest SMAPI 2.0 beta. Here's a festival with a test grayscale texture mod:

                                        upload_2017-10-14_0-13-10.png
                                         

                                        Share This Page