Skip to content

Instantly share code, notes, and snippets.

@KageDesu
Last active December 18, 2024 10:42
Show Gist options
  • Save KageDesu/388693e5ec2d0e2716c08fabaf10fb8c to your computer and use it in GitHub Desktop.
Save KageDesu/388693e5ec2d0e2716c08fabaf10fb8c to your computer and use it in GitHub Desktop.
Simple Fishing Plugin Guide

Simple Fishing Mini-Game Plugin Guide

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

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


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