[MSX] Inventory Categories

Discussion in 'JS Plugin Releases (RMMV)' started by Melosx, Oct 5, 2016.

  1. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    MSX_InventoryCategories v2.0


    Introduction
    I asked for this previously but then I said "Meh, is better if I do this myself" and... ta-dah!! :)

    Features
    This plugin allow you to add new categories in your inventory. Also provide a notetag to set the correct category for items, weapons and armors.

    Screenshots
    [​IMG]

    How to Use
    Parameters explanation

    Two-Level Menu
    Add a new layer in the Item Menu.
    - Default Items command now contain the list of all categories related to Items.
    - Default Weapons command now contain the list of all categories related to Weapons.
    - Default Armors command now contain the list of all categories related to Armors.


    TL Item/Weapon/Armor IDs
    The ID (1 to 50) of each category you want in the relative sub menu.


    Category X Name
    The name of the category.
    Use the following name to add default categories in list
    - Items -> for default items list
    - Weapons -> for default weapons list
    - Armors -> for default armors list
    - Key Item -> for default key item list


    Category X Hide If Empty
    Hide the category X if no items inside.

    ! X is the ID (1 to 50) of the category !

    IMPORTANT NOTES
    If default command are hidden or Two Level Menu is enabled all uncategorized item aren't shown in any list.

    Notetag

    Item/Weapon/Armor Notetag:

    <Category: X>

    Where X is the name of the category you want the item.
    Example:
    <Category: Cooking>

    Demo
    -

    Plugin Download
    MSX_InventoryCategories
    (Right-click -> Save link as)

    Changelog
    v2.0
    New:
    • Improved control of each category (up to 50).
    • Can hide category if is empty.
    This new version change how the categories are read from the plugin.
    Each category have is own setting for "Name" and "Hide if Empty" param.


    v1.2
    New:
    • Change the way the categories are read by the plugin. Can now have category names with more than one word.
    v1.1.2
    BugFix:
    • Game freeze caused by onSellCancel function.
    v1.1.1
    BugFix:
    • Game freeze caused by onItemCancel function.
    • Actor window now appear correctly over other windows.
    v1.1
    New:
    • Weapon and Armor categorization.
    • Enable/Disable two-level menu.

    Credit and Thanks
    - Melosx

    Author's Notes
    - Free for use with both Free and Commercial Projects.
    - No problem with YEP_ItemCore.
     
    Last edited: May 20, 2017
    #1
    Tetsune, styx92, jordanblake and 7 others like this.
  2. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, I've been looking for something like this for awhile now. Thanks so much! What are your terms of usage by the way?

    EDIT: Hm, it shows undefined when I go to the item menu with Yanfly's Item Core script. I even tried it on a blank project with just Yanfly's Engine and Item Core script and got the same thing.

    [​IMG]
     
    Last edited by a moderator: Oct 11, 2016
    #2
  3. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    That's weird. uhm...
    Can I see a screenshot of your Plugin Manager config?

     


    EDIT: Rename the plugin file as    MSX_InventoryCategories.js  , I think this is the problem. I forgot to say on the How to sue section, sorry ^-^
     
    Last edited by a moderator: Oct 12, 2016
    #3
    Vassim74 likes this.
  4. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV


    Yep, that fixed it, thanks! In the future it might be a good idea to upload the plugin somewhere if it requires a specific name.
     
    #4
  5. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    Edited first post.
    Sorry again for the inconvenience
     
    #5
  6. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry to bother you again, but I have another question. Would it be possible to make it so that you can categorize weapons and armors as well? It seems to only work with entries in the items tab.
     
    #6
    Melosx likes this.
  7. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    Plugin Update v1.1


    Changelog


    v1.1 

    • Weapon and Armor categorization.
    • Enable/Disable two-level menu.
    • Show/Hide default categories

    New Parameters


    - Two-Level Menu (v1.1) -


    Add a new layer in the Item Menu. 
      - Default Items command now contain the list of all categories related to Items.
      - Default Weapons command now contain the list of all categories related to Weapons.
      - Default Armors command now contain the list of all categories  related to Armors.
      - Key Item command is now inside Item categories list, at the 
     


    - Show/Hide Default Categories (v1.1) -



       - Default categories Items, Weapons, Armors can now be hidden.
       - Default category Key Items is is always shown, at the end of  all categories.
     
    #7
    Vassim74 likes this.
  8. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV
    Encountered a bug with two level menu. The game freezes when you select a category and try to exit.
     
    #8
  9. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    Plugin Update v1.1.1

    Changelog


    BugFix:

    • Game freeze caused by onItemCancel function.
    • Actor window now appear correctly over other windows.
     
    #9
    Vassim74 likes this.
  10. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks! Will keep you updated if I find any more bugs.
     
    #10
    Melosx likes this.
  11. sol003

    sol003 Villager Member

    Messages:
    13
    Likes Received:
    5
    First Language:
    Filipino
    Is it possible to have the categories separated if they have an overlap with each other between items, weapon and armor?


    Example: Both weapon and armor have a category called Common, which are vendor-obtained items. A Longsword is a Common, but it will show up in either categories regardless if it was an armor or not.


    Additionally, it appears that while selling, if you enter the category to sell something and cancel out, the category list is not disposed properly, even overlapping over the Item, Weapon and Armor selection which makes it look like the game froze.

    Game 2016-10-17 21-26-52-51.png
     
    #11
    Melosx likes this.
  12. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    Plugin Update v1.1.2

    Changelog


    BugFix:

    • Game freeze caused by onSellCancel function.
     
    #12
  13. Vassim74

    Vassim74 It's a Secret! Veteran

    Messages:
    101
    Likes Received:
    69
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMMV
    Seems the plugin doesn't like Yanfly's Shop Menu Core, as I get this error when I try to sell.
    [​IMG]

    I've pasted the error log from the console in the spoiler below if that helps.

     

    pixi.js:20314 Deprecation Warning: DisplayObjectContainer has been shortened to Container, please use Container from now on.
    pixi.js:20096
        Pixi.js 4.0.0 - ✰ WebGL ✰      http://www.pixijs.com/ ♥♥♥



    pixi.js:20314 Deprecation Warning: DisplayObjectContainer has been shortened to Container, please use Container from now on.
    rpg_managers.js:1756 TypeError: Cannot read property 'setItemWindow' of undefined
        at Scene_Shop.onCategoryOk (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/plugins/MSX_InventoryCategories.js:402:34)
        at Window_ShopCategory.Window_Selectable.callHandler (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:896:31)
        at Window_ShopCategory.Window_Selectable.callOkHandler (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:1165:10)
        at Window_ShopCategory.Window_Command.callOkHandler (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:1422:51)
        at Window_ShopCategory.Window_Selectable.processOk (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:1150:14)
        at Window_ShopCategory.Window_Selectable.processHandling (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:1021:18)
        at Window_ShopCategory.Window_Selectable.update (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:978:10)
        at Window_ShopCategory.Window_ItemCategory.update (file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_windows.js:1877:41)
        at file:///D:/Pete/Games/PC/Games/Steam/steamapps/common/RPG%20Maker%20MV/Projects/Tower/js/rpg_core.js:6485:19
        at Array.forEach (native)rpg_managers.js:1756 SceneManager.catchException
     
    #13
  14. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    @Vassim74Place the plugin below Yanfly's Engine plugins
     
    #14
  15. Zarsla

    Zarsla Veteran Veteran

    Messages:
    674
    Likes Received:
    190
    First Language:
    English
    @Melosx


    Hi I really love this plugin so simple yet so need for simple customization. 


    This may come of as bit rude however lines 139-141 which allow for the custom naming of categories are set up in a way that allows for only one word categories like "Food" or "Armor" but not for multi word categories like "Blacksmithing and Crafting".  I recommend rectifying that by simple changing the the array separator form " " to ", " this way multiple word categories can be made.
     
    #15
  16. Maidlyn

    Maidlyn Secretly a Mermaid Veteran

    Messages:
    354
    Likes Received:
    114
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I agree with Zarsla on the being able to make category names more than one word. Overall, nice plugin though! :)  
     
    #16
  17. Melosx

    Melosx Master of Bananas Veteran

    Messages:
    50
    Likes Received:
    27
    Location:
    Italy
    First Language:
    Italian
    Plugin Update v1.2

    Changelog


    Add:

    • Change the way the categories are read by the plugin. Can now have category names with more than one word.

    !!IMPORTANT NOTE!!


    After the update of the plugin edit Item Categories, Weapon Categories & Armor Categories and replace the space with a comma.
     
    #17
  18. RhysO101

    RhysO101 Veteran Veteran

    Messages:
    72
    Likes Received:
    9
    Location:
    A Remote Village
    First Language:
    English
    Primarily Uses:
    N/A
    Nice and simple plugin.


    Looks like something I would use.
     
    #18
  19. Michael Caiola

    Michael Caiola The Stone Bull Veteran

    Messages:
    392
    Likes Received:
    72
    Location:
    Albany/Saratoga, NY
    First Language:
    English
    I love this plugin. The inventory screen has bothered me for a while now and I love the layout this gives.


    I have a request. I'd like it so categories only show up if there are items in the inventory of that category. I have about 20 weapon types and the party will only start out with weapons from like 3 categories. Having 20 categories to sift through when there are only a few weapons would get really annoying for the player.
     
    #19
  20. VesperCire

    VesperCire Villager Member

    Messages:
    19
    Likes Received:
    1
    Location:
    Milky Way Galaxy
    First Language:
    English
    Nice plugin! Is there a way for Key Items to not be a sub-category in items?
     
    #20

Share This Page