釣りミニゲーム – GALV_Fishing.js
- タイトル
- Fishing mini game that runs in it's own scene
- 作者名
- Galv - galvs-scripts.com様
- ヘルプ
- Galv's Fishing Mini Game
----------------------------------------------------------------------------
This plugin adds a fishing mini game where the player can catch fish. It's
not plug-and-play and requires a lot of setting up. Make sure to read all
the plugin settings as they contain a lot of options you can tweak.
The demo has examples of the mini game setup and working, however it is up
to you as a developer to trial and error and decide on the best rod strength
as well as fish pull strength and detect/take to use to balance it for your
players.
INFORMATION:
1. New folder
A new folder is required in your project: /img/fishing/
This is where graphics related to fishing are kept. Use the images in the
plugin demo or as templates to create your own.
2. Fishing spots aka ponds
The mini game works by using an event that contains a bunch of script calls
that can randomly build a list of fish that will appear in the fishing spot.
Once the fish list script calls have run, then the script call to run the
fishing mini game is used.
3. Creating fish
In the plugin settings there are a lot of listings to use to create fish
with different attributes. Each fish has a number (eg. Fish 1) and this
number will be used when choosing which fish to add to a pond.
NOTE: These "Fish" can be used for any object under the water such as
chests, rocks, monsters. They are all classified as "Fish".
The fish settings are separated by commas, and in case of settings with
multiple values those values are separated by a |.
img,spd,pull,move,lvl,x,item,baits,range,stats,length,weight,ctxt,cevent,anim
img = the image used from /img/fishing/ folder. (Fish can be any size)
spd = the swim speed of the fish.
pull = the higher their pull, the more difficult it is to reel in and
the quicker the line will break. Stronger rods will be able to
pull in fish with a higher pull more easily.
move = A number to determine how the fish moves.
-1 unmovable - use for things like rocks to snag the line
- will constantly stress the line when reeling in
0 inanimate - used for things like chests or quest items
- will constantly stress the line when reeling in
- will move to their starting Y position if pulled
- away from it (eg. sink if starts at bottom)
1 passive - normal fish movement
- will stress the line only when fish is pulling
2 erratic - fish changes direction more often
will stress the line only when fish is pulling
lvl = low|high - where the fish can swim. 10 = ground, 0 = water surface
eg: 0|10
x = 0 far left, 10 far right, -1 for random.
the fish will start in this x position.
item = the item id that will be gained if the fish is caught
baits = id|id|id - a list of bait id's that the fish will eat.
It will ignore any other bait that doesn't have one of those id's
eg: 3|5|6|10
range = detect|take - detect is the distance from bait a fish will notice
take is the distance from bait a fish will bite
eg: 20|2
stats = true or false if fish is to display in stats window
length = low|high - For fish stats - A random number between low & high
eg: 40|80
weight = low|high - For fish stats - A random number between low & high
eg: 10|23
ctxt = text displayed instead of the item name when catching a fish and
when displayed in the fish stat scene.
cevent = When this fish is caught, it will exit fishing and run common event
anim = animation id played instead of default when caught
4. Fishing
In order to cast a rod and start fishing, the player must equip both a rod
and a bait. These are items with certain notetags (further down). Rods can
have a power value to make them faster or better at reeling fish in and bait
has a sink speed and baitId that is used to determine what fish will eat it.
When reeling in, the player can hold down the 'ok' button or the right
arrow. Reeling a fish in that is pulling on the line causes the line stress
and the player must manage the stress of the line by trying not to reel
while the fish is pulling the opposite direction. Once a fish is pulled all
the way to the right and at the surface of the pond, it is caught and the
player obtains the specified item and the fish's stats are recorded.
5. Spritesheets
The fishing rod spritesheet uses a bunch of rows to show fishing.
1. Standing idle
2. Casting
3. Reeling in (normal)
4. Not reeling (normal)
5. Reeling in (while fish pulling)
6. Not reeling (while fish pulling)
The fish spritesheets (remember 'fish' is a term for all objects here)
uses 4 frames in a single row to animate.
The splash spritesheet works the same but uses 5 frames
The casting spritesheet works the same but frames are specified in the
plugin settings and can be changed to look however you like.
6. Fish Stats
Fish are only added to the stats scene if they have their stats setting set
to true. The scene will display the name of the ITEM obtained from a fish
in the stat scene or if no item, the name of the GRAPHIC for the fish.
Fish stats can be obtained and stored in game variables to use in dialogue
during your game. See below in script calls section for that.
----------------------------------------------------------------------------
Note Tags for ITEMS
----------------------------------------------------------------------------
<rod:x> specify an item as a rod with x being rod strength
<rodImg:x> image to use from /img/fishing/ folder. Leave out to use
the default rod graphic from plugin settings
<bait:x> specify an item as bait with a number id that is used to
determine which fish will take the bait.
<baitImg:x> image to use from /img/fishing/ folder. Leave out to use
the default bait graphic from plugin settings
<baitSink:x> How quickly the bait sinks. eg. 0.5 is slow, 3 is fast
Defaults to 1 if left blank
----------------------------------------------------------------------------
Note Tags for ACTORS
----------------------------------------------------------------------------
If the 'Fisher Rod XY Offset' values do not work for every actor you have
(perhaps you have different size character graphics) then you can use these
two note tags to override the plugin settings for certain actors:
<rod_x:x> override the Fisher Rod XY Offset X value
<rod_y:y> override the Fisher Rod XY Offset Y value
----------------------------------------------------------------------------
SCRIPT for CONDITIONAL BRANCH
----------------------------------------------------------------------------
Galv.FISH.hasData(id) checks if the player has caught fish with id
----------------------------------------------------------------------------
SCRIPT for CONTROL VARIABLES
----------------------------------------------------------------------------
Galv.FISH.data(id,'data') returns data for fish with id. data can be:
'weight', 'length', 'amount'
Galv.FISH.totalCaught() returns total number of all fish caught
----------------------------------------------------------------------------
EVENT SCRIPT CALLS
----------------------------------------------------------------------------
Fish added to the pond will remain in the fish list for the fishing scene.
Catching fish will not remove them from the fishing scene permanently, they
will be returned when exiting and re-entering the scene again. You must
clear the pond in order to create a new fish list for the fishing scene.
Galv.FISH.addFish(x,x,x); Add specified fish id's to the pond. Any
amount can be added separated by commas.
Galv.FISH.randFish(id,min,max); Add random amount of a fish id to pond
Galv.FISH.clearPond(); Clears all added fish from the pond.
Galv.FISH.run(); starts fishing scene. Do a fadeout event command
before this for fading transition.
Galv.FISH.viewStats(); view the fish stat scene
$gamePlayer._rodEquipped = x; equip player with item id x for rod
(MUST BE A ROD ITEM WITH ROD TAG!)
$gamePlayer._baitEquipped = x; equip player with item id x for bait
(MUST BE A BAIT ITEM WITH BAIT TAG!)
Galv.FISH.changePond(setting,value); Can change pond settings (below)
default settings:
- 'bg' 'back1' img in /img/fishing/ folder
- 'surface' 'surface1' img in /img/fishing/ folder
- 'under' 'under1' img in /img/fishing/ folder
- 'underOverlay' 'under1_1' img in /img/fishing/ folder
- 'land' 'land1' img in /img/fishing/ folder
- 'splash' 'splash' anim in /img/fishing/ folder
- 'speed' [0.3,0.3,1] [bg,surface,underOverlay] scroll
- 'music' {name:'Field1',pan:0,pitch:100,volume:80};
EXAMPLES:
Galv.FISH.changePond('bg','back2'); change the background image
Galv.FISH.changePond('speed',[0,0,0.5]); change scroll speed for bgs
Galv.FISH.changePond('music',{name:'Field1',pan:0,pitch:100,volume:80}); - パラメータ
-
param --- GRAPHICS --- desc default param Surface Y desc The y position of the surface graphic. (surface graphic is 170px high) default 185 param Fisher Info desc The position of the fisher
x,ydefault 730,150 param Fisher Rod XY Offset desc The offset position for rod based on fisher
x,ydefault -8,-25 param Default Rod Graphic desc Image name located in /img/fishing/ for fishing rod over the fisher default rod require 1 dir img/system/ type file param Default Bait Graphic desc Image name located in /img/fishing/ for bait in the water default bait require 1 dir img/system/ type file param Equip Slot Graphic desc The slot image for where bait and rods icons are displayed default equipslot require 1 dir img/system/ type file param Rod Equip XY desc The position for the rod equip slot
x,ydefault 40,40 param Bait Equip XY desc The position for the rod equip slot
x,ydefault 100,40 param No Rod Text desc Text displayed where equipped rod icon is when no rod equipped default Rod param No Bait Text desc Text displayed where equipped bait icon is when no bait equipped default Bait param No RodBait Text Size desc The size of the above No Rod and No Bait text. default 14 param Cast Power Graphic desc Image name located in /img/fishing/ for cast power spritesheet graphic default castpower require 1 dir img/system/ type file param Cast Power Frames desc Number of frames in cast power graphic default 11 param Cast Pow XY desc The position for the cast power graphic
x,ydefault 410,200 param Splash Graphic desc Image name located in /img/fishing/ for the splash graphic default splash require 1 dir img/system/ type file param -- SOUND/ANIM -- desc default param Default Music desc Music played when in fishing scene
name,volume,pitchdefault Field1,80,100 param Rod Equip SE desc Sound effect when equipping a rod
name,volume,pitchdefault Equip1,80,100 param Bait Equip SE desc Sound effect when equipping bait
name,volume,pitchdefault Equip1,80,100 param Cast SE desc Sound effect when casting rod
name,volume,pitchdefault Wind4,80,120 param Reel SE desc Sound effect that repeats when reeling line in
name,volume,pitchdefault param Splash SE desc Sound effect when bait lands in water
name,volume,pitchdefault Water1,80,140 param Hooked Anim desc The animation Id played on a fish when hooked default 1 param Break Anim desc The animation Id played on a fish when the line breaks default 1 param Player Catch Anim desc The default animation Id played on player when a fish is caught default 0 param --- MENU --- desc default param Menu Pos desc Position of the menu.
x,y,widthdefault 288,200,240 param Cast Text desc Menu text for casting the line default Cast Line param Equip Rod Text desc Menu text for equipping different rods default Equip Rod param Equip Bait Text desc Menu text for equipping different bait default Equip Bait param Leave Text desc Menu text for leaving the fishing scene default Stop Fishing param Catch Window desc Position and size of the catch info window.
x,y,width,heightdefault 200,160,420,180 param Caught Text desc If no custom text, this text will be followed by the item name default You caught a param Equip Window Width desc Width of the equip rod/bait window default 72 param Equip Window Cols desc Number of bait/rod item icons in a row default 1 param Length Text desc The name of what you want 'length' to be called default Length param Weight Text desc The name of what you want 'weight' to be called default Weight param -- RECORDS -- desc default param Record Title desc The title at the top of the records scene default FISH STATS param Record Types desc Text next to info of how many fish types caught default Fish Types param Record Total desc Text next to how many fish have been caught total default Total Caught param Record Fish desc Text next to the largest fish caught default Record Fish param Record Fish Number desc Text next to the number of selected fish caught default Number Caught param Record Fish Length desc Text next to the record length of selected fish caught default Record Length param Record Fish Weight desc Text next to the record weight of selected fish caught default Record Weight param Record Scene Padding desc Padding surround the record scene. default 0 param Record Fish Y desc The Y position of the fish displayed in record scene default 150 param Record Fish Scale desc The size of the fish sprite in record scene (1 is 100%) default 1 param --- FISH --- desc default param Fish 1 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default Name,5,0,1,2|8,-1,23,1|2|3,30|2,true,140|310,23|52,,0,0 param Fish 2 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 3 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 4 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 5 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 6 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 7 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 8 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 9 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 10 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 11 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 12 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 13 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 14 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 15 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 16 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 17 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 18 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 19 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 20 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 21 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 22 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 23 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 24 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 25 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 26 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 27 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 28 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 29 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 30 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 31 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 32 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 33 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 34 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 35 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 36 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 37 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 38 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 39 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 40 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 41 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 42 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 43 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 44 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 45 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 46 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 47 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 48 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 49 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default param Fish 50 desc img,speed,pull,move,lvl|lvl,x,item,bait|bait|bait,range|range,stats,length|length,weight|weight,ctxt,cevent,anim default - ライセンス表記
- Not Free For Commercial Use
Terms of Use
https://galvs-scripts.com/terms-of-use/
紹介ページ https://galvs-scripts.com/category/rmmv-plugins/mv-scenessystems/#post-1856