Essentials Docs Wiki

The Essentials wiki has moved and is now at: Essentials Engine wiki

This wiki will no longer be updated.

READ MORE

Essentials Docs Wiki
(Created page with "This article describes '''fishing'''. == Where to fish == Fishing can be done while facing any water tile, i.e. a tile with the terrain tags 5, 6, 7, 8 or 9. The player ca...")
Tag: Visual edit
 
Maruno (talk | contribs)
No edit summary
Line 1: Line 1:
  +
[[Image:Fishing.png|right|256px|thumb|Don't let it be the one that got away.]]
This article describes '''fishing'''.
 
  +
{{for|general information about wild encounters|Wild encounters}}
 
This page describes '''fishing'''.
   
 
== Where to fish ==
 
== Where to fish ==
  +
Fishing can be done while facing any water tile, i.e. a tile with the terrain tags 5, 6, 7, 8 or 9. The player can fish while standing on land or while surfing.
+
Fishing can be done while facing any water tile, i.e. a tile with the [[Tilesets|terrain tags]] 5, 6, 7, 8 or 9. The player can fish while standing on land or while surfing.
   
 
== Fishing sprites ==
 
== Fishing sprites ==
  +
Fishing involves showing the player's sprite cast and use a fishing rod. There are two versions of this animation, one used when standing and fishing and the other used when surfing and fishing. Both are defined by a player character's metadata. As with all other player character graphics, the fishing charsets take the player's outfit into consideration.
+
Fishing involves showing the player's sprite cast and use a fishing rod. There are two versions of this animation, one used when standing and fishing and the other used when surfing and fishing. Both are defined by a player character's [[metadata]]. As with all other player character graphics, the fishing charsets take the player's outfit into consideration.
   
 
== Encounter types ==
 
== Encounter types ==
  +
The three encounter types used for fishing are:
+
The three [[Wild encounters|encounter types]] used for fishing are:
  +
 
* OldRod
 
* OldRod
 
* GoodRod
 
* GoodRod
 
* SuperRod
 
* SuperRod
  +
The only difference between these three encounter types is the number of entries each one has (2, 3 and 5 respectively). They don't necessarily need to be used in the order "worst -> best". See the article Encounters for more information.
+
The only difference between these three encounter types is the number of entries each one has (2, 3 and 5 respectively, by default). They don't necessarily need to be used in the order "worst -> best".
   
 
== Scripts ==
 
== Scripts ==
The fishing scripts are all located in the script section '''PokemonField'''. The main def is called <code>pbFishing</code>, and what follows below is a description of what this def does.
 
   
 
The fishing scripts are all located in the script section '''PField_Field'''. The main method is <code>def pbFishing</code>, and what follows below is a description of what this method does.
The def first defines two values: "bitechance" (probability there will be a bite) and "hookchance" (probability of a battle after successfully hooking it, i.e. by pressing the use button fast enough). Both are set to 65% by default.
 
   
 
The method first defines two values: "bitechance" (probability there will be a bite) and "hookchance" (probability of a battle after successfully hooking it, i.e. by pressing the use button fast enough). By default, the former depends on the type of fishing rod used and the ability of the first Pokémon in the [[party]], and the latter is 100.
Then the def <code>pbFishingBegin</code> is called, which displays the rod casting animation.
 
   
 
Then <code>def pbFishingBegin</code> is called, which displays the rod casting animation.
A random number ("time") is then chosen (<code>2 + rand(10)</code> dots), and the def <code>pbWaitMessage</code> is called, which displays "<code>. . . . .</code>" at the rate of one dot every 0.5 seconds until there are "time" number of dots. If the player presses the use or back button while the dots are being displayed, the fishing is cancelled with the message "Not even a nibble...".
 
   
If the fishing is not cancelled, then another random number is chosen (out of 100). If this number is greater than "bitechance", or there are no encounters defined for the used rod in that map, then the fishing is cancelled with the message "Not even a nibble...". If it is less than "bitechance", then the def <code>pbWaitForInput</code> is called, which displays the message "Oh! A bite!" at the end of the dots. It then waits for a short time (<code>(15 + rand(6)) / 40</code> seconds) for the player to tap either the use or back button. If they don't do so within that time, then the fishing is cancelled with the message: "It got away...".
+
A random number ("time") is then chosen (<code>5 + rand(6)</code> dots), and <code>def pbWaitMessage</code> is called which displays "<code>. . . . .</code>" at the rate of one dot roughly every 0.5 seconds until there are "time" number of dots. If the player presses the [[Controls|use or back button]] while the dots are being displayed, the fishing is cancelled with the message "Not even a nibble...".
   
However, if the player ''does'' manage to tap a button within that time, then a third random number is chosen (out of 100). If this number is less than "hookchance", then a Pokémon has been hooked and a wild battle ensues. If the third random number is greater than "hookchance", then the whole process happens again (i.e. everything after casting the rod), but with "15" added to both "bitechance" and "hookchance" (making it more likely to get a bite/hook the next time). This keeps happening until the player either successfully hooks a Pokémon (leading to a battle) or fails.
+
If the fishing is not cancelled, then another random number is chosen (out of 100). If this number is greater than "bitechance", or there are no [[Wild encounters|encounters]] defined for the used rod in that map, then the fishing is cancelled with the message "Not even a nibble...". If it is less than "bitechance", then <code>def pbWaitForInput</code> is called, which displays the message "Oh! A bite!" at the end of the dots. It then waits for a short time (<code>(20 + rand(21)) / 40</code> seconds) for the player to tap either the [[Controls|use or back button]]. If they don't do so within that time, then the fishing is cancelled with the message: "It got away...".
   
  +
However, if the player ''does'' manage to tap a button within that time, then a third random number is chosen (out of 100). If this number is less than "hookchance", then a [[Pokémon]] has been hooked and a [[Wild encounters|wild battle]] ensues. If the third random number is greater than "hookchance", then the whole process happens again (i.e. everything after casting the rod). This keeps happening until the player either successfully hooks a Pokémon (leading to a battle) or fails.
   
 
At the end of the fishing session (both after successfully hooking a Pokémon and after failing to hook one), <code>def pbFishingEnd</code> is called, which is just the reverse of the rod casting animation (i.e. reels in). Then a battle occurs (if successful).
 
At the end of the fishing session (both after successfully hooking a Pokémon and after failing to hook one), the def <code>pbFishingEnd</code> is called, which is just the reverse of the rod casting animation (i.e. reels in). Then a battle occurs (if successful).
 
   
 
=== Automatic hooking ===
 
=== Automatic hooking ===
  +
There is a setting (<code>FISHINGAUTOHOOK</code>) in the script section '''Settings''', which if TRUE, will mean Pokémon are hooked automatically rather than requiring a reaction text.
+
There is a setting (<code>FISHINGAUTOHOOK</code>) in the [[script section]] '''Settings''', which if TRUE will mean that Pokémon are hooked automatically rather than requiring a reaction text.
   
 
== Tips ==
 
== Tips ==
  +
* Change the probabilities and waiting times, to make it easier/harder to hook a Pokémon. Notably, the default length of time in which you have to press a button to hook the Pokémon is very short (between 0.375 and 0.5 seconds), and you may want to make this longer so that players with slower reaction times stand a chance of hooking a Pokémon.
+
* Change the probabilities and waiting times, to make it easier/harder to hook a Pokémon. Notably, the default length of time in which you have to press a button to hook the Pokémon is fairly short (between 0.5 and 1 second), and you may want to make this longer so that players with slower reaction times stand a chance of hooking a Pokémon.
** You could make it harder to hook Pokémon depending on the rod used.
 
* Create new fishing encounter methods that depend on the time of day as well as the type of rod, e.g. certain species can only be fished for during the day.
+
* Create new fishing [[Wild encounters|encounter methods]] that depend on the time of day as well as the type of rod, e.g. certain species can only be fished for during the day.
 
* Have just one fishing rod, but different kinds of bait that will attract different species (the encounter type will depend on the type of bait used, not the type of rod used).
 
* Have just one fishing rod, but different kinds of bait that will attract different species (the encounter type will depend on the type of bait used, not the type of rod used).
* Modify the species encountered through fishing depending on whether the player is fishing on a particular tile in a map (e.g. Feebas does this). Save the special tile(s) coordinates somewhere (remember to relate them to a particular map), and modify the item handler effects for the rod items as appropriate.
+
* Modify the species encountered through fishing depending on whether the player is fishing on a particular tile in a map (e.g. Feebas does this). Save the special tile(s) coordinates somewhere (remember to relate them to a particular map), and modify the [[Item effects|item handler effects]] for the rod items as appropriate.
* Why not turn fishing into a mini-game, rather than a simple reaction test?
+
* Why not turn fishing into a [[Mini-games|mini-game]], rather than a simple reaction test?

Revision as of 00:18, 11 August 2019

Fishing

Don't let it be the one that got away.

For general information about wild encounters, see Wild encounters.

This page describes fishing.

Where to fish

Fishing can be done while facing any water tile, i.e. a tile with the terrain tags 5, 6, 7, 8 or 9. The player can fish while standing on land or while surfing.

Fishing sprites

Fishing involves showing the player's sprite cast and use a fishing rod. There are two versions of this animation, one used when standing and fishing and the other used when surfing and fishing. Both are defined by a player character's metadata. As with all other player character graphics, the fishing charsets take the player's outfit into consideration.

Encounter types

The three encounter types used for fishing are:

  • OldRod
  • GoodRod
  • SuperRod

The only difference between these three encounter types is the number of entries each one has (2, 3 and 5 respectively, by default). They don't necessarily need to be used in the order "worst -> best".

Scripts

The fishing scripts are all located in the script section PField_Field. The main method is def pbFishing, and what follows below is a description of what this method does.

The method first defines two values: "bitechance" (probability there will be a bite) and "hookchance" (probability of a battle after successfully hooking it, i.e. by pressing the use button fast enough). By default, the former depends on the type of fishing rod used and the ability of the first Pokémon in the party, and the latter is 100.

Then def pbFishingBegin is called, which displays the rod casting animation.

A random number ("time") is then chosen (5 + rand(6) dots), and def pbWaitMessage is called which displays ". . . . ." at the rate of one dot roughly every 0.5 seconds until there are "time" number of dots. If the player presses the use or back button while the dots are being displayed, the fishing is cancelled with the message "Not even a nibble...".

If the fishing is not cancelled, then another random number is chosen (out of 100). If this number is greater than "bitechance", or there are no encounters defined for the used rod in that map, then the fishing is cancelled with the message "Not even a nibble...". If it is less than "bitechance", then def pbWaitForInput is called, which displays the message "Oh! A bite!" at the end of the dots. It then waits for a short time ((20 + rand(21)) / 40 seconds) for the player to tap either the use or back button. If they don't do so within that time, then the fishing is cancelled with the message: "It got away...".

However, if the player does manage to tap a button within that time, then a third random number is chosen (out of 100). If this number is less than "hookchance", then a Pokémon has been hooked and a wild battle ensues. If the third random number is greater than "hookchance", then the whole process happens again (i.e. everything after casting the rod). This keeps happening until the player either successfully hooks a Pokémon (leading to a battle) or fails.

At the end of the fishing session (both after successfully hooking a Pokémon and after failing to hook one), def pbFishingEnd is called, which is just the reverse of the rod casting animation (i.e. reels in). Then a battle occurs (if successful).

Automatic hooking

There is a setting (FISHINGAUTOHOOK) in the script section Settings, which if TRUE will mean that Pokémon are hooked automatically rather than requiring a reaction text.

Tips

  • Change the probabilities and waiting times, to make it easier/harder to hook a Pokémon. Notably, the default length of time in which you have to press a button to hook the Pokémon is fairly short (between 0.5 and 1 second), and you may want to make this longer so that players with slower reaction times stand a chance of hooking a Pokémon.
  • Create new fishing encounter methods that depend on the time of day as well as the type of rod, e.g. certain species can only be fished for during the day.
  • Have just one fishing rod, but different kinds of bait that will attract different species (the encounter type will depend on the type of bait used, not the type of rod used).
  • Modify the species encountered through fishing depending on whether the player is fishing on a particular tile in a map (e.g. Feebas does this). Save the special tile(s) coordinates somewhere (remember to relate them to a particular map), and modify the item handler effects for the rod items as appropriate.
  • Why not turn fishing into a mini-game, rather than a simple reaction test?