Jump to content

Recommended Posts

Limited Inventory
Version : 1.4
Type : System add-on

 

Introduction :
This script allow you to limit your inventory by overall possesed items instead of individual item

Features :

  • Limit inventory by overall possesed item
  • Each item may have their own size / weight
  • You may increase or decrease inventory limit using states or equipment
  • Ability to discard item in item menu
  • Define your own formula to determine inventory limit
  • Penalty for having overburdened like slower movement / disable dash *New
  • The rest of features is written in script

Screenshots :

limited01.jpg
limited02.jpg
limited03.jpg


 
Script:
The script is too long. Grab it here
 
How to use:
Put this script below material but above main
If you're using YEA - Shop Option, put it below that script
Edit configurations and the notetags as described inside the script

Credit:
Credit me as TheoAllen

Share this post


Link to post
Share on other sites

Thanks. I haven't tried to use it in actual game. 

It could be trouble some or something. But, at least, this was one of my dream systems I wished to make.

Share this post


Link to post
Share on other sites

Pretty cool, bet it would be great for strategic/tactics based games to add another strategy and logistics element.

Share this post


Link to post
Share on other sites

No, not this version. However, you could put this patch right below limited inventory

class Window_ItemUseCommand
  def discardable?(item)
    return false if item.nil? || !item.note[/<undiscardable>/].nil?
    !(item.is_a?(RPG::Item) && item.itype_id == 2)
  end
end

Just put <undiscardable> in item notebox it will not be able to discarded

Share this post


Link to post
Share on other sites

Hi, Theo. This script is fantastic, and I am goint to use it on my zombie game project, but I have a problem. When I have my inventory almost full (75/100 for example) and I want to collect and object with a size of more than 25 (in this case) Ilose the object. I put a chest with and object but if I dont have enough space in my inventory I lose the object. 

I want to do a Conditional Branch, that says "You cant collect that" when i have my inventory full. How can I do that? 

 

Sorry if you dont understand something, but I am spanish and is hard to me explain this in english XD

Share this post


Link to post
Share on other sites

Hi, Theo. This script is fantastic, and I am goint to use it on my zombie game project, but I have a problem. When I have my inventory almost full (75/100 for example) and I want to collect and object with a size of more than 25 (in this case) Ilose the object. I put a chest with and object but if I dont have enough space in my inventory I lose the object. 

I want to do a Conditional Branch, that says "You cant collect that" when i have my inventory full. How can I do that? 

 

Sorry if you dont understand something, but I am spanish and is hard to me explain this in english XD

Don't worry, I clearly understand what do you want :)

You can do a script call in conditional branch

$game_party.free_slot < 25

It means that if you free slot is less than 25, then it will return true.

Hope it helps

Share this post


Link to post
Share on other sites

 

Hi, Theo. This script is fantastic, and I am goint to use it on my zombie game project, but I have a problem. When I have my inventory almost full (75/100 for example) and I want to collect and object with a size of more than 25 (in this case) Ilose the object. I put a chest with and object but if I dont have enough space in my inventory I lose the object. 

I want to do a Conditional Branch, that says "You cant collect that" when i have my inventory full. How can I do that? 

 

Sorry if you dont understand something, but I am spanish and is hard to me explain this in english XD

Don't worry, I clearly understand what do you want :)

You can do a script call in conditional branch

$game_party.free_slot < 25

It means that if you free slot is less than 25, then it will return true.

Hope it helps

 

 

 

Yes, it works! Thank you :D

Share this post


Link to post
Share on other sites

First of all, awesome work!

 

Now...:

How could I change the position of that "Inv : 000/100" window on the main menu?

I have a script that changes the main menu appearence, and this is kinda on the middle

of the screen =S.

 

Take a look.:

 

WJzD8gT.png

Share this post


Link to post
Share on other sites

Look at the line 672 ~ 676

  def create_liminv_window
    @lim_inv = Window_MenuLimInv.new(@gold_window.width)
    @lim_inv.x = @command_window.x
    @lim_inv.y = @command_window.height
  end
To change the width, replace the @gold_window.width

and for position, change the @lim_inv.x = other number

as well as @lim_inv.y

Share this post


Link to post
Share on other sites

Thanks a lot!

Now it's the gold window =D 

But I guess that's not really from your script right? I tried changing values from Window_Gold and Window_Message, but no luck =/

 

2oVG2gH.png

 

(My icons are all messed up, I know, it's because I'm still working on the database, so I won't bother touching them for now)

Share this post


Link to post
Share on other sites

Nice script.

- Is there a way to get current "weight" carried into a variable?

- Does this bring problems with multiple inventores scripts? (Like actor inventory)

1. Set a script call in Control Variables

$game_party.total_inv_size

2. Maybe yes, maybe not. Depends on the script

Share this post


Link to post
Share on other sites

Hey Theo, wondering if you could help me..

The script is fantastic and does everything I want, though one thing is in my way and I'm not sure how to get rid of it.

This little window that pops up in the pause menu, the one that displays your inventory limit.

I'd like to turn it off as you can check this elsewhere, and it's getting in the way of one of my survival bars.

I'm fairly certain this is the window I'm talking about...

 

# =============================================================================
# â–¼ New Class : Window_MenuLimInv
# =============================================================================
class Window_MenuLimInv < Window_Base
  
  def initialize(width)
    super(0,0,width,fitting_height(1))
    refresh
  end
  
  def refresh
    contents.clear
    change_color(system_color)
    txt = Theo::LimInv::SlotVocabShort
    draw_text(0,0,contents.width,line_height,txt)
    draw_inv_slot(0,0)
  end
  
end
# =============================================================================
 
When I try and remove anything, I just end up with an error.
Please help!

 

EDIT: Nevermind, someone helped me out with this, thanks anyway :)

post-54841-0-53863100-1427546665_thumb.png

Edited by Kacper Tez

Share this post


Link to post
Share on other sites

Hi! Great script! It's almost perfect for the rucksack in my Harvest Moon-style game.

 

I was wondering if there was a way to disable discarding certain items. There are certain items, like tools, I don't want my character to get rid of by discarding from the item menu.

Thanks for your help!

Share this post


Link to post
Share on other sites

If you would've read the earlier responses, you would've seen that he already answered that question.

Put this snippet at the end of the script.

 

class Window_ItemUseCommand
def discardable?(item)
return false if item.nil? || !item.note[/<undiscardable>/].nil?
!(item.is_a?(RPG::Item) && item.itype_id == 2)
end
end

 

 

 

Just put <undiscardable> in an item notebox it will not be able to discarded.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted