This easiest method will be name-tagging, or checking each Item's name for "\w[<v>]" and setting weight to V.
Also, you'll only want to do checking when gain_item, gain_weapon, gain_armor, lose_item, lose_weapon, or lose_armor is called.
*makes a version*
EDIT:
Something like this should work, but you'll have to do some fiddling to get it to *really* work with BlizzABS/DBS (ie making items stay on the ground if they're too heavy to pick up, etc, and making an improved items menu, etc):
#==============================================================================
# * Game_System
#==============================================================================
class Game_System
attr_accessor :wcw_weighted_active, :wcw_weighted_factor
#----------------------------------------------------------------------------
# initialize
#----------------------------------------------------------------------------
alias wcw_weighted_initialize_later initialize
def initialize
@wcw_weighted_active = true
@wcw_weighted_factor = 20
wcw_weighted_initialize_later
end
end
#==============================================================================
# ** WcW_Weighted
#==============================================================================
module WcW_Weighted
#----------------------------------------------------------------------------
# wcw_weighted_weight
#----------------------------------------------------------------------------
def wcw_weighted_weight
@name.scan /\\[[0-9]*?\]/
return $1 ? $1 : -1
end
#----------------------------------------------------------------------------
# wcw_weighted_remove_tag
#----------------------------------------------------------------------------
def wcw_weighted_remove_tag(str)
return str.gsub(/\w\[[0-9]*?\]/, '')
end
end
#==============================================================================
# * RPG::Item
#==============================================================================
class RPG::Item
include WcW_Weighted
#----------------------------------------------------------------------------
# name
#----------------------------------------------------------------------------
def name
return wcw_weighted_remove_tag @name
end
end
#==============================================================================
# * RPG::Weapon
#==============================================================================
class RPG::Weapon
include WcW_Weighted
#----------------------------------------------------------------------------
# name
#----------------------------------------------------------------------------
def name
return wcw_weighted_remove_tag @name
end
end
#==============================================================================
# * RPG::Armor
#==============================================================================
class RPG::Armor
include WcW_Weighted
#----------------------------------------------------------------------------
# name
#----------------------------------------------------------------------------
def name
return wcw_weighted_remove_tag @name
end
end
#==============================================================================
# * Game_Actor
#==============================================================================
class Game_Actor
#----------------------------------------------------------------------------
# wcw_weighted_max_weight?
#----------------------------------------------------------------------------
def wcw_weighted_max_weight?
return base_str / $game_system.wcw_weighted_factor
end
end
#==============================================================================
# * Game_Party
#==============================================================================
class Game_Party
attr_accessor :wcw_weighted_total_weight
#----------------------------------------------------------------------------
# initialize
#----------------------------------------------------------------------------
alias wcw_weighted_initialize_later initialize
def initialize
@wcw_weighted_total_weight = 0
end
#----------------------------------------------------------------------------
# gain_item(id)
#----------------------------------------------------------------------------
alias wcw_weighted_gain_item_later gain_item
def gain_item(id)
if (not $game_system.wcw_weighted_active) || ($data_items[id].wcw_weighted_weight ==
-1) || (@wcw_weighted_total_weight + $data_items[id].wcw_weighted_weight <
@actors[0].wcw_weighted_max_weight)
wcw_weighted_gain_item_later(id)
wcw_weighted_total_weight += $data_item[id].wcw_weighted_weight
end
end
#----------------------------------------------------------------------------
# gain_weapon(id)
#----------------------------------------------------------------------------
alias wcw_weighted_gain_weapon_later gain_weapon
def gain_weapon(id)
if (not $game_system.wcw_weighted_active) || ($data_weapons[id].wcw_weighted_weight ==
-1) || (@wcw_weighted_total_weight + $data_weapons[id].wcw_weighted_weight <
@actors[0].wcw_weighted_max_weight)
wcw_weighted_gain_weapon_later(id)
wcw_weighted_total_weight += $data_weapons[id].wcw_weighted_weight
end
end
#----------------------------------------------------------------------------
# gain_armor(id)
#----------------------------------------------------------------------------
alias wcw_weighted_gain_armor_later gain_armor
def gain_armor(id)
if (not $game_system.wcw_weighted_active) || ($data_armors[id].wcw_weighted_weight ==
-1) || (@wcw_weighted_total_weight + $data_armors[id].wcw_weighted_weight <
@actors[0].wcw_weighted_max_weight)
wcw_weighted_gain_armor_later(id)
wcw_weighted_total_weight += $data_armors[id].wcw_weighted_weight
end
end
#----------------------------------------------------------------------------
# lose_item(id)
#----------------------------------------------------------------------------
alias wcw_weighted_lose_item_later lose_item
def lose_item(id)
@wcw_weighted_total_weight -= $data_items[id].wcw_weighted_weight if $game_system.wcw_weighted_active
wcw_weighted_lose_item_later(id)
end
#----------------------------------------------------------------------------
# lose_weapon(id)
#----------------------------------------------------------------------------
alias wcw_weighted_lose_weapon_later lose_weapon
def lose_weapon(id)
@wcw_weighted_total_weight -= $data_weapons[id].wcw_weighted_weight if $game_system.wcw_weighted_active
wcw_weighted_lose_weapon_later(id)
end
#----------------------------------------------------------------------------
# lose_armor(id)
#----------------------------------------------------------------------------
alias wcw_weighted_lose_armor_later lose_armor
def lose_armor(id)
@wcw_weighted_total_weight -= $data_armors[id].wcw_weighted_weight if $game_system.wcw_weighted_active
wcw_weighted_lose_armor_later(id)
end
end
To give an item weight, simply add "\w[<weight>]" in its name in the editor.
To change the number of strength it takes to increase maximum weight by 1, change either $game_system.wcw_weighted_factor (in-game) or the default value in the script (search for @wcw_weighted_factor =).
To activate/deactivate the system, use $game_system.wcw_weighted_active = <true/false>.