Manual Item Sorting

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by FenixFyreX, Oct 23, 2013.

  1. FenixFyreX

    FenixFyreX Fire Deity Veteran

    Messages:
    434
    Likes Received:
    307
    Location:
    A Volcano Somewhere
    First Language:
    English
    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
     
    #1
  2. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    I'm on work right now, but this sounds very interesting. :)

    I'll try it as soon as I arrive in home! :D
     
    #2
  3. Nosleinad

    Nosleinad Storyteller Veteran

    Messages:
    351
    Likes Received:
    28
    Location:
    Brazil
    First Language:
    Portuguese
    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?
     
    #3
  4. FenixFyreX

    FenixFyreX Fire Deity Veteran

    Messages:
    434
    Likes Received:
    307
    Location:
    A Volcano Somewhere
    First Language:
    English
    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.
     
    #4
  5. kerbonklin

    kerbonklin Hiatus King Veteran

    Messages:
    1,728
    Likes Received:
    281
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    Last edited by a moderator: Oct 26, 2013
    #5
  6. twsauthor

    twsauthor Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    English
    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. :)
     
    Last edited by a moderator: Dec 30, 2013
    #6
  7. nazgul

    nazgul Husband Veteran

    Messages:
    116
    Likes Received:
    39
    Location:
    Oregon
    First Language:
    english
    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?
     
    #7

Share This Page