マップ上のボタンが押されたときに、ツールを切り替えて使用するプラグイン – Galv_Tools.js

タイトル
Swap between and use tools when a button is pressed on the map.
作者名
ヘルプ
Galv's Tools
----------------------------------------------------------------------------
This plugin creates a tool system, where the player can cycle between items
that are designated as tools and press a button to use the tool that is
selected on the screen.
The basis behind this plugin is to allow players to event what happens when
a tool is used, giving the player script calls to use to assist them with
tool functionality. Each tool activates a common event to control this.


----------------------------------------------------------------------------
NOTE TAGS for ITEMS
----------------------------------------------------------------------------

<tool:x> where x is the COMMON EVENT id that is run on tool use

<toolimg:x> where x is an image from /img/pictures/ to use for the
tool instead of the tool's icon for the HUD

----------------------------------------------------------------------------
NOTE TAGS for EVENTS
----------------------------------------------------------------------------

<label:x> events can have any tag in them which can be accessed
by the tool's common event to determine functionality.
the label can be anything and different for each event

----------------------------------------------------------------------------
COMMENTS for EVENT PAGES
----------------------------------------------------------------------------

<stopTool> disables tools on event with this comment on active page
eg. use if you change to an empty page to remove an event

----------------------------------------------------------------------------
SCRIPT for CONDITIONAL BRANCH
----------------------------------------------------------------------------

Galv.TOOLS.frontEvent('label') detects if an event has a <label> note
on the tile in front of the player

Galv.TOOLS.frontEvent('label',x) detects if label's x value was set
eg <label:x>

Galv.TOOLS.underEvent('label') same as above but same tile as player
Galv.TOOLS.underEvent('label',x) same as above but same tile again

----------------------------------------------------------------------------
SCRIPT for event SCRIPT calls
----------------------------------------------------------------------------

$gameSystem.toolBtnDisabled = status status can be true or false
to disable/enable tool hud

Galv.TOOLS.equipTool(id); manually equip tool item to player.
this won't do anything if the player
does not actually have the tool item

Galv.TOOLS.event AFTER one of the above conditional branch script
is used, it stores the event object found in this
object variable. This can be used with a little
javascript knowledge (see demo for examples and
also some below)

Galv.TOOLS.event._eventId the event Id of event tool is used on
can be used in Control Variables script

Galv.TOOLS.event.erase() erase the event

Galv.TOOLS.event._animationId = x; play animation on tool event

I recommend asking or searching forums for more scripts you can use on an
event object.

----------------------------------------------------------------------------
パラメータ
param HUD Image
desc Name of the image located in /img/system/ to use for the HUD
default toolhud
require 1
dir img/system/
type file

param HUD XY
desc The x,y position of the tool hud.
default 710,520

param HUD Icon XY
desc The x,y position of the tool icon relative to the hud's x,y.
default 50,50

param Icon Size
desc The width and height that the tool icon/image will display at.
width,height
default 32,32

param Initial Zoom
desc When swapping tools the icon starts zoomed in this much. 1 = 100%, 2 = 200% etc.
default 2

param Number Size
desc The font size for the item number display over tools with more than 1 item
default 18

param Switch Left
desc Button to switch tool left
Default: pagedown (which is L on gamepad)
default pagedown

param Switch Right
desc Button to switch tool right
Default: pageup (which is R on gamepad)
default pageup

param Use Tool
desc Button to use the selected tool
Default: alt (no gamepad button)
default alt

param Gamepad Dash Button
desc Make the gamepad cancel button dash and the previous dash button becomes use tool. true or false
default true

ライセンス表記
Terms of Use
https://galvs-scripts.com/terms-of-use/

紹介ページ https://galvs-scripts.com/category/rmmv-plugins/mv-on-map/#post-1877