Two-Handed Weapons

TimmyTheNerd

Veteran
Veteran
Joined
Aug 16, 2012
Messages
182
Reaction score
111
First Language
English
Primarily Uses
Right, I searched and couldn't find any threads requesting a script like this. So, I'm assuming this hasn't been requested before but I may be wrong.

I have a character class in my game that can wield 1 handed weapons, 2 handed weapons a shield. The issue I have, is that it doesn't make sense for the character to have a 2 handed weapon and a shield. I was wondering if there's a script out there, or if someone can make me a script, where a weapon can take up both the weapon slot and the shield slot, or both weapon slots for a class that can duel wield 1 handed weapons. Basically, if a player equips a 2 handed weapon, they can't equip a shield or 2nd weapon.

I know back in RPG Maker 2003, which I fiddled around with back in 2005, it had the option of designating weapons as 2 handed. I want something similar to that.
 
 

RandomIdoit

Legendary Bird
Veteran
Joined
Aug 12, 2013
Messages
38
Reaction score
2
First Language
English
Primarily Uses
Sorry, had to double-check, but yeah, that's how you'd do it.

go to features for whatever weapon you want to designate as two-handed

go to the equip tab

select seal equip and then from that shield.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,671
Reaction score
2,993
First Language
Tagalog
Primarily Uses
^ I think somebody already tried that, but it bugs when you already have a shield equipped before using the "two-handed" weapon (seen in a thread months ago)... he can still try it though and see if it works...

or maybe you can use Tsukihime's dynamic equips to remove the shield slot when you equip a two-handed weapon...
 

TimmyTheNerd

Veteran
Veteran
Joined
Aug 16, 2012
Messages
182
Reaction score
111
First Language
English
Primarily Uses
I actually already use Yanfly's equip engine so all the characters in my game can equip 2 accessories.

So the only way to make a 2 handed weapon is to have the equip seal the Shield slot? I'll give it a try and see what happens.
 

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,699
Reaction score
1,892
First Language
Music
Primarily Uses
RMMV
Yeah, that'll work.  I've done that for another project I was working on.  Works pretty well.
 
Joined
Apr 30, 2012
Messages
215
Reaction score
35
First Language
Spanish
Primarily Uses
I found this in another site...

Credits: Trihan

Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=#  ▼ Dual wield / two-handed fix#  Author: Trihan#  Version 1#  Release date: 28/06/13#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=#------------------------------------------------------------------------------#  ▼ UPDATES#------------------------------------------------------------------------------# 28/06/13 - First release#------------------------------------------------------------------------------#  ▼ TERMS OF USAGE#------------------------------------------------------------------------------# This script may be used for any purpose with or without credit, though a# little mention would be nice.#------------------------------------------------------------------------------#  ▼ INTRODUCTION #------------------------------------------------------------------------------# This script "fixes" two-handed weapons for dual wielders; by default VX Ace# has no checks in place to prevent a weapon that seals shield being equipped# in both hands, because dual wielders have two weapon slots instead of a# shield slot.#------------------------------------------------------------------------------#  ▼ INSTRUCTIONS#------------------------------------------------------------------------------# All you have to do is make the weapon you want to make two-handed "seal# shield" and the script will do the rest for you.#------------------------------------------------------------------------------#  ▼ COMPATIBILITY#------------------------------------------------------------------------------# There should be few if any compatibility issues with this script; the only# directly overloaded method is release_unequippable_items, so if you're using# a script that modifies this some edits may be required.#------------------------------------------------------------------------------$imported = {} if $imported.nil?$imported['tridw2hfix'] = true#==============================================================================# ** RPG::Weapon#------------------------------------------------------------------------------# Base class for equippable weapons.# NEW METHOD - two_handed?#==============================================================================class RPG::Weapon < RPG::EquipItem  #--------------------------------------------------------------------------  # * Determine whether weapon requires two hands (seals shield)  #--------------------------------------------------------------------------  def two_handed?    for feature in self.features      if feature.code == 54 && feature.data_id == 1        return true      end    end    return false  endend#==============================================================================# ** Game_BattlerBase#------------------------------------------------------------------------------# ALIASED METHOD - equippable?#==============================================================================class Game_BattlerBase  #--------------------------------------------------------------------------  # * Determine if Equippable  #--------------------------------------------------------------------------  alias tri_dw2hfix_equippable? equippable?  # Need to add a parameter for slot so we can check slot-specific setups.  def equippable?(item, slot = nil)    if slot != nil      # If the current slot is "off-hand" AND the character dual-wields AND      # the item being equipped is a weapon AND something is already equipped      # in the main hand AND the main hand weapon is two-handed...      if slot == 1 && dual_wield? && item.is_a?(RPG::Weapon) && equips[0] && equips[0].two_handed?        return false      end    end    # Call the original method to continue default equippable checks.    tri_dw2hfix_equippable?(item)  endend#==============================================================================# ** Game_Actor#------------------------------------------------------------------------------# OVERLOADED METHOD - release_unequippable_items#==============================================================================class Game_Actor < Game_Battler  #--------------------------------------------------------------------------  # * Remove Equipment that Cannot Be Equipped   #     item_gain:  Return removed equipment to party.  #--------------------------------------------------------------------------  def release_unequippable_items(item_gain = true)    loop do      last_equips = equips.dup      @equips.each_with_index do |item, i|        # Changed to include index as a parameter to equippable? so we know        # which slot is being checked.        if !equippable?(item.object, i) || item.object.etype_id != equip_slots[i]          trade_item_with_party(nil, item.object) if item_gain          item.object = nil        end      end      return if equips == last_equips    end  endend#==============================================================================# ** Window_EquipSlot#------------------------------------------------------------------------------# ALIASED METHOD - enable?#==============================================================================class Window_EquipSlot < Window_Selectable  #--------------------------------------------------------------------------  # * Display Equipment Slot in Enabled State?  #--------------------------------------------------------------------------  alias tri_dw2hfix_enable? enable?  def enable?(index)    # if the actor dual wields AND current index is that of the off-hand AND    # there's something equipped in the main hand AND it's two-handed...    if @actor.dual_wield? && index == 1 && @actor.equips[0] && @actor.equips[0].two_handed?      return false    end    tri_dw2hfix_enable?(index)  endend  #==============================================================================# ** Window_EquipItem#------------------------------------------------------------------------------# ALIASED METHOD - include?#==============================================================================class Window_EquipItem < Window_ItemList  #--------------------------------------------------------------------------  # * Include in Item List?  #--------------------------------------------------------------------------  alias tri_dw2hfix_include? include?  def include?(item)    # If the actor dual wields AND item is a weapon    if @actor.dual_wield? && item.is_a?(RPG::Weapon)      # Don't show it if we're equipping the off-hand and the actor already has      # a two-handed weapon in the main hand.      if @actor.equips[0] != nil && @actor.equips[0].two_handed? && @slot_id == 1        return false      end      # Also don't show it if we're equipping any slot but the first and the      # item is two-handed (so we can't equip 2H items in the off-hand)      return false if item.two_handed? && @slot_id != 0    end    tri_dw2hfix_include?(item)  endend
 

Blair Pendragon

Veteran
Veteran
Joined
Jul 15, 2012
Messages
91
Reaction score
41
First Language
English
Primarily Uses
I found this in another site...

Credits: Trihan
Thanks, just the thing I was looking for.

By the way, where do i copy/paste this to?

Is there a sort of standard place to post these, if its not specified?
 

sartha

Veteran
Veteran
Joined
Jan 15, 2013
Messages
31
Reaction score
6
First Language
English, French
Primarily Uses
There is a standard place, you should always post new scripts under Materials but above Main Process in the scripts window. The order of the scripts does have an impact as well so if you have several user scripts changing the order around a bit can sometimes solve incompatibilities.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I posted a funny gag reel of Drifty's video's here, but realized it was probably too riskay, so I deleted it, oops, lol.
Another room (actually other half of previous room)
What should I focus on today?

Character Portraits?
OR
Mapping?
Alright, I think I've got tired of VXAce. I guess I will jump to MV.
Just had a stranger SPRINT away from me in the grocery store. Talk about overreaction...
...I don't think I'm that ugly! ^-^

Forum statistics

Threads
95,512
Messages
929,735
Members
125,776
Latest member
FrogScholar
Top