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.
Maximum Item Limits

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 88
Script Name: Maximum item Limits
Written by: Synthesize
Current Version: V.1.00
Release Date: August 15, 2007

What is it?
This script rewrites the gain_ methods in Game_Party allowing the designer to define maximum item, weapon and armor limits. Also, item IDs, weapon IDs, and Armor IDs can be defined allowing one to define custom item limits for specific items.

Screenshots
Look at the item screen, instead of '99' the value is x.

The Script
Place above Main
Spoiler for:
Code: [Select]
#============================================================================
# *Syn's Maximum Item Limits*
#----------------------------------------------------------------------------
# Written by Synthesize
# Version 1.00
# August 15, 2007
#============================================================================
#----------------------------------------------------------------------------
# Compatability
# Rewrites:
#   Game_Party::gain_item
#   Game_Party::gain_weapon
#   Game_Party::gain_armor
#----------------------------------------------------------------------------
# Begin Customization Section
#----------------------------------------------------------------------------
module SynItemMax
  # Format = {item_id => maximum amount}
  Max_item = {32 => 100}
  # Default Max Item Storage
  Max_item.default = 100
  # Format = {weapon_id => maximum amount}
  Max_weapon = {}
  # Maximum Weapon storage
  Max_weapon.default = 99
  # Format = {armor_id => maximum amount}
  Max_armor = {}
  # Maximum storage space
  Max_armor.default = 99
end
#----------------------------------------------------------------------------
# Begin Game_Party rewrite
#----------------------------------------------------------------------------
class  Game_Party
  #--------------------------------------------------------------------------
  # Rewrite gain_item
  #--------------------------------------------------------------------------
  def gain_item(item_id,n)
if item_id > 0
  @items[item_id] = [[item_number(item_id) + n, 0].max, SynItemMax::Max_item[item_id]].min
end
  end
  #--------------------------------------------------------------------------
  # Rewrite gain_weapon
  #--------------------------------------------------------------------------
  def gain_weapon(weapon_id,n)
if weapon_id > 0
  @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, SynItemMax::Max_weapon[weapon_id]].min
end
  end
  #--------------------------------------------------------------------------
  # Rewrite gain_armor
  #--------------------------------------------------------------------------
  def gain_armor(armor_id,n)
if armor_id > 0
  @armor[armor_id] = [[armor_number(armor_id) + n, 0].max, SynItemMax::Max_armor[armor_id]].min
end
  end
end
#============================================================================
# Written by Synthesize
# Version 1.00
# August 15, 2007
#----------------------------------------------------------------------------
#    *Syns Maximum Item Limits*
#============================================================================
 


Usage:
This script may be used in either a commercial project or a free ware project free of charge. However, credit must be present somewhere in the project.

Editing/Distribution:
Feel free to redistribute this post to other boards/websites. Just keep the wording the same. As for editing the script to suite your tastes feel free. Just keep the original header/footer in tact.

If you have any questions or you found a bug, please PM me or make a post with the following:
1.) SDK Version
2.) Other Scripts
3.) Factors of the bug (What did you do to make it happen?)
4.) version
5.) Error Line

Cheers,

Syn

*
Rep:
Level 102
2014 Biggest Narcissist Award2014 Biggest Forum Potato2014 Best Non-RM Creator2013 Best Game Creator (Non-RM)2013 Best IRC ChatterboxParticipant - GIAW 112012 Most Successful Troll2012 Funniest Member2012 Best Use Of Avatar and Signature space2012 Best IRC ChatterboxSecret Santa 2012 ParticipantProject of the Month winner for November 2009For being a noted contributor to the RMRK Wiki2010 Most Successful Troll2010 Biggest Forum Couch Potato2010 Best IRC Chatterbox
Sounds awesome. People could really get some use out of this.

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
looks very cook :D
can't wait to see more scripts.
Watch out for: HaloOfTheSun

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Another nice script. I hope to see you around the forums a little more. It's nice to see more scripters.

***
Rep:
Level 86
I hate everyone except the ones I don't hate...
So by changing the numbers in the script you change how many of that item you can have in your inventory at one time?  :-\ Ah, well cool anyways, and I like that it's so short- really makes it easier when you just have one simple script like that!  ;D
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

**
Rep: +0/-0Level 83
Can it also make your player only have a maximum of 20 items in the game.
I guess the elements are all mine ! -> Working on Element Island < -

***
<3
Rep:
Level 83
I am the love in your heart. <3
Was it really worth necroposting when you can just look at the script here,

#============================================================================
#                     *Syn's Maximum Item Limits*
#----------------------------------------------------------------------------
# Written by Synthesize
# Version 1.00
# August 15, 2007
#============================================================================
#----------------------------------------------------------------------------
# Compatability
# Rewrites:
#   Game_Party::gain_item
#   Game_Party::gain_weapon
#   Game_Party::gain_armor
#----------------------------------------------------------------------------
# Begin Customization Section
#----------------------------------------------------------------------------
module SynItemMax
  # Format = {item_id => maximum amount}
  Max_item = {32 => 100}
  # Default Max Item Storage
  Max_item.default = 100
  # Format = {weapon_id => maximum amount}
  Max_weapon = {}
  # Maximum Weapon storage
  Max_weapon.default = 99
  # Format = {armor_id => maximum amount}
  Max_armor = {}
  # Maximum storage space
  Max_armor.default = 99
end
#----------------------------------------------------------------------------
# Begin Game_Party rewrite
#----------------------------------------------------------------------------
class  Game_Party
  #--------------------------------------------------------------------------
  # Rewrite gain_item
  #--------------------------------------------------------------------------
  def gain_item(item_id,n)
   if item_id > 0
     @items[item_id] = [[item_number(item_id) + n, 0].max, SynItemMax::Max_item[item_id]].min
   end
  end
  #--------------------------------------------------------------------------
  # Rewrite gain_weapon
  #--------------------------------------------------------------------------
  def gain_weapon(weapon_id,n)
   if weapon_id > 0
     @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, SynItemMax::Max_weapon[weapon_id]].min
   end
  end
  #--------------------------------------------------------------------------
  # Rewrite gain_armor
  #--------------------------------------------------------------------------
  def gain_armor(armor_id,n)
   if armor_id > 0
     @armor[armor_id] = [[armor_number(armor_id) + n, 0].max, SynItemMax::Max_armor[armor_id]].min
   end
  end
end
#============================================================================
# Written by Synthesize
# Version 1.00
# August 15, 2007
#----------------------------------------------------------------------------
#               *Syns Maximum Item Limits*
#============================================================================

**
Rep: +0/-0Level 83
I already tried doing that but no work
I guess the elements are all mine ! -> Working on Element Island < -

****
Rep:
Level 83
i find interst in your script because of the game im makeing you carry ammo and 99 bulets in a machine gun dont go very far... however it doesn't seem to work
i edit it but still the limits are 99
Spoiler for:
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com