RELEASED [SMAPI 0.40+] Chest Pooling/ GateOpener/ ToolCharging

Discussion in 'Gameplay Mechanics' started by mralbobo, Mar 29, 2016.

  1. mralbobo

    mralbobo Title Not Found

    Oh thought I replied... Yeah, looked into it briefly, nothings jumping out at me.
    Not particularly interested in attempting to support the betas. So.. I guess I'm just going to call this incompatible with the beta.

    Ping me on release and I'll look into an update.
     
    • BremkeW

      BremkeW Void-Bound Voyager

      I get an error even without the beta.


      [14: 35:40 ERROR SMAPI] Skipped Chest Pooling because its DLL 'ChestPooling.dll' couldn't be loaded.
      System.InvalidOperationException: Operation is not valid due to the current state of the object.
      at Mono.Cecil.MethodSpecification.set_DeclaringType(TypeReference value)
      at StardewModdingAPI.AssemblyRewriters.Rewriters.TypeReferenceRewriter.Rewrite(ModuleDefinition module, ILProcessor cil, Instruction instruction, PlatformAssemblyMap assemblyMap, Boolean platformChanged)
      at StardewModdingAPI.Framework.AssemblyLoader.RewriteAssembly(AssemblyDefinition assembly, Boolean assumeCompatible) in D :\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\AssemblyLoader.cs:line 228
      at StardewModdingAPI.Framework.AssemblyLoader.Load(String assemblyPath, Boolean assumeCompatible) in D :\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\AssemblyLoader.cs:line 77
      at StardewModdingAPI.Program.LoadMods() in D :\source\_Stardew\SMAPI\src\StardewModdingAPI\Program.cs:line 467
       
      • mralbobo

        mralbobo Title Not Found

        What smapi version and which version of the mod (link preferable)?
         
        • BremkeW

          BremkeW Void-Bound Voyager

          Version 1.9 of SMAPI and I tried both versions 1.2 and 1.3 of the mod, all from the official GitHubs. I am sure I didn't do anything wrong myself
           
          • Pathoschild

            Pathoschild Cosmos Killer

          • mralbobo

            mralbobo Title Not Found

            Minakie and Pathoschild like this.
          • suishoku

            suishoku Void-Bound Voyager

            Gate opener broke with sdv 1.2/smapi 1.10.

            [14:33:36 ERROR SMAPI] A mod failed handling the GameEvents.FourthUpdateTick event:
            System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<Microsoft.Xna.Framework.Vector2> StardewValley.Character.getAdjacentTiles()'.
            at GateOpener.GateOpenerMainClass.Event_Update(Object sender, EventArgs e)
            at StardewModdingAPI.Framework.InternalExtensions.SafelyRaisePlainEvent(IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, EventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 46
             
            • Pathoschild

              Pathoschild Cosmos Killer

              @mralbobo: I submitted a pull request to update GateOpener for Stardew Valley 1.2, and attached a compiled version you can release. I temporarily posted a unofficial update until you have time to release it. :)
               
              • chazwhiz

                chazwhiz Space Hobo

                Having trouble with ChestPooling. Using the 1.3better release, SMAPI 1.10, and SV 1.2. It does not work (just doesn't do anything) and throws the error below in the console. Occurs regardless of other mods.

                Pathoschild took a look at it in the How to fix mods broken in Stardew Valley 1.2 thread and didn't have issues with my save file - so wondering if it's something about my environment? Can different errors occur on *nix vs Windows? I'm on Mac if maybe it matters.

                Save file and SMAPI log are attached. Error occurs when something is placed in a chest.

                Code:
                [10:25:37 ERROR SMAPI] A mod failed handling the PlayerEvents.InventoryChanged event:
                Failed loading type: : System.TypeLoadException: Failure has occurred while loading a type.
                  at ChestPooling.ChestPoolingMainClass.QueryChests (System.Collections.Generic.List`1 chestList, StardewValley.Item itemRemoved) <0x1651d4900 + 0x0004b> in <filename unknown>:0
                  at ChestPooling.ChestPoolingMainClass.Event_InventoryChanged (System.Object sender, System.EventArgs e) <0x1784893a0 + 0x000ea> in <filename unknown>:0
                  at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs] (IMonitor monitor, System.String name, IEnumerable`1 handlers, System.Object sender, StardewModdingAPI.Framework.TEventArgs args) <0x16380d4c0 + 0x000f3> in <filename unknown>:0 
                 

                  Attached Files:

                • mralbobo

                  mralbobo Title Not Found

                  Pathoschild would probably be better able to answer the platform dependent question better than I can (wrote this before the game was multi-platform).
                  Dunno... 1.2 is out now, so I guess I'll peruse tonight or tomorrow.

                  Presumably you've done all the standard stuff? Removed other mods (to test), ensured your one the latest smapi, etc...
                  Also worth trying the build he did instead (maybe something screwy with my environment)
                  https://github.com/mralbobo/stardew-chest-pooling/files/938491/ChestPooling-1.3.zip
                   
                  • mralbobo

                    mralbobo Title Not Found

                  • goldilon

                    goldilon Void-Bound Voyager

                    I'm having the same problem as chazwhiz. Mod simply does not work and throws an error in SMAPI. Also playing on Mac.

                     
                    • Tinybillow

                      Tinybillow Void-Bound Voyager

                      I just wanted to share this also doesn't work for me. I tested it as the only mod used. Latest version of everything. Stardew + SMAPI. I'm also on Mac. Hmm.
                      Code:
                      [17:50:32 ERROR SMAPI] A mod failed handling the PlayerEvents.InventoryChanged event:
                      
                      Failed loading type '': System.TypeLoadException: Failure has occurred while loading a type.
                      
                        at ChestPooling.ChestPoolingMainClass.QueryChests (System.Collections.Generic.List`1 chestList, StardewValley.Item itemRemoved) <0x17a7cbca0 + 0x0004b> in <filename unknown>:0
                      
                        at ChestPooling.ChestPoolingMainClass.Event_InventoryChanged (System.Object sender, System.EventArgs e) <0x17a7c6270 + 0x000ea> in <filename unknown>:0
                      
                        at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs] (IMonitor monitor, System.String name, IEnumerable`1 handlers, System.Object sender, StardewModdingAPI.Framework.TEventArgs args) <0x16afa6b90 + 0x000f3> in <filename unknown>:0
                       
                      • Pathoschild

                        Pathoschild Cosmos Killer

                        @mralbobo That error happens when a mod uses dynamic, which isn't supported in the game's version of Mono. It looks like you only use it here:
                        Code:
                        dynamic thing = Game1.activeClickableMenu;
                        
                        You can just replace dynamic with var (which is probably what you intended), and it should work fine on Linux/Mac.
                         
                        • mralbobo

                          mralbobo Title Not Found

                          Not quite that simple. Was an old hack (I'm not a c# dev) to pull off compatibility with another mod (basically shh compiler). My impression is that the other mod got overhauled anyways, so I just ripped out that code. Anyways, I'll take your word on that being the issue.

                          New build:
                          https://github.com/mralbobo/stardew-chest-pooling/releases/tag/1.4.0
                           
                          • Tinybillow

                            Tinybillow Void-Bound Voyager

                            @mralbobo I tested it this morning and it works. *thumbs up* Appreciate your work. ^^
                             
                            • mralbobo

                              mralbobo Title Not Found

                              To be fair, pathos probably deserves most of the credit for this fix.
                               
                              • Tinybillow

                                Tinybillow Void-Bound Voyager

                                Well, that's what I meant. I appreciate everyone's time and effort on things that are considerably voluntary. Both you guys.
                                 
                                • trung111993

                                  trung111993 Intergalactic Tourist

                                  @mralbobo can you update the tool charging mod pls ? I can't play it with SMAPI 2.4
                                   
                                  • mralbobo

                                    mralbobo Title Not Found

                                  Share This Page