Manual Item Sorting

Manual Item Sorting v1.0
FenixFyreX
​
Introduction
This script allows the player to manually sort items, weapons, armors, key items, and skills.

Screenshots
Not really applicable as you'd need to see it in action. Just put it in your project and try it out.

How to Use
1> Install the script below the default scripts and above Main.
2> Playtest, giving the player some items.
3> Open the item scene and select a category.
Select any item once to be able to switch with other items. Double select an item to use it like normal.

Demo
Not necessary.

Script
Version 1.0

Credit and Thanks
- FenixFyreX
I'm on work right now, but this sounds very interesting. 🙂

I'll try it as soon as I arrive in home! 😀
Hello Fenix, first of all thanks for another useful script.

The script is working as intended in the item scene, but i am also rearranging my skills in battle, which at least for me is nit very fun rsrsrs. Was this intended?
Yes, sorry. It was intended; my original ideas for this script originate from this thread and requester: Sort Menu Option


It was intended for any list in-game to be 'sortable'. I'm working on more sortable options like A-Z, Item/Skill type, etc.


If you would like a precedent / example of this in a 'real-life' game, just think of Final Fantasy style games; I remember in most of them I played you could rearrange your items / skills however you pleased.
A few possible sorting options: (being that the default is sorted by database ID)

  • Newer obtained items first [can apply to items/Weapon/Armor/Key Items]
  • Older obtained items first [can apply to items/Weapon/Armor/Key Items]
  • Let users pre-define an order set manually within a configuration section [can apply to items/Weapon/Armor/Key Items] *
  • Sort by equip type [applies to weapons/armors]
  • Sort by skill element
  • Sort by skill MP cost
  • Have compatibility with Extended Item Catagories script by Shadowmaster *
The ones marked with * would be of higher importance. What I mean by "pre-define" would be like

module Pre_define_sort#Pre-define list by database IDSort_Item[1, #HP Potion70, #Better HP Potion20, #MP Potion15, #Better MP Potion]This way if users have their databases unorganized, it won't mean that the default sorting is unorganized as well.
Hey Fenix, its me: from http://forums.rpgmakerweb.com/index.php?/topic/19146-sort-menu-option/#entry186201

I wanted to point out a minor oversight in your code that I managed to find and "fix".  Items automatically de-select after you swap them but skills did not. It doesn't de-select a skill after using it either, so if you're not paying attention, it will auto swap with the next skill you try to use,  This happens in both battles and from the menu,

The section marked with #'s is your original script. The other part is what I changed it to, simply copying and pasting the snippet under the "class Window_ItemList"

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

    class Window_SkillList

#      def process_ok
#        if (@bypass_switch_ids && (item.id == @bypass_index))
#          super
#        elsif (@bypass_switch_ids && (item.id != @bypass_index))
#          process_switch_order
#        elsif !@bypass_switch_ids
#          Sound.play_ok
#          @bypass_switch_ids = true
#          @bypass_index = item.id
#          refresh
#        end
#      end

     
       def process_ok
        if (@bypass_switch_ids && (item.id == @bypass_index))
          @bypass_switch_ids = @bypass_index = nil
          super
        elsif (@bypass_switch_ids && (item.id != @bypass_index))
          process_switch_order
        elsif !@bypass_switch_ids
          if item
            Sound.play_ok
            @bypass_switch_ids = true
            @bypass_index = item ? item.id : 0
            refresh
          else
            @bypass_switch_ids = @bypass_index = nil
            super
          end
        end
      end

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

I dont know how to make posts in Spoilers so they're hidden 🙁

On a side note thank you again for the script. 🙂
When I use this and the fix with Yanflys custom equip menu, I get this weird error if I try to equip an item.


https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/ace-equip-engine/

Script 'Fenix Fyre Item sorting' ArgumentError occurred. comparison of NilClass with 0 failed. 

Basically what happens is its trying to make you double click the equipped items and it only single clicks and thus game over. is this easy to fix or are these scripts to incompatible?

Original thread: https://forums.rpgmakerweb.com/threads/manual-item-sorting.19263/