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:Garbage Can

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

Inventory full

Maybe a note about this? If you interact with a garbage can that has an item inside and your inventory is full, you'll be prompted a window to choose what to keep and what to discard. It's the same process for the fishing treasure chest (except here you can throw something out the inventory (not in trash to be deleted) to be taken back after when you have space. If you do it while fishing, I'm almost sure that it always fall in the water and you lose the item. But as there is no note there about this, I'm not sure if it's worth here. But I remember me being afraid of checking a garbage can and lose the new possible item automatically without ever knowing what it was. So I used not to check it. :D -- Sapador (talk) 22:33, 3 September 2018 (BST)

I added a note about it. I didn't think the Garbage Can page was the right place to explain the whole dragging items off screen functionality. The Inventory page might be the right place for that. I feel like it's explained somewhere on the wiki, but I have no idea where right now... margotbean (talk) 16:35, 4 September 2018 (BST)
True. Similar mechanic appear in some other game situations like artifact spots. A general note in the inventory would be great. If there is already something about, I couldn't find either. -- Sapador (talk) 21:22, 4 September 2018 (BST)

Garbage Can Contents Luck Dependency

After doing a bit of looking into the code it appears that the line "Garbage can contents depend on daily luck" is false. The contents themselves do not depend on luck, but whether the player receives the contents on any given check does depend on luck. The line which checks the players luck in code is contained in the "Locations/Town.cs" file and states as follows:

(line 174) if (!mega && !(garbageRandom.NextDouble() < 0.2 + who.DailyLuck))

where garbageRandom is determined by: Random garbageRandom = new Random((int)Game1.uniqueIDForThisGame / 2 + (int)Game1.stats.DaysPlayed + 777 + whichCan * 77);

When this if statement is passed, the garbageRandom variable is then used to check a switch case statement to determine the item dropped for the player.

(line 299) switch (garbageRandom.Next(10)) case 0: item = 168; break; case 1: item = 167; break; (it continues)

Note, the garbageRandom variable has no dependency on luck, and therefore the contents of the garbage can are not dependent on luck, only whether contents are dropped. I will be editing the single line to reflect that luck only affects whether an item is dropped and not the contents. --ItsFreakinEthan (talk) 15:46, 9 November 2020 (UTC)

Generic garbage can loot doesn't depend on luck, but whether or not specialized loot appears does depend on luck. After the switch statement you mentioned, there's a series of statements like if (whichCan == 4 && garbageRandom.NextDouble() < 0.2 + who.DailyLuck) that determine whether, for example, the saloon garbage contains the dish of the day instead of a generic item. All the specialized items are more likely when daily luck is higher.
I've also confirmed this in game: replaying the previous day can result in a different value of daily luck, and I've seen both the existence of garbage can loot and the type of loot be changed. Not every can, not every time, but nevertheless it has definitely happened. So I think the original version of the article is more accurate (or else a more substantial rewrite is necessary). Nebulous Maestress (talk) 20:17, 9 November 2020 (UTC)
I firmly believe you are incorrect, after reading through the code further, and checking with multiple other people. The wording about contents being determined by luck is short and misleading at best, but I won't die on this hill. --ItsFreakinEthan (talk) 04:52, 10 November 2020 (UTC)
Both of these are partially correct. I've rewritten the line in the opening paragraph to reflect what I believe is correct after reading through the code. "Garbage cans' contents are affected by daily luck" is only true for some cans, and is even then misleading for those cans. The chance to drop an item, but not what the item is, is affected by daily luck. And, like you said, those special rolls are also (partially) determined by daily luck. There's also some random chance, not affected by daily luck but also not predetermined, to do the high lid jump or the explosion, which can further modify what you get (explosions always give hats and high jumps always drop an item).
Honestly this mechanic is strangely complicated and I'd personally like to see a rework of this article to better reflect the actual mechanics and the chances of each item appearing. Might give it a shot if I'm bored some day. -PancakeIdentity (talk) 20:17, 10 November 2020 (UTC)