[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


    As many are aware, several of Stardew Valley's mechanics aren't all that random. The most well-known is probably the way "mushroom levels" and infestations in the mines persist throughout a day and seemingly travel "upward" through the mines as the days progress. This app reads a save file (or takes a game ID number) and simulates the pRNG calls to predict such events. It is somewhat cheaty, but hopefully still interesting and useful to those who choose to try it.

    Since all the predictions are based on the game ID and other information from the save file, it's only useful for people playing on the PC & Mac versions. Currently, the following items are predicted:
    1. All mushroom levels, regular monster infestations, and slime-only infestations in the mines. This is presented in a calendar format and is scrollable a month or year at a time.
    2. Items available from the Traveling Merchant Cart. This is browsable by week or searchable within various timeframes.
    3. The Wednesday fish and Saturday cooked item sold by Krobus in the sewers. Searchable.
    4. Wallpaper and flooring items sold by Pierre and the Joja Mart.
    5. Contents from cracking open geodes at Clint's shop. Currently only browsable by geode count, I'll probably be adding searching to this too as well as adding an indicator on those minerals which still need to be donated. Note that both of those features are available in-game using the Geode Info Menu mod.
    6. Trains passing by at the Railroad. Note that if you load/reload a save on the day of an expected train, the train will not spawn.
    7. Various overnight events on the farm. This is just the chance that the event is chosen and checked; additional spawning conditions could still prevent the event from happening.
    8. Feast of the Winter Star gifting assignments. Primarily useful if you didn't write down your designated gift recipient or want a sneak peek at who will be giving a gift to you.
    The app is accessible at https://mouseypounds.github.io/stardew-predictor/. To see a preview without running your own save through it, you can supply an ID to the URL like this: https://mouseypounds.github.io/stardew-predictor/?id=157948696.

    For anyone who uses it, please let me know here about any feedback or suggestions. Also special thanks to
    @margotbean whose comments over on the wiki helped get development moving again.

    Frequently Asked Questions (FAQs)
    1. Can you add the Dish of the Day sold at the Saloon?
    • Unfortunately, the RNG seed used for that includes the number of steps taken, so that is not predictable long-term.
     
      Last edited: Nov 1, 2018
    • TaleSpinnerGames

      TaleSpinnerGames Industrial Terraformer

      Thanks for making this available. It was very reassuring to see that I didn't miss a red cabbage or red cabbage seed all the times I have forgotten to check the traveling cart in my current game.
       
        Darkcedars likes this.
      • Lilliput

        Lilliput Oxygen Tank

        Well now you've just gone and driven Welwick out of the fortune telling business. You'd better have a good fortune for me when you set up a booth at the Stardew Valley Fair this year!
         
          Darkcedars, ManaUser and MouseyPounds like this.
        • BentFX

          BentFX Cosmic Narwhal

          Gotta give this a test run... I re-rolled SEVERAL new save files. The app claims that the one I'm choosing to play will get a Red Cabbage on Spring 14, for 780g.

          After looking over my existing saves it looks like the app seems to know what it's talking about. Thanks!

          EDIT: Yup, just like clockwork. Cheapest Cabbage I've ever seen on the travel cart. Now I've just got to dig in a bit deeper and find where the prismatic shards are hiding.
           
            Last edited: Feb 24, 2018
            ManaUser likes this.
          • BouncingCactus

            BouncingCactus Big Damn Hero

            The fact that I can now have an overview over where the mushroom levels spawn without having to mod the game is very significant. This is really neat.
             
            • margotbean

              margotbean Phantasmal Quasar

              The mushroom floor calendar is a game-changer. Goodbye sticky notes and composition books sitting next to the computer, full of illegible scribblings, and never labeled by saved game.

              Thanks @MouseyPounds for making the panels tabbed, so I can avoid spoilering the feast of the Winter Star. I've checked after the fact, and it's 100% accurate. In fact, I've been testing everything except geodes, and it's all 100% accurate. Amazing work. Kudos!
               
              • Honeywell

                Honeywell Subatomic Cosmonaut

                MouseyPounds, you are amazing! I'm not sure I can ever use this (I'm weak and it's too tempting) but I love that it exists.

                P.S. I found your save analyzer last week and love, love it. Thanks so much.
                 
                • Saraneth

                  Saraneth Big Damn Hero

                  Love this, thank you.

                  Can anyone help me with the cave calendar? I can only seem to look at Spring and Fall. Looking at "Previous" and "Next" months jump me two months.

                  edit:
                  Actually, the weeks are also jumping by two in the Merchant Cart view.

                  I didn't have this problem looking at the bare numbers. Only when I loaded a file in have things started skipping. :(
                   
                    Last edited: Feb 25, 2018
                  • MouseyPounds

                    MouseyPounds Cosmic Narwhal

                    What browser are you using? I've seen that a couple times in testing on Firefox, but haven't been able to reliably reproduce it. When it did happen, a force reload (ctrl-f5) or closing and reopening the browser cleared it up.
                     
                    • Saraneth

                      Saraneth Big Damn Hero

                      Chrome, on a Mac. Reloading the page and re-uploading the file seems to have worked. Thank you.

                      It happened after first checking the page with the bare number, then uploading the file on the same page. I was just able to reproduce it.

                      For example, if I have a file that matches your example above, I might go to this url to check the bare information:
                      https://mouseypounds.github.io/stardew-predictor/?id=157948696
                      Then, inside *that* page, I upload my actual file (e.g., FarmerDan_157948696), and suddenly, everything moves in twos.
                       
                        MouseyPounds likes this.
                      • MouseyPounds

                        MouseyPounds Cosmic Narwhal

                        Thanks for the report. I'll see if I can figure out what's going on.

                        EDIT: @Saraneth I think I found what's going on a pushed out a potential fix. Please try it again when you get a chance and see if it still happens.
                         
                          Last edited: Feb 25, 2018
                        • Saraneth

                          Saraneth Big Damn Hero

                          That's got it! :D
                           
                            MouseyPounds likes this.
                          • MouseyPounds

                            MouseyPounds Cosmic Narwhal

                            The Geode panel now indicates which items still need to be donated (using little Gunther icons).
                             
                            • ManaUser

                              ManaUser Scruffy Nerf-Herder

                              I don't know if this will be worth your time to look at, but I'm encountering a technical problem.

                              Apparently the javascript "class" statement is not supported by all browsers yet. Won't be a problem for anyone using a recent version of one of the "big three", but not everybody does. I'm using Pale Moon since Mozilla seems determined to ruin Firefox, unfortunately it's developed by a small team, and apparently they haven't got around to this yet.

                              No clue how hard it would be to re-write without using "class", just putting it out there that it would be more accessible, to an admittedly small number of users, if it didn't.
                               
                              • MouseyPounds

                                MouseyPounds Cosmic Narwhal

                                Thanks for the feedback. I will see if there is an alternative way I can define the random class, although there may be other ES6/ES2015 language features used in the project as well.

                                EDIT: @ManaUser please give it a try now. I rewrote the RNG class to avoid ES2015-specific features such as the class keyword.
                                 
                                  Last edited: Mar 5, 2018
                                • ManaUser

                                  ManaUser Scruffy Nerf-Herder

                                  Awesome! It does indeed work for me now. Thanks a bunch.

                                  Edit: I imagine you already checked this, but I can also confirm that it is (still) giving the correct results. Checked the mines and merchant. Nifty.
                                   
                                    Last edited: Mar 5, 2018
                                    MouseyPounds likes this.
                                  • margotbean

                                    margotbean Phantasmal Quasar

                                    Opened 4 geodes and 42 omni geodes yesterday. 100% accuate. :D
                                     
                                    • MouseyPounds

                                      MouseyPounds Cosmic Narwhal

                                      OK, Geode searching is now in, and since that was the last big thing I had planned, we are officially out of "beta." My current farmer is gonna need to crack almost 500 more geodes before he can get a Prismatic Shard that way. :cry:
                                       
                                        margotbean and BentFX like this.
                                      • margotbean

                                        margotbean Phantasmal Quasar

                                        So, for your next trick, you're going to reverse-engineer the game ID that will net you a Prismatic Shard within the first 20 geodes cracked, right? (heh heh, evil laugh) ;)
                                         
                                        • MouseyPounds

                                          MouseyPounds Cosmic Narwhal

                                          Although I haven't verified it in-game, the Predictor says Game ID 100000734 will get you one as early as possible (geode #16). Other IDs will do so as well, but that was the first one that did it when brute-force searching via a quick perl script.
                                           
                                            margotbean likes this.

                                          Share This Page