Theo - Limited Inventory

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by TheoAllen, Aug 19, 2013.

  1. redshard

    redshard Warper Member

    Messages:
    4
    Likes Received:
    2
    First Language:
    English
    Hello there. I'm having a bit of a compatibility issue with your script and another. I read that you did not like scripts that overwrites the default code so much, so I'm sure if this is up your alley. But here is my problem anyway:

    I have a script that removes the categories (items, weapons, armor, key items) from the inventory window at the top and merges everything into a single window. Here is that script, located in the second post down: (link).

    Whenever this script is running, the category window is removed, and not only does your inventory limit and item weight not appear, but whenever I try to use an item, I get the error 

    Script 'LimitedInventory' line 802: NoMethodError occurred.undefined method 'set_item' for nil:NilClasswhich I assume means the category-erasing script somehow messed with the window that is supposed to appear when a usable item is selected. And since your script overwrites the window that typically appears when an item is called to be used, an error occurs. 

    So my question is: is there some way to make it to where your method of using items with the "Use item / Discard Item / Cancel" window overrides the usual method, or can you suggest a way to remove the category windows when your script is active?

    Any help is greatly appreciated, and please feel free to ask if I need to clarify any wording.
     
    #81
  2. Dymdez

    Dymdez Newbie-in-Chief Veteran

    Messages:
    752
    Likes Received:
    148
    Location:
    Western Massachusetts
    First Language:
    English
    Theo made me this (Theo if you don't wish for this to be here, just tell me and I'll remove it)

    class Window_ItemUseCommand  def discardable?(item)    return false if item.nil?    return false if (item.is_a?(RPG::Item) && item.itype_id == 2)    return !item.note[/<persistent>/i]  endend
    use the notetag <persistent> on whatever you wish to be omitted from the discard menu.

    @redshard: I have no help to give you, but maybe try changing the script order?
     
    Last edited by a moderator: Oct 19, 2015
    #82
  3. redshard

    redshard Warper Member

    Messages:
    4
    Likes Received:
    2
    First Language:
    English
    @Dymdez: I rearranged the script to have the removal of categories go over this script, then I had a problem with Yanfly's menu engine. I realized I could live without that and removed it, and now it works perfectly. Thanks for the advice, you're my hero for the day.
     
    #83
    Dymdez likes this.
  4. Dymdez

    Dymdez Newbie-in-Chief Veteran

    Messages:
    752
    Likes Received:
    148
    Location:
    Western Massachusetts
    First Language:
    English
    I'm no hero. That's how those of us without scripting knowledge get along. We guess a lot :D hahahaha
     
    #84
  5. stiven202

    stiven202 Villager Member

    Messages:
    18
    Likes Received:
    0
    Location:
    Colombia
    First Language:
    English
    how to change the sizes of items? all in my database are size 1.
     
    #85
  6. InfectionFiles

    InfectionFiles Warper Member

    Messages:
    2
    Likes Received:
    1
    First Language:
    English
    Hi, Theo! What are your terms of service for your scripts? Thank you!
     
    #86
  7. ddejan90

    ddejan90 Veteran Veteran

    Messages:
    55
    Likes Received:
    18
    Location:
    Bosnia and Herzegovina
    First Language:
    Serbo-Croatian
    Hey man! I love your TheoAllen - Limited Inventory script! I adore it! I do have one comp ability issue and I would be really sad to not be able to use both of those scripts. I use your script (above) and Moder Algebra Hover Alerts 1.0.3. script. That script, as title says, makes item/gold icon pop above character when you loot, but with your script it don't work. It shows gold, but items, weapons and armors don't pop up. Is there anyway, you could just tweek it little bit to make it work? Please, I would be so appreciative. I wanted to ask M.Algebra, but he wasn't online in a long time so you are my only hope. Please reply, I need you.
     
    #87
  8. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,494
    Likes Received:
    5,101
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Sure, drop the link to MA's script here.
     
    #88
  9. ddejan90

    ddejan90 Veteran Veteran

    Messages:
    55
    Likes Received:
    18
    Location:
    Bosnia and Herzegovina
    First Language:
    Serbo-Croatian
    Best guy ever! Made a tweek just for me.
    In case you wonder if you use the script, it's "Sleek Item Popup- V.M of D.T
     
    #89
  10. djboro88

    djboro88 Maker Amateur Member

    Messages:
    9
    Likes Received:
    0
    Location:
    Valencia
    First Language:
    Spanish English
    Is it possible to use the selected object in the first actor, without having to choose the character? I am playing a game with only one player and in my case it is absurd to have to select the player if there is only one player. Thanks.
     
    #90
  11. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,494
    Likes Received:
    5,101
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    I haven't tested this yet, but try to insert a patch below the script
    Code:
    class Scene_Item
      def use_command_ok
        theo_liminv_use_item
        @freeslot.refresh
      end
    end
    
     
    #91
  12. Gamingstar

    Gamingstar Gamer Veteran

    Messages:
    50
    Likes Received:
    11
    Location:
    Outside your window
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm having a problem where every time i start the game, it starts me with 20 items, but my inventory is empty. (even after i set the limit to 30, it still instantly gives me 20 empty items
     
    #92
  13. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,494
    Likes Received:
    5,101
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    I don't get what u mean. Elaborate?
     
    #93
  14. Gamingstar

    Gamingstar Gamer Veteran

    Messages:
    50
    Likes Received:
    11
    Location:
    Outside your window
    First Language:
    English
    Primarily Uses:
    RMVXA
    Wait nvm i figured out what was wrong

    Edit: is there a way to make it so that key items weigh nothing?
     
    #94
  15. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,494
    Likes Received:
    5,101
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Use tag <inv size: 0>
     
    #95
  16. Gamingstar

    Gamingstar Gamer Veteran

    Messages:
    50
    Likes Received:
    11
    Location:
    Outside your window
    First Language:
    English
    Primarily Uses:
    RMVXA
    Idk what you mean by adding a tag, sorry. (I suck at script-related stuff)
     
    #96
  17. Gamingstar

    Gamingstar Gamer Veteran

    Messages:
    50
    Likes Received:
    11
    Location:
    Outside your window
    First Language:
    English
    Primarily Uses:
    RMVXA
    like this? upload_2019-2-4_18-30-47.png
     
    #97
  18. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,494
    Likes Received:
    5,101
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Yep, that one. It's called "notetag".
    Many scripts uses similar notetag like that, so you have to get used with the term.
     
    #98
  19. Gamingstar

    Gamingstar Gamer Veteran

    Messages:
    50
    Likes Received:
    11
    Location:
    Outside your window
    First Language:
    English
    Primarily Uses:
    RMVXA
    Ah, okay. Thanks for the help!
     
    #99
  20. IneptAttoney_08

    IneptAttoney_08 MMORPG! Veteran

    Messages:
    91
    Likes Received:
    11
    Location:
    Here!
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    (Translated by Mod, see post below)

    Can I ask for the Indonesian version, bro? I don't understand B. English
     

Share This Page