全站通知:

En:Talk:Targeted Bait

阅读

    

2024-10-25更新

    

最新编辑:sizau

阅读:

  

更新日期:2024-10-25

  

最新编辑:sizau

来自星露谷物语
跳到导航 跳到搜索
页面贡献者 :
sizau
Time_Task
本页面用于讨论 En:Talk:Targeted Bait.
  • 将新留言放在已有留言的下方。
  • 在你的留言的末尾输入四个波浪符(~~~~)来签名和标注时间。
  • 保持礼貌。
  • 与他人善意相待。
  • 不要删除已有讨论。

Exact Functionality of Targeted Bait

In order to clear up some of the misconceptions around Targeted Bait, I've decided to actually spell out exactly how it affects the fish-catching process, which is rather complicated. The relevant code can be found in GameLocation::GetFishFromLocationData for the overall loop, and GameLocation::CheckGenericFishRequirements for the Spawn Rate effects. 1) First, the game gets a list of all possible catches for the location. This list is then ordered by ascending precedence, and randomly shuffled within each level of precedence. 2) Now, the game iterates over the list of possible catches, checking each Fish in sequence to see if it passes the two associated RNG checks:

  • Locational Chance (specified in Locations.xnb) - this is multiplied by 1.66 for the Targeted Fish, after it has been modified by any Curiosity Lure, Daily Luck, or Conditional modifiers specified in the location data. This does not include bonuses per Luck level, which are applied after. Any Chance value over 1.0 has no effect, as it simply guarantees the RNG check passing.
  • Spawn Rate (specified in Fish.xnb) - this is multiplied by 1.66 for the Targeted Fish, after it has been modified by Fishing Level and after the 0.9 cap. For fish above their Minimum Fishing Zone, this means that final Spawn Rate for targeted fish can be simplified to (Spawn_Multiplier + 0.02 * Fishing_Level) * 1.66. Any Spawn Rate over 1.0 has no effect, as it simply guarantees the RNG check passing.

The game continues iterating over the list, performing these checks on all catches until one of three conditions is met:

  • The Targeted Fish passes both checks. In this case, the Targeted Fish is returned.
  • Three items pass both checks. In this case, the third item (which may or may not be the targeted Fish) is returned.
  • Two full loops of the list are completed without either of the above happening. In this case, the first item to pass both checks is returned.

Due to Trash existing in all locations (see Default in Location.xnb) which has a 1.0 Locational Chance, no Fish.xnb data (causing it to auto-pass the Spawn Rate check unless it's the Fishing Tutorial), and always being in last position due to +2000 Precedenmce, this means that Trash will always pass its checks, on both loops. As this means 2 items are guaranteed to succeed, the only possible way to reach two full loops of the list without 3 items passing is if no items other trash passed their random checks. This means that the third condition is guaranteed to return trash.

So there are two effects that Targeted Bait has on the catch. If not using Targeted Bait, the game simply returns the first item to pass both checks. See the following code from GameLocation::GetFishFromLocationData:

if (baitTargetFish == null || !(fish.QualifiedItemId != baitTargetFish) || targetedBaitTries >= 2) { return fish; }
Really excellent analysis! I'm glad we know of the exact effects of targeted bait now. The Lava Eel spawn rates are still slightly alluding though, but it's okay. User314159 (talk) 16:01, 19 April 2024 (UTC)
Previously, I stated that Targeted Bait had no impact on Locational Chance. This was incorrect, as I failed to check a function defined in StardewValley.GameData.dll, outside of the usual game code. Having checked this now, I have updated the overview to include this effect for future reference. This has little effect on most fish, as most fish have a Locational chance of 1, but has a significant impact on Legendaries, Caldera Lava Eels, and Submarine fish. Sicarious (talk) 18:11, 23 April 2024 (UTC)
Good catch, I didn't check that function either. That explains why the Lava Eel bite rates are so high with Targeted Bait. Also, by the way, the SpecificBaitBuff value in Locations.xnb was only added in 1.6.4, so I wonder if Targeted Bait impacting Locational Chance is new (because it seemed to not impact in 1.6.3 for Legendary Fish, unless I got really unlucky). User314159 (talk) 18:42, 23 April 2024 (UTC)