This is a very quick, simple script that should be useful. It was requested awhile back- and here it is.
This script steps in when you equip "nothing". It equips (but does not give the player) a hidden weapon (which is fully configurable per actor) that can serve as fists, or other abilities. It's basically assigns a weapon to id 0 that is unique to each actor.
Edited for suggestions by SephirothSpawn. Thanks.
This script steps in when you equip "nothing". It equips (but does not give the player) a hidden weapon (which is fully configurable per actor) that can serve as fists, or other abilities. It's basically assigns a weapon to id 0 that is unique to each actor.
Code:
# theory's Way of the Fist script
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Fists Settings
#--------------------------------------------------------------------------
def natweap_id
# Settings: {0 => Default Fist ID, 1 => Actor 1 Fists ID, etc}
@Fists = {0 => 7, 1 => 7, 2 => 7}
# End Settings
natweap = @Fists[@actorid]
if natweap == nil
natweap = @Fists[0]
end
return natweap
end
#--------------------------------------------------------------------------
# * Change Equipment
# equip_type : type of equipment
# id : weapon or armor ID (If 0, remove equipment)
#--------------------------------------------------------------------------
def equip(equip_type, id)
case equip_type
when 0 # Weapon
if $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
if id == 0
if @weapon_id != natweap_id
$game_party.gain_weapon(@weapon_id, 1)
end
if @weapon_id == nil
@weapon_id = 0
end
@weapon_id = natweap_id
end
when 1 # Shield
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor1_id], $data_armors[id])
$game_party.gain_armor(@armor1_id, 1)
@armor1_id = id
$game_party.lose_armor(id, 1)
end
when 2 # Head
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor2_id], $data_armors[id])
$game_party.gain_armor(@armor2_id, 1)
@armor2_id = id
$game_party.lose_armor(id, 1)
end
when 3 # Body
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor3_id], $data_armors[id])
$game_party.gain_armor(@armor3_id, 1)
@armor3_id = id
$game_party.lose_armor(id, 1)
end
when 4 # Accessory
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor4_id], $data_armors[id])
$game_party.gain_armor(@armor4_id, 1)
@armor4_id = id
$game_party.lose_armor(id, 1)
end
end
end
end
Edited for suggestions by SephirothSpawn. Thanks.