RELEASED [Storm] Handsome Matt's Mods (Junimo Deposit Anywhere, Calendar Anywhere, Durable Fences) (Moved)

Discussion in 'Gameplay Mechanics' started by Handsome Matt, Mar 1, 2016.

  1. cantorsdust

    cantorsdust Existential Complex

    XNB files are the content data of the game. When I modded in the first new item, I had to edit the xnb with the item spritesheet, then edit the xnb with the item data, then repack it all. But every item mod would have to edit the same file, meaning only one mod could work at a time without compatibility patches. That wouldn't be feasible for any level of serious modding.
     
    • Handsome Matt

      Handsome Matt Aquatic Astronaut

      I think the best way to go about this is to hook the loading of the XNB/YAML files, have mod able to override the file completely or merge them. Will mess around with an implementation within the API.
       
      • cantorsdust

        cantorsdust Existential Complex

        Check with Zoryn, too. He's been working on adding items by API already and has a new_item command that works (except for crashing after saves).
         
        • Handsome Matt

          Handsome Matt Aquatic Astronaut

          From what I can tell he's making them without XNB files. I've got a lot of changes I want to make to the modding API right now before people start committing to making mods too much, we had this issue when Terraria modding first started it turned into a huge mess, I think I can pull what I've learned from that and make an API where you don't have to worry too much about conflicts. Will see how it goes.
           
          • Perl

            Perl Big Damn Hero

            Nice job.
            You should try enabling multiplayer, there's quite a bit of netcode already in the current client. Take a look at Menus.CooperativeMenu, it has the host and join button handlers. There's a bit of faff before you can actually get it running. I couldn't manage to get it to connect to the other client that was hosting, but maybe you'll have more luck.
             
            • Zoryn4163

              Zoryn4163 Big Damn Hero

              Screw XNB files I despise them. I will do everything in my power to not touch them. You're free to make your own API as well if that's what you're referring to with 'make an API', but at this point in time I'm unsure if what I'm doing with my API can be as catastrophic as tConfig was.
               
              • Handsome Matt

                Handsome Matt Aquatic Astronaut

                Yeah I'm not liking these XNB files, they're irritating. As for the API, I've been messing around with IL patching for a little bit, think I can remove a lot of hardcoded stuff and create a lot of events using it, will see how problematic it gets.
                 
                • Zoryn4163

                  Zoryn4163 Big Damn Hero

                  Programmatic is good. I don't like precompiled things. I greatly prefer being able to call things in realtime. As a side note, I exported all of the trainer functions (I believe) to its own DLL that ships in the release folder.
                   
                  • Drogean

                    Drogean Scruffy Nerf-Herder

                    You may want to look into how Terraria worked. The engine is similar enough so that things seems to work closely to that game.

                    http://www.terrariaonline.com/threads/terraria-custom-content-loader.44541/

                    might be helpful.

                    Also more here http://www.terrariaonline.com/threads/old-terraria-1-1-mod-tconfig-setup-guide.82443/
                     
                    • cantorsdust

                      cantorsdust Existential Complex

                    • Bandus

                      Bandus Big Damn Hero

                      +1 for the Durable Fence mod.
                       
                      • xjapanboy

                        xjapanboy Subatomic Cosmonaut

                        the calendar mod is totally helpfull. Thanks :D
                         
                        • Skipper Scootaloo

                          Skipper Scootaloo Scruffy Nerf-Herder

                          All of these are useful. ;_; The mods are already great.
                           
                          • MicaiahL

                            MicaiahL Void-Bound Voyager

                            Heyho, i have a problem i downloaded the Durable Fence mod but my Fence's keep breaking.

                            to %appdata%\Roaming\Stardew Valley\Mods <- i did that and started it with the MAPI did i do something wrong? ._.
                             
                            • dantheman999

                              dantheman999 Void-Bound Voyager

                              Can you take a screenshot of the folder?
                               
                              • TheSilentObserver

                                TheSilentObserver Big Damn Hero

                                I also had this problem, but interestingly enough... only with the wooden fences. My stone fences seemed to be perfectly indestructible.
                                 
                                • James Bennett

                                  James Bennett Scruffy Nerf-Herder

                                  Covered your mod in my latest video! :)
                                   
                                  • TheSilentObserver

                                    TheSilentObserver Big Damn Hero

                                    Actually, I stand corrected... my stone fences still break down too... very strange.
                                     
                                    • yBot

                                      yBot Space Hobo

                                      I got a crash using your mods, here's the log from the API

                                      [18:37:16] An error occured in the base update loop: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: StardewValley.Characters.Junimo cannot be serialized because it does not have a parameterless constructor.
                                      at System.Xml.Serialization.TypeDesc.CheckSupported()
                                      at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
                                      at System.Xml.Serialization.XmlSerializationWriter.CreateUnknownTypeException(Type type)
                                      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write35_NPC(String n, String ns, NPC o, Boolean isNullable, Boolean needType)
                                      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write63_CommunityCenter(String n, String ns, CommunityCenter o, Boolean isNullable, Boolean needType)
                                      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write85_GameLocation(String n, String ns, GameLocation o, Boolean isNullable, Boolean needType)
                                      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write127_SaveGame(String n, String ns, SaveGame o, Boolean isNullable, Boolean needType)
                                      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write128_SaveGame(Object o)
                                      --- End of inner exception stack trace ---
                                      at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
                                      at StardewValley.SaveGame.<getSaveEnumerator>d__0.MoveNext()
                                      at StardewValley.Menus.SaveGameMenu.update(GameTime time)
                                      at StardewValley.Game1.updateActiveMenu(GameTime gameTime)
                                      at StardewValley.Game1.Update(GameTime gameTime)
                                      at StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime)
                                       
                                      • Alice

                                        Alice Scruffy Nerf-Herder

                                        I think it may be an incompatibility with another mod. I got a similar crash but part of my error gave a filepath that leads me to believe it's not Matt's mods doing it.
                                        Code:
                                        [10:39:41] An error occured in the base update loop: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: StardewValley.Characters.Junimo cannot be serialized because it does not have a parameterless constructor.
                                           at System.Xml.Serialization.TypeDesc.CheckSupported()
                                           at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
                                           at System.Xml.Serialization.XmlSerializationWriter.CreateUnknownTypeException(Type type)
                                           at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write35_NPC(String n, String ns, NPC o, Boolean isNullable, Boolean needType)
                                           at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write63_CommunityCenter(String n, String ns, CommunityCenter o, Boolean isNullable, Boolean needType)
                                           at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write85_GameLocation(String n, String ns, GameLocation o, Boolean isNullable, Boolean needType)
                                           at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write127_SaveGame(String n, String ns, SaveGame o, Boolean isNullable, Boolean needType)
                                           at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write128_SaveGame(Object o)
                                           --- End of inner exception stack trace ---
                                           at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
                                           at StardewValley.SaveGame.<getSaveEnumerator>d__0.MoveNext() in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\SaveGame.cs:line 188
                                           at StardewValley.Menus.SaveGameMenu.update(GameTime time) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Menus\SaveGameMenu.cs:line 44
                                           at StardewValley.Menus.ShippingMenu.update(GameTime time) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Menus\ShippingMenu.cs:line 201
                                           at StardewValley.Game1.updateActiveMenu(GameTime gameTime) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Game1.cs:line 1682
                                           at StardewValley.Game1.Update(GameTime gameTime) in C:\Users\Barone_\Documents\Visual Studio 2010\Projects\Farmer\Farmer\Farmer\Game1.cs:line 1433
                                           at StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime)
                                        
                                        For reference I'm only using AutoSpeed.dll, VariableGrass.dll (which doesn't seem to be the cause even though that one had an error itself for me), TrainerMod.dll, Matt's calendar mod, and of course the Junimo mod too. Are you using any of those other ones yourself?
                                         

                                        Share This Page