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.
Inventory: Breaking Limits

0 Members and 2 Guests are viewing this topic.

**
Rep: +0/-0Level 73
Sad Egg
Inventory: Breaking Limits
Version: 1.20
Author: Ahnez67
Date: 02.3.2011

Version History


  • <Version 1.2> 02.05.2011 - Shop bug Fixed
  • <Version 1.0> 02.03.2011 - Original Release

Planned Future Versions

  • None at all.

Description


This Script can change the default limit for Gold (default: 9999999). Itens, Weapons and Armour (Default: 99 each)

Features

  • Virtually infinite limit for Gold and Itens
  • Limit in Shops

Screenshots



Instructions

Paste it above Main, but below the Default Scripts. Change the limits at lines 18,19, 20 and 21.
Line 22: That one changes the limit in Shops. If it's 99, then, you can only buy itens/armour/weaponry in shops up to 99.
And Done, it's ready to use.

You can change the limits with Script Calls:

AHNEZ67::BREAK::GOLDMAXB = new gold limit
AHNEZ67::BREAK::ITEMMAXB = new item limit
AHNEZ67::BREAK::WEAPONMAXB = new weapon limit
AHNEZ67::BREAK::ARMORMAXB = new armour limit
AHNEZ67::BREAK::SHOPMAXB = new shop limit

Script


Code: [Select]
#-----------------------------------------------------------------------
#---------------------AHNEZ67 INVENTORY BREAKING LIMITS----------------
#----------------------------------------------------------------------
#Place the Script above Main, but below the default Scripts#
#This Script can change the limit of Gold, Items, Weapons and Armour in the
#inventory-
#It's very easy to use, change the parameters (numbers in red) at lines 18 (Gold
#limit, 19 (Item Limit), 20 (Weapon Limit) and 21 (Armour Limit).
#The parameter in line 22, is the limit to buy in shops. if SHOPMAXB (line 22)
#is 99, means that you can only buy things in shops up to 99
##############################################################################
##############################################################################

#EDITABLE REGION#
module AHNEZ67
  module BREAK
   
    GOLDMAXB = 100000000  #Gold limit
    ITEMMAXB = 9999       #Item Limit
    WEAPONMAXB = 9999     #Weapon Limit
    ARMORMAXB = 9999      #Armour Limit
    SHOPMAXB = 9999       #Limit in Shops
  end
end
#EDITABLE REGION END#

class Game_Party < Game_Unit
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, AHNEZ67::BREAK::GOLDMAXB].min
  end

  def gain_item(item, n, include_equip = false)
    number = item_number(item)
    case item
    when RPG::Item
      @items[item.id] = [[number + n, 0].max, AHNEZ67::BREAK::ITEMMAXB].min
    when RPG::Weapon
      @weapons[item.id] = [[number + n, 0].max, AHNEZ67::BREAK::WEAPONMAXB].min
    when RPG::Armor
      @armors[item.id] = [[number + n, 0].max, AHNEZ67::BREAK::ARMORMAXB].min
    end
    n += number
    if include_equip and n < 0
      for actor in members
        while n < 0 and actor.equips.include?(item)
          actor.discard_equip(item)
          n += 1
        end
      end
    end
  end
end

class Window_ShopBuy < Window_Selectable
  def initialize(x, y)
    super(x, y, 304, 304)
    @shop_goods = $game_temp.shop_goods
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    @data = []
    for goods_item in @shop_goods
      case goods_item[0]
      when 0
        item = $data_items[goods_item[1]]
      when 1
        item = $data_weapons[goods_item[1]]
      when 2
        item = $data_armors[goods_item[1]]
      end
      if item != nil
        @data.push(item)
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  def draw_item(index)
    item = @data[index]
    number = $game_party.item_number(item)
    enabled = (item.price <= $game_party.gold and number < AHNEZ67::BREAK::SHOPMAXB)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    draw_item_name(item, rect.x, rect.y, enabled)
    rect.width -= 4
    self.contents.draw_text(rect, item.price, 2)
  end
  def update_help
    @help_window.set_text(item == nil ? "" : item.description)
  end
end

class Scene_Shop < Scene_Base
  def update_buy_selection
    @status_window.item = @buy_window.item
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      @help_window.set_text("")
      return
    end
    if Input.trigger?(Input::C)
      @item = @buy_window.item
      number = $game_party.item_number(@item)
      if @item == nil or @item.price > $game_party.gold or number == AHNEZ67::BREAK::SHOPMAXB
        Sound.play_buzzer
      else
        Sound.play_decision
        max = @item.price == 0 ? AHNEZ67::BREAK::SHOPMAXB : $game_party.gold / @item.price
        max = [max, AHNEZ67::BREAK::SHOPMAXB - number].min
        @buy_window.active = false
        @buy_window.visible = false
        @number_window.set(@item, max, @item.price)
        @number_window.active = true
        @number_window.visible = true
      end
    end
  end
end

Credit


  • Ahnez67


Support


Post here if you encounter any problem with this script

Known Compatibility Issues

None know

Demo


There's no Demo version of this Script. It's not really necessary for such simple Script.

---------------------------------------------------------------------------------------
No credits needed. But it was made by me.
Commercial and non-Commercial games are all the same for me. You are free to use and edit it as you wish
« Last Edit: July 25, 2011, 07:48:52 PM by Ahnez67 »
Hello, i'm Japanese and my English is broken-

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I assume you could use it to limit as well?

Code: [Select]
ARMORMAXB = 5       #Armour Limit

This? Or instead does it default to 99? Limiting would be a nice addition if it doesn't already.

**
Rep: +0/-0Level 73
Sad Egg
Yeah.

Even 1, 3, 5 works.

if you don't want it to change, simply use 99 as limit
« Last Edit: February 03, 2011, 11:15:27 PM by Ahnez67 »
Hello, i'm Japanese and my English is broken-

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Very nice :)

**
Rep: +0/-0Level 73
Sad Egg
Thanks -   :D
Hello, i'm Japanese and my English is broken-

**
Rep: +0/-0Level 73
Sad Egg
Version 1.2
----------------------------------

A minor bug Fixed
Now, limit of Item bought in Shops are customizable
Hello, i'm Japanese and my English is broken-

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
I hate people having too much money in my games. I'm much too lazy to fix it myself, so this will help immensely! Thank you!
*Credited*
it's like a metaphor or something i don't know

**
Rep: +0/-0Level 75
Just another RM Guy
Ive started using this script in my recent game, and I changed to weapon limit to 500 cause of ammunition reserves.  But when I found a different ammo script, I tried to change the limits back but they wouldnt change again.

Its like I had it like this:  AmmoNamex10

Then when I tried to change it, it did this:
AmmoName+
AmmoName+
AmmoName+

continuously through my inventory list.

Any help on how to fix this?

**
Rep: +0/-0Level 73
Sad Egg
Ive started using this script in my recent game, and I changed to weapon limit to 500 cause of ammunition reserves.  But when I found a different ammo script, I tried to change the limits back but they wouldnt change again.

Its like I had it like this:  AmmoNamex10

Then when I tried to change it, it did this:
AmmoName+
AmmoName+
AmmoName+

continuously through my inventory list.

Any help on how to fix this?

Are you using another Script that customize the Inventory?

...

Ahn... Put my script under your other Scripts. It should work
Hello, i'm Japanese and my English is broken-

**
Rep: +0/-0Level 75
Just another RM Guy
Thanks i got it to work again. :3

**
Rep: +0/-0Level 81
Rpg Maker VX Master
Can you change limits in game with a script call ?
This would be really useful for something like a bag system...
example:
Standard Gold Limit: 500
Than you find an item "Big Gold Bag"
You change with a script call the gold limit to 1000
And it looks like your bag has been "Upgraded" !
is this possible ?
If not, can you add it ?
Anyway, this is an awesome script ! Good job !  ;D
« Last Edit: July 25, 2011, 12:40:17 PM by The Frontera »
Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos !
Link: Awesome videos here

The VX Project I'm working on: (Click to see the Description)


ALL MY AWESOME COMPLETED GAMES [OPEN THE SPOILER!!!]
Spoiler for:
My Completed VX Games:
The Frontera Legends (Click to Download)


My Completed XP Games:
The Frontera 2 (Click to Download)


The Frontera 1
Unfortunatly I can't have more than three pictures in my signature...
However, download it HERE (without the cool image)

**
Rep: +0/-0Level 73
Sad Egg
Can you change limits in game with a script call ?
This would be really useful for something like a bag system...
example:
Standard Gold Limit: 500
Than you find an item "Big Gold Bag"
You change with a script call the gold limit to 1000
And it looks like your bag has been "Upgraded" !
is this possible ?
If not, can you add it ?
Anyway, this is an awesome script ! Good job !  ;D

Yes, you can change it with Script Calls:

AHNEZ67::BREAK::GOLDMAXB = new gold limit
AHNEZ67::BREAK::ITEMMAXB = new item limit
AHNEZ67::BREAK::WEAPONMAXB = new weapon limit
AHNEZ67::BREAK::ARMORMAXB = new armor limit
AHNEZ67::BREAK::SHOPMAXB = new shop limit
Hello, i'm Japanese and my English is broken-

**
Rep: +0/-0Level 81
Rpg Maker VX Master
Thanks !
I missed that part of the first post...
Now I'll use your script in my new game !
And even if are not necessary, I'll give you credits !
Again, Great Work !
« Last Edit: July 26, 2011, 10:24:47 AM by The Frontera »
Visit my official website for resources, games, and informations.
Download for free my (great) videogames and resources.
Link:
http://thefrontera.knossus.net

Watch also my great videos !
Link: Awesome videos here

The VX Project I'm working on: (Click to see the Description)


ALL MY AWESOME COMPLETED GAMES [OPEN THE SPOILER!!!]
Spoiler for:
My Completed VX Games:
The Frontera Legends (Click to Download)


My Completed XP Games:
The Frontera 2 (Click to Download)


The Frontera 1
Unfortunatly I can't have more than three pictures in my signature...
However, download it HERE (without the cool image)

*
Rep: +0/-0Level 57
RMRK Junior
i love this script! btw, is it possible to have multiple shopmax limits? like, the shopmax limit for items is 10 while the shopmax limit for weapons is 2?..