Item and Skill Sort Priority

Item & Skill Sort Priority
by Aloe Guvner
Download Link
(Instructions: right-click the "Raw" button and click "Save Link As...")​

Introduction
By default, the items/weapons/armors/skills are sorted by database ID number in menu windows, and there is no way to change this order from the editor.

This simple plugin allows the developer to use a notetag in the database in order to define a custom order for the items/weapons/armors/skills to appear.


From searching the forums, similar plugins have existed in the past, but all of the links are dead or outdated.

Instructions
The following notetag may be added to the notes on a database entry for items/weapons/armors/skills.

<Sort Priority: X>

X --> The sort priority for the item/weapon/armor/skill.

Example:
<Sort Priority: 2>

  • If a database entry does not contain this notetag, its sort priority is set to the ID# of the entry.
  • If a database entry has a defined sort priority that is the same as the ID# of an entry without a notetag, the entry with the notetag is prioritized.

Compatibility Issues
  • No known compatibility issues yet.
  • Bug reports can be posted on this thread and compatibility patches will be developed if reasonable.

Terms of Use
  • Free for use in both non-commercial and commercial projects.
  • You are free to edit this plugin as you see fit for your project.
    • If the edits can benefit the community as a whole, I request that they are also posted here so the edits can be incorporated into an official release.
  • Credits are required to: Aloe Guvner

Change Log
Version 1.00:
-Initial release with support for items, weapons, armors, and skills

Download Link
(Instructions: right-click the "Raw" button and click "Save Link As...")​
Where was this before I re-arranged all the skills in my database? XD
Should I put this below any plugins that affect the skill/item window?
To be on the safe side, yes, place it below other plugins which may affect the skill or item window. Technically, it shouldn't matter since I didn't overwrite any functions but you never know when strange compatibility issues can pop up.
To be on the safe side, yes, place it below other plugins which may affect the skill or item window. Technically, it shouldn't matter since I didn't overwrite any functions but you never know when strange compatibility issues can pop up.

I looked at the plugin you wrote and I was actually surprised, I thought there would have been a lot more code to it.
Anywho, it seems to work just fine for me. As for my post in my request thread explaining how SRD's Skill Extender plugin works, these two plugins don't seem to interfere with each other. Meaning that I can use your plugin to set whatever skill order I want, but the skill order in an extended skill window is still defined by the custom order I set with SRD's plugin. So that's pretty nifty.
I looked at the plugin you wrote and I was actually surprised, I thought there would have been a lot more code to it.
It's not about how much code you write, it's how you use it 😉
see DataManager.extractMetadata. It's extract meta data for all database files.
It does, but I prefer to write my own regular expressions to extract notetags because I can make it case-insensitive, so it's more friendly for users of the plugin 🙂
The plugins responds very well with various YEP Inventory related plugins.
You can sort up to at least +9999 (did not try more) wich can be useful.

A very good option adding flexibility to the database, thanks Aloe.
Hey, I know it's a longshot but is there any chance you could port this script to RMXP or RMVXA?

I need a script like this badly, but haven't been able to find one.
Ah sorry, but I don't know how to script in those versions (it uses a different programming language - Ruby rather than Javascript). Feel free to link this page if you end up making a post in the RGSS Script Request area.
He could show your script to someone who uses Ace and knows how to code, and they'd basically have to 'translate' it into Ruby but if you're good with that then he could post it in script requests for Ace.
Screenshots please :3
Ah sorry, but I don't know how to script in those versions (it uses a different programming language - Ruby rather than Javascript). Feel free to link this page if you end up making a post in the RGSS Script Request area.

Sorry, but I didn’t understand how to work with this wonderful plugin. Can I have at least a couple of screenshots?)
He could show your script to someone who uses Ace and knows how to code, and they'd basically have to 'translate' it into Ruby but if you're good with that then he could post it in script requests for Ace.

Screenshot with this plugin at work please
Hi, I haven't had access to my computer in quite some time so no chance for a screenshot yet.

Did you mean to quote me? The quote is not relevant for your question.

I don't understand your issue, what problem are you having? Have you followed the instructions in the help section? What did you write in the notetag box?
Screenshot with this plugin at work please
I'll explain.

By default, items/weapons/armors/skills are sorted by their ID in the game's database. Meaning that if for whatever reason you want things organized in a different way (as they would appear in the actual game) your only option is to reorganize them in the database.

With this plugin, adding this tag "<Sort Priority: X>" into the note-box (note-box: the text area on the bottom right of the database window) of said item/weapon/armor/skill changes it's order it will be listed in the game when it's run.

In other words, if in your database your skills are organized like this:
Fire <Sort Priority: 2>
Firaga <Sort Priority: 1>

In game they would appear like this:
Firaga
Fire

Remember that the sort priority is technically separate between each Database type. If you choose not to use these tags for your items, they will show up as they are ordered inside your database.

Now if you're still confused, here's the best way to illustrate how it works:
Open your game. Run a battle troop from the database editor and open the item window in battle so you can see how the items are ordered. Now go into your item database, change the order of some of them by adding the plugin's tag in the item note-boxes, and then run the battle again. You should see the items are listed differently.
Hi, I haven't had access to my computer in quite some time so no chance for a screenshot yet.

Did you mean to quote me? The quote is not relevant for your question.

I don't understand your issue, what problem are you having? Have you followed the instructions in the help section? What did you write in the notetag box?

I wrote to the skill with id 5 <Sort Priority: 1>, but he was not the first in the character skill list. I registered absolutely all the skills in order, but nothing has changed ...
Can you please share the following to help identify the issue?
  1. Screenshot of Plugin Manager list
  2. Does the issue happen if you turn all other plugins off?
    • If not, which is the conflicting/incompatible plugin?
  3. Screenshot of your skill in the database with the notebox
  4. Screenshot of your skill in the game
Can you please share the following to help identify the issue?
  1. Screenshot of Plugin Manager list
  2. Does the issue happen if you turn all other plugins off?
    • If not, which is the conflicting/incompatible plugin?
  3. Screenshot of your skill in the database with the notebox
  4. Screenshot of your skill in the game

1Cнимок, Снимок1, Снимок2.
2. Yes
3.Огонь, Био
4. Ingame


Снимок.PNG
Снимок1.PNG
Снимок2.PNG
Био.PNG
Ingame.PNG
Огонь.PNG
Снимок.PNG
Снимок1.PNG
Снимок2.PNG
Био.PNG
Ingame.PNG
Огонь.PNG



F***in' image upload.

Original thread: https://forums.rpgmakerweb.com/threads/item-and-skill-sort-priority.90931/