RELEASED [SMAPI 0.37+] Automatic Open/Close Animal Doors at specific Time

Discussion in 'Gameplay Mechanics' started by montana123, Mar 11, 2016.

  1. montana123

    montana123 Subatomic Cosmonaut

    Hey guys it's me again!

    Today I coded something by request from this Thread: http://community.playstarbound.com/threads/auto-close-open-barn-and-coop-gates.109436/

    The Mod closes on a specific Time of Day all your Animal Doors! You can change the Time in the Config File, but you should leave the Timing standard because it could close the door before your animals get out.

    The Config File is self pretty explanatory.

    Please report all Bugs in this Thread! Thanks!

    Make sure to check if your Animals are in Coop before Door closes or they get bad Mood! I'm not responsible for Dead/Unhappy Animals!

    GIF:
    [​IMG]
    Bad Cut im sorry but it opens at the end :D

    ----------------------------

    Download Links:

    Version 1.1

    OLD VERSION 1.0
    ----------------------------

    Changelog:

    Version 1.1:
    1. Gamecrash and FPS loss fix try - Door should open/close only once now
    ----------------------------
     
      Last edited: Mar 12, 2016
      极品小猫, Pietoro, Vith and 10 others like this.
    • Trestkon

      Trestkon Void-Bound Voyager

      Oh wow this could be useful, I'll try it out and let you know if there are any problems. ^^

      EDIT: Works perfect for me, thanks montana123! :confirm:
       
        Last edited: Mar 11, 2016
        montana123 likes this.
      • montana123

        montana123 Subatomic Cosmonaut

        Thank you! Please note that on the Time you set your Timer for Open/Close the Gate is inaccessible/spamming Open/Close all the Time. After it changes Time ex. 6:00 to 6:10 you can close it again. Maybe I'll change it in the future.

        Also Note: Make your timer after the regulary Anime Shedule. I think at 16:00 they return to their Buildings. If you close to early they get locked out!

        ALSO ALSO NOTE: If you sleep before that Timer the Door remains open! I can't get to fix it. I tried but it was very buggy (Animals not leaving their Home, Animals leaving their Home while Door was still closed[Dont ask me how they did this :D]).

        Feel free to report bugs here.
         
          Trestkon likes this.
        • Trestkon

          Trestkon Void-Bound Voyager

          So during the times I've set, I can't/shouldn't access the animal gate to prevent from losing the closing/opening feature?

          Alright thanks for the heads up on this, so if I sleep it will remain open but will I still be able to open and close it manually? And if that does happen will it still retain the open/close feature or will it stop it?

          EDIT: and just to verify on the close times - Animals seem to return to their homes after the day between 17:00 - 17:00 around there maybe even 17:40 or so but definitely around there.
           
            Last edited: Mar 11, 2016
          • montana123

            montana123 Subatomic Cosmonaut


            You can open and close it manually. Everytime it reaches your desired time it close / open the doors.

            You probably should pick a time after 17:40 where the animals are back in their shed.
             
            • eternal_wait

              eternal_wait Scruffy Nerf-Herder

              Very useful mod. I keep forgetting to close the gates because of long time in the mines.
              Quick question though (noticed config file only mentions rain days) , is it going to open gates on winter/snow days ?
               
              • montana123

                montana123 Subatomic Cosmonaut

                No it never opens in winter. It checks whether its winter first. It doesn't open in winter but it closes though
                 
                • hihi427

                  hihi427 Tentacle Wrangler

                  I think this mod maybe is the reason cause my game stucked.
                  what i did is just walking around the farm, then suddenly game frozen and the bgm stucked.
                  I checked there wasn't any error log. I restarted the game several times, but the problem still. I tried to run game without this mod, everything was fine.
                  It seems like random game crash, but I can take a guess here.
                  Maybe it is because Robin was constructing my coop(my 1st building) during that time.
                  What will this mod do if a barn or coop is not completed yet? Perhaps there is a bug. please take a look.
                   
                    Last edited: Mar 12, 2016
                    AnOfficialLoser likes this.
                  • AnOfficialLoser

                    AnOfficialLoser Void-Bound Voyager

                    I just wanted to say that after testing each one of my mods, I am also getting crashes just like hihi427 from this. Robin is also building my coop at the moment, and I do not have any other buildings at this time.
                     
                    • Trestkon

                      Trestkon Void-Bound Voyager

                      Hmm interesting thanks for the heads up on that problem guys, I might have been wondering the same if I had switched to different characters.

                      Mine were already built so I didn't run across that yet on my current character but I still plan on upgrading my other barn when I can play again so lucky I found this first.
                       
                      • montana123

                        montana123 Subatomic Cosmonaut

                        Well it doesnt break your Save or something like that. I will definetly look into this bug now guys. So is it save to say, that this crashing bug only occur if you upgrade the barn? Or does it happen all the time? I must say when I tested this mod I found out that my game was lagging somehow. I didn't know it was coming from the mod.
                         
                        • montana123

                          montana123 Subatomic Cosmonaut

                          I uploaded a new version. Can you try it out maybe? Possible fix for this.
                           
                            hihi427 likes this.
                          • eternal_wait

                            eternal_wait Scruffy Nerf-Herder

                            I had the same bug on a fresh new game.On first day robin is building the coop the game will get stuck as soon as the openDoors time hits the clock.

                            Tested with the new version. The game did not crash and on the openDoors time the game paused and a message displayed "under construction". Seems to be the same message displayed when interacting with the building while being built.

                            Thanks a lot can continue that save now :)
                             
                            • hihi427

                              hihi427 Tentacle Wrangler

                              yea "under construction" should be worked

                              thank you
                               
                                Last edited: Mar 12, 2016
                              • Qwynn

                                Qwynn Industrial Terraformer

                                Out of curiosity, is there a reason we need to open and close the doors? I just leave them open all the time so they can go out during the day and in at night. Does leaving it open over night or in rainy weather make them grumpy or something?
                                 
                                • Trestkon

                                  Trestkon Void-Bound Voyager

                                  Well I hear leaving it open may cause a random event where a wolf will come in and chow one of your livestock, hasn't happened to me yet during the times I did by accident.

                                  Other than that leaving it open over night just leaves them in a "fine" mood during the day when their out but well for me goats especially get sad by it but other animals are "fine".

                                  Opening it the next day will make them go happy mode I guess this generates hearts/animal love points faster.
                                   
                                  • Skydruid

                                    Skydruid Aquatic Astronaut

                                    Is the mods folder the right place for the config file? When it created it, it just left it there. Should it be in that folder or put elsewhere?

                                    The reason I ask is that it isn't closing on rainy days, though that is set to false. Should it be true? Hm.
                                     
                                      Last edited: Mar 14, 2016
                                    • montana123

                                      montana123 Subatomic Cosmonaut

                                      Hello,

                                      so this is how it works:

                                      The Config file can just be in the mods folder. It has to be there. After the Closedoortime is reached Ex: you want it to Close at 18oClock = 1800 in Config, it will close the door from all your barns and coops. It will only get executed once per day. I hope this helps!
                                       
                                      • Skydruid

                                        Skydruid Aquatic Astronaut

                                        That it does! Thank you, just wanted to make sure it was in the right area and was working. I played for a bit more and saw it working. Still opens during rainy days though... weird. Probably because I have the cjbcheat installed with its weather control.

                                        But! Thank you! This is one tedious chore of managing animals that is well and truly made better by your mod. Thank you!
                                         
                                        • montana123

                                          montana123 Subatomic Cosmonaut

                                          I'm glad you like it! :)
                                           

                                          Share This Page