Jump to content

User:BarleyZP: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
request for help
 
imported>BarleyZP
Line 12: Line 12:


Thank you very much for all the work you've put in to update the wiki!! [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 17:39, 13 June 2025 (UTC)
Thank you very much for all the work you've put in to update the wiki!! [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 17:39, 13 June 2025 (UTC)
:Oh no, I figured I might have broken a link or two (it's good to know there's a place I can see that now, I should have asked about that), but I didn't realize non-modding pages linked to the Modding space! I'd argue updated information about fish spawn calculations probably deserves to go in the main namespace, although the code for it is definitely a bit complex.
:It looks like some of the requirements-checking happens in <samp>GameLocation::CheckGenericFishRequirements</samp>. The game uses the fields at indices 9 ("maxDepth"), 10 ("chance"), and 11 ("depthMultiplier") of the fish data here:
:<syntaxhighlight lang="c#">
float dropOffAmount = depthMultiplier * chance;
chance -= (float)Math.Max(0, maxDepth - waterDepth) * dropOffAmount;
</syntaxhighlight>
:From this, it seems like we start with the base <samp>chance</samp> amount from the fishing data. The chance is decreased by the difference between the <samp>maxDepth</samp> field and the current depth the rod was cast in (noted in <samp>GameLocation::GetFishFromLocationData</samp> as "the tile distance from the nearest shore"). This means that if a rod is cast to at least <samp>maxDepth</samp> tiles from shore, there is no penalty from <samp>dropOffAmount</samp>. Otherwise, a penalty may be applied based on the <samp>depthMultiplier</samp> and <samp>chance</samp> fields.
:Further calculations are applied that increase <samp>chance</samp> based on the training rod, the curiosity lure, the player's fishing level, targeted bait, and daily luck. (The <samp>ChanceModifiers</samp> field of the location's fish data is also relevant, but it looks like vanilla only uses it for things like the lost necklace at the spa and some fishable paintings).
:'''At any rate, let me try to answer your more concrete questions!''' In <samp>Data/Fish</samp> [[Sturgeon]] have a <samp>maxDepth</samp> of 3, a <samp>chance</samp> of 0.35, and a <samp>depthMultiplier</samp> of 0.2. So, we can conclude that you are LESS likely to fish up a sturgeon fewer than 3 tiles from land. I can't say that you're MORE likely to fish one up 4 tiles from land than 3, since other fish might influence it (although it's certainly possible that that's the case!)
:I can also agree that [[trash]] frequency gets a lot lower when more types of fish are present, since most fish spawns have a <samp>Precendence</samp> of 0 in <samp>Data/Locations</samp>, which puts them ahead of trash's <samp>Precedence</samp> of 2000. If we have 5 possible fish that could be caught at a tile, all 5 would have to fail to spawn before we spawned trash.
:'''Questions/Possible Actions:''' (1) Where do you think an overview of fish spawning data should go on this wiki? (2) I can start trying to fix broken links and missing references (I am the one who broke them after all). If I'm unsure about a reference for a claim, would you prefer I note that on the affected page's talk page, my own talk page, or your talk page?
: Hope we can get this cleaned up soon! Thanks for bringing it up! [[User:BarleyZP|BarleyZP]] ([[User talk:BarleyZP|talk]]) 22:51, 13 June 2025 (UTC)

Revision as of 22:52, 13 June 2025

This talk page is for discussing User:BarleyZP.
  • 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 data question

Hello! I have a question about the changes you made to Modding:Fish data...

The info from v1.3 about "spawn rates" is gone now (hooray!), but that leaves me with several wiki pages that link to that page and refer to spawn rates which now have no valid reference. There are approximately 10 pages that need attention, included in the list here: https://stardewvalleywiki.com/Special:WhatLinksHere/Modding:Fish_data

So, I'm messaging to ask if you're in a position to evaluate spawn criteria with v1.6 -- specifically, can the wiki say that Sturgeon are a more likely catch further from shore? If so, what's the proof? Also with trash, algae, etc. the pages make similar claims about where to cast to maximize the chances of catching them.

I'm sure this is a simple fix, so I hate to delete the info for lack of a valid reference, but I also hate to leave it, well, reference-less.

Any advice you can give would be most appreciated!

Thank you very much for all the work you've put in to update the wiki!! margotbean (talk) 17:39, 13 June 2025 (UTC)

Oh no, I figured I might have broken a link or two (it's good to know there's a place I can see that now, I should have asked about that), but I didn't realize non-modding pages linked to the Modding space! I'd argue updated information about fish spawn calculations probably deserves to go in the main namespace, although the code for it is definitely a bit complex.
It looks like some of the requirements-checking happens in GameLocation::CheckGenericFishRequirements. The game uses the fields at indices 9 ("maxDepth"), 10 ("chance"), and 11 ("depthMultiplier") of the fish data here:
float dropOffAmount = depthMultiplier * chance;
chance -= (float)Math.Max(0, maxDepth - waterDepth) * dropOffAmount;
From this, it seems like we start with the base chance amount from the fishing data. The chance is decreased by the difference between the maxDepth field and the current depth the rod was cast in (noted in GameLocation::GetFishFromLocationData as "the tile distance from the nearest shore"). This means that if a rod is cast to at least maxDepth tiles from shore, there is no penalty from dropOffAmount. Otherwise, a penalty may be applied based on the depthMultiplier and chance fields.
Further calculations are applied that increase chance based on the training rod, the curiosity lure, the player's fishing level, targeted bait, and daily luck. (The ChanceModifiers field of the location's fish data is also relevant, but it looks like vanilla only uses it for things like the lost necklace at the spa and some fishable paintings).
At any rate, let me try to answer your more concrete questions! In Data/Fish Sturgeon have a maxDepth of 3, a chance of 0.35, and a depthMultiplier of 0.2. So, we can conclude that you are LESS likely to fish up a sturgeon fewer than 3 tiles from land. I can't say that you're MORE likely to fish one up 4 tiles from land than 3, since other fish might influence it (although it's certainly possible that that's the case!)
I can also agree that trash frequency gets a lot lower when more types of fish are present, since most fish spawns have a Precendence of 0 in Data/Locations, which puts them ahead of trash's Precedence of 2000. If we have 5 possible fish that could be caught at a tile, all 5 would have to fail to spawn before we spawned trash.
Questions/Possible Actions: (1) Where do you think an overview of fish spawning data should go on this wiki? (2) I can start trying to fix broken links and missing references (I am the one who broke them after all). If I'm unsure about a reference for a claim, would you prefer I note that on the affected page's talk page, my own talk page, or your talk page?
Hope we can get this cleaned up soon! Thanks for bringing it up! BarleyZP (talk) 22:51, 13 June 2025 (UTC)