RMXP seems to hard-code the ability to completely remove all weapons from a person and armor/accesories too, and while this may seem cool to some, it's a nightmare to others. This script work around does the trick.
Features
Perfect for Visual Equipment, that relies on armor being on naked templates
Institutes an unarmed feature, allowing for events that work when 'Unarmed' weapon is equipped
Keeps battle with a little damage for an unarmed character, vs damage being 0
Screenshots
None Demo
None Script
"script"
Code:
#==============================================================================
#
#------------------------------------------------------------------------------
# Window_EquipItem Redux by DaVoiceJayRay and Tuna
# version 1.0 - Exclusive on save-point.org and roguehaven.elementfx.com
# Please do not post this script to any other RPG Maker website.
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
# equip_type : equip region (0-3)
#--------------------------------------------------------------------------
def initialize(actor, equip_type)
super(0, 256, 640, 224)
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Item Acquisition
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add equippable weapons
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
# Add equippable armor
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
# Add blank page, but keep original weapons and armor
if @equip_type == 0
@data.push($data_weapons[1])
else
@data.push($data_armors[1])
end
# Make a bit map and draw all items
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max-1
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Text Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
Instructions
Place above main, and above any Moghunter or Other Custom Menu Systems you may have. Then in game database, create a new weapon for slot 1, being Unarmed. Give it a low damage, cause well, it's your first, and doesn't have the power of say, a Bronze Sword. Next do the same for armor, creating a new one called 'Birthday Suit' or 'Clothes' or whatever
Compatibility
This should be SDK compliant, as well as usable with any base Menu System. However, as some Custom Menu Systems utilize their own coding you may have to simply copy lines 59-64 to the appropriate section of the new Menu System.
Credits and Thanks
To Tuna, who I worked on this script with last night.
Author's Notes
I implemented this script for a Hud that would display a picture depending on what weapon is armed, and plan to use it to aid my own Visual Equipment script. Also, having an 'unarmed' weapon makes it perfect for puzzle modes, as it's hard to solve a puzzle with a AK47 in your hands, and hard to beat up a zombie without it...
ALSO: If you just want this to work for your weapons and not your armor, find this line in the script...
@data.push($data_armors[1])
and replace with
@data.push(nil)
Terms and Conditions
You may use this script freely, I just ask that you don't copy it and place it in other script resource sites. In addition, all I'd like is maybe a credit? Please?