Talk:Fishing

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

Fish quality

What happens if you get a perfect catch while using the Quality Bobber? Do both enhance the quality or only one of them? The page currently doesn't specify, but is worded in such a way that implies that both apply. It says that you have to start with a base quality of Gold to get Iridium, but if both quality enhancements could apply to the same fish, that wouldn't be true. Can somebody who knows the answer enhance the page so that it's clear? Thanks. Zendowolf (talk) 18:20, 18 December 2021 (UTC)

Based on the game code I believe they stack, with the Quality Bobber boost being considered before the Perfect Catch boost (I could be wrong here which is why I didn't specify this, if someone could verify this that would be nice). Also, where does it say the base quality has to be Gold to get Iridium? All I see it says is that the fish must either be caught perfectly or with the Quality Bobber to get iridium quality, which is true. User314159 (talk) 01:30, 19 December 2021 (UTC)
The effects do stack. As for updating the page, under "Perfect Catches" it says perfect catches increase silver or gold by 1 quality (to gold or iridium respectively). The "Fish & Quality" section says that the table doesn't take into account improvements in quality from the Quality Bobber. Both are true -- the quality bobber increases quality as soon as you cast the rod, while a perfect catch increases quality at the time of catching the fish. Not sure where the info should go, tbh, or what to rewrite. I'm open to suggestions! margotbean (talk) 17:57, 19 December 2021 (UTC)
My suggestion would be to make a small table highlighting the final quality of the fish in various scenarios in the "Fish Size & Quality" section considering various factors, specifically the base fish quality and whether the quality bobber was used or the fish catch was perfect. As I think we can agree that they stack with the quality bobber boost considered before the perfect catch one, that should probably be specified on the page as well. User314159 (talk) 20:22, 19 December 2021 (UTC)

Table

I've noticed that the table for fish qualities might have an error, from what I can tell, the random.Next function is exclusive when it comes to the upper bound, however the table does not reflect this, the game should create a random number between (1+Fishing Level/2) and MAX(6;1+Fishing Level/2), this would mean that for fishing levels lower than 10 it should generate a random number up to 6, but not including 6, however the table seems to include 6 in the calculation resulting in a higher maximum fFishSize and a higher chance of higher quality fish. Magikarp 129 (talk) 10:04, 2 February 2022 (UTC)

You are correct that 6 cannot be a random number generated. However, since the resulting number is a float, I'm pretty sure it can be a decimal just under 6, like 5.99, which would result in a negligible difference compared to 6. This would barely change the calculations currently in the table. User314159 (talk) 15:12, 2 February 2022 (UTC)
Magikarp is correct. The result of Random.Next(int,int) is an int, which doesn't include the max number. Even if this is converted to a decimal, it would still wouldn't be higher than 5.BlaDe (talk) 09:44, 3 February 2022 (UTC)
Yup, you are correct. Also, the float only affects the entire fraction anyways. I will need to overhaul the table. Thanks BlaDe. User314159 (talk) 15:08, 3 February 2022 (UTC)

Fishing Treasure Chest Contents

I think there are multiple issues with how the fishing treasure chest percentage chances are currently calculated on the main page.

First, rice shoots, qi beans, and wild bait can only be found under specific conditions, and it looks like it does not affect the chances of finding anything else (because there is no "break" anywhere after adding the item). This means that the sentence "The chance of finding one item is 60%; two items is 24%; three items is 10%; four or more items is 6%" is incorrect because the chances of finding the actual number of items is dependent on whether or not the three items listed earlier can be found.

Second, I believe the page currently assumes that the "while" loop will run an average of 1.67 times (this is what I thought at first), with the formula 1 + (2/5) + (2/5)^2 + (etc.). However, I think that formula is wrong.

The while loop runs under the "chance" variable in the code, which is initially 1, and gets multiplied by 2/5 every time. So the probability of it running once is 1 and twice is 2/5. However, the chance of running a third time is not (2/5)^2 because it requires the while loop to have already run twice, so the chances it runs a third time is actually (2/5)^3. Then the chances of it running a fourth time is (2/5)^6, etc. (The powers are just the triangular numbers). Adding those up, the "while" loop actually runs an average of 1.4682 times.

I could be wrong here, so that's why I'm posting it here. Should there be no objection to this within the next few days, I will make the appropriate changes. User314159 (talk) 17:44, 3 February 2022 (UTC)

I've no objections, my comment here is to move the reference to the PHP code that determined the % chances to find items from the main page, since it's outdated (may have been based on v1.3, v1.4 at the newest). The link is https://github.com/margotbean/SDVTreasureChestProbabilities. I would love to delete the entire github repo if it's of no longer of use, since I didn't create the code, and the user who did create it hasn't been active for something like a year. Please let me know if the repo is of any use, or when I can delete it. Thanks, margotbean (talk) 19:23, 3 February 2022 (UTC)
I'll look into the repo soon. So far, I think the original probabilities calculated didn't change, but the fact that the average # of times the while loop in the game code runs are lower than initially calculated (1.67, now 1.47). Unless I am misinterpreting the luck modifier, it changes proportionally to fishing zone, meaning if Zone=1 there is only a 20% chance of catching an item than if it was Zone=5, so that might be something to point out. If someone could confirm that 1.47 is indeed the average # of times the while loop runs, that would be great! User314159 (talk) 01:23, 4 February 2022 (UTC)
The notes for the two weapons say "only if one has not been obtained this way before". This is not accurate as of the current Switch version. I've gotten Broken Tridents on separate days on the same playthrough, and today I got my second and third Neptune's Glaive on the same playthrough. Slipstream8 (talk) 20:26, 13 February 2022 (UTC)Slipstream8
You are correct, I actually got a couple on one save file as well. For some reason the game code implies you can only get one, but either that's not effective or is overridden elsewhere. User314159 (talk) 01:38, 14 February 2022 (UTC)
What I want to know is, if I avoid getting artifacts, does it give a better chance at rare items like the iridium band, Neptune's Glaive, or treasure chests at fishing level 2+? It seems to me that those are very worthwhile to get early on, and the smaller museum things, or even ancient seeds or dinosaur eggs aren't so worthwhile. The math behind the formulas isn't so clear about how this might work. Thanks! Nerdpride (talk) 05:19, 14 December 2022 (UTC)
The code is complex, but I believe the short answer is "no", you would get coal instead. Sorry for the bad news. margotbean (talk) 16:31, 14 December 2022 (UTC)

Fishing XP Formula

The formula for XP from catching a fish does not seem to match the example. Wouldn't the example be 3 + (3 * 0) + (30 / 3)? The result would still be 13, but the example confused me. Then again, I'm not great at math. The two relevant parts below:

    "XP = 3 + (3 * Fish Quality) + (1/3 * Fish Difficulty)
    For example, a regular quality sardine (difficulty 30) would net the player (0 + 1) * 3 + (30 / 3) = 13 XP."

Thanks, castronaut 19:22:24, 21 February 2022 (UTC)

I think the problem is with the way the formula is written. In the game code, it's (fishQuality + 1) * 3 + fishDifficulty / 3. So, the example follows the game code, but the equation doesn't. The altered equation is equivalent to the game code, but you're right, there's inconsistency. I'll change the equation to match the game code. Thanks for pointing this out! margotbean (talk) 19:56, 21 February 2022 (UTC)

Broken Trident / Neptune's Glaive

Regarding the conditions to find these items in Fishing Treasure Chests, the relevant code is FishingRod::openTreasureMenuEndFunction, specifically !lastUser.specialItems.Contains(14) (Neptune's Glaive) and !lastUser.specialItems.Contains(51) (Broken Trident).

I stepped through the code, but altered it so that !lastUser.specialItems.Contains(14) would always execute, and emptied my inventory of everything but tools & the Broken Trident. I successfully caught several Broken Tridents. (Full disclosure: I used CJB Cheats Menu to ensure "Always Treasure".)

The list of "specialItems" for two different save files were:

  • {474,479,486,1541,499,490}
(Inventory contained Gold tools, Iridium Fishing Rod & Broken Trident)
  • {474,479,486,875,876,490,499,688,279,864,865,866,867,868,869,870,460}
(Inventory contained Iridium tools, Iridium Fishing Rod, Broken Trident, Horse Flute, & Return Scepter)

I have no idea what these items are. 474 is Cauliflower Seeds, 479 is Melon Seeds... 1541 is 'A Night On Eco-Hill' (something I had not yet obtained in that save file).

More research is needed into what the game is checking, but it's not whether or not the player already has a Broken Trident or Neptune's Glaive (in inventory or otherwise obtained). So, I'm going to remove the restriction listed on the page, and welcome further research into what the game code is doing! Thank you! margotbean (talk) 20:40, 3 October 2022 (UTC)

My best random guess (without looking at the code) would be that it's merely checking the current haul of treasure to make sure you aren't catching multiple tridents/glaives/etc in the same cast, as that would look a bit weird for those and some other items. But I've caught a total of 3 Neptune's Glaives at different times in my current save file (with no relevant mods) while already having one in my inventory constantly as my default weapon/grass cutter. So I have to agree that it's definitely not preventing people from repeatedly catching the same weapon during different casts, and/or while one is already in inventory. FreeTheJunimos (talk) 10:18, 4 October 2022 (UTC)
Farmer.specialItems are weird - I know it has something to do with museum rewards, but it consolidates all the IDs together in a single list, and it's a little hard to trace exactly what gets added to it and what doesn't. Honestly I mostly consider it early development jank, it's hard to follow and often goes nowhere. Atravita (talk) 11:34, 4 October 2022 (UTC)
That's consistent with what I found. The game sets specialItem to true after catching one of these weapons, but no IDs get added to the list of specialItems. I didn't go down that rabbit hole any further; I'd already spent a couple of hours on it. Museum rewards make sense, but why they get checked when fishing... I'm not even going there. 😁
Thanks to all for their input and for making the wiki better! And everyone please remember to add code references and use talk pages when making changes! Thank you again, margotbean (talk) 16:50, 4 October 2022 (UTC)