Disallow No Weapon
#1
Disallow No Weapon
By Jirbytaylor
Version: 1.0

Introduction
Most of us are aware how having no weapon will mean physical attacks will deal zero damage. Usually this is fine, as there are scripts to allow punches, and other similar moves.
However consider this - Aluxes has no weapon, yet can still use Cross Cut. Illogical!

This edit remedies that paradox by preventing no weapon from being equipped in the default equipment system.

Features
  • When a weapon is equipped, you can no longer have no weapon equipped.
  • Plays buzzer when trying to unequip something
Script
Code:
# Disallow No Weapon~ By Jirbytaylor
class Scene_Equip
  def update_item
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Get currently selected data on the item window
      item = @item_window.item
      # Change equipment, check if weapon selected
      if @right_window.index == 0
        if item == nil
          $game_system.se_play($data_system.buzzer_se)
        else
          $game_system.se_play($data_system.equip_se)
          @actor.equip(@right_window.index, item == nil ? 0 : item.id)
        end
      else
        $game_system.se_play($data_system.equip_se)
        @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      end
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # Remake right window and item window contents
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end
Instructions

Place this script below SDK and above Main.

FAQ

Awaiting questions~

Compatibility

0.1% chance this works with MultiSlot systems or Weapon Customisations. (Or anything that edits update_item in Scene_Equip.)
Compatible with SDK 1, 2.2 and without. (Last time I checked SDK did not edit update_item)

Terms and Conditions

May be used in free or commercial games, not like any commercial games will be using the default equipment system anyway~

Credit should go to myself.

This is a simple edit, but I'm sure people will find it useful if they have classes that learn weapon-like skills.
Reply }
#2
Cool.. It worked.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Hotkey Weapon Cycling DerVVulfman 0 4,739 04-21-2013, 04:01 AM
Last Post: DerVVulfman
   MrMo DVV Add-On #16: Taryn's Weapon Ammo System DerVVulfman 4 11,445 07-08-2011, 03:09 AM
Last Post: DerVVulfman
   Taryn's Weapon Ammunition System DerVVulfman 0 5,314 03-05-2008, 07:29 AM
Last Post: DerVVulfman
   Mary's Weapon Ammunition Hud DerVVulfman 0 4,759 03-05-2008, 07:05 AM
Last Post: DerVVulfman
   Weapon Enabled Skills ParaDog 0 4,116 03-04-2008, 05:16 AM
Last Post: ParaDog
   Weapon Unleashes Trickster 0 4,395 03-02-2008, 07:13 AM
Last Post: Trickster



Users browsing this thread: 1 Guest(s)