RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Categorized Items Menu - by: albertfish

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
Detective Scrotes
    Categorized Items Menu
    Version: 1.3
    Author: albertfish
    Date: October 22, 2009

    Version History


    • Version 1.3: October 22, 2009
           - Fixed a bug that did not display weapons in the weapon category
    • Version 1.2: October 4, 2009
           - Fixed a bug that did not allow you to remove the all items category
    • Version 1.1: September 13, 2009
           - The variable for recent items is no longer global
           - Some code removed
           - Changed it so when you are in items window and you hit escape it goes back to the category window.
           - You can also select a category with enter now.
    • Version 1.0: September 13, 2009: Initial release.
           - Initial release

    Planned Future Versions

    • No planned future versions at this point. However, if you have a suggestion on what to add it could be added to a future version.

    Description


    This is a complete redesign of the default items menu that aims to make it a lot easier to search through your items. This script sorts items into categories for better organization.

    Features

    • Includes 10 different categories to sort items
    • Easy to set up items to be sorted
    • Easy to customize appearance
    • Easy to customize which categories are active
    • Extremely customizeable which allows you to set it up the way you want it set up

    Customizable Features

    • Choose what categories you want
    • Choose if you want the top window to be 1 or 2 windows
    • Unselected categories translucent or opaque
    • Categories cursor on or off
    • All items category position
    • All category titles and icons
    • Category title alignment
    • Help window icon size. It can be double sized, normal size or off.

    Screenshots



    Easy to choose which categories you want!



    Instructions

    Item Setup Instructions:
         This script sorts items automatically based on certain aspects of the
    item. To set up items to be sorted into correct categories follow this
    guide.

         Consumable Items - Must have Consumable flag set to yes
                          - Must have Occasion flag set to anything other than
                            never.
         Weapons          - All items in Weapons tab in the database
         Equipment        - All items in the Weapons and Armors tab
         Body Equipment   - Must be under Armors tab
                          - Kind must be Body Armor
         Head Equipment   - Must be under Armors tab
                          - Kind must be Helmet
         Arm Equipment    - Must be under Armors tab
                          - Kind must be Shield
         Accessory        - Must be under Armors tab
                          - Kind must be Accessory
         Raw Materials    - Must be consumable
                          - Must have occasion of never
         Story Items      - Must be non consumable
         All Items        - All of the above

    Install Instructions:
         Place this script above the main script and below the default scripts.

    Script


    Please see the attached script or the demo!

    Credit


    • albertfish

    Thanks

    • IAMFORTE for the idea
    • modern algebra for helping me shorten the code and get rid of a global variable
    • MarkDarkness for informing me about a bug in the script
    • blademan for informing me about a bug in the script

    Support


    If you need to contact me you can send me a pm.

    Known Compatibility Issues

    Incompatible with some other items menu scripts. No real compatibility issues found yet.

    Demo

    Warning! The following demo is of an older version. Please download the newer script until a new demo is posted.
    There is a demo available! Download it here!

    Author's Notes


    If you discover any bugs, please pm me or post the bug here! Thanks.
    Enjoy :).

    Restrictions

    You may use this in your game commercial or non-commercial as long as proper credit is given.[/list]
    « Last Edit: December 05, 2009, 02:23:11 AM by albertfish »

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    That is really quite a nice interface. Great work, albertfish!

    Some tips on making your scripts a little shorter and more compatible though;

    I noticed that you added a $recent_items global variable:

    Code: [Select]
    #==============================================================================
    # ** Scene_Load
    #------------------------------------------------------------------------------
    #  This class performs load screen processing.
    #==============================================================================
    class Scene_Load < Scene_File
      #--------------------------------------------------------------------------
      # * Read Save Data
      #     file : file object for reading (opened)
      #--------------------------------------------------------------------------
      def read_save_data(file)
        # Read character data for drawing save file
        characters = Marshal.load(file)
        # Read frame count for measuring play time
        Graphics.frame_count = Marshal.load(file)
        # Read each type of game object
        $game_system        = Marshal.load(file)
        $game_switches      = Marshal.load(file)
        $game_variables     = Marshal.load(file)
        $game_self_switches = Marshal.load(file)
        $game_screen        = Marshal.load(file)
        $game_actors        = Marshal.load(file)
        $game_party         = Marshal.load(file)
        $game_troop         = Marshal.load(file)
        $game_map           = Marshal.load(file)
        $game_player        = Marshal.load(file)
        $recent_items       = Marshal.load(file)
        # If magic number is different from when saving
        # (if editing was added with editor)
        if $game_system.magic_number != $data_system.magic_number
          # Load map
          $game_map.setup($game_map.map_id)
          $game_player.center($game_player.x, $game_player.y)
        end
        # Refresh party members
        $game_party.refresh
      end
    end

    #==============================================================================
    # ** Scene_Save
    #------------------------------------------------------------------------------
    #  This class performs save screen processing.
    #==============================================================================

    class Scene_Save < Scene_File
      #--------------------------------------------------------------------------
      # * Write Save Data
      #     file : write file object (opened)
      #--------------------------------------------------------------------------
      def write_save_data(file)
        # Make character data for drawing save file
        characters = []
        for i in 0...$game_party.actors.size
          actor = $game_party.actors[i]
          characters.push([actor.character_name, actor.character_hue])
        end
        # Write character data for drawing save file
        Marshal.dump(characters, file)
        # Wrire frame count for measuring play time
        Marshal.dump(Graphics.frame_count, file)
        # Increase save count by 1
        $game_system.save_count += 1
        # Save magic number
        # (A random value will be written each time saving with editor)
        $game_system.magic_number = $data_system.magic_number
        # Write each type of game object
        Marshal.dump($game_system, file)
        Marshal.dump($game_switches, file)
        Marshal.dump($game_variables, file)
        Marshal.dump($game_self_switches, file)
        Marshal.dump($game_screen, file)
        Marshal.dump($game_actors, file)
        Marshal.dump($game_party, file)
        Marshal.dump($game_troop, file)
        Marshal.dump($game_map, file)
        Marshal.dump($game_player, file)
        Marshal.dump($recent_items, file)
      end
    end

    with aliasing (which you've done a few times in the script, I notice), it could become a lot shorter and also work with any other scripts that modify those methods. As a short exercise, the above code could be condensed to:


    Code: [Select]
    #==============================================================================
    # ** Scene_Load
    #------------------------------------------------------------------------------
    #  This class performs load screen processing.
    #==============================================================================
    class Scene_Load < Scene_File
      #--------------------------------------------------------------------------
      # * Read Save Data
      #     file : file object for reading (opened)
      #--------------------------------------------------------------------------
      alias abfish_rd_save_rcntitms_9lj4 read_save_data
      def read_save_data(file, *args)
        abfish_rd_save_rcntitms_9lj4 (file, *args)
        $recent_items       = Marshal.load(file)
      end
    end

    #==============================================================================
    # ** Scene_Save
    #------------------------------------------------------------------------------
    #  This class performs save screen processing.
    #==============================================================================

    class Scene_Save < Scene_File
      #--------------------------------------------------------------------------
      # * Write Save Data
      #     file : write file object (opened)
      #--------------------------------------------------------------------------
      alias albertfish_recent_items_wrtsave_0gb2 write_save_data
      def write_save_data(file, *args)
        albertfish_recent_items_wrtsave_0gb2 (file, *args)
        Marshal.dump($recent_items, file)
      end
    end

    But what would be even better would be to not use a separate global variable at all.

    You could get rid of the Scene_Title, Scene_Save, and Scene_Load modifications altogether if you did something like this:

    Code: [Select]
    class Game_Party
      attr_accessor :recent_items
      alias albertfish_init_rcntitms_0hf2 initialize
      def initialize (*args)
        albertfish_init_rcntitms_0hf2 (*args)
        @recent_items = []
      end
    end

    You could then access the array through:

    Code: [Select]
    $game_party.recent_items

    and it would completely bypass the need to create a new global variable to store that data.

    Anyway, this script does look very nice. Again, great work!
    « Last Edit: September 13, 2009, 03:24:00 PM by modern algebra »

    **
    Rep:
    Level 83
    Detective Scrotes
    I originally had the save and load menus aliased but had an error while doing so. I must have done something wrong lol.

    Thanks for the suggestions. I'll see what I can do to finally remove that global variable!

    ***
    3==D This is my bellend.
    Rep:
    Level 83
    i used this script,plz remind me to credit you in my game
    no

    By Kraft

    **
    Rep:
    Level 83
    Detective Scrotes
    i used this script,plz remind me to credit you in my game
    This is a reminder.

    Also, a newer version has been posted with a few changes. New demo and script available!

    ***
    Rep:
    Level 83
    X-PLAT!
    @albertfish - nice touch! customizable!! neat icon resizing

    you don't have to remind me to give credit ^,^

    ~g)@m(e|F/A\(C|E


    EDIT: @"MA" - nice catch!                                !
                                                                       ^  ^
    when it comes to script, you know your $#!T d *_* b
                                                                         *
    « Last Edit: September 26, 2009, 06:26:05 AM by gameface101 »

    **
    Rep: +0/-0Level 83
    DUDE! this script is awsome! I hav no prob citing you!
    The things we do for pizza!

    **
    Rep:
    Level 83
    Detective Scrotes
    New version available that fixed a bug found by MarkDarkness. New version of the script is added to the initial post.

    **
    Rep: +0/-0Level 82
    I'm not sure what's causing this, but Weapons do not shop up in the weapons tab:

    All items tab (the weapon is there):
    Spoiler for:

    Weapons tab (the sword doesn't show up):
    Spoiler for:

    Any idea what's happening? It's not a Script incompatibility, since I tried it on a brand new game project, and the error still happened.

    ****
    kikiki
    Rep:
    Level 84
    Hi
    I will use this.... thanks...
    Hi

    **
    Rep:
    Level 83
    Detective Scrotes
    I'm not sure what's causing this, but Weapons do not shop up in the weapons tab:

    All items tab (the weapon is there):
    Spoiler for:

    Weapons tab (the sword doesn't show up):
    Spoiler for:

    Any idea what's happening? It's not a Script incompatibility, since I tried it on a brand new game project, and the error still happened.
    I'll take a look at it, sorry for the late reply I have been busy lately.

    Edit:  Okay version 1.3 is now out which fixes that problem. That you for bringing that problem to my attention blademan.
    « Last Edit: October 22, 2009, 07:53:55 AM by albertfish »

    ****
    Rep:
    Level 83
    i like the script but does this interfear with editing the max limits of items carryed, because when ever i edit that amount it never takes effects, good script tho very helpfull
    nvm i fixed that.... nice script
    « Last Edit: December 03, 2009, 05:25:55 AM by Mr_Wiggles »
    Spoiler for:
    METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

    We also

        Refinish decks
        Do custom interior painting
        Strip wallpaper
        Refinish cedar siding
        Metal front doors and sidelights
        Metal garage and service doors
        Grained fiberglass doors

        If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

    northern Illinois and southern Wisconsin.

    http://metalfreshcoatings.com


    **
    Rep: +0/-0Level 81
    This is a really cool script.

    I have a bit of a problem though.  In my game, the player has a camp area that they can travel back to whenever they want, no matter where they are.  They have a usable item that actually does the teleport.

    Whenever I put your menu code in the game, once the item is obtained, it shows up in both recent items, and quest items, since it's non consumable.  And the first time that I started it up to test out the menu, it worked fine.  However, now, it gives me an error whenever I try to use the item.  I took a screenshot of the error.
    Spoiler for:

    This is the line of code it mentions, but since I don't know the code language, I don't know what it's talking about.  lol

              if $game_variables[c.variable_id] < c.variable_value


    Anyone know what the problem might be?

    **
    Rep: +0/-0Level 81
    RMRK Junior
    Great script! I can't make a new game without it! But I do have a question: Is there a way to make the inventory half-transparent like 50%, 70%? (so I can see the map while I scroll through the inventory)

    *
    Rep: +0/-0Level 81
    RMRK Junior
    Hello my game doesn't display any text with the script : I have the icons but no text. I'm using a French version of RMXP. Is it the source of the problem? How can I do to fix it. Thank you very much for your answer.

    **
    Rep: +0/-0Level 81
    RMRK Junior
    How do u get Raw Materials I dnt understand what you mean by

                          - Must have occasion of never

    **
    Rep: +0/-0Level 78
    RMRK Junior
    Found small bug...
    If description of more items is same, icon in help bar doesnt change when scrolling through them.

    Sorry for my awful english
    « Last Edit: February 04, 2012, 09:34:22 PM by lekiller »