Save-Point
Two-Handed Weapons - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Two-Handed Weapons (/thread-2727.html)



Two-Handed Weapons - RPG Advocate - 03-03-2008

Two-Handed Weapons
by RPG Advocate
saved from Phylomortis.Com


This script adds functionality for two-handed weapons. When a two-handed weapon is equipped, the equipped shield will be unequipped. When a shield is equipped while a two-handed weapon is equipped, the weapon will be unequipped. The stat changes shown in the left window reflect this. Additionally, this script makes it so that the weapon or shield that will be unequipped is shown in a partially transparent color. To declare a weapon as two-handed, add its ID number to the "$game_system.two_handed_weapons" array.

Note: If simply copied as directed, this script will mess up the Advanced Equip Window script. This script can be used with the Advanced Equip Window script, but you will need some understanding of how the code works in order to know how to merge thetwo together. It is your responsibility to understand this, so please don't bug me about it


Script
Two-Handed Weapons



RE: Two-Handed Weapons - KasperKalamity - 07-07-2013

what line is the actual array in? i can't make sense of anything in ruby


RE: Two-Handed Weapons - DerVVulfman - 07-07-2013

Technically around line 24 within the first bit of code shown here:
Code:
alias twohanded_initialize initialize
  def initialize
    twohanded_initialize
    @two_handed_weapons = []
  end
end
So you can edit it to look like this...
Code:
alias twohanded_initialize initialize
  def initialize
    twohanded_initialize
    @two_handed_weapons = [5,6,7,8]
  end
end
... Would make the default spears (by their database IDs) all two-handed weapons.

BUT... you don't really need to edit the default code. After installing, you can just make a event perform a script call just by passing...
Code:
$game_system.two_handed_weapons = [5,6,7,8]
... to do the same thing.