An minigame when fishing starts
The fishing minigame is a timing-based activity where the player must press the Space key when the moving fish overlaps the target area. The fish moves left and right inside the fishing bar, while the target appears in a random position for each attempt. The player has a limited number of attempts and must hit the target before the timer runs out. A perfect catch happens when the center of the fish matches the center of the target. A normal hit happens when the fish overlaps enough with the target. If the player misses, the fail count increases and the next attempt begins. The minigame ends when the player gets a hit, a perfect hit, runs out of attempts, or the time expires.
New chances mechanics
The fishing system now uses a reworked chance system with two separate stages: chance to catch something and chance to receive a specific fish or reward.
1. Chance to catch something
After the player finishes the minigame with a Hit or Perfect Hit, the server calculates if the player successfully catches something.
A normal hit uses the base success chance configured in fishing.json.
Example:
"baseSuccessPct": 20This means a normal hit gives a base 20% chance to catch something.
A perfect hit gives an additional bonus chance.
Example:
"perfectBonusPct": 20With this setup:
Normal Hit = 20% chance
Perfect Hit = 20% base chance + 20% perfect bonus = 40% chanceThe system also supports bonus apply values from the player, such as:
POINT_FISHING_SUCCESS_PCTThis means items, bonuses, events, or special effects can increase the player’s chance to successfully catch something.
Final success chance example:
Base chance: 20%
Player fishing bonus: +10%
Final chance: 30%For a perfect hit:
Base chance: 20%
Perfect bonus: +20%
Player fishing bonus: +10%
Final chance: 50%So the minigame result matters. A better timing result gives the player a better chance to catch something.
2. Chance to Catch a Specific Fish or Reward
If the player successfully catches something, the server then chooses what reward the player receives.
All possible rewards are configured inside fishing.json.
Each fish or reward can have:
{
"vnum": 27803,
"weight": 100,
"rare": false,
"maps": [1, 21, 41]
}Explanation:
vnum = item ID of the reward
weight = chance weight of this reward
rare = whether the reward is rare or normal
maps = maps where this reward can be caughtThe reward system is based on weighted chances. Items with higher weight have a higher chance to be selected.
Example:
Fish A weight 100
Fish B weight 50
Rare Fish C weight 10Total weight:
160Approximate chances:
Fish A: 62.5%
Fish B: 31.25%
Rare Fish C: 6.25%This makes the system very flexible because every fish, item, or rare reward can be configured directly from JSON.
3. Map-Based Fishing Rewards
Each reward can also be restricted to specific maps.
Example:
"maps": [1, 21, 41]This means the fish or item can only be caught on those maps.
If the map list is empty, the reward can be caught everywhere.
This allows server owners to create different fishing areas with different rewards, such as:
Beginner maps with common fish Special maps with rare fish Event maps with limited-time rewards Premium zones with exclusive catches
4. Normal and Rare Fishing Boosts
The system also supports separate boosts for normal and rare rewards.
Normal reward boost:
AFFECT_FISHING_BOOSTRare reward boost:
AFFECT_FISHING_RARE_BOOSTThese boosts increase the weight of normal or rare rewards during the reward roll.
For example, if a rare fish has weight 10 and the player has a 50% rare fishing boost, its new weight becomes:
10 + 50% = 15This does not guarantee the rare fish, but it increases the chance of getting rare rewards.
Example config
{
"maxDuration": 15,
"maxAttempts": 3,
"baseSuccessPct": 20,
"perfectBonusPct": 20,
"entries": [
{ "vnum": 27800, "weight": 5000, "rare": false },
{ "vnum": 27801, "weight": 3500, "rare": false },
{ "vnum": 27802, "weight": 2000, "rare": false },
{ "vnum": 27850, "weight": 120, "rare": true },
{ "vnum": 27851, "weight": 60, "rare": true },
{ "vnum": 50041, "weight": 80, "rare": true, "maps": [41] }
]
}