Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Last active April 6, 2026 15:24
Show Gist options
  • Select an option

  • Save KageDesu/388693e5ec2d0e2716c08fabaf10fb8c to your computer and use it in GitHub Desktop.

Select an option

Save KageDesu/388693e5ec2d0e2716c08fabaf10fb8c to your computer and use it in GitHub Desktop.
Simple Fishing Plugin Guide

Simple Fishing Mini-Game Plugin Guide

Simple Fishing new

Author: Pheonix KageDesu
Target: RPG Maker MZ / MV
Website: KD Workshop


Overview

This plugin adds a simple fishing mini-game to your project.
Important: Proper configuration of plugin parameters is required.


Plugin Setup

Required Plugin Parameters

  1. Game Events
  2. Variables
  3. Fishing Regions

How to Start the Fishing Mini-Game

Steps:

  1. Positioning:
    The player must stand on a Fishing Region (default: Region ID 70).

  2. Setup Variables:
    Assign the player's Bait ID and Rod ID to the appropriate variables (set in the plugin parameters).

Way 1: Custom Setup

  1. Call the script:
   InitFishingGame();  

This displays the mini-game UI.

  1. In the fishing game common event (On Inited - from Game Events parameter), call:
   StartFishingGame();  

You can use this step to make additional preparations before the game begins.

Way 2: Quick Start

  1. Call the script:
   InitFishingGame(true); 

This both initializes and starts the mini-game UI.

Tip: For better understanding, refer to the provided Demo Project.


Script Calls

Script Description
InitFishingGame(); Prepares the system and displays the mini-game UI.
StartFishingGame(); Starts the fishing mini-game (must be called after InitFishingGame();).
InitFishingGame(true); A shortcut to initialize and start the mini-game at the same time.
PauseFishingGame(); Pauses the fishing mini-game.
StopFishingGame(); Stops and exits the mini-game.
IsInFishingGame(); Returns true if the fishing mini-game is active.
GetCaughtFishId(); Returns the Item ID of the last caught fish.
GetMissedFishId(); Returns the Item ID of the last missed fish.
CurrentFishId(); Returns the Item ID of the fish currently being caught (during the game).
ShowCaughtFishNotify(Fish_Item_ID); Shows a notification for the caught fish. Fish_Item_ID - item from database caughtFishAnimation
ShowNotifyMessage("message"); Shows a notification message. message - text to display (should be in quotes) CustomMessage
PrintAvailableFishesInRegion(REGION_ID); Prints to console all fishes that can be caught in the specified region. REGION_ID - ID of the fishing region

Fishing Statistics

stats_sm

You can track and utilize fishing performance statistics in your game.

For show fishing statistics window, enable the option Show Fishing Statistics Window in the plugin parameters.

The plugin automatically tracks fishing performance statistics. Use these script calls to access the data:

Script Description
GetFishingStats(); Returns an object with all statistics data (see details below).
GetTotalCaughtFish(); Returns the total number of fish caught.
GetTotalMissedFish(); Returns the total number of fish missed/lost.
GetFishingSuccessRate(); Returns success rate as a percentage (0-100).
GetCurrentStreak(); Returns current consecutive catches streak.
GetMaxStreak(); Returns the maximum streak ever achieved.
GetBiggestFishId(); Returns the Item ID of the most valuable fish caught (by price).
GetFishCaughtCount(Fish_ID); Returns how many times a specific fish was caught.
GetClickAccuracy(); Returns click accuracy as a percentage (0-100).
ResetFishingStats(); Resets all fishing statistics to zero.

Statistics Data Structure

GetFishingStats() returns an object with the following properties:

{
    totalCaught: 0,           // Total fish caught
    totalMissed: 0,           // Total fish missed
    totalAttempts: 0,         // Total fishing attempts
    currentStreak: 0,         // Current consecutive catches
    maxStreak: 0,             // Best streak achieved
    biggestFishId: 0,         // ID of most valuable fish
    biggestFishPrice: 0,      // Price of most valuable fish
    perfectClicks: 0,         // Number of perfect clicks
    badClicks: 0,             // Number of bad clicks
    fishCaughtByType: {}      // Object {fishId: count}
}

Usage Examples

// Show player statistics in a message
var stats = GetFishingStats();
var message = "Fish Caught: " + stats.totalCaught + "\n";
message += "Success Rate: " + GetFishingSuccessRate() + "%\n";
message += "Best Streak: " + stats.maxStreak;
// Display message using your preferred method

// Check if player caught a rare fish 10 times
if (GetFishCaughtCount(42) >= 10) {
    // Unlock achievement
}

// Conditional event based on success rate
if (GetFishingSuccessRate() >= 80) {
    // Player is skilled, trigger special event
}

Additional Features

Display Fish Images in the UI

To display fish images during the mini-game, add the following note tag to the Item's Note section:
<fishIcon:NAME>

  • NAME: The name of the image file (without extension) located in img/pSimpleFishing/.

Add Animated Fishing Spot Images

To add an animated image above an event for a fishing spot:

  1. Add a Comment to the event page:
    fishingSpot:IMAGE_NAME,FRAMES_COUNT

    • IMAGE_NAME: Name of the base image file.
    • FRAMES_COUNT: Number of animation frames.
  2. Place the following files in img/pSimpleFishing/:
    IMAGE_NAME_0.png, IMAGE_NAME_1.png, ..., IMAGE_NAME_(FRAMES_COUNT-1).png

Example:

If the comment is:
fishingSpot:fishingSpotIcon,4 Ensure the following files exist in the folder:
fishingSpotIcon_0.png, fishingSpotIcon_1.png, fishingSpotIcon_2.png, fishingSpotIcon_3.png

fishingSpot


Rod and Bait Selection Menu

The plugin includes a built-in menu for selecting fishing rods and baits.

fishing_menu

To open the menu, call the script:

ShowFishingEquipmentMenu();

As the equipped rod and bait are stored in variables, you need to create items for them and specify in their description the ID of the rod or bait they will represent. For example:

  • Create an item called "Basic Rod" and in its description write: fishingRodId:1 (assuming 1 is the ID of the rod in your plugin parameters Rods).
  • Create an item called "Worm Bait" and in its description write: fishingBaitId:1 (assuming 1 is the ID of the bait in your plugin parameters Baits).

notetag
notetag_ref

Extra Script Calls:

IsPlayerHaveEquippedRod(); // Returns true if the player has a rod equipped
IsPlayerHaveEquippedBait(); // Returns true if the player has a bait equipped
IsPlayerHaveEquippedBaitInInventory(); // Returns true if the player has the equipped bait in their inventory (not just assigned to the variable, but actually item in the inventory (at least 1 unit))
ConsumeEquippedBaitFromInventory(); // Consumes one unit of the equipped bait from the player's inventory

You can use this script calls inside the plugin's common events (see Plugin Parameter Game Events) to add additional conditions or effects based on the player's equipped rod and bait. Or limit the player's access to the fishing mini-game if they don't have the necessary equipment.


Customizing:

  • You can modify the appearance of the minigame by editing the .json files located in: data\PKD_SimpleFishing\ (all files starting with NUI_).

  • Images are stored in the img\pSimpleFishing\ folder. You can replace these images with your own to customize the appearance of the minigame.


Enjoy fishing in your RPG project! 🎣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment