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

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

GMN Data Base Priority - GMN_DataBasePriority.js

Plugin desc : Sort the database items in the order of priority specified in the memo field.

License : MIT License

Author : GEMINI

Website : https://github.com/nulluo/GEMINI-RPG-Maker-Plugin/blob/master/MZ/GMN_DataBasePriority.js

Desc page : https://github.com/GEMINIGAMEDEV/RPG-Maker-Plugin/blob/master/MZ/GMN_DataBasePriority.js

Download Page : https://raw.githubusercontent.com/nulluo/GEMINI-RPG-Maker-Plugin/master/MZ/GMN_DataBasePriority.js

File name : GMN_DataBasePriority.js

Help of plugin :

* @target MZ
 * @plugindesc Sort the database items in the order of priority specified in the memo field.
 * @base PluginCommonBase
 * @url https://github.com/GEMINIGAMEDEV/RPG-Maker-Plugin/blob/master/MZ/GMN_DataBasePriority.js
 * @author GEMINI
 *
 * @help
 * You can sort the display order of the database items in the order of priority specified in the memo field.
 *
 * 1.
 * Describe the priority in the memo field of Items, Skills, Weapons, and Armor as follows.
 * Example description:
 * <priority:100>.
 * The priority tag name ("priority") can be changed in the plugin parameters.
 * The priority value (where "100" is specified) must be a positive integer.
 * 2.
 * Items, skills, weapons, and armor will be displayed in order of priority.
 * Ascending order (1,2,3...) and descending order (1,2,3...) order) and descending order (99999,99998,99997...). is
 * Ascending order (1,2,3...) and descending order (99999,99998,99997...) can be selected by plugin parameters.
 * If the priority is the same, they will be sorted by ID as per the standard specification.
 * 3.
 * If the priority is not set in the memo field,
 * the default priority will be used.
 *
 * [Function for developers]
 * When the plugin parameter "isScriptEnabled" is enabled.
 * Sorting script can be executed from outside the plugin.
 * This is intended for use by scripts and plug-ins.
 * Can be executed non-destructively.
 *
 * [How to use reorder script]
 *
 * "window.<plugin name>.sortByPriority(<sort target>)".
 * Execute.
 *
 * "<plugin name>" is the file name of this plugin minus the extension.
 * "GMN_DataBasePriority" by default.
 *
 * <Sorting Target> is an array of database configuration items represented by $dataXxx, etc.
 * However, each item must have an "id" and "meta" field.
 * Example: $dataEnemies.slice(1)
 * Does not change with script execution.
 *
 * The return value is a sorted array.
 *
 * 2022/02/10 1.0.0 Release
 * 2022/02/10 1.1.0 Added a function for developers
 *
 * @param priorityName
 * @text Name of the priority tag.
 * @desc The name of the tag to describe in the memo field of the database.
 * "priority" by default.
 * @type string
 * @default priority
 *
 * @param asc
 * @text Ascending or descending order of priority.
 * @desc Selects whether the priorities should be in ascending or descending order.
 * In the ascending order, the priorities are ordered as 1,2,3... In the ascending order, the items are sorted in order of 1,2,3....
 * In descending order, the order is 99999,99998,99997...
 * In descending order, the order is 999999,99998,99997...
 * @on ascending order
 * @off descending order
 * @type boolean
 * @default true
 *
 * @param defaultPriority
 * @text default priority
 * @desc Set if priority is not set or is not an integer.
 * Default priority value.
 * @type number
 * @default 100
 * @min 0
 * @max 999999
 * @max 999999
 *
 * @param isScriptEnabled
 * @text [Function for developers] Enable reorder script.
 * @desc If enabled, you can run the reorder script from outside the plugin.
 * @param isScriptEnabled
 * @type boolean
 * @default false

スポンサードリンク

-MZ plugins

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