[WebApp] Stardew Predictor -- Gaze into the future of your farm

Discussion in 'General Discussion' started by MouseyPounds, Feb 23, 2018.

  1. MouseyPounds

    MouseyPounds Cosmic Narwhal

    Thanks! Ooh, this one is really interesting. Train on a festival day (which I wasn't sure could happen) and a cutscene conflict. Chance of trains on the 18th and 20th on this save as well.

    EDIT: Was surprised that your dog wasn't named Snoopy given that you live on DaisyHillPuppy Farm. :D

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

    Nice, thanks. Be aware of possible subsequent trains throughout the next week on that save (Spr 19, 21, and 23). If you get trains on any (or all) of those days, please let me know.
     
      Last edited: Apr 13, 2018
      margotbean likes this.
    • Stryder87

      Stryder87 Giant Laser Beams

      Had a weird train 'thing' happen a little while ago. I heard the whistle, saw the notice, decided not to run to the other side of the map because I was, of course, down in Cindergap. About 10 seconds after that I moved between maps and the whistle happened again, and another notice! Two trains! I have no idea how it would have looked, but there would have been no way for the first train to clear the map before the second one would have started. Wish i could have been there to see that!
       
      • Pangaearocks

        Pangaearocks Big Damn Hero

        Is weather randomised or is it the same for each game?

        If not the same for each game but possible to predict, I suppose rain and stormy days could be fitting in a tool like this.


        As for trains, I've stopped caring about them. Managed to run up twice, and one time got a log, and the other nothing, so doesn't seem worth the bother. Cool to watch though.
         
        • One More Day

          One More Day Cosmic Narwhal

          Certain days have fixed weather, eg spring 3 of the first year is always a rainy day, I think there's something about a stormy day on either summer 25 or 26, and festival days are always sunny weather.

          Otherwise, weather can be affected by a rain totem, so it can't be totally fixed in advance. I'd expect it is randomly assigned at bedtime two days before, after any potential totem usage, so that the weather forecast is accurate one day in advance
           
          • Stryder87

            Stryder87 Giant Laser Beams

            Actually, I tested that. If you check the weather and it says it's going to be sunny, then use a rain totem and check the weather again, it will change to rainy.
             
            • MouseyPounds

              MouseyPounds Cosmic Narwhal

              By default, the first 4 days of a save are always sunny, sunny, rainy, sunny, and every Summer 13 & 26 is stormy.

              Yep, this is basically how it's done, although the actual assignment of weather happens the morning of the previous day so it can be changed by the totem. Additionally, the RNG seed used includes Game1.stats.StepsTaken, so it can't be easily predicted ahead of time.
               
              • One More Day

                One More Day Cosmic Narwhal

                Oh OK, I stand corrected. I just made an assumption. I've literally never bothered with a rain totem, not even in my first ever playthrough. By the time I can make them I don't care if it rains or not anyway, because I have sprinklers on everything. And I couldn't care less about whether I can catch an eel or whatever, if I need one for whatever reason then I'll just wait until the next naturally rainy day
                 
                • MouseyPounds

                  MouseyPounds Cosmic Narwhal

                  So I've learned an odd thing about trains. If you load (or reload) the save from a day where a train is supposed to arrive, it won't spawn on the reload. The only way I could get the train from margot's save to show was by loading the previous day (thanks for including the *_old save too) and then sleeping. So I'm going to need to put some kind of disclaimer on train predictions once I figure out how to word it properly.

                  I have not yet determined how the type of train is selected and if that is also predictable; the need to reload from a day before makes it somewhat annoying to test if that aspect is consistent or not.

                  There's a base 20% chance for a train to show each day, but there's an additional 40% chance that it will roll an invalid time, so the overall chance is more like 12%. And because of the way the RNG is seeded, the practical effect is you'll get about 15-18 days of no trains followed by ~7-9 days of trains spawning every other day (but only if they roll valid times). It's very similar to the slot machines in the Casino.
                   
                    Last edited: Apr 14, 2018
                    margotbean likes this.
                  • BentFX

                    BentFX Cosmic Narwhal

                    Off topic... has anyone ever been killed by the train? I know I tried standing in the way once, and if I recall I was knocked back and took damage. I want to try that after taking some damage in the mine. Need to let the bats beat me around till I'm starting to squirt then go stand on the railroad tracks. Could be a great afternoon of discovery.
                     
                    • Saraneth

                      Saraneth Big Damn Hero

                      About to start Spring 24 and no trains.
                      It's possible I may have missed them all while being indoors, (I have never seen the train announcement while I'm in one of my farm buildings or farm cave) though I did make a point to be outside as much as possible this whole last week.
                       
                      • margotbean

                        margotbean Existential Complex

                        @MouseyPounds -- I didn't experience a train on the 18th or 20th. I too made it a point to be outdoors as much as possible, after feeding the 7 animals indoors (which didn't take a lot of time) and selling 2 items at the Guild (also took probably 10 minutes of game time on the 18th).

                        I've played straight through from Fall 17 to Winter 10 or so, and the only train I got was on Winter 7 at 3:50 PM. (I was in the mountains at the time, ha ha). Of course, I spent a lot of time indoors over the course of those days.

                        Am I correct in reading the code that trains can only occur between 9am and 6pm?

                        Also, "Snoopy" is set as my favorite thing, I guess I was in a different frame of mind when I chose my dog's name. (Marlon Brando can do that to you. But I digress).

                        I'm still looking for an .xnb mod (content patcher mod) that makes the dog look like Snoopy. There's already a Charlie Brown shirt in the vanilla sprite sheet, I think. :D

                        @BentFX -- no spoilers, but a train can totally kill you. If you're truly suicidal, stand inside the right side of the tunnel when a train is coming.

                        For anyone interested in the gory technical details of weather, the wiki's modding section has analyzed it fairly well: https://stardewvalleywiki.com/Modding:Weather_data
                        There's no discussion of the RNG seed, though.
                         
                          BentFX likes this.
                        • MouseyPounds

                          MouseyPounds Cosmic Narwhal

                          For your save, I'm not surprised that you didn't get a train on the 18th or 20th since the times the game rolled for those were 1560 and 1190 respectively. I originally wasn't sure if weird times like those would get adjusted, but now I am pretty confident they simply get ignored. As I understand it, the game rolls a number in the range [900, 1800) which is then rounded down to a multiple of 10 (i.e. 900, 910, 920, ... 1790) and during the normal 10-minute update checks, if the current game time matches that time, a train will be spawned.

                          The next set of potential trains on your save are Winter 7 @ 1550 (which you got), Winter 9 @ 1180 (invalid), Winter 11 @ 1700, Winter 13 @ 1330, and Winter 15 @ 960 (invalid).

                          @Saraneth 's save had potential valid train spawns on Spring 21 @ 1310, and Spring 23 @ 940 and I am hoping it was just a case of missing the notifications because of being indoors. Ignoring invalid times, the next set of trains on that save should be Summer 10 @ 1300, Summer 12 @ 930, and Summer 18 @ 1610.
                           
                            Saraneth and margotbean like this.
                          • margotbean

                            margotbean Existential Complex

                            Missed the train on Winter 11 (was in the mines), but got the train on Winter 13 at 1330. It was a Joja train. (Boo!) ;)
                             
                            • MouseyPounds

                              MouseyPounds Cosmic Narwhal

                              OK, the train predictions are in a good enough state that I've pushed out the update. As always, please let me know if there are any problems. Although I never found it in the code, the type of train seems to be unpredictably random so only the time is included in the app.
                               
                                BentFX likes this.
                              • Pangaearocks

                                Pangaearocks Big Damn Hero

                              • MouseyPounds

                                MouseyPounds Cosmic Narwhal

                                They've got an open bug report on that issue, so it is on the radar to be fixed. Personally, I don't know enough about how that project is laid out to feel comfortable trying to make a pull request.
                                 
                                • Saraneth

                                  Saraneth Big Damn Hero

                                  Screen Shot 2018-04-16 at 11.56.09 PM.png

                                  Bingo! (Whistle blew at 1:00 p.m.; no loot this go though.)
                                   
                                    margotbean and MouseyPounds like this.
                                  • MouseyPounds

                                    MouseyPounds Cosmic Narwhal

                                    I'm looking into the overnight events (meteor, fairy, etc.) that are chosen by StardewValley.Utility.pickFarmEvent(). The RNG seed is predictable (standard daysPlayed + gameID/2) but there are prerequisites so these things wouldn't be guaranteed. For example, a bundle completion will override most events and the spouse pregnancy question would take precedence over a fairy visit, but only if the player is married and can have another child. I'll need to figure out how to present these possibilities without it being too confusing.
                                     
                                      Saraneth and margotbean like this.
                                    • BouncingCactus

                                      BouncingCactus Big Damn Hero

                                      I'm experiencing some wonkiness with the predictor and the current multiplayer beta and checking the mines.

                                      We are on day 17, summer 1, that much it true. However, the program reads this:
                                      "Day 17 of Summer, Year 1 (4545 days played)".
                                      It also tells me that, as far as the mines are concerned, I am at Day 9, Fall, Year 41.
                                      So... not sure what that's all about. Maybe it has something to do with the same issue that made it so there's no treasure chests in the mines.
                                      Regardless, it's a beta-wonky-thingie but I figured I would at least mention it.
                                       
                                      • MouseyPounds

                                        MouseyPounds Cosmic Narwhal

                                        @BouncingCactus : Thanks for the report. If possible, please upload a copy of your save here and I'll take a look. Easiest thing is to zip the entire folder for that character and attach to a post.
                                         

                                        Share This Page