Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Fishing System

Fishing System
By: xXDarkDragonXx

First off, I was bored so I made this simple system.

Description:

Allows the player to fish in his / her game without using any scripts at all.

Instructions:

Open up your Database and go to Common Events. There we will create two Common Events:

Basic Fishing
Advanced Fishing

(I'll put comments inside the event so don't go putting them in your actual Common Event unless it serves you as a guide.)

IMPORTANT NOTE: You can use ONE variable for each fishing (basic, advance, expert bla bla bla). In this example I used two, one for each type of fishing but you can use one for each fishing type.

Firstly, let's go with the Basic Fishing one.

Inside the whole Common Event, do this:

Code:
@>Comment: Let's now set the Basic Fishing variable with random 
 :		: values. The program will give the variable a random 
 :		: value and depending on the value, it does an action.
@>Control Variables: [0001: Basic Fishing] = Random No. (1...7)
@>Conditional Branch: Variable [0001: Basic Fishing] == 1
  @>Comment: Wait time. Or else the effects will SUCK!
  @>Wait: 55 frame(s)
  @>Comment: You can alter the waiting frames to your likings.
   :	   : The 'Wait: x frame(s)' will add reality.
  @>Comment: Cheap sound.
  @>Play SE: '022-Dive02', 85, 100
  @>Change Items: [Bait], - 1
  @>Change Items: [Guppy], + 1
  @>Text: You got...
   :	: A Guppy! Fresh from the pond!
  @>Comment: Reset graphic. That is IF before the fishing started
   :	   : you changed the hero's graphic like I did in the demo.
  @>Change Actor Graphic: [Aluxes], 150-Salior01, 0, , 0
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Basic Fishing] == 2
  @>Wait: 55 frame(s)
  @>Play SE: '022-Dive02', 85, 100
  @>Change Items: [Bait], - 1
  @>Change Items: [Bass], + 1
  @>Text: You got...
   :	: A Bass.I wonder if it tastes good or... ?
  @>Change Actor Graphic: [Aluxes], 150-Salior01, 0, , 0
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Basic Fishing] == 3
  @>Wait: 55 frame(s)
  @>Play SE: '022-Dive02', 85, 100
  @>Change Items: [Bait], - 1
  @>Change Items: [Salmon], + 1
  @>Text: You got...
   :	: A Salmon. Why the heck was it in a
   :	: pond? O_O;; Questions of the unknown...
  @>Change Actor Graphic: [Aluxes], 150-Salior01, 0, , 0
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Basic Fishing] == 4
  @>Wait: 55 frame(s)
  @>Play SE: '022-Dive02', 85, 100
  @>Change Items: [Bait], - 1
  @>Change Items: [OMFG A BOOT!!], + 1
  @>Text: You got...
   :	: OMFG A BOOT!!. Man, you got bad luck.
  @>Change Actor Graphic: [Aluxes], 150-Salior01, 0, , 0
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Basic Fishing] >= 5
  @>Wait: 55 frame(s)
  @>Text: No fish decided to go home with you.
   :	: Try again and maybe it'll go with you.
  @>Change Actor Graphic: [Aluxes], 150-Salior01, 0, , 0
  @>
 : Branch End
@>

That's it for the Basic Fishing Common Event. Now let's go over to the items:

*Create one for the Bait, Consumable: NO (we descrease the amount each time we fish something up), put up a price, Scope: NONE, Occasion: NEVER
*Create the basic fishes (used in Basic Fishing Common Event), the ones I created were:​

Guppy
Bass
Salmon
OMFG A BOOT!!

And put the same options as you did to the Bait, except the price because you may sell them or you may want to put them to be consumable so hero regains HP or whatever, use your imagination here.

Let's go now the weapons. There the rods shall be created.

*Create a new weapon called 'Basic Fishing Rod' (as an example) which will be used to fish
*Create a new weapon called 'Advaned Fishing Rod' (as an example) which will be used to fish​

Now let's go the map. Create a pong or whatever and create a new event.The very same will
be:

Code:
@>Comment: First off, let's check if the player has the Basic Fishing 
 :		: Rod equipped.
 :		: (It can be a weapon, armor, accessory, whichever 
 :		: you are happy with. In my case, is a wepon.)
@>Conditional Branch: [Aluxes] is [Basic Fishing Rod] equipped
  @>Conditional Branch: [Bait] in inventory
	@>Comment: Now let's check if the player has bait (what is fishing 
	 :	   : without bait? NOTHING!! That's what it is.)
	@>Comment: This right here will be used to change the hero's 
	 :	   : graphic to a fishing one. This is up to you.
	@>Change Actor Graphic: [Aluxes], Fishermanright, 0, , 0
	@>Play SE: '022-Dive01', 85, 100
	@>Call Common Event: Basic Fishing
	@>
   : Branch End
   @>
  : Else
   @>
  : Branch End
@>Comment: For the Advanced Fishing.
@>Conditional Branch: [Aluxes] is [Basic Fishing Rod] equipped
  @>Conditional Branch: [Bait] in inventory
	@>Change Actor Graphic: [Aluxes], Fishermanright, 0, , 0
	@>Play SE: '022-Dive01', 85, 100
	@>Call Common Event: Advanced Fishing
	@>
   : Branch End
   @>
  : Else
   @>
  : Branch End
@>

OK so what we did here is check if the player has equipped any of the rods, if he has equipped at least one of them, checks for Bait in inventory, if the player has Bait, then it starts the fishing depending on wich rod you have equipped.

The Advaned Fishing Common Event is like the Basic Fishing One. The only thing that changes is the variable to another one (or you could use the very same one for every fishing Common Event, which is better because you'll save up some variables) and change the fishes that it gives you. Oh, and by the way, you have to create new fishes for the Advanced Fishing Common Event or else is crap. XD

Demo:

I made you guys read all that and then find the demo. XD Well, here:

Fishing System

Well, I think that's about it.

Hope it's for good use to you guys.
 
I love fishing. That was pretty neat. I caught a boot, and a frozen tuna. I don't know how I'm gonna cook it though.

I'll try to implement this in my game for fun. I already have fish in my game too so it'll be nice. Thanks.
 
this looks good, but since I want so change the type and frequency of catching fish to be based on skill level I'll probably just add that as a conditional branch and make the rod a generic weapon. But really good system here that's for sure
 
The tutorial is quite nice. I sure it will come in handy for anyone who wants a system like this. Very helpful for people just starting out with rmxp. And I love the boot! :D

You really should consider putting the big ugly code blocks in spoiler tags. That would be a lot easier on the eyes. :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top