Anyone know where I can find accurate fish distribution tables?

I’m looking to put together a guide on “expected profit per energy and / or tile per day”, because I think it would be useful and the results might be surprising to some folks. Part of that is fishing, but in order for it to be accurate I need the expected distribution of fish by zone, season, and weather type, ideally also with percentage of trash catches.

For example, I know the mountain lake in Spring has Chub, Bullhead, Largemouth Bass, etc. But I don’t know the relative proportion of Chub vs Largemouth Bass, which makes a big difference in expected profit. Similarly, if the lava eel floor contained only fish, it would be crazy profitable. Getting trash instead 75% of the time changes the equation, to where maybe it’s still worth it, maybe not.

Does anyone know where I can find that info, or any other info that might help me get this together?
 

Elenna101

Farmer
It's not in an easy to import format, but all that information is here: https://stardewvalleywiki.com/Fish

Also, you missed time of day. That's another variable for the fishes.
That page doesn't have the percentage chances of each fish, unfortunately.

IIRC, the chance of each fish is kind of complicated - basically the game creates a randomly ordered list of the fish that are possible to catch. Each fish has some probability (between 0 and 1) of showing up. Then, for the first fish in the list, it does a check to see if that fish shows up, by randomly rolling a number between 0 and 1 and seeing if it's lower than the probability for that fish. If the random roll fails for the first fish, then it tries the second, and so on. If it fails for all the fish, you get trash.

This means that the chance of any particular fish showing up is dependent on what fish are possible at that time, so it changes based on time, weather, and location. It also changes based on water depth.

Anyways, you can look up the probability of each fish showing up in @BlaDe 's spreadsheet of fish chances.
 
Oh jeez, found this:

"Every time the player casts with their fishing rod, a new spawning queue is created containing every available type of fish (including algae and seaweed) which meets the criteria based on location, season, time, and weather. The spawning queue is then shuffled so that the available types of fish are listed in a random order. A skill check with a random component is performed on each type of fish, in the order in which it is currently in the spawning queue. Success results in a bite ("HIT!") and failure results in the skill check being repeated with the next fish in the queue. If all fish in the queue fail the skill check, a random trash item is caught instead.

If a fish matches the spawning criteria, the probability that it will succeed in spawning is: {base spawn probability} = {spawn multiplier} - max(0, {minimum depth} - {actual depth}) × {depth multiplier} × {spawn multiplier} + {fishing level} / 50, up to a maximum of 90%. The actual depth is the bobber's tile distance from land."


That's both helpful and really not helpful at all, because I'm sure that's accurate, and using Fish.xnb I could calculate each fish's expected bite percentage, then determine the relative probabilities of all fish for each possible spawn queue order, and average it out to get total expected bite probabilities, for each location, every period of the day where the available fish differ, and each season. However, that would take *forever*.

There's probably a way to streamline the calculation process. I know the trash percentage will just be equal to the probability of every fish in the spawn queue failing its test regardless of order, and then from there I can probably use ratios to determine the rest. However before I go down that path and start doing test calculations to verify it works, I'm going to keep looking for somewhere that data is already aggregated.

And yeah, time of day definitely matters, didn't forget about it, just didn't mention it :-)

Edit: BlaDe THANK YOU!!! Also thank you Elenna for pointing me to that!! I super appreciate it, and armed with that I can do the rest of the work which needs to be done. I will of course need to make some assumptions and take some shortcuts, but in the final work I'll reference the sheet in question and indicate that it can be used to calculate more precise values.

Speaking of, BlaDe would you be interested in the calculations I run to derive the final expected profit per energy, and possibly incorporating that into the sheet? Only if you feel it's actually a value add, of course. No worries either way just wanted to offer in case you felt it would be useful. I'll be incorporating them into a downloaded copy of the sheet and can send you the final edited form so you can take from it what you wish and modify accordingly, I just know you've already given such an incredible base to work from with so much of the heavy lifting done the least I can do is contribute in some way.
 
Last edited:

Elenna101

Farmer
There's probably a way to streamline the calculation process. I know the trash percentage will just be equal to the probability of every fish in the spawn queue failing its test regardless of order, and then from there I can probably use ratios to determine the rest. However before I go down that path and start doing test calculations to verify it works, I'm going to keep looking for somewhere that data is already aggregated.
Incidentally, I believe Blade's spreadsheet that I linked above doesn't use any shortcuts, he just has a program that checks all the possible permutations. But if you can mathematically prove a faster way to do it, that would be cool :)
 

LRangerR

Local Legend
The min-max is hilariously strong in this thread xD

Also don't forget about casting, that's another variable you have to work in, as different fish are caught at different cast lengths.
 

BlaDe

Farmer
would you be interested in the calculations I run to derive the final expected profit per energy, and possibly incorporating that into the sheet?
I would be, yes!

Also don't forget about casting, that's another variable you have to work in, as different fish are caught at different cast lengths.
That is accounted for as Water Depth (known on the wiki as fishing zones)
 

BlaDe

Farmer
Incidentally, I believe Blade's spreadsheet that I linked above doesn't use any shortcuts, he just has a program that checks all the possible permutations. But if you can mathematically prove a faster way to do it, that would be cool :)
My approach breaks when I try to account for magic bait. There are just too many permutations to account for.
 

Elenna101

Farmer
Perhaps an independent table for only when using magic bait?
That's not the issue - the issue is that, as mentioned above, the fish are randomized by a process that involves creating a random ordering of all the fish that can appear at that time. So Blade found these probabilities of each fish by using a program that goes through each possible ordering and checks the probability given that ordering, and then averages them to get the overall probability.
The thing is, the number of possible orderings is pretty small if there's only a few fish you can catch, but as you add more fish it gets really big, really fast. And magic bait lets you catch any fish in the game. Math below because I'm a stats major, but the short version is that the number of orderings is more than 10^25, or 1 with 25 zeros after it. Computers are fast, but they're not that fast; it's just impossible to actually check all those orderings.

Basically, if for example you have 5 possible fish, the first fish in the random ordering can be any of those 5 fish. For each of those 5 possibilities, the second one can then be any of the 4 remaining fish, so there are 5*4 = 20 possibilities for first and second fish. Then for each of those 20 possibilities, the third one can be any of the 3 remaining fish, and so on. So in the end, the total number of possible orderings (also known as permutations) is 5*4*3*2*1 = 120.
By the way, this number is called 5!, or "five factorial". That is, 5! = 5*4*3*2*1
You might notice that 5! is pretty small, so a computer can very easily check all 120 permutations. But if you increase the number of objects (fish, in this case) being permuted, you see that the factorials grow really quickly: 6! = 720, 7! = 5040, 8! = 40,320, 9! = 362,880, 10! = 3,628,800, 11! = 39,916,800, and so on.
I'm too lazy to look up the actual number of fish in this game, but it's definitely more than 25. And with 25 fish, the total number of permutations is then 25!, which, as mentioned above, is more than 10^25.
 
It's not all fish in the game, to be fair. It's just all of them in that space, regardless of season or weather type. Nonetheless, for the Ocean that's like 20 fish, and as your numbers show, that's plenty to get to way too large of numbers.

Intuitively folks will know that they're best for trying to, for example, catch an Octopus during winter or something like that, and intuitively they should also know that they have at best around a 5% chance of hooking one since all ocean fish are available, so I'm not sure how impactful the hard numbers would really be to someone's usage of magic bait or experience with it. Still would be nice to be able to calculate, for sure. I'm just not sure it'll ever be high enough on the priority list for anyone to actually get done, barring an easier calculation method being discovered and proven.
 

Elenna101

Farmer
It's not all fish in the game, to be fair. It's just all of them in that space, regardless of season or weather type. Nonetheless, for the Ocean that's like 20 fish, and as your numbers show, that's plenty to get to way too large of numbers.
...Oh. You can tell I've never used magic bait lol.
Anyways, like you said, still way too many.
 

Existence

Greenhorn
It's not all fish in the game, to be fair. It's just all of them in that space, regardless of season or weather type. Nonetheless, for the Ocean that's like 20 fish, and as your numbers show, that's plenty to get to way too large of numbers.

Intuitively folks will know that they're best for trying to, for example, catch an Octopus during winter or something like that, and intuitively they should also know that they have at best around a 5% chance of hooking one since all ocean fish are available, so I'm not sure how impactful the hard numbers would really be to someone's usage of magic bait or experience with it. Still would be nice to be able to calculate, for sure. I'm just not sure it'll ever be high enough on the priority list for anyone to actually get done, barring an easier calculation method being discovered and proven.
We shouldn't need to calculate all possible orderings of the list. To determine the probably of catching a specific fish, all that matters is the possible groups of fish which are ahead of it on the list. Since multiplication is commutative, the ordering of the group is irrelevant. For 25 fish, there are around 17 million different groups for each candidate (https://www.wolframalpha.com/input?i2d=true&i=sum+of+24+choose+k+from+k=+0+to+24), which should be small enough for a computer to handle.
 

Skylark

Newcomer
Anyways, you can look up the probability of each fish showing up in @BlaDe 's spreadsheet of fish chances.
I love that this spreadsheet exists! I started trying it out and modifying it a little for my purposes, but I don't know if it's working properly. It's showing me 0% chance of catching certain fish that I know shouldn't be 0, based on the information I inputted. I tried to see if I could go into the code to debug it, but google sheets won't let me access the code.

So I'm trying to make a similar spreadsheet from scratch. There's just part of the formulas I'm not understanding. The wiki shows the formulas:

{base spawn probability} = {spawn multiplier} - max(0, {minimum depth} - {actual depth}) × {depth multiplier} × {spawn multiplier} + {fishing level} / 50, up to a maximum of 90%

{relative spawn probability} = {base spawn probability} * POWER( ({all fish failure rate} - {this fish failure rate}) / ({number of fish} - 1}), ({fish queue position} - 1)), averaged between all possible fish queue positions

So what is {all fish failure rate}?? And am I correct in assuming that {this fish failure rate} = 1 - {base spawn probability}? Or am I also missing something as far as that variable is concerned?

Any help is much appreciated! For anyone curious, I'm trying to make something that tells you where's the best location to fish (which location would potentially make you the most money) based on the current conditions.
 

BlaDe

Farmer
Make sure you have the correct settings for time, weather, and training rod. If you share you copy I can help debug.
 

Skylark

Newcomer
Make sure you have the correct settings for time, weather, and training rod. If you share you copy I can help debug.
Well here's my copy for debugging purposes - Town (Fall) shows 0% for Walleye, Catfish, and Shad, even though the time and weather matches their conditions.

But I will also have to do my own version anyway, because what I'm wanting will require some script, and it won't let me access the script editor on your version. So I'd still like to understand the formulas used if possible. If there's any way you could share maybe a text version of your script, that would be amazing.
 

Skylark

Newcomer
Enter Y into cell AC1. This triggers the code to calculate the overall chances.
Yes, I did. Nothing changes. Still shows 0% for all three.
Oh man, I ran it again, but this time it made the total chance go over 100%. o_O
 

BlaDe

Farmer
Yes, I did. Nothing changes. Still shows 0% for all three.
Oh man, I ran it again, but this time it made the total chance go over 100%. o_O
Oh, the script never finished, so the Tiger Trout value never updated and kept the value from the previous calculation. There are a lot of fish, so a lot of permutations for all the potential orders that the fish get evaluated at. Try clearing out the values of W, and try again.

Someone suggested a better way of scripting the chances, so I will look at improving the logic at some point.
 
Top