Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
| ################################################################################ | |
| ##### Max Item | |
| ########################################################## | |
| # Author : Biward | |
| # Date : 27/04/2014 | |
| # Version : 1.0 Ace | |
| # | |
| # With this script, you can modify the maximum amount you can have of an object (items, weapons, armors) | |
| # | |
| # How it works : | |
| # You just have to put <Max = N> in the object's note | |
| # N = maximum amount | |
| # | |
| ########################################################## | |
| ##### Script | |
| ################################## | |
| ################################## | |
| # ** RPG::BaseItem | |
| ################## | |
| module RPG | |
| class BaseItem | |
| attr_reader :max | |
| def init_max | |
| note =~ /<Max = (.*)>/ | |
| @max = 99 | |
| @max = $1.to_i if $1 | |
| end | |
| end | |
| end | |
| ################################## | |
| # ** DataManager | |
| ################ | |
| module DataManager | |
| class << self | |
| alias lndbimax load_normal_database | |
| def load_normal_database | |
| lndbimax | |
| load_max | |
| end | |
| alias lbtdbimax load_battle_test_database | |
| def load_battle_test_database | |
| lbtdbimax | |
| load_max | |
| end | |
| def load_max | |
| $data_items.each { |obj| obj.init_max if obj } | |
| $data_weapons.each { |obj| obj.init_max if obj } | |
| $data_armors.each { |obj| obj.init_max if obj } | |
| end | |
| end | |
| end | |
| ################################## | |
| # ** GameParty | |
| ############## | |
| class Game_Party | |
| def max_item_number(item) | |
| return item.max | |
| end | |
| end | |
| ################################## | |
| ##### Fin du Script | |
| ########################################################## |