On the effects, or lack thereof, of Luck on your game

Discussion in 'General Discussion' started by ShneekeyTheLost, Feb 9, 2018.

  1. ShneekeyTheLost

    ShneekeyTheLost Master Astronaut

    This post is rated N for Number Crunching. This post contains scenes of graphic math and explicit calculations that are not suitable for all audiences. Viewer discretion is advised.

    As always, this is not intended to try to tell people 'how to play the game', this is merely intended as a resource for those who are curious about the effects depicted herein. There are as many ways to play the game as there are people who play it, which is awesome. Much like a scientific paper, I have discovered a phenomenon, experimented with it, tested my conclusions, and now I am releasing my results for peer review.

    Introduction and Premise

    Luck has had a very storied history with Stardew Valley. There are many guides and videos on youtube floating around which instruct people 'only do x on a good luck day' or 'never do x on a bad luck day'. However, I have come to the conclusion that luck has a significantly lower impact on the average gameplay than most perceive it to have, based on many misconceptions and misunderstandings of how it works. It is the purpose of this thesis paper to dispel these misconceptions and misunderstandings and bring the light of reason to this dark corner of superstition.

    While normally I would cite references in the bibliography at the end of a Thesis, I feel it would be of tremendous assistance for the reader to share this (thanks to user Lilliput for linking it to me) which has the bulk of information I was already collecting handily put together. We can use this as a reference to go over the material together. if you like.

    Luck: what it *actually* does

    The list of things Luck actually affects is depressingly brief, and does NOT include many things previously believed by the majority as being influenced.

    A list of things which ARE impacted are as follows:


    • Rare drops from animals (duck feathers and rabbit's feet)
    • Chance of getting 'extra' wood from trees
    • Chance of 'extra' harvest from crops which have that chance (potatoes, blueberries, cranberries, etc...)
    • Coal drops from normal rocks
    • Ladder spawn from rocks (as modified by how many rocks are left in the level, but NOT including ladders spawned from enemy kills)
    • Chance of Geode drop from rocks (and chance of a second geode dropping)
    • Chance of getting an item, rather than 'trash', from trash bins in town
    • Chance of treasure chest appearing in fishing minigame
    • Chance of a Glaive appearing in the chest (but NOT other artifacts)
    • Amount of lightning per thunderstorm day (higher luck equals lower amount)
    • Chance of succeeding with Slots at the Casino
    • Chance of your marriage partner not getting jealous about gifting other marriage candidates
    A list of things which are commonly held to be affected, but are in fact *NOT* affected by luck:

    • Anything related to the Prairie King minigame (powerups, coins, quantity/pathing of mobs... ANYTHING)
    • Anything to do with the Junimo Cart minigame
    • Playing Calico Jack (i.e. blackjack)
    • Quality of Foraged drops (exclusively modified by Foraging skill, and the Botanist perk if present overwrites the chance with guaranteed iridium)
    • Quarry ore spawns
    • Artifact drop chance from any factor (including worm tile, treasure chest from fishing, tilling dirt in the mines, mob drops, or any other method of obtaining artifacts)
    • What is dug up from tillable dirt in mines
    • What drops from mobs
    • What comes out of a Geode when processed by Clint (while geodes dropping may increase, what you get from them is a static chance based on how many you have previously processed)
    • Chances of getting trash when fishing
    • Quality of fish caught
    • Most things from treasure chest from fishing minigame (except Glaive)
    • How much fight a fish puts up
    • Quality of animal drops
    • Chance of special event happening overnight (meteor, witch, fairy...)
    The effects of food bonuses on luck

    There are a few food items which have bonuses to luck, so just how do those figure in?

    After some digging around, I have determined that each '+1' is a +.1, or a 10% bonus to luck modifer. HOWEVER, food bonuses don't stack, so you can't just eat a half a stack of Lucky Lunches and expect enormous gains. In theory, if there was a drink which added a luck bonus, it might stack with a food item, however there are no drinks in the game which provide a luck bonus.

    On the upside, this means what you eat can have a signficantly higher impact than your daily modifier. Even with maximum bad luck (-10%), a Lucky Lunch will still provide you with a total higher luck bonus than the maximum good luck chance per day (+20% net, higher than the 10% max bonus from daily luck).

    However, as we demonstrate in the next section, that isn't saying much...

    The significance and impact of Luck upon those things which it DOES influence

    And here's where we realize just how insignificant luck is on your day to day life. You see... the problem is that the total luck modifier is multiplied into the chances of a given thing happening, and the chances of most of these things happening are very low. For example, let's say you had a max-luck day (+.1) and a Lucky Lunch (+.3) for a total of +.4 or a 40% bonus on an event triggering. That sounds like a lot, doesn't it?

    Well, unfortunately, it falls into the same trap that the critical hit multipliers from the combat perk tree fell into: when you have a very small percentage chance of something happening, a percentage of that percentage is even smaller. For example, let's say you are harvesting your potato crop, which have a 10% chance of dropping a second potato. ASSUMING you have max luck and lucky lunch (maximum possible swing of 40%), you now have a 14% chance of one dropping, for a total change of a mere 4%.

    That means if you have a 100 potato farm plot, and harvested them all under maximum effects of luck, instead of getting, on average, 110 potatoes, you'd get 114 potatoes, a total of 4 potatoes more. And since secondary products are *always* normal quality and unaffected by fertilizer, your net gain would be, on average, 352g, assuming Tiller perk, or 320g without. Which would cost you a Lucky Lunch to get.

    Most of the factors that Luck impacts are significantly lower base chance of happening than that, which means Luck's impact is correspondingly lower. The only curious exception to that is ladder generation from rocks.

    As you may or may not know, the odds that breaking a rock (which includes metal ore, gem ore, or any other placed stone block, but NOT including large stones) increase as the number of rocks decreases, ending up with a guaranteed spawn on the final rock (assuming one hasn't already spawned). This is done to ensure that you never get stuck without a potential way down in any given level. However, this also means that as the odds of this happening goes up, the impact of the luck modifier also goes up, meaning you are more likely to get a ladder to spawn from breaking rocks sooner than anticipated. However, as this does NOT impact the odds of ladders spawning through any other mechanic, including mob kills, this isn't as impactful as one might think, unless one simply dodges enemies in favor of destroying rocks, or using bombs to clear rocks rapidly (a.k.a. the 'bomberman' method of clearing levels). Furthermore, the slight penalty on a maximum bad luck day does not significantly delay your ladder from spawning all that much, especially if you focus on fighting enemies, and the final rock in any given level, assuming no ladders are yet present, is still guaranteed to spawn a ladder, as an overriding condition.

    In Conclusion

    The effects Luck actually has on your game are quite minimal. I don't really consider it worth the time or effort to try to alter your schedule based on the given daily luck modifier, and it generally isn't worth consuming a luck-giving item unless it possesses some other benefit (such as Spicy Eel also giving a speed bonus for mine clearing).

    In particular, the only thing remotely related to fishing that is impacted by luck is the chances of a chest spawning, and the chances that the chest might contain a Glaive. It does not otherwise impact fish spawning, fish quality, type of fish spawning, or any other mechanic related to the fishing minigame. Therefore, suggestions to only fish on a good luck day are entirely baseless unless you are specifically trying to find artifacts (while luck does not increase the chances of an artifact spawning in a chest, it does increase the chances of a chest spawning to begin with, which gives you more opportunities to try for an artifact).

    The most significant thing impacted by Luck is mining, as it impacts how soon you might find a ladder, how much 'bonus' coal you might find from breaking normal rocks, and how many geodes you might get in a given run. However, simply because it is the most significant impact does not mean that it is actually a noticeable impact, as the changes are very slight. So while guides that suggest waiting until a good luck day to go mining are not without some basis, the effects of luck are grossly exaggerated in most instances, and you are denying your opportunity to descend further into the mines by holding off an entire day just because the Welwick Oracle saw unhappy omens as opposed to fluffy bunnies.

    Having said that, I have merely presented the mechanics of how Luck really works. If you wish to continue to fishing on good luck days, that is entirely your business and enjoyment, and I wish you all the best of luck, even if the game won't.
     
    • kidkid123

      kidkid123 Phantasmal Quasar

      does having a rabbits foot on you influence luck?
       
      • Lilliput

        Lilliput Supernova

        No. Odd as it seems, the only thing the rabbit's foot does-- aside from making the rabbit walk straight-- is make a really good near-universal gift. (Yes, Penny, we know, you are sad for the rabbits. Look! They just... drop extra feet! Look at them! They're not even stumbling!)
         
        • kidkid123

          kidkid123 Phantasmal Quasar

          damn, are u sure? been having an iridium rabbits foot on me all the time:wut:.."some say it may be lucky":wut:
           
          • ShneekeyTheLost

            ShneekeyTheLost Master Astronaut

            Unfortunately, 'some' is wrong. The only item in the game that impacts luck when owned is the unimplemented 'special charm' which basically gives you a minimum daily luck modifier of +.8. But you effectively have to cheat to get that item, since there is no method of obtaining it legitimately in the game.
             
            • kidkid123

              kidkid123 Phantasmal Quasar

              i did not know about this item:)..thanks for sharing;)
               
              • TaleSpinnerGames

                TaleSpinnerGames Industrial Terraformer

                Nice guide. I was familiar with the reddit post (amusingly, I discovered it when fact-checking your correction of my long-held assumption that luck impacts what you get from breaking geodes) but this is a much easier read.
                 
                • Stryder87

                  Stryder87 Giant Laser Beams

                  Gawd I love the proper grammar, spelling and punctuation throughout the ENTIRE document. It makes me sway deliriously and drool with pleasure! :geek: :party:
                  I have to go wipe my chin now.... :catdealwithit:
                   
                  • sunlite

                    sunlite Pangalactic Porcupine

                    I'm glad luck does not have as much of an impact as originally thought. I feel it prevents the game from becoming too luck-based, but also adds a small sense of depth to the game.
                     
                    • musical74

                      musical74 Space Kumquat

                      So the fact that the spirits tend to be annoyed or mad day in and day out (I seem to get the spirits don't like me much a lot) doesn't affect too much after all? I think for every "the spirits are very happy today!" I get 4 or 5 "The spirits are annoyed/very displeased and they plan on making your life difficult"...
                       
                      • rabidcow

                        rabidcow Scruffy Nerf-Herder

                        There are multiple sort-of "extra" crop effects:
                        • There's a range of min/max on some crops that is theoretically affected by farming skill, but is bugged to always use the minimum instead.
                        • There's the infinite bonus chance, which is just a flat percent set by the crop type and nothing else. (probably what you're referring to, given that it's called "extra", but NOT affected by luck)
                        • There's a chance of a double harvest for everything except sunflowers and harvest-with-scythe crops. THIS is affected by luck. If you haven't noticed it, that tells you something about the magnitude of chance.
                         
                          Honeywell likes this.
                        • ShneekeyTheLost

                          ShneekeyTheLost Master Astronaut

                          Interesting. Do you have a source to cite for this information?
                           
                          • rabidcow

                            rabidcow Scruffy Nerf-Herder

                            Ah, I applaud your skepticism. :nod: I'm getting this via dotPeek, so... the source? Of course it's possible that I'm misinterpreting it or that it decompiled wrong, so it'd be nice if somebody could verify in-game, but I don't know how easy that is...

                            If it helps, the chance of doubling, as a fraction (ie, 1 = always), is luck skill / 1500 + daily luck / 1200 + 0.0001. Where the numerical value of daily luck is, I think, plus or minus 0.1. This would mean that, where one potato plant normally yields 1.25 potatoes on average, with +3 luck and optimal daily luck it would yield ~1.252729 potatoes.

                            BTW, that 1.25 is because the bonus is 20% but repeats indefinitely until that 20% fails, leading to 1/(1-20%)-1 = 25% total extra on average.

                            And this sort of ad-hoc scaling of luck skill and daily luck is pretty typical; you can't just take 0.1 daily luck + 3 luck skill to get a combined 40% luck everywhere. For example, the chance of getting a ladder from a stone in the mines is 0.02 + 1 / stones left + luck skill / 100 + daily luck / 5 + 0.04 if there are no monsters left. So +3 Luck and 0.1 daily luck adds 5%.
                             
                            • BigBerries

                              BigBerries Tentacle Wrangler

                              This is cool, thanks for the info :) I'm playing my luckiest playthrough so far right now, I found over 4K in gems in the mines, PLUS a prismatic shard(enemy drop) on a "neutral" day with no luck-altering items. Are you sure it doesn't effect how much ore drops? I swear I get more ore and gem nodes on luckier days. What about the mushroom level? I've done a few runs to the mushroom level on various playthroughs, and it seemed to me that on the luckier days I got way more purple mushrooms.
                               
                              • ShneekeyTheLost

                                ShneekeyTheLost Master Astronaut

                                That... doesn't seem to quite add up, it may have decompiled wrong. From my experience, luck only seems to affect the 'bonus chance' from some of the crops that have them. Potatoes, for example, have a base 10% chance (not 25%) for a second potato. Cranberries have a 10% for a fourth berry, and Cranberries have... I'm wanting to say around 2% for a third berry. These are the sorts of things that luck seems to be affecting according to the code I was looking at when I was working on a mod in MonoDevelop.

                                From what I can see, the min/max thing that farming affects is quality, not quantity. I don't know why you refer to the bonus chance a few crops has as an 'infinite' chance, because that isn't accurate by any means, and I didn't see anything in the code for a flat very small chance of anything hand-picked (other than Sunflowers who do, admittedly, have their own code with regards to yield) to double.

                                So.... check your source? Because I think someone is pulling your leg. You might want to use something like Visual Studio to take a peek at what the code is actually doing.
                                 
                                • rabidcow

                                  rabidcow Scruffy Nerf-Herder

                                  I see no mechanism for that. Have you done the statistics or is this just intuition?

                                  It absolutely is not 10% for potatoes: true 1 2 8 .2. minHarvest=1, maxHarvest=2, maxHarvestIncreasePerFarmingLevel=8, chanceForExtraCrops=.2.

                                  For cranberries, the third is 10%, the fourth is 1%, the fifth is 0.1%, the sixth is 0.01%, etc.

                                  Ok, but I don't know what you're looking at because there is no luck in that loop and no other use of chanceForExtraCrops.

                                  Farming level does affect quality, but there is code to make it affect quantity that ultimately doesn't. It looks like a bug, although you wouldn't want to fix it now that prices have been balanced with it always using the minimum.

                                  Because it's an unbounded loop. while (NextDouble < chanceForExtraCrops). And 20% + 20%*20% + 20%*20%*20%... equals 25% in the limit. If that's not accurate, what limits it?

                                  The place I'm looking at is right before the special case for sunflowers. (there's an else if in between) It conditionally plays a "dwoop" sound.

                                  dotPeek is kinda like Visual Studio... JetBrains tends to know what they're doing, although decompilation can be tricky and sometimes the decompiled code is very strange. Does Visual Studio decompile? How do you get it to do that?
                                   
                                  • Honeywell

                                    Honeywell Phantasmal Quasar

                                    I can verify that I'll occasionally get extra pumpkins - I didn't associate it with luck though. You can see it here (there's a little ping and an animated pumpkin when you get double). My pumpkins were ready to be harvested again so I just experimented with it in game. Normal 480 pumpkin field:

                                    w/ coffee & pepper poppers: 482 pumpkins harvested. Repeated twice, same result.
                                    w/ coffee & spicy eel: 484 pumpkins harvested. Repeated twice, same result.
                                    w/ coffee & lucky lunch: 484 pumpkins harvested. Repeated twice, same result.

                                    I'd love to repeat each a third time just to see if I'd get 482/484 again but six times was all I could stand. lol

                                    Thanks for the info. rabidcow and for the thread, Shneekey. Looks like I'll be harvesting my cash crops (that get processed) with +luck food now if I have it... and pay more attention to how many doubles I get while I'm at it.
                                     
                                    • Lilliput

                                      Lilliput Supernova

                                      I haven't been this riveted by fractions since Achilles chased that tortoise.
                                       
                                        TaleSpinnerGames and Honeywell like this.
                                      • kidkid123

                                        kidkid123 Phantasmal Quasar

                                        about worms..as far as
                                        hey, your laugh and voice does not sound the same:))

                                        45 views..uhuu..your killing it girl:)
                                         
                                        • ShneekeyTheLost

                                          ShneekeyTheLost Master Astronaut

                                          Visual Studio is an IDE. I prefer MonoDevelop, because in addition to being free it's also Linux compatible and I happen to run on linux.

                                          Basically, what you probably want to do is download the actual source code, run through dotPeek yourself, which is *NOT* an IDE, it's just a decompiler, then open it up in your IDE of choice to view the actual code instead of having someone else do it for you, because I think they're looking at some very outdated code. You can find instructions on the Wiki here.
                                           

                                          Share This Page