Limited Inventory

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 80
Monster Hunter
Well, I gave you two solutions since I wasn't sure which you wanted from your request - one was if you wanted them to go to loot but not to open, while the other was if you wanted to immediately destroy the items and not go to loot at all. It sounds like you chose the first one instead of the second. Go back to the PM and test the second one.
okay i will thanks ^^

***
Rep:
Level 80
Monster Hunter
Quote
Anyway, I'm a little confused as to what you're asking. Do you want it to go to Loot but just not immediately open the loot window? Or do you want the item to be immediately destroyed?

If the former, a possible solution is as follows: no guarantees as I haven't looked at the script for a very long time and I forget how it was supposed to work, but try replacing line 1036:


           
Code: [Select]
show_loot

with:

           
Code: [Select]
@item_window.refresh ($game_party.limit_inventory)
If the latter, try replacing this whole section from lines 1026 - 1039:

         
Code: [Select]
$game_temp.slots_to_discard.add_item (type, id, n)
          # Deactivate Command Window
          @command_window.active = false
          @command_window.index = -1
          @command_window.visible = false
          # Reactivate previous Window
          if @loot_window.visible
            @item_window.refresh ($game_party.limit_inventory, 1)
            @loot_window.refresh ($game_temp.slots_to_discard, 1)
          else
            show_loot
          end
          @item_window.active = true
          RPG::SE.new (Sound::MA_DISCARD_SE).play
with:


         
Code: [Select]
RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false

Again, I don't remember the script well enough to know if those changes would break anything. I don't think they should, but you should try it out in a test project first
.

as you told me in your PM only the first solution works for me, the second freezes once you click on discard (destroy) the item.
the only problem now is that once closing the item window it asks me if i'm okay with discarding the items , i would like it not to show this question. thanks for the help so far it works like a charm :p

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Well, instead of just:

Code: [Select]
          RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false

try making it:

Code: [Select]
          RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false
          @item_window.refresh ($game_party.limit_inventory, 1)
          @item_window.active = true

Like I said, I don't really remember this script very well and certainly don't feel like relearning it. Hopefully that will work fine.

***
Rep:
Level 80
Monster Hunter
Well, instead of just replacing:


Code: [Select]
$game_temp.slots_to_discard.add_item (type, id, n)
          # Deactivate Command Window
          @command_window.active = false
          @command_window.index = -1
          @command_window.visible = false
          # Reactivate previous Window
          if @loot_window.visible
            @item_window.refresh ($game_party.limit_inventory, 1)
            @loot_window.refresh ($game_temp.slots_to_discard, 1)
          else
            show_loot
          end
          @item_window.active = true
          RPG::SE.new (Sound::MA_DISCARD_SE).play

with

Code: [Select]
          RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false

try making it:

Code: [Select]
          RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false
          @item_window.refresh ($game_party.limit_inventory, 1)
          @item_window.active = true

Like I said, I don't really remember this script very well and certainly don't feel like relearning it. Hopefully that will work fine.

yes that worked thanks Modern algebra, just one little thing

make it

Code: [Select]
RPG::SE.new (Sound::MA_DESTROY_SE).play
          @command_window.active = false
          @command_window.visible = false
          @item_window.refresh ($game_party.limit_inventory)
          @item_window.active = true

instead, you'll see why (it gives a little bug if you don"t )

thanks again :p

**
Rep: +0/-0Level 81
I received this error when I obtained a Non-Discard item from a
chest while my inventory was already full. This happened in the
Limited Inventory 1.1 Demo. I'm not using any other scripts.

Script 'Limited Inventory 1.1c' line 480: NoMethodError occurred.
undefined method 'item_type' for nil:NilClass

***
Rep:
Level 89
I received this error when I obtained a Non-Discard item from a
chest while my inventory was already full. This happened in the
Limited Inventory 1.1 Demo. I'm not using any other scripts.

Script 'Limited Inventory 1.1c' line 480: NoMethodError occurred.
undefined method 'item_type' for nil:NilClass
Yup, checked this and you're right. <waiting for fixing this>  ::)

Hmmm, I wonder is it possible to had the free slots number in variable? Could you help, modern_algebra? :)
« Last Edit: February 05, 2011, 07:57:28 PM by Fizzly »
Regards,
Mike

**
Rep: +0/-0Level 72
Black Onslaught
Its a good script to make the player build a strategy to fight a tough boss or a quest boss.
Congrats!

***
Rep:
Level 74
I'm baaack!
This is an awesome script but I was wondering if I could use the normal Items window with the limited Items features.

EXAMPLE:
-No dark blue rectangles
-Can not scroll down to empty slots

BTW i forget what I was gonna post here (after the BTW)


EDIT: Another thing I wonder if it is possible:
Can the loot be disabled without disabling the ability to discard items?

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Well, you could remove the loot scene, but it would be reckless. What if the player's inventory was full and you wanted someone to give them a key item? Without a loot scene it would destroy the item.

As for getting rid of the blocks, I haven't worked with this script for a very long time so no guarantees, but you could try finding this in the refresh method of the Window_Item class (still inside the Limited Inventory script - I do not mean the default Window_Item class):

Code: [Select]
    @item_max = inventory.max_size == -1 ? @data.size : inventory.max_size
    create_contents
    # Calculate number of empty slots to draw
    empty_slots = (inventory.max_size == -1 || !$scene.is_a? (Scene_Item)) ? 0 : inventory.max_size - inventory.slots.size

and changing it to:

Code: [Select]
    @item_max = @data.size
    create_contents
    # Calculate number of empty slots to draw
    empty_slots = 0

***
Rep:
Level 81
Is there a way to specify items, that do not use up item slots?
I would love that feature.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
There isn't, though that would be a good idea for the future.

***
Rep:
Level 81

***
Rep:
Level 81
Double-Post-Bump, because I love this script.
I have another suggestion.
Could you add the option to "hide" items? You should still be able to check if there are present in the inventory, via events, but they don't show up in the
inventory screen.
I think there are a few possible uses for that.

Edit:
In the discard-window, the description box always displays the description of the last item in the inventory and not the one that is selected in the discard pile.
Is this a bug, or caused by this script conflicting with KGC_CategorizeItem?

« Last Edit: June 17, 2011, 11:57:12 AM by rofl1337 »

***
Rep:
Level 75
What the...?
Question about this script:

Is it possible, or would it be possible to use only one part of the script?

I need only the part which does the item stacking limitations. 

DRIACS system gives the ability to discard items, and it seems to be incompatible when the two scripts are running together.  So, if there was a way to limit via switch or some sort of boolean flag the parts of this script which do the same thing as DRIACS, just so I could use the stack-size limits that would be very beneficial.  Thanks.

**
Rep: +0/-0Level 75
RMRK Junior
I tried some stuff to fix this bug that I found but I can't fix it :(
When I open the Item Manu I get this error:

Script 'Limited Inventory 1.1b' line 851: ArgumentError occurred.
Wrong number of arguments(2 for 0)

I am useing YEMs scripts I removed YEMs Item Overhaul.
Anyway of fixing this? :/
MrD

**
Rep: +0/-0Level 67
RPGVX Advanced (I Do Not Script Tough)
AWESOME MA  ;)

****
Rep:
Level 75
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
Is there any way to add inventory slots rather than change the amount of slots there are. For instance instead of acquiring a specific backpack ingame, you can find multiple pouches throughout the game that just add more slots to your total inventory space.

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Zero to Hero2014 Best IRC Quote2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Code: [Select]
s = $game_party.limit_inventory.slots.size
s += 6 # The amount you're adjusting the size by. This can be any operation (+, -, *, /)
# Then either:
$game_party.limit_inventory.resize(s)
# Or:
resize_inventory(s)
it's like a metaphor or something i don't know

****
Rep:
Level 75
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
There's no way I missed that...

Is that in the script? Or should I be adding that to it in some way?

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Zero to Hero2014 Best IRC Quote2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
No, it's a command I whipped up just then. Use it in an event script call when you want to adjust the inventory. It should work, though I didn't test it.
it's like a metaphor or something i don't know

****
Rep:
Level 75
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
Sounds good. Thanks a lot.

But... How exactly do I get this to work? Should I make this its own script? Or is that entire thing one script call.
« Last Edit: January 03, 2012, 04:11:36 AM by hiromu656 »

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Zero to Hero2014 Best IRC Quote2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
It's a script call you use when you want to adjust the inventory relative to what it already is.
Essentially, it's only three lines:
Code: [Select]
s = $game_party.limit_inventory.slots.size
s += 6 # Or whatever
resize_inventory(s)
it's like a metaphor or something i don't know

****
Rep:
Level 75
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
I used this:
Code: [Select]
s = $game_party.limit_inventory.slots.size
s += 6 # Or whatever
resize_inventory(5)
All it did was change the inventory size to 5.

Then I used:
Code: [Select]
s = $game_party.limit_inventory.slots.size
s += 6 # Or whatever
resize_inventory(s + 5)
And what that did was for some reason subtract 5 from the total size. So I tried using a minus sign instead, and that did the same as what my initial test had done.

 ;9

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Zero to Hero2014 Best IRC Quote2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Check the last line of my code. It's an s, not a 5.
it's like a metaphor or something i don't know

****
Rep:
Level 75
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
Sorry, this is an extremely late reply, but I only used 5 because I thought that s was just a placeholder for a number. But at first, I used the s as it is but still nothing beneficial happened.

What I did was create an event in which you get a new pouch, then I called the script, (copying what you typed). When I tested the event, it resized my inventory to 6. So it didn't add more spaces.