This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Talk:Luck

From Stardew Valley Wiki
Jump to: navigation, search
This talk page is for discussing Luck.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Dying in the Mines

Found that loss of items, etc. is affected by luck in Event::checkForNextCommand. Those who wish to verify, search for "minedeath" and/or "hospitaldeath" (in quotes). margotbean (talk) 13:32, 19 August 2018 (BST)

Double the Number of Crops

Just want someone to confirm this or point out that this is wrong, but I'm pretty sure that luck affects the chance of getting double crops for all crops (except those harvested with a scythe). By editing the luck value of some food to be 1500 and then eating it in-game, I was able to get this doubling to happen every time. I have a video of me doing this if someone wants to see, but I can't add the link in here. I tested this on both version 1.4 and 1.3.36.--Ivordir (talk) 23:04, 29 November 2019 (UTC)


Mechanics

Most random events in the game are determined by generating a random double-precision number in the range 0 to 1 that is then compared to the event's chance of happening. For example, when panning for ore the base chance for finding iridium is 1%. This means iridium is only found if the random number is less than 0.01.

Daily Luck typically increases the critical threshold for an event without any change in magnitude: a 0.01 value of daily luck changes the iridium ore panning threshold from 0.01 to 0.02. On the other hand, buffed luck values are significantly rescaled before being applied, with large variability in scale factors. For ore-panning alone, scale factors include 0.001, 0.002, and 0.04 (when deciding the type of ore, whether there's an extra item, and deciding the type of extra item, respectively). For iridium ore specifically the scale factor is 0.001, so if a player has a 0.1 value of Daily Luck and a +1 Luck Buff, the threshold is 0.021 (2.1% chance).

However, the exact meaning of Daily Luck and Luck Buff is always context-dependent, because every event applies luck slightly differently. Nebulous Maestress‎ talk) 20:11, 11 March 2020 (UTC)

I've moved this section to this talk page because several terms might not be understood by users (double-precision, critical threshold), and it seems too technical for the main page. margotbean (talk) 20:19, 11 March 2020 (UTC)
My top priority was adding some (still-present) text providing some sense of the magnitudes of Daily Luck vs Luck Buffs. Because for a long time I'd thought that Daily Luck must be practically irrelevant if its value is a hundred times smaller than any Luck Buff.
I do think some additional explanation such as this Mechanics section is necessary. "1% more likely" can mean chance changes from 1% to 2% (correct) or to 1.01% (incorrect). I think the only way to clarify the true meaning is to provide an example.
Unfortunately, the code uses different numbers in nearly every case. I don't know whether anyone else has a better suggestion for an example -- one where DailyLuck and Luck Buff are both applied, both use semi-typical scale factors, but there aren't alot of other factors muddying the case. I realized at the last minute that panning-for-iridium really undervalues luck buffs, and tried to simultaneously salvage and de-conflict. Nebulous Maestress (talk) 20:41, 11 March 2020 (UTC)


Hmmm?

So, I have a question, based on the values of the front page. If the value is exactly 0.07, will it show good luck or great luck? If the value is exactly 0.02 will it be neutral or good on TV? Just wondering, as this seemed confusing. Fun Cupcake i81 (talk) 03:28, 3 April 2020 (UTC) =)

Looking at TV::setFortuneOverlay, a value of 0.07 is good luck (pyramid), and 0.02 is neutral (circle). -0.02 is neutral and -0.07 is bad (bat) BlaDe (talk) 04:34, 3 April 2020 (UTC)
I've made some changes that should help clarify. ≥ means "greater than or equal to". margotbean (talk) 16:48, 3 April 2020 (UTC)

Double Crops Probability

I know chances of doubling crops has already been added to the list but I'm wondering if it's relevant to include what the probability of that is?

if (r.NextDouble() < Game1.player.team.Average LuckLevel() / 1500.0 + Game1.player.team.AverageDailyLuck() / 1200.0 + 9.9999997473787516E-05)

From the formula it's looking like a .01% base chance plus .066% chance per +1 food buff plus/minus .008% based on daily luck, correct me if I'm wrong. The chances of it seem so small it's almost negligible. I've seen people ask if it's better to eat something with luck buff or farming buff before harvesting to maximize profit and if this is the case it's definitely better to go with the farming buff. Daiby (talk) 17:44, 24 August 2020 (UTC)

Luck and fish

There is only one place where luck affects what fish bite. On the forest farm, the first check is for a woodskip, and the chance is 5% +/- dailyLuck. BlaDe (talk) 19:34, 22 October 2020 (UTC)

Luck Variability on Replay

At Talk:Garbage Can#Garbage Can Contents Luck Dependency we find a discussion with alternate views about daily luck. One editor says daily luck can change upon replaying "the previous day"; the other doubts it.

I wouldn't want to claim anything absolutely, but my extensive experience would lead me to doubt the variability. For one thing, the value of daily luck is registered in the save file, which does not change. (But maybe daily luck is not actually set according to the saved value? I can't say.) In almost four years of play, I've never seen a change in luck reporting on the TV - enough to nudge a value into another reporting category. A bit strange, since saved luck can be minimally close to a reporting category boundary. (What else but the saved value could provide such consistency? And why bother saving otherwise?)

But I only replay a "previous day" occasionally. I often restart a given day that was never completed. (My play style and continuous available play time seldom permit more than one game day without interruption.) What I'm unsure of is if a restart (without save) counts as a replay, in the view of the referenced editor. I have noted how I almost never hear a train going through Stardew Valley, so the game apparently makes a distinction. (The game presents trains only when current play extends continuously BEYOND the game day that was loaded, never on the day of the load: a dubious feature, in my opinion.)

How much is verifiable by code reading? Load behavior should be readily accessible, I assume. But does the code otherwise dynamically alter the daily luck value during play and replay? What is the means by which variation occurs from one load to another, or can it occur even more sporadically? And why would such mechanics be done at all? It seems more reasonable to conclude that the mechanics are simpler, and that daily luck is just daily luck, one day at a time, one load after another. Trains depend on luck, but they depend on one more loading feature unique to them and not based on luck. That's my reasoned conjecture based on experience.

It's also my experience that luck is overrated as a predictor. I've had too many days of consistently bad luck all day when daily luck is supposed to be good. And vice versa. Some of my best mining or fishing days have been "bad luck" days. My recommendation would be to do what you want, take what you get, and forget about expectations. That's more like real life anyway. Good luck is even more welcome when you don't expect it. And if you just can't stand your bad luck, you can always replay. Butterbur (talk) 21:07, 10 November 2020 (UTC)

I can answer the code questions. DailyLuck is set for the day on save. Abandoning a day and restarting will not change this value. However, if you revert to a previous day, it is possible for the dailyLuck to be calculated different when saving (on mobile this revert can be done in the memus, on pc the save folder contains and _old copy of your previous day save). The number of steps taken on the save is used in the RNG object that determines dailyLuck. Also, having machines still processing at 6am of the new day can affect the value of dailyLuck. To help illustrate this, I have a mod on nexus ops (Daily Luck and Weather Predictions) that shows you what your luck would be on the following day if you were to sleep without taking any more steps. BlaDe (talk) 23:26, 10 November 2020 (UTC)
Thanks for replying! It's pretty much as I thought: loading takes the saved value. Reverting a day itself pretty much erases that day, so when you save again, it is entirely reasonable that you should have no expectation at all about that later day. I have seen both luck and weather change under those circumstances many times. What was not entirely clear in the prior discussion was "change in what day". You have verified that once saved, the daily luck for that day is set and does not change. If you revert a day (throw it away), all is new when you save the next day again. And you have a mod to show the calculation of luck (and weather!) before the game makes it. (Nice).
I copy every day's save files into a set of separate folders, thus saving the entire progress of a game. I can take any prior day and load it again, and later restore the current latest and proceed with play from there. This has been most useful to check on all sorts of game behaviors that shift or are modified as play progresses, like forage or crop prices (which once has all sorts of anomalies on the wiki lists). I've also reverted several weeks if I don't like the way a certain strategy has been developing, to see if another alternative checks out better in comparison. That allows me to explore many play variations from an equal starting point. With that, you get a better feel for what kinds of plans tend to work out best. But knowing that save points are stable is key to this kind of exploration. And there are values saved in the files that are not used upon load: artifacts of game code changes that may occur without notice. Some other types of random elements work that way. Good to know. Butterbur (talk) 07:51, 11 November 2020 (UTC)