Fishing

From WEBFISHING Wiki
Jump to navigation Jump to search

Fishing is part of the main gameplay loop of WEBFISHING. By fishing, players can catch fish, earn money, and purchase lures and upgrades to aid in fishing.

Fishing Basics

Fishing requires an equipped fishing rod, and bait. The rod can be cast in any body of water by clicking and holding Keyboard White Mouse Left.png to charge a cast, and a set of arrows on the water's surface will indicate where your bobber will land. After casting, using Keyboard White Mouse Left.png will reel in the lure back towards shore, and holding Keyboard shift.png will reel in faster. After some amount of time, a fish will bite, and the fishing minigame will begin. Successfully completing the fishing minigame will reward the player with the fish, and potentially a bonus coin bag.

A game screenshot of a player standing next to the lake, casting their rod. The bobber arrows can be seen on the water's surface.
Casting the rod
A game screenshot of a player standing next to the lake with their rod cast. The bobber is a yellow rubber duck.
Waiting for fish to bite
A game screenshot of a player standing next to the lake, having just started the fishing minigame. The catch meter is shown on screen, with a slight horizontal gradient dimming the left side of the screen.
Reeling in a catch!
A game screenshot of a player holding a small fish after catching it.
A successful catch

Fishing Minigame

An annotated game screenshot of a player standing next to the lake, having just started the fishing minigame. The catch meter, yank spots, and quality stars are all labelled.
The fishing minigame. Note the stars in the top left corner that indicate that the fish is of glistening quality.

Once a fish has been hooked, the fishing minigame will begin. The game will randomly select a fish from the list of possible options, and assign it a random quality, based on the player's currently equipped bait and indicated by the number of stars in the top left corner of the screen.

To successfully reel in the catch, the player must fill the catch meter. Holding Keyboard White Mouse Left.png will reel in the catch, gradually filling the meter. During the minigame, the player will encounter between 1 and 5 yank spots, symbolized by a bar going across the catch meter, with a number shown above. Clicking to "yank" the rod at a yank spot will decrease the count by the player's current rod power, and once the number reaches zero, the player can continue to reel in and fill the catch meter.

Upon successfully reeling in the fish, if the player has at least one rod luck upgrade, there is also a 15% chance of receiving a bonus Coin Bag, the value of which is based on the player's current rod luck stat.

Rod Stats

See also: Lures

Rod stats are upgradeable parameters that influence how long it takes for the player to catch a fish, the amount of progress achieved by yanking the rod, and more. Rod stat upgrades can be purchased at the Upgrade Shop, and all stats have the same upgrade price within each upgrade tier.

Rod Stat Upgrades
Stat Effect Base Value Tier 1 Tier 2 Tier 3 Tier 4 Tier 5
Rod Power Increases the amount of progress achieved by yanking the rod 1 3 10 20 35 50
Reel Speed Increases the speed at which the catch meter fills 0 0.1 0.24 0.4 0.7 1.0
Catch Chance Decreases the average time it takes for a fish to bite 0 0.02 0.04 0.06 0.08 0.1
Rod Luck Increases the value of Coin Bags earned while fishing 0 1 2 3 4 5
Rod Stat Upgrade Costs
Tier Cost
1 $100
2 $350
3 $1000
4 $5000
5 $10000

Technical Breakdown

The behind-the-scenes process that governs how fishing works is complex and involves a lot of Pseudorandom number generation. This section will attempt to break the process down into a series of understandable steps:

  1. Fish timer
  2. Bait and special fish tables
  3. Rolling
  4. Quality, Treasure Chests, difficulty and XP gain
  5. Fishing minigame
  6. Bonus assignment

Fish timer

The catch process starts with the fish_chance variable. This variable starts at a value of 0.06, and is summed with:

  • The product of 0.06 and the failed_casts variable
  • The product of 0.06 and the player's rod_chance stat
  • The product of the fishing zone's boost stat and fish_chance itself (Zones that add onto boost stat: Fish spawn, Meteor Spawn, and Tutorial Island)

fish_chance is then multiplied by:

  • A factor of 1.1, if the player has reeled in the rod any by distance in the past 15 physics frames (0.25 seconds)
  • A factor of 1.3, if the player has the Attractive Angler equipped
  • A factor of 1.1, if it is currently raining
  • The boost factor of the player's active catch cola, if applicable

Note that all of these increases are not mutually exclusive.

Upon casting the rod, the game starts a short timer with a random length between 2 and 3 seconds. Each time this timer runs to completion, the game checks if a random float between 0 and 1 is less than the value of fish_chance. If the random value is greater than or equal to fish_chance, the failed_casts variable is increased by 0.05, and the fish timer resets. If the random value is less than fish_chance, the fish timer ends, and the game moves onto the next phase of the fishing process.

Bait and Special Fish Tables

Bait usage

The game checks the player's equipped lure, and depending on RNG and the equipped lure, consumes between 0 and 3 bait from the player's bait supply.

Bait usage
Equipped Lure Outcome
Efficient Lure 20% chance to consume zero bait, otherwise consumes one bait.
Large Lure, Sparkling Lure, or Double Hook 25% chance to consume two bait, otherwise consumes one bait.
Golden Hook Always consumes three bait.

Type lock

Type lock prevents the fish_type of a catch from changing from the zone's default value. This prevents junk objects, rain fish, or Treasure Chests from being caught. Currently, the only zone with type lock is the Meteor zone.

Junk object chance

The default treasure_mult and junk_mult values are set to 1.0. If the player has the Magnet Lure equipped, treasure_mult is increased to 2.0, and junk_mult to 3.0. If the fishing zone does not have a type lock, the game then checks if a random float between 0 and 1 is less than the product of 0.05 and junk_mult. (5% chance, or 15% with the Magnet Lure equipped), and if it is, fish_type is changed to water_trash. However, due to the roll for a treasure chest occurring after the roll for junk, the effective junk chance becomes 4.9%, or 14.4% with the Magnet Lure.

Rain fish chance

If the fishing zone does not have a type lock and it is currently raining, the game checks if a random float between 0 and 1 is less than 0.08, and if it is, fish_type is changed to fish_rain. Note that this action will override the existing fish_type value and takes precedence over a junk object roll.

Rolling

The game generates three "rolls" based on the currently selected fish_type's corresponding fish table[1]. Each fish in the table has a specific loot weight, which influences how likely it is to be chosen. The three rolls generated each represent a randomly chosen fish with a normally-distributed size (where μ is 1.25 * average_size and σ is 0.55 * average_size). Note that a quality has not yet been assigned to any of the fish. The game then iterates through all three rolls and chooses a fish out of the three possible options based on the player's currently equipped lure.

Lure effect on roll choice
Lure Action Effect
Fly Hook Chooses the roll with the smallest size. Effectively decreases the average size of caught fish, and increases the chance of catching fish with a smaller default size.
Large Lure Chooses the roll with the largest size. Effectively increases the average size of caught fish, and increases the chance of catching and fish with a larger default size.
Sparkling Lure Chooses the roll with the highest tier Effectively increases the chance of catching tier 2 and 3 fish.
Golden Hook Chooses a Rare fish if one is present. Roughly triples the catch chance for each rare fish, due to how the inclusion-exclusion principle increases the chance of an outcome over multiple trials.
All other lures The last fish rolled is selected. None.

Quality, Treasure Chests, Difficulty and XP Gain

Quality assignment

See: Quality, Bait

The random quality of a fish is determined based on the player's currently equipped bait. Each bait has a specific set of weighted quality values, with more expensive baits being able to catch higher qualities of fish.

Bait quality chances
Bait Chance for Normal Chance for Shining Chance for Glistening Chance for Opulent Chance for Radiant Chance for Alpha
Worm 100%* 0% 0% 0% 0% 0%
Cricket 95% 5% 0% 0% 0% 0%
Leech 80.75% 14.25% 5% 0% 0% 0%
Minnow 35.62% 35.63% 23.75% 5% 0% 0%
Squid 8.88% 35.53% 36.34% 14.25% 5% 0%
Nautilus 0.16% 7.86% 24.05% 39.19% 23.75% 5%

Treasure Chests

If the fishing zone does not have a type lock, the game rolls a random float from 0 to 1, and if the random value is less than 0.02 * treasure_mult (2% chance, 4% with the Magnet Lure equipped), the currently selected fish is discarded, and the catch is changed to a Treasure Chest. Treasure Chests always have a size of 60.0, and a quality of Normal.

Difficulty

Difficulty is a value between 1 and 250 that determines how "difficult" the fish is to catch. The base difficulty multiplier, diff_mult, is set to size / data.average_size (the catch's size coefficient), and clamped between 0.7 and 1.8. The total difficulty is then calculated as follows:

var difficulty = clamp((data.catch_difficulty * diff_mult * quality_data.diff) + quality_data.bdiff, 1.0, 250.0)

where data.catch_difficulty is the average difficulty for the catch, and quality_data.bdiff is the base difficulty of the assigned quality.

Quality base difficulty
Quality Base difficulty
Normal 0.0
Shining 3.0
Glistening 8.0
Opulent 14.0
Radiant 24.0
Alpha 32.0

XP gain

The base XP multiplier, xp_mult, is set to size / data.average_size. If this initial value is found to be less than 0.15, it is increased by a flat 1.25. The minimum value of xp_mult is then clamped at 0.5, and the amount of XP given to the player, xp_add, is calculated as follows:

var xp_add = ceil(data.obtain_xp * xp_mult * catch_drink_xp * quality_data.worth)

where data.obtain_xp is the catch's average XP value, catch_drink_xp is either 1.0, or 1.25 if the Catcher's Luck DELUXE effect is active, and quality_data.worth is the assigned quality's worth value.

Quality worth
Quality Worth value
Normal 1.0
Shining 1.8
Glistening 4.0
Opulent 6.0
Radiant 10.0
Alpha 15.0

Fishing Minigame

The game now moves to the fishing minigame subroutine, to which the parameters {"fish": fish_roll, "rod_type": rod_cast_data, "reel_mult": catch_drink_reel, "quality": quality, "damage": rod_damage, "speed": rod_spd} and difficulty are passed. To recap each of these parameters:

  • fish is the fish that will be caught
  • rod_type is the player's equipped lure
  • reel_mult is the active effect's reel speed multiplier. However, this parameter is entirely unreferenced in the code, and is instead always set to 1.0.
  • quality is the fish's randomized quality
  • damage is the player's rod power stat
  • speed is the player's reel speed stat
  • difficulty is the difficulty between 1 and 250, based off of the selected fish, size, and quality

Note that upon beginning the subroutine, difficulty is copied to the variable diff, which is what will be referred to going forwards.

Yank spots

The number of yank spots is first set to min(floor(diff / 2.2) + 1, 5), and then reassigned to clamp(ceil(rand_range(1, yank_spots)), 1, 6)[2]. Next, total_hp is set to ceil((diff * diff * 0.35) * 2). The yank spots are then generated as follows:

var last_spot = 0
for i in yank_spots:
	last_spot += 10 + randi() % int(60 / yank_spots)
	last_spot = clamp(last_spot, 5, 75)
	var health = ceil(rand_range(0.5, 1.2) * (total_hp / yank_spots))
	_create_yank_spot(last_spot, health)

Reel speed and bad speed

Next, the two speeds for the minigame are determined. Reel speed, which is the speed the progress bar fills at, is set to max((0.25 - ((diff) * 0.001)), 0.09) * rod_speed_mult * reel_mult. Bad speed, which is the speed the red bar fills at, is set to max(0.15 - ((diff) * 0.001), 0.1). The red bar starts with a progress of -20, giving the player a head start, and increases by the value of bad_speed on every physics tick (60 times per second, barring lag).

Bonus assignment

After the fishing minigame has been successfully completed, the game calculates bonuses such as coin bags and double catches.

If the player has the Double Hook equipped, the game rolls a random float between 0 and 1, and if it is less than 0.15, the player will receive an extra catch.

Independent of a double catch, as long as the player's rod luck stat is higher than zero the game will then roll another 15% chance to determine if a bonus Coin Bag is caught. Coin Bags are given a random integer size between 15 and 30, and their Quality is always equal to the player's rod luck stat, with the highest possible value of 5 always netting the player an Alpha Coin Bag.

Next, if the player has the Lucky Hook equipped, the game calculates the sell value of the fish and gives the player between 1% and 10% of that value.

And finally, if the player has an active effect that gives gold per catch, then a random amount of money between its minimum and maximum values are given to the player, and in the case of Catcher's Luck ULTRA, an additional 1-25% of the catch's value is added on top of that.

Trivia

  • Given the upper limit for difficulty, the maximum possible total health is 43750, and the maximum possible health value for a fish with a rare single yank spot is 52500.
    • However, no fish in the game currently has a catch difficulty high enough to max out the difficulty variable at 250. The highest is an Alpha Leedsichthys, with a difficulty of 106.25 and a maximum single yank spot value of 9484.

Notes

  1. The fish tables generated by the game are always logged to file, and can be viewed in %AppData%\Godot\app_userdata\webfishing_2_newver\logs\godot.log
  2. Although the number of yank spots is clamped between one and six, the maximum number of possible yank spots is only five, because the value being clamped is first clamped between one and five.