An open library of RPG Maker MV plugins, powered by the community.

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

FTKR Item Sub Command - FTKR_ItemSubCommand.js

Plugin desc : v1.7.3 Add subcommands to the item box

License : MIT License

Author : Futokoro

Desc page : https://github.com/munokura/futokoro-MV-plugins

Download Page : https://raw.githubusercontent.com/munokura/futokoro-MV-plugins/refs/heads/master/FTKR_ItemSubCommand.js

File name : FTKR_ItemSubCommand.js

Help of plugin :

@plugindesc v1.7.3 Add subcommands to the item box
@author Futokoro
@url https://github.com/munokura/futokoro-MV-plugins
@license MIT License

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/futokoro-MV-plugins ).
Original plugin by Futokoro.
Please check the URL below for the latest version of the plugin.
URL https://github.com/futokoro/RPGMaker
-----
-----------------------------------------------------------------------------
Overview
-----------------------------------------------------------------------------
By implementing this plugin, you can display subcommands after selecting an item and select their execution.

Subcommands include the following:
1. Use - Uses an item. If unavailable, this option is grayed out.
2. Discard - Discards an item. "Key Item" items cannot be discarded.
3. Equip - If the item is a weapon or armor, equips it to an actor.
Opens the actor selection screen and selects the target to equip.
4. Quit - Closes the subcommand.
5. Custom - Executes a common event set in the plugin parameters.

-----------------------------------------------------------------------------
Settings
-----------------------------------------------------------------------------
1. Add this plugin to the "Plugin Manager."

-----------------------------------------------------------------------------
Setting the subcommands to display
-----------------------------------------------------------------------------
Set the commands to display in the plugin parameter <Command List>.
Enter the command codes you want to display, separated by commas (,).
The commands will be displayed in the order you entered them. (All lowercase)

<Code>
use	
discard	
equip	
cancel	
custom* (* represents the custom command number)

Example:
use,discard,custom0,cancel

-----------------------------------------------------------------------------
Discarding Items
-----------------------------------------------------------------------------
Executing the "Discard" subcommand lets you set the number of items to discard.
Once you've decided on the number, a confirmation screen will appear.
By selecting "Execute," you can discard the items.
The sound effect when discarding can be configured using the plugin parameters.

The confirmation screen can be hidden using the plugin parameter <Enable Confirmation>.

Entering the following tags in an item's Note field will prevent it from being discarded.

<NOT_DISCARDABLE>

Also, if you add a number after the tag, the item cannot be discarded while the switch with that ID is ON.

<NOT_DISCARDABLE: x>
x: Switch ID

-----------------------------------------------------------------------------
Equip an Item
---------------------------------------------------------------------------
When you execute the "Equip" subcommand, if the selected item is a weapon or armor, you can select an actor and change the equipment.

This subcommand will not appear in the subcommand window if an item other than a weapon or armor is selected.

Caution!
The equipment slot is automatically determined by the item's equipment type.
This may not work correctly if other plugins allow multiple items of the same equipment type to be equipped.

----------------------------------------------------------------------------
Custom Command
----------------------------------------------------------------------------
You can set a custom command to execute any common event.
Add the set command to the plugin parameter <Command List>.

Command Name
Set using the plugin parameter <Custom* Format>.

Common Event ID to Execute
Set this using the plugin parameter <Custom* EventID>.
You can also set the common event ID to execute for each item. (*1)
If both plugin parameters and individual item settings exist,
the item settings take priority.

Display Condition: Conditions for displaying in the subcommand window
You can set the plugin parameter <Custom* Show Condition> and
individual item conditions (*1).
Enter a conditional expression in script format (*2).
If not set, the event will not be displayed.
If both plugin parameters and individual item settings exist,
the event will only be displayed if both conditions are met.

Enabled Condition: Conditions for executing the subcommand window
You can set the plugin parameter <Custom* Enabled Condition> and
individual item conditions (*1).
Enter a conditional expression in script format (*2).
If not set, the event will not be executed.
If both plugin parameters and individual item settings exist,
the event will only be executed if both conditions are met.

(*1) How to Set Individual Conditions for Each Item
You can set conditions for each item by entering the following tags in the Note field.
<Custom Command: x>
Display Condition: Condition Expression
Enabling Condition: Condition Expression
Common Event ID: y
</Custom Command>
x: Custom Command Number
y: Common Event ID to execute

(*2) How to Enter Condition Expressions
Like damage calculation formulas, you can use non-fixed values by entering a script-style formula.
The following code can be used:
item - References the item data to be used. (item.id is the item ID)
number - References the number of items in possession to be used.
v[x] - References the value of variable ID x.
s[x] - References the value of switch ID x.
true - Always enabled.

-----------------------------------------------------------------------------
Example scripts that can be used in condition expressions
-----------------------------------------------------------------------------
1. Determine the item type (item, weapon, or armor)

DataManager.isWeapon(item) : The selected item is a weapon.
DataManager.isArmor(item) : The selected item is armor.
DataManager.isItem(item) : The selected item is an item.

2. Obtain the number of items owned for the selected item.

$gameParty.numItems(item)

-----------------------------------------------------------------------------
License for this plugin
----------------------------------------------------------------------------
This plugin is released under the MIT License.

Copyright (c) 2019 Futokoro
http://opensource.org/licenses/mit-license.php

Plugin Publisher
https://github.com/futokoro/RPGMaker/blob/master/README.md

-----------------------------------------------------------------------------
Change History
-----------------------------------------------------------------------------

v1.7.3 - 2020/01/05: Bug Fixes
1. Fixed a bug that caused an error when discarding an item due to the plugin parameter "Discard Sound" not being correctly read.

v1.7.2 - 2019/12/25: Fixed the standard parameter display settings.
v1.7.1 - 2019/12/25: Added Traits
1. Added the ability to change the target and order of parameters displayed when changing equipment.

v1.7.0 - 2019/12/22: Traits Added
1. Added a window displaying actor parameters when executing the equip command.

v1.6.0 - 2018/08/30: Traits Added
1. Added a Traits that eliminates actor selection when executing the equip command when there is only one actor.

v1.5.2 - 2018/03/15: Bug Fixes
1. Fixed an issue where custom command names were not displayed.

v1.5.1 - 2018/02/24: Bug Fixes
1. Fixed an issue where ternary operators were not Reflectioned when entering scripts.

v1.5.0 - 2018/02/22: Traits Added
1. Added the ability to equip from the item screen.

v1.4.1 - December 2, 2017: Bug Fixes
1. Fixed a typo in the default value of the plugin parameter "Disposal SE Name."

v1.4.0 - September 24, 2017: Traits Additions
1. Added the ability to set the common event ID to be executed for each item.
2. Added the ability to automatically adjust the height of the subcommand window based on the number of commands.

v1.3.0 - September 19, 2017: Traits Additions
1. Added the ability to add commands to execute any common event.

v1.2.1 - August 19, 2017: Bug Fixes
1. Fixed a bug that allowed the subcommand window to be displayed even when no items were in possession.

v1.2.0 - July 23, 2017: Traits Additions
1. Added the ability to set whether or not an item can be discarded individually.
2. Added the ability to play a custom sound effect when discarding an item.

v1.1.0 - 2017/06/11: Traits Added
1. Added the ability to adjust the subcommand window size and position.
2. Added the ability to change the maximum number displayed on the numeric input screen.

v1.0.0 - 2017/06/04: First version created

-----------------------------------------------------------------------------

@param --アイテム情報取得--
@text --Get item information--

@param Use Item Id
@desc The ID of the selected item is stored in the specified variable.
@type number

@param --サブコマンド--
@text --Subcommand--

@param Command List
@desc Set the target and order of displaying execution commands.
@default use,discard,cancel

@param Command Position X
@desc Specifies the X coordinate of the top left corner of the command window (default 0) (-1 means right-justified).
@default 0

@param Command Position Y
@desc Specifies the Y coordinate of the top left corner of the command window (default 180) (-1 means bottom-aligned).
@default 180

@param Command Width
@desc Specifies the width of the command window. (Default: 240) (Reference value: Margin = 18) (-1 means to the right edge of the screen)
@default 240

@param Command Height
@desc Specifies the height of the command window. (Reference values: 1 line = 36, margin = 18) (-1: to the bottom of the screen, 0: auto-adjust)
@default -1

@param --アクター選択画面--
@text --Actor selection screen--

@param Disable Select Single Actor
@desc Do not display actor selection screen when there is only one actor.
@default 0
@type select
@option Show
@value 0
@option Do not display
@value 1

@param --使うコマンド--
@text --Command to use--

@param Command Use Format
@desc Set the command name to use for the execution command.
@default 使う

@param --やめるコマンド--
@text --Stop command--

@param Command Cancel Format
@desc Set the command name for the execution command "Stop".
@default やめる

@param discard
@text --Discard command--

@param Command Discard Format
@desc Set the command name for the execution command "Discard".
@default 捨てる
@parent discard

@param --数値入力画面--
@text --Numeric input screen--
@parent discard

@param Max Number Format
@desc Sets the maximum number to be displayed in the numeric entry window. %1 - Number of items on hand
@default /MAX %1
@parent discard

@param Number Position X
@desc Specifies the X coordinate of the top left corner of the numeric input window. (Default: 0) (-1: right-justified)
@default 240
@parent discard

@param Number Position Y
@desc Specifies the Y coordinate of the top left corner of the numeric input window (default 180) (-1 means bottom-justified).
@default 180
@parent discard

@param Number Width
@desc Specifies the width of the numeric input window. (Default: 456) (Reference value: Margin = 18) (-1 means to the right edge of the screen)
@default 456
@parent discard

@param Number Height
@desc Specifies the height of the numeric input window. (Reference values: 1 line = 36, margin = 18) (-1 means to the bottom of the screen)
@default -1
@parent discard

@param --確認画面--
@text --Confirmation screen--
@parent discard

@param Enable Confirmation
@desc Whether to display a confirmation screen when discarding an item. 1 - Display, 0 - Do not display
@default 1
@type select
@parent discard
@option Show
@value 1
@option Do not display
@value 0

@param Conf Title Format
@desc Set the confirmation content when discarding items. %1 - Item name, %2 - Number to discard
@default Discard [%2] [%1] ?
@parent discard

@param Confirmation Ok Format
@desc Set the command name for the confirmation command "Execute".
@default Execute
@parent discard

@param Confirmation Cancel Format
@desc Set the command name for the confirmation command "Do not execute."
@default Do not execute
@parent discard

@param --捨てるサウンド--
@text --Discard sound--
@parent discard

@param Disposal SE Name
@desc Sets the sound effect when dropping an item.
@default Decision1
@type file
@require 1
@dir audio/se
@parent discard

@param Disposal SE Pitch
@desc Sets the pitch of the sound effect when dropping an item.
@default 100
@type number
@min 50
@max 150
@parent discard

@param Disposal SE Volume
@desc Sets the volume of the sound effect when dropping an item.
@default 90
@type number
@min 0
@max 100
@parent discard

@param equip
@text --Equipment Command--

@param Command Equip Format
@desc Set the command name for the "Equip" execution command.
@default Equip
@parent equip

@param display_timing_equipstatus
@text Window display timing
@desc Specifies when the window should be displayed.
@default 1
@type select
@parent equip
@option Do not display (disable display function)
@value 0
@option Displayed when executing the equip command
@value 1
@option Displayed when selecting an equipped item
@value 2

@param Status_Window_Layout
@text Parameter Layout Settings
@desc Set the size and display position of the equipment parameter window.
@default {"posiX":"0","posiY":"180","width":"240","height":"-1"}
@type struct<windowLayout>
@parent equip

@param Select_Default_Param
@text Standard parameter display settings
@desc Set the parameters to be displayed in standard specifications. 0: Max HP, 1: Max MP, 2~7: Attack power~luck, 8: Name. Separate with a comma (,).
@default 8,2,3,4,5,6,7
@parent equip

@param Enabled_Window_Param
@desc Whether to use the window parameter change function. FTKR_CustomSimpleActorStatus is required.
@default false
@type boolean
@parent equip
@on valid
@off invalid

@param Status_Window_Param
@text Window Parameter Settings
@desc Sets the size and display position of the equipment parameter window. Requires FTKR_CustomSimpleActorStatus.
@type struct<windowParam>
@parent equip

@param Enabled_statusList
@desc Whether to use the display content change function. FTKR_CustomSimpleActorStatus is required.
@default false
@type boolean
@parent equip
@on valid
@off invalid

@param statusList
@text Equipment parameter display content
@desc Sets the status to display and its position. Requires FTKR_CustomSimpleActorStatus.
@type struct<status>[]
@parent equip

@param Actor Status Space In Text
@desc Specifies the spacing when displaying multiple items within a text.
@default 5
@parent equip

@param --カスタムコマンド0--
@text --Custom Command 0--

@param Custom0 Format
@desc Set the command name for the execution command "Custom Command 0".

@param Custom0 EventID
@desc Set the ID of the common event to be executed by custom command 0.
@type number

@param Custom0 Show Condition
@desc Set the conditions for displaying Custom Command 0.

@param Custom0 Enabled Condition
@desc Set the conditions for executing custom command 0.

@param --カスタムコマンド1--
@text --Custom Command 1--

@param Custom1 Format
@desc Set the command name for the execution command "Custom Command 1".

@param Custom1 EventID
@desc Set the ID of the common event to be executed by Custom Command 1.
@type number

@param Custom1 Show Condition
@desc Set the conditions for displaying Custom Command 1.

@param Custom1 Enabled Condition
@desc Set the conditions for executing Custom Command 1.

@param --カスタムコマンド2--
@text --Custom Command 2--

@param Custom2 Format
@desc Set the command name for the execution command "Custom Command 2".

@param Custom2 EventID
@desc Set the ID of the common event to be executed by Custom Command 2.
@type number

@param Custom2 Show Condition
@desc Set the conditions for displaying Custom Command 2.

@param Custom2 Enabled Condition
@desc Set the conditions for executing Custom Command 2.

@param --カスタムコマンド3--
@text --Custom Command 3--

@param Custom3 Format
@desc Set the command name for the execution command "Custom Command 3".

@param Custom3 EventID
@desc Set the ID of the common event to be executed by Custom Command 3.
@type number

@param Custom3 Show Condition
@desc Set the conditions for displaying Custom Command 3.

@param Custom3 Enabled Condition
@desc Set the conditions for executing Custom Command 3.

@param --カスタムコマンド4--
@text --Custom Command 4--

@param Custom4 Format
@desc Set the command name for the execution command "Custom Command 4".

@param Custom4 EventID
@desc Set the ID of the common event to be executed by Custom Command 4.
@type number

@param Custom4 Show Condition
@desc Set the conditions for displaying Custom Command 4.

@param Custom4 Enabled Condition
@desc Set the conditions for executing Custom Command 4.

スポンサードリンク

-MV plugins

Copyright© PGMV - The Community-Driven Plugin Library for RPG Maker MV , 2026 All Rights Reserved.