Tool Storm Modding API

Discussion in 'Mods' started by Handsome Matt, Mar 7, 2016.

  1. ThatNorthernMonkey

    ThatNorthernMonkey Aquatic Astronaut

    Thank you for the quick reply, missed the manifest.json! Time to tinker.
     
    • ThatNorthernMonkey

      ThatNorthernMonkey Aquatic Astronaut

      Sorry, still getting the hang of this. I'm trying to work out how to use the accessors? I want to see what is in my farmers hand after an event is triggered, im assuming by using InventoryPageAccessor._GetHeldItem() but I'm not quite sure how to utilize it in code. Am I trying to use them incorrectly? Or can you give a quick example? Any help appreciated!

      Edit: Hrrmm looking at the Farmer class - ActiveObject looks about right? Not sure how to get the string name of the object as it is an Item object though..

      Edit 2: Specifically, I'm looking to see if I have a certain crop in my hand after an event - so not a tool!
       
        Last edited: Mar 8, 2016
      • Pinkishu

        Pinkishu Phantasmal Quasar

        Generally you shouldn't use accessors in your mod at all.
        Not directly sure how in the current state you can cast from Item to Object though :p
         
        • ThatNorthernMonkey

          ThatNorthernMonkey Aquatic Astronaut

          Yeah its been so long since doing anything programming related i'm just trying to get my head around it again :) Set myself some really arbitrary task to get going. When left-clicking a growing crop with a blueberry in your hand, output the name of the growing crop to the console. I'll keep plugging away :p
           
          • Pinkishu

            Pinkishu Phantasmal Quasar

            There health bars mod updated to newest storm. Still need to tweak it some more though and make it fancier
             
            • ThatNorthernMonkey

              ThatNorthernMonkey Aquatic Astronaut

              Any ideas why when using the example MovementSpeedModifier mod with a speed >= 6, crops just disappear from the tile when running over them?
               
              • SatyPardus

                SatyPardus Void-Bound Voyager

                Weeeeell...damn...

                I just nearly finished my Mod Loader for Stardew that is pretty much like this. Just that mine has an Ingame Mod Menu and a Launcher with Available Mods to download ._.
                I think i gonna drop that Project then :(
                 
                • SgtPineapple1st

                  SgtPineapple1st Subatomic Cosmonaut

                  I'm building, but I keep getting StormLoader.vshost not StormLoader.exe
                   
                  • ClxS

                    ClxS Pangalactic Porcupine

                    An ingame mod menu would be pretty cool, maybe that could be turned into a standalone mod for Storm?
                     
                    • Pinkishu

                      Pinkishu Phantasmal Quasar

                      Define "pretty much like this"
                       
                      • SatyPardus

                        SatyPardus Void-Bound Voyager

                        Also uses Mono.Cecil for Injection, has an easy to use event hook, can cancel events, change values on called methods.
                        It's just not so smoothed out like this one (Probably because i'm working alone^^)

                        But yeah. I'm not as far as this Project, so i gonna leave it to the pro's :D

                        Yeah maybe. I gonna look how this turns out.


                        Edit: Looked at the Code of Storm. I am faaaaar away from being on the same level^^
                        My modloader is 4 times as hard to use as this. xD
                         
                          Last edited: Mar 8, 2016
                        • ThatNorthernMonkey

                          ThatNorthernMonkey Aquatic Astronaut

                          I can't seem to find a way to get a Wrapper.Object by its index? I want to retrieve information about a crops harvest object (e.g., a Cauliflower object from a Cauliflower crop) from the crop itself (using the IndexOfHarvest property). Is there any way to do this? I'm looking to expose things like the name and various prices for different qualities and things. Thanks
                           
                          • Powermate

                            Powermate Space Spelunker

                            Hey guys i have a little problem with starting the StormAPI, ill start it and it shows some errors for 1 sec and crashes instantly and there are no errorlogs to find. I buildet it after the tutorial from Matt and everything seem to work fine until i wanted to start it. Someone know what is wrong? xD thx

                            [​IMG]
                            [​IMG]
                            [​IMG]

                            Everything is fine here right?
                             
                            • Handsome Matt

                              Handsome Matt Aquatic Astronaut

                              rename injectors-1.02 -> injectors
                               
                              • ThatNorthernMonkey

                                ThatNorthernMonkey Aquatic Astronaut

                                Request: Could you add the following Crop properties please?

                                List<int> phaseDays
                                List<string> seasonsToGrowIn

                                Thank you.
                                 
                                • Powermate

                                  Powermate Space Spelunker

                                  Okay that helped thanks, there is another problem the mods doesnt seem to load in and some of them cauz crashes.
                                  Fishing Mod = Crash
                                  Movement Modifier = Crash
                                  Durable Fences = Crash

                                  Timespeed Mod = Work (But not loading in)
                                  Monster Healthbar = Work (But not loading in)

                                  The API tells me that it loaded 0 mods.
                                   
                                  • Handsome Matt

                                    Handsome Matt Aquatic Astronaut

                                    need to recompile mods which is why they're not working, we renamed a lot of things (we won't rename things after release so mods won't break)

                                    mods need a manifest.json to load properly.

                                    (i recompiled Durable Fences, but other mods need recompiling, which I'm sure will be done at release)
                                     
                                      Last edited: Mar 8, 2016
                                    • Pinkishu

                                      Pinkishu Phantasmal Quasar

                                      Should load if you place chatBox.png into its folder xD and the manifest of course
                                       
                                      • Powermate

                                        Powermate Space Spelunker

                                        Okay so im just waiting for the release?
                                         
                                        • Afterscore

                                          Afterscore Weight of the Sky

                                          We all are friend. We all are.
                                           

                                          Share This Page