Jumat, 28 Desember 2012

Selamat hari Natal!!! 2012....  (telat karena masalah Komputer)

Tak terasa sudah, melalui semua rintangan dan cewe cowo tampan yang tangguh pasti bisa survive kan?....
Abis dah kiamatnya lewat toh.... Lol~

Perencanaan Game selanjutnya

School Life : Wonderland

Gambar bisa berubah... Sewaktu"
Gameplay : Side Battleview System
Fitur :
- Weapon Upgrade +25
- Crystal Skill Equipment
- Compose Item (yg suka Alchemy)

Seperti itulah.....

Q : Lho, mana game yg School Life : Nightmare Reunion ?
A : gue malas ada banyak konsep pemikiran yg akhirnya pakai scripty yg banyak.....

Selasa, 04 Desember 2012

Setelah lama tidak update Blog, sekarang let me introduce irony Party Management....
ini script nya oleh Pacman (rmrk.net)


#===============================================================================
#
# Pacman Advanced Creative (PAC) Engine - Party Management System (2.0 ?)
# 19/6/2011
# Type: Scene
# Installation: Script calls.
# Level: Average
# Thanks: Infinate X
#
#===============================================================================
#
# Description:
# VX limits your party to having 4 members. Isn't that terrible? This script
# won't give you more members in your party, rather be able to change them
# throughout the game at the player's call. Read the instructions to find out
# more.
#
#===============================================================================
#
# Instructions:
# INSTALLATION
# Paste above main, below materials, in the script editor (F11). Make sure you
# save upon exiting.
# SCRIPT CALLS
# $data_actors[ID].found = true/false
# Where ID is the ID of an actor in the database. This places an actor in the
# reserves party, ready for selection by the player if true, and takes them
# out if false.
# $data_actors[ID].unavailable = true/false
# Makes actor with the specified ID unavailable to the player in the reserves
# party if true. If false, makes them available.
# $data_actors[ID].required = true/false
# Locks actor with specified ID to the actual party, ergo mandatory to the
# player, if true. Unlocks the character if false.
# For each of these calls you can use, instead of $data_actors[ID],
# $game_party.members[position].actor.found/unavailable/required to perform
# the action for the actor in that position in the party, starting with 0 as
# the party leader.
# $game_system.party_menu_disabled = true/false
# This will change the access of the command if PAC Main Menu is being used.
# $scene = Scene_Party.new
# Simply calls the Party Management scene. By default, there is no menu option
# for the party scene, but it is simple to add if you are using PAC Main Menu,
# and still quite easy if you are using the default menu system.
#
#===============================================================================
#
# EDITING BEGINS AT LINE XX. DO NOT TOUCH LINES XX-XX.
#
#===============================================================================

module PAC
module MENU
module PARTY

#===============================================================================
#
# BEGIN EDITING
#
#===============================================================================

  PARTY_SWITCH = Input::X # Button which will switch between equip and status
  # display in the party scene.
  PARTY_KILL = Input::Z # Button used to dispose of actors.
  DISPOSE_TEXT = "Tidak Bisa"  # Text displayed on disband command.
  KEEP_TEXT = "Biarkan saja" # Text displayed on the leave alone command.
  PARTY_VARIABLE = 1  # Variable which stores the id of the last acted upon
  # actor.
  STATUS_WINDOW = Input::Y  # Button to toggle status window existance.
  START_NO_STATUS = false # false: status window at start. true: no status
  # window at start.
  MOVE_SPEED = 4  # Speed at which the windows move when opening the status
  # window (pixels/second).
  ACTOR_TEXT = "Actors"

#===============================================================================
#
# This script requires no editing. Do not edit anything in this script
# unless you are a compenent scripter. Should you edit without any scripting
# education, it may result in me tutting at you for getting it wrong.
#
#===============================================================================

end
end
end

$pac = {} unless $pac
$pac["Party Management"] = [2.0, :gamma]

#==============================================================================
# ** RPG::Actor
#------------------------------------------------------------------------------
#  Data class for actors.
#==============================================================================

class RPG::Actor  
  #--------------------------------------------------------------------------
  # Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :found
  attr_accessor :unavailable
  attr_accessor :required
  attr_accessor :disband
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  def setup
    @found = true
    @unavailable = false
    @required = false
    @disband = false
  end
end

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :party_menu_disabled
  #--------------------------------------------------------------------------
  # alias listing
  #--------------------------------------------------------------------------
  alias pac_party_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    pac_party_initialize
    @party_menu_disabled = false
  end
end

#==============================================================================
# ** Game_Actors
#------------------------------------------------------------------------------
#  This class handles the actor array. The instance of this class is
# referenced by $game_actors.
#==============================================================================

class Game_Actors
  #--------------------------------------------------------------------------
  # Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :data
  #--------------------------------------------------------------------------
  # alias listing
  #--------------------------------------------------------------------------
  alias pac_pms_act_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    pac_pms_act_initialize
    $data_actors.each do |actor|
      actor.setup if actor
      @data[actor.id] = Game_Actor.new(actor.id) if actor
    end
  end
end

#==============================================================================
# ** Window_CurrentMember
#------------------------------------------------------------------------------
#  This window displays the current party member in the party scene.
#==============================================================================

class Window_CurrentMember < Window_Base
  #--------------------------------------------------------------------------
  # Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :mode
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(member = nil, mode = 0)
    super(334, 64, 192, 261)
    create_contents
    @member = member
    @mode = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get member
  #--------------------------------------------------------------------------
  def member
    return @member
  end
  #--------------------------------------------------------------------------
  # * Set Member
  #--------------------------------------------------------------------------
  def set_member(member)
    old_member = @member
    @member = member
    refresh if old_member != @member
  end
  #--------------------------------------------------------------------------
  # * Set modes
  #--------------------------------------------------------------------------
  def mode=(n)
    @mode = n if [0, 1].include?(n)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    return unless @member
    x, y = 0, 0
    self.draw_actor_face(@member, x, y, 48)
    self.draw_actor_name(@member, x + 52, y)
    self.draw_actor_class(@member, x + 52, y + WLH)
    self.draw_actor_level(@member, x, y + WLH*2)
    case @mode
    when 0
      self.draw_icon(142, self.contents.width - 24, y + WLH*2)
      self.contents.draw_text(x, y + WLH*2, self.contents.width - 12, WLH,
       'Stat', 2)
      self.draw_actor_hp(@member, x, y + WLH*3, 160)
      self.draw_actor_mp(@member, x, y + WLH*4, 160)
      self.draw_actor_parameter(@member, x, y + WLH*5, 0)
      self.draw_actor_parameter(@member, x, y + WLH*6, 1)
      self.draw_actor_parameter(@member, x, y + WLH*7, 2)
      self.draw_actor_parameter(@member, x, y + WLH*8, 3)
    when 1
      self.draw_icon(143, self.contents.width - 24, y + WLH*2)
      self.contents.draw_text(x, y + WLH*2, self.contents.width - 12, WLH,
       'Equip', 2)
      for i in 0...@member.equips.size
        item = @member.equips[i]
        self.draw_item_name(item, x, y + WLH*(3+i), true)
      end
    end
  end
end

#==============================================================================
# ** Window_CurrentParty
#------------------------------------------------------------------------------
#  This window displays the current party selected in the party scene.
#==============================================================================

class Window_CurrentParty < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(24, 64, 310, 64)
    @item_max = 4
    @column_max = @item_max
    create_contents
    self.index = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get member
  #--------------------------------------------------------------------------
  def member
    return $game_party.members[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh window
  #--------------------------------------------------------------------------
  def refresh
    for i in 0...@item_max
      rect = item_rect(i)
      self.contents.clear_rect(rect)
    end
    for i in 0...$game_party.members.size
      rect = item_rect(i)
      bitmap = Cache.character($game_party.members[i].character_name)
      sign = $game_party.members[i].character_name[/^[\!\$]./]
      if sign != nil and sign.include?('$')
        cw = bitmap.width / 3
        ch = bitmap.height / 4
      else
        cw = bitmap.width / 12
        ch = bitmap.height / 8
      end
      n = $game_party.members[i].character_index
      src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
      if $game_party.members[i].actor.unavailable
        self.contents.blt(rect.x, rect.y, bitmap, src_rect, 128)
      else
        self.contents.blt(rect.x, rect.y, bitmap, src_rect, 255)
      end
      if $game_party.members[i].actor.required
        lock_bitmap = Cache.system("Locked")
        self.contents.blt(rect.x + rect.width - lock_bitmap.width,
        rect.y + rect.height - lock_bitmap.height,lock_bitmap,lock_bitmap.rect)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get rectangle for displaying items
  #     index : item number
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = (contents.width + @spacing) / @column_max - @spacing
    rect.height = 32
    rect.x = index % @column_max * (rect.width + @spacing)
    rect.y = index / @column_max * 32
    return rect
  end
end

#==============================================================================
# ** Window_SelectMember
#------------------------------------------------------------------------------
#  This window displays the currently selected member in the party scene.
#==============================================================================

class Window_SelectMember < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(24, 128, 310, 270)
    calculate_actors
    @item_max = [@actors.size, 28].min
    @column_max = 5
    self.index = -1
    self.active = false
    refresh
  end
  def page_row_max
    return (self.height - 64) / WLH
  end
  #--------------------------------------------------------------------------
  # * Calculate Actors
  #--------------------------------------------------------------------------
  def calculate_actors
    @actors = []
    for a in $game_actors.data
      if a.is_a?(Game_Actor) and a.actor.found and
       !$game_party.members.include?(a)
        @actors << a unless $data_actors[a.id].disband
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get member
  #--------------------------------------------------------------------------
  def member
    return @actors[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh Window
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    calculate_actors
    @item_max = @actors.size + 1
    for i in 0...page_item_max
      next if @actors[i].nil?
      rect = item_rect(i)
      bitmap = Cache.character(@actors[i].character_name)
      sign = @actors[i].character_name[/^[\!\$]./]
      if sign != nil and sign.include?('$')
        cw = bitmap.width / 3
        ch = bitmap.height / 4
      else
        cw = bitmap.width / 12
        ch = bitmap.height / 8
      end
      n = @actors[i].character_index
      src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
      if @actors[i].actor.unavailable
        self.contents.blt(rect.x, rect.y, bitmap, src_rect, 128)
      else
        self.contents.blt(rect.x, rect.y, bitmap, src_rect, 255)
      end
      if @actors[i].actor.required
        lock_bitmap = Cache.system("Locked")
        self.contents.blt(rect.x + rect.width - lock_bitmap.width,
        rect.y + rect.height - lock_bitmap.height,lock_bitmap,lock_bitmap.rect)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get rectangle for displaying items
  #     index : item number
  #--------------------------------------------------------------------------  
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = (contents.width + @spacing) / @column_max - @spacing
    rect.height = 32
    rect.x = index % @column_max * (rect.width + @spacing)
    rect.y = index / @column_max * 32
    return rect
  end
  def update_help
    super
    value1, value2 = self.actor_min, self.actor_max
    text = sprintf("#{PAC::MENU::PARTY::ACTOR_TEXT} %d to %d", value1, value2)
    @help_window.set_text(text)
  end
  def actor_min
    return @page + 1
  end
  def actor_max
    return [@page + 16, @actors.size, $data_actors.size].min
  end
end

#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # alias listing
  #--------------------------------------------------------------------------
  alias pac_pms_file_write_save_data write_save_data
  alias pac_pms_file_read_save_data read_save_data
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    pac_pms_file_write_save_data(file)
    Marshal.dump($data_actors, file)
  end
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    pac_pms_file_read_save_data(file)
    $data_actors = Marshal.load(file)
  end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # alias listing
  #--------------------------------------------------------------------------
  alias pac_pms_ttl_command_new_game command_new_game
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    pac_pms_ttl_command_new_game
    $game_party.members.each {|s| s.actor.found = true if s}
  end
end

#==============================================================================
# ** Scene_Party
#------------------------------------------------------------------------------
#  This class performs the party screen processing.
#==============================================================================

class Scene_Party < Scene_Base
  include PAC::MENU::PARTY
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(from_map = true, from_menu = false)
    @from_map = from_map
    @from_menu = from_menu
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_windows
  end
  #--------------------------------------------------------------------------
  # * Create windows
  #--------------------------------------------------------------------------
  def create_windows
    @member_window = Window_CurrentMember.new
    @member_window.visible = false if START_NO_STATUS
    @member_window.openness = 0 if START_NO_STATUS
    @party_window = Window_CurrentParty.new
    @party_window.active = true
    @party_window.x += 96 if START_NO_STATUS
    @selectable_window = Window_SelectMember.new
    @selectable_window.x += 96 if START_NO_STATUS
    commands = [PAC::MENU::PARTY::DISPOSE_TEXT, PAC::MENU::PARTY::KEEP_TEXT]
    @choice_window = Window_Command.new(160, commands)
    @choice_window.x = (544 - @choice_window.width) / 2
    @choice_window.y = (416 - @choice_window.height) / 2
    @choice_window.openness = 0
  end
  #--------------------------------------------------------------------------
  # * Open Member Window (now with awesomeness!)
  #--------------------------------------------------------------------------
  def open_member_window
    begin
      @party_window.x -= MOVE_SPEED
      @selectable_window.x -= MOVE_SPEED
      Graphics.update
    end until @party_window.x == 48
    @member_window.visible = true
    @member_window.open
    begin
      @member_window.update
      Graphics.update
    end until @member_window.openness == 255
  end
  #--------------------------------------------------------------------------
  # * Close Member Window (with equal awesomeness!)
  #--------------------------------------------------------------------------
  def close_member_window
    @member_window.close
    begin
      @member_window.update
      Graphics.update
    end until @member_window.openness == 0
    @member_window.visible = false
    begin
      @party_window.x += MOVE_SPEED
      @selectable_window.x += MOVE_SPEED
      Graphics.update
    end until @party_window.x == 144
  end
  #--------------------------------------------------------------------------
  # * Window update
  #--------------------------------------------------------------------------
  def update_windows
    @member_window.update
    @party_window.update
    @selectable_window.update
    @choice_window.update
    if @party_window.active
      @member_window.set_member(@party_window.member)
    elsif @selectable_window.active
      @member_window.set_member(@selectable_window.member)
    end
  end
  #--------------------------------------------------------------------------
  # * Open Choice Window
  #--------------------------------------------------------------------------
  def activate_choice_window
    @previously_active = @selectable_window.active ?
     @selectable_window : @party_window
    @previously_active.active = false
    @choice_window.active = true
    @choice_window.open
    begin
      @choice_window.update
      Graphics.update
    end until @choice_window.openness == 255
  end
  #--------------------------------------------------------------------------
  # * Close Choice Window
  #--------------------------------------------------------------------------
  def deactivate_choice_window
    @choice_window.active = false
    @party_window.active = true
    @choice_window.close
    @selectable_window.index = -1
    begin
      @choice_window.update
      Graphics.update
    end until @choice_window.openness == 0
  end
  #--------------------------------------------------------------------------
  # * Update Party Window
  #--------------------------------------------------------------------------
  def update_party_window
    if Input.trigger?(Input::B) # If you want to leave,
      if $game_party.members.size == 0  # If party is empty,
        Sound.play_buzzer # Bee-bow.
        return  # No soup for you
      else
        Sound.play_cancel # Bloop.
        if @from_map
          $scene = Scene_Map.new
        elsif @from_menu
          if $pac["Main Menu"]
            $scene = Scene_Menu.new
          else
            $scene = Scene_Menu.new(4)
          end
        end
      end
    elsif Input.trigger?(Input::C)  # If you want to do something,
      member = @party_window.member # do stuff.
      if member != nil
        if member.actor.unavailable or member.actor.required
          Sound.play_buzzer
          return
        end
      end
      Sound.play_decision
      @party_window.active = false
      @selectable_window.active = true
      @selectable_window.index = 0
    elsif Input.trigger?(PARTY_KILL)
      Sound.play_buzzer
    end
  end
  #--------------------------------------------------------------------------
  # * Update Selectable Window
  #--------------------------------------------------------------------------
  def update_selectable_window
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @selectable_window.index = -1
      @selectable_window.active = false
      @party_window.active = true
    elsif Input.trigger?(Input::C)
      member = @selectable_window.member
      if member != nil
        if member.actor.unavailable
          Sound.play_buzzer
          return
        end
      end
      Sound.play_decision
      if @party_window.member != nil
        member = @party_window.member
        $game_party.remove_actor(member.id)
      end
      if @selectable_window.member != nil
        member = @selectable_window.member
        $game_party.add_actor(member.id)
      end
      $game_variables[PAC::MENU::PARTY::PARTY_VARIABLE] = member.id
      @selectable_window.refresh
      @party_window.refresh
      @selectable_window.index = -1
      @selectable_window.active = false
      @party_window.active = true
    elsif Input.trigger?(PAC::MENU::PARTY::PARTY_KILL)
      activate_choice_window
    end
  end
  #--------------------------------------------------------------------------
  # * Update Choice Window
  #--------------------------------------------------------------------------
  def update_choice_window
    if Input.trigger?(Input::B)
      Sound.play_cancel
      deactivate_choice_window
    elsif Input.trigger?(Input::C)
      case @choice_window.index
      when 0  # Disband
        member = @selectable_window.member
        if member != nil
          if member.actor.unavailable
            Sound.play_buzzer
            return
          end
        end
        Sound.play_decision
        if @party_window.member != nil
          member = @party_window.member
        end
        if @selectable_window.member != nil
          member = @selectable_window.member
        end
        $game_party.remove_actor(member.id)
        $game_variables[PAC::MENU::PARTY::PARTY_VARIABLE] = member.id
        $data_actors[member.id].disband = false
        @selectable_window.refresh
        @party_window.refresh
        @selectable_window.index = -1
        deactivate_choice_window
      when 1  # Leave
        Sound.play_cancel
        deactivate_choice_window
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    @member_window.dispose
    @party_window.dispose
    @selectable_window.dispose
    @choice_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_windows
    update_input
  end
  #--------------------------------------------------------------------------
  # * Update Command Input
  #--------------------------------------------------------------------------
  def update_input
    if Input.trigger?(PARTY_SWITCH) # If the button is being pressed...
      Sound.play_decision
      @member_window.mode = @member_window.mode == 1 ? 0 : 1
    elsif Input.trigger?(STATUS_WINDOW)
      Sound.play_decision
      if @member_window.visible
        close_member_window
      else
        open_member_window
      end
    end
    if @party_window.active # If the party member is active
      update_party_window
    elsif @selectable_window.active
      update_selectable_window
    elsif @choice_window.active
      update_choice_window
    end
  end
end

#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================

Setidaknya settingan ini bisa 33 karakter dalam game, bekas edit..... Bakal jadi seperti ini

Hasil dari Party

Yah. dengan membuat sesuatu aja, di kasih event untuk trigger menu terus pilih

1. Script dan ketik ini >  $scene = Scene_Party.new
2. test run dengan event nya... biar yakin bisa,
3. dan suprise mothafaka

Have a fun..... dan itu B. Indo... tq~


Jumat, 02 November 2012

Masalah Stats Hit Rate, Evasion, dan Critical Script

Yo dawg, I heard you like Hit Rate, Evasion right?
So I put a script here and copy paste and say to anyone that you made the script by your ownself...

Yah, tahukah kamu di RPGMaker VX, banyak banget yang bilang Hit Rate, Evasion bergantung equip aja kan? Saya ada Script nya ... Dan tahu gak kalo Stats Agility fungsinya cuma turn cepat doank kan? Let my script fix it....

So.... Agility adalah kecepatan, jadi semakin tinggi Agi, mestinya makin tinggi Evasionnya kan? Sekarang copy Script yang berwarna hijau ini.... Jadi Gamemu akan keracunan dan hancur sendiri Nanti efeknya akan ke Evasion...

#Script Credit to Zetu, and Editing from http://schoollife-thegames.blogspot.com/
#So enjoy this, Edit at your own risk... oke

module AgiToEva
  APPE = 15
  # Agility Points Per Evasion - how many agility points you need for a single
  # evasion point bonus.  Always rounds down.
  EFA_CAP = 100
  # Evasion From Agility Cap - max amount of EVA points can be added by agility 
  
  EVA_CAP = 1000
  # True Max EVA cap, recommend you just cap out the bonus agility and keep raw
  # eva numbers low instead of having a true hard cap
  # having this over 100 essentially means no cap
end

class Game_Actor
  
  alias eva_before_agi eva
  def eva
    n = eva_before_agi # get raw evasion
    raw_agi = [actor.parameters[5, @level] + @agi_plus, 0].max
    # get raw agi, agility without equipment or states, minimum of 0
    bonus_eva = [raw_agi / AgiToEva::APPE, AgiToEva::EFA_CAP].min
    # get bonus eva, capped at EFA_CAP
    n += bonus_eva # add agi bonus eva 
    n = [n, AgiToEva::EVA_CAP].min # reduces agi to the absolute cap, if necessary
    return n # returns the modified evasion
  end
  
end

class Game_Enemy
  
  alias eva_before_agi eva
  def eva
    n = eva_before_agi # get raw evasion
    raw_agi = [enemy.agi + @agi_plus, 0].max
    # get raw agi, agility without states, minimum of 0
    bonus_eva = [raw_agi / AgiToEva::APPE, AgiToEva::EFA_CAP].min
    # get bonus eva, capped at EFA_CAP
    n += bonus_eva # add agi bonus eva 
    n = [n, AgiToEva::EVA_CAP].min # reduces agi to the absolute cap, if necessary
    return n # returns the modified evasion
  end
  end

Yang itu, evasion aja, kalo Hit Rate, saya males edit buat musuh... cari untung sendiri, yee~


#Script Credit to Zetu, and Editing from http://schoollife-thegames.blogspot.com/
#So enjoy this, Edit at your own risk... oke


module AgiToHit
APPHR = 10
# Agility Points Per Hit Ratio- how many attack points you need for a single
# hit point bonus. Always rounds down.
HRA_CAP = 100
# Hit Ratio From Attack Cap - max amount of HIT points can be added by hit ratio

HIT_CAP = 1000
# True Max EVA cap, recommend you just cap out the bonus attack and keep raw
# hitratio numbers low instead of having a true hard cap
# having this over 100 essentially means no cap
end

class Game_Actor

alias hit_before_agi hit
def hit
n = hit_before_agi # get raw hit ratio
  raw_agi = [actor.parameters[5, @level] + @agi_plus, 0].max
  bonus_hit = [raw_agi / AgiToHit::APPHR, AgiToHit::HRA_CAP].min
  # get bonus hit, capped at HRA_CAP
  n += bonus_hit # add atk bonus ehit 
  n = [n, AgiToHit::HIT_CAP].min # reduces atk to the absolute cap, if necessary
return n # returns the modified hit ratio
end
end

Ternyata critical juga bisa dikasih... uwah... No sir, no good.... Why?
Gak imbang, jelek dan ngapain.... tapi apa boleh buat, nih scriptnya.... bedanya ini berdasarkan Atk...


#Script Original but still edited, and Editing from http://schoollife-thegames.blogspot.com/
#So enjoy this, Edit at your own risk... oke


module AtkToCri
APPCR = 10
# Agility Points Per Hit Ratio- how many attack points you need for a single
# hit point bonus. Always rounds down.
CRA_CAP = 100
# Hit Ratio From Attack Cap - max amount of HIT points can be added by hit ratio

CRI_CAP = 1000
# True Max EVA cap, recommend you just cap out the bonus attack and keep raw
# hitratio numbers low instead of having a true hard cap
# having this over 100 essentially means no cap
end

class Game_Actor

alias cri_before_atk cri
def cri
n = cri_before_atk # get raw hit ratio
  raw_atk = [actor.parameters[2, @level] + @atk_plus, 0].max
  bonus_cri = [raw_atk / AtkToCri::APPCR, AtkToCri::CRA_CAP].min
  # get bonus Crit, capped at HRA_CAP
  n += bonus_cri # add atk bonus crit 
  n = [n, AtkToCri::CRI_CAP].min # reduces atk to the absolute cap, if necessary
return n # returns the modified hit ratio
end
end

Sebenernya udah ada dasar Stats nya
per Actor dah dikasih
Crit : 4% (Crit 8% kalo Option Critical bonus di cek, dari senjatanya +4%, maksimal 16% kalo dari Two Handed Style dan Crit bonus di cek)
Evasion : 5%
Hit Rate : 95%

cuma kalian gak dikasi tau... cek di script Game_Actor
Yah... seperti itu lah.... coba aja liat perbedaannya sendiri... Me now leaving...
My jokes are bad, and I should feel bad too....
Tadi ada bug... okay~


Kamis, 18 Oktober 2012

Script RPGMaker VX Lancar!!!

Oh yeah... akhirnya... akhirnya.... jalan juga script nya setelah lama bertapa di gunung (bohong).

Script Extension Equip... KGC

silahkan kalau mau coba :D


#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/   ◆                Skill CP System - KGC_SkillCPSystem               ◆ VX ◆
#_/   ◇                      Last Update: 2008/09/06                          ◇
#_/   ◆            Translated and Extended Updates by Mr. Anonymous           ◆
#_/   ◆ KGC Site:                                                             ◆
#_/   ◆ http://f44.aaa.livedoor.jp/~ytomy/                                    ◆
#_/   ◆ Translator's Blog:                                                    ◆
#_/   ◆ http://mraprojects.wordpress.com                                      ◆
#_/    Bugfixed by Mithran (http://www.rpgmakervx.net/index.php?showtopic=17424)
#_/    
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/         This script has two functions equipment-related functions.
#_/   The first function is the ability to create moire 'slots' for equipment,
#_/  such as separating Boots and Gauntlets from mere 'accessories'.
#_/  It is possible to also create additional equipment slots. See the customize
#_/  block for more details.
#_/  
#_/   The second function is an "EP" (Equipment Point) System, which allows you
#_/  to designate how many 'points' an item costs to successfully equip. A
#_/  character's total EP expenditure is increased upon leveling up.
#_/  This introduces more strategy-oriented character customization.
#_/----------------------------------------------------------------------------
#_/                        ◆ Instructions For Usage ◆
#_/  To make use of these functions, you must insert the tag into the desired
#_/   item's "Notes" box located in the Armor tab of the database. For example,
#_/   you want the Leather Boots to be bound to the "Legs" slot and cost
#_/   2 EP to equip. Insert <equipkind Legs>, press enter, then add <EP 2>
#_/  
#_/                                ◆ Tags ◆
#_/  <equipkind EquipType>
#_/   Where EquipType = The name of the type of equipment. See EXTRA_EQUIP_KIND
#_/                                                        below.
#_/  <EP Amount>
#_/   Where Amount = The desired amount of EP the item requires to equip.
#_/
#_/
#_/                           ◆ Script Commands ◆
#_/  These commands are used in "Script" function in the third page of event
#_/   commands under "Advanced".
#_/
#_/  * set_actor_equip_type(ActorID, [EquipType])
#_/     Allows you to manually specify an actor's equipment slots. a
#_/      Ex. set_actor_equip_type(2, [0, 2, 3, 3, 3])
#_/      If "nil"(without quotations) is appointed to EquipType, the default
#_/      EQUIP_TYPE (see below) is used. Trust me, it's useful!
#_/
#_/  * change_actor_equipment(ActorID, equipslot_index, ItemID)
#_/     Allows you to change the equipment of a specified actor. 
#_/      equipslot_index works by finding the equipment slot number, which is
#_/      different from EQUIP_TYPE. Setting ItemID to 0 will remove the item.
#_/                   With the default setup, we see:
#_/      0=Weapon 1=Shield 2=Headgear 3=Armor 4=Accessory 5=Legs 6=Arms
#_/
#_/                         So, for an example:
#_/                  change_actor_equipment(1, 3, 15) 
#_/ Would change Ralph's(Actor01 in the database) armor to Chainmail(By default)
#_/                                            
#_/     
#_/============================================================================
#_/ Installation: This script must be inserted below KCG_ExtendedEquipScene
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#=============================================================================#
#                           ★ Customization ★                                 #
#=============================================================================#

module KGC
  module EquipExtension
  #           ◆ Extended Equipment Classification Names ◆
  #  You may designate the names of additional equipment slots here.
  #   Each time you designate a new equipment slot, it is assigned a number.
  #   The first four equipment types (Shield, Helmet, Armor, and Accessory) are
  #   given as 1, 2, 3, 4, respectively. Then the values below are assigned in
  #   order. By default "Legs" and "Arms" would be 4 and 5. It is possible
  #   to add additional slots.
  #  Example: EXTRA_EQUIP_KIND = ["Legs", "Arms", "Skill Book"]
  EXTRA_EQUIP_KIND = ["Legs", "Arms"]

  #                     ◆ Equipment Placement ◆
  #  This allows you to arrange the equip slots as you see fit on the equipment
  #   menu. Note the order listed below.
  #                  ** Equipment Classification Summary **
  # 0.Shield  1.Headgear  2.Armor  3.Accessory  4. "Legs"  5."Arms"
  #  Note that these can be changed as desired. By default, we've enabled two
  #   accessory slots at the end, instead of one. If you plan on adding extra
  #   equip slots, the category's cooresponding number must be inserted in the 
  #   brackets [] below.
  EQUIP_TYPE = [0, 1, 2, 3, 3, 3, 3]

  #                       ◆ EP (Equip Point) System ◆
  #  These settings are for the Equipment Point Limit System.
  #   This toggle allows you to use the EP system if set to true.
  #   If set to false, the EP system will be disabled.
  USE_EP_SYSTEM = false
  # VOCAB_EP appears once a character gains EP from battle. (Not Tested)
  VOCAB_EP   = "EP"
  # VOCAB_EP_A appears above the EP gauge.
  VOCAB_EP_A = "EP"
  # This toggle allows you to display the EP gauge in the actor status window.
  SHOW_STATUS_EP = true

  #                          ◆ Default EP Cost ◆ 
  #  Allows you to change the default amount an item costs to equip in EP.
  #   (When not otherwise specified.)
  DEFAULT_EP_COST   = 1
  #  This toggle allows you to hide the EP cost of an item if its cost is 0.
  #   true = hide
  #   false = show
  HIDE_ZERO_EP_COST = true

  #                        ◆ EP Values & Level Gain ◆
  #  Maximum EP that can be spent equipping items.
  EP_MAX = 20
  # Characters begin with this amount of EP.
  EP_MIN = 5
  # ◆ EP Level Gain 
  #  This is the formula for the amount of EP gained upon leveling up.
  #  The result of this formula is automatically converted to an integer.
  EP_CALC_EXP = "level * 0.3 + 4"
  # ◆ Individual Actor EP Level Gain
  PERSONAL_EP_CALC_EXP = [] # <- Do not alter or remove!
  #  Below here, you may specify formulas for individual actors that dictates
  #   the amount of EP they recieve upon leveling up. Like EP_CALC_EXP, the
  #   result is converted to an integer.
  #  Format: PERSONAL_EP_CALC_EXP[ActorID] = "Formula"
  #  The format is just like EP_CALC_EXP, except each actor is defined after
  #   PERSONAL_EP_CALC_EXP in brackets [].
  #  Any actor not specified uses the EP_CALC_EXP formula. 
  #  Example:
  # PERSONAL_EP_CALC_EXP[1] = "level * 0.5 + 5"
  #                 ◆ Insert Personal EP Calculations Below Here ◆
  PERSONAL_EP_CALC_EXP[1] = "level * 0.5 + 5"
  
  
  
  #                 ◆ Insert Personal EP Calculations Above Here ◆
  
  #                        ◆ EP Gauge Colorization ◆
  #  Allows you to change the color of the EP gauges.
  #  The color can also be determined by a red, green, and blue values.
  #  Example: GAUGE_NORMAL_START_COLOR = Color.new(255, 0, 0)  <- This is red.
  #   This method of color assignment is much like Tint Screen event command.
  #
  #  This affects the color of number that represents EP cost.
  EP_COST_COLOR        = 23
  #  This is the fill color for the early phase of the guage.
  EP_GAUGE_START_COLOR = 28
  #  This is the fill color for the late phase of the guage. (When full)
  EP_GAUGE_END_COLOR   = 29
  end
end

#=============================================================================#
#                          ★ End Customization ★                              #
#=============================================================================#

#=================================================#
#                    IMPORT                       #
#=================================================#

$imported = {} if $imported == nil
$imported["EquipExtension"] = true

#=================================================#

module KGC::EquipExtension
  # Unless the EP system is used...
  unless USE_EP_SYSTEM
    SHOW_STATUS_EP = false
    HIDE_ZERO_EP_COST = true
  end

#==============================================================================
# □ KGC::EquipExtension::Regexp
#==============================================================================
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
#                          Note Field Tag Strings                             #
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
#  Whatever word(s) are after the separator ( | ) in the following lines are 
#   what are used to determine what is searched for in the "Note" section of 
#   an item or armor.

  #  Regular expressions defined
  module Regexp
    # Base Item Module
    module BaseItem
      #  EP Tag String
      EP_COST = /<EP\s*(\d+)>/i
      #  Item Type Tag String 
      # Special note: I cannot get this tag to work right. If anyone knows how
      # this works or if it's bugged, please let me know.
      EQUIP_TYPE = /<(?:EQUIP_TYPE|equiptype)\s*(\d+(?:\s*,\s*\d+)*)>/
    end

    #  Base Armor Module
    module Armor
      #  Armor Type Tag String
      EQUIP_KIND = /<(?:EQUIP_KIND|equipkind)\s*(.+)>/i
    end
    
  end
end

#=================================================# 

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC
module Commands
  module_function
  #--------------------------------------------------------------------------
  # ○ アクターの装備を修復
  #--------------------------------------------------------------------------
  def restore_equip
    (1...$data_actors.size).each { |i|
      actor = $game_actors[i]
      actor.restore_equip
    }
  end
  #--------------------------------------------------------------------------
  # ○ アクターの装備タイプを設定
  #     actor_id   : アクター ID
  #     equip_type : 装備タイプ
  #--------------------------------------------------------------------------
  def set_actor_equip_type(actor_id, equip_type = nil)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.equip_type = equip_type
  end
  #--------------------------------------------------------------------------
  # ○ アクターの装備を変更
  #     actor_id   : アクター ID
  #     index      : 装備部位 (0~)
  #     item_id    : 武器 or 防具 ID (0 で解除)
  #--------------------------------------------------------------------------
  def change_actor_equipment(actor_id, index, item_id)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_equip_by_id(index, item_id)
  end
end
end

class Game_Interpreter
  include KGC::Commands
end

#=================================================#

#==============================================================================
# ■ Vocab
#==============================================================================

module Vocab
  # EP
  def self.ep
    return KGC::EquipExtension::VOCAB_EP
  end

  # EP (略)
  def self.ep_a
    return KGC::EquipExtension::VOCAB_EP_A
  end

  # 拡張防具欄
  def self.extra_armor(index)
    return KGC::EquipExtension::EXTRA_EQUIP_KIND[index]
  end
end

#=================================================#

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ 装備拡張のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_equip_extension_cache
    @__ep_cost = KGC::EquipExtension::DEFAULT_EP_COST
    @__equip_type = []

    self.note.split(/[\r\n]+/).each { |line|
      case line
      when KGC::EquipExtension::Regexp::BaseItem::EP_COST
        # 消費 EP
        @__ep_cost = $1.to_i
      when KGC::EquipExtension::Regexp::BaseItem::EQUIP_TYPE
        # 装備タイプ
        @__equip_type = []
        $1.scan(/\d+/) { |num|
          @__equip_type << num.to_i
        }
      end
    }

    # EP 制を使用しない場合は消費 EP = 0
    @__ep_cost = 0 unless KGC::EquipExtension::USE_EP_SYSTEM
  end
  #--------------------------------------------------------------------------
  # ○ 消費 EP
  #--------------------------------------------------------------------------
  def ep_cost
    create_equip_extension_cache if @__ep_cost == nil
    return @__ep_cost
  end
  #--------------------------------------------------------------------------
  # ○ 装備タイプ
  #--------------------------------------------------------------------------
  def equip_type
    create_equip_extension_cache if @__equip_type == nil
    return @__equip_type
  end
end

#=================================================#

#==============================================================================
# ■ RPG::Armor
#==============================================================================

class RPG::Armor < RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ 装備拡張のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_equip_extension_cache
    super
    @__kind = -1

    self.note.split(/[\r\n]+/).each { |line|
      if line =~ KGC::EquipExtension::Regexp::Armor::EQUIP_KIND
        # 装備種別
        e_index = KGC::EquipExtension::EXTRA_EQUIP_KIND.index($1)
        next if e_index == nil
        @__kind = e_index + 4
      end
    }
  end

unless $@
  #--------------------------------------------------------------------------
  # ○ 種別
  #--------------------------------------------------------------------------
  alias kind_KGC_EquipExtension kind
  def kind
    create_equip_extension_cache if @__kind == nil
    return (@__kind == -1 ? kind_KGC_EquipExtension : @__kind)
  end
end

end

#=================================================#

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_writer   :equip_type               # 装備タイプ
  #--------------------------------------------------------------------------
  # ● セットアップ
  #     actor_id : アクター ID
  #--------------------------------------------------------------------------
  alias setup_KGC_EquipExtension setup
  def setup(actor_id)
    actor = $data_actors[actor_id]
    @extra_armor_id = []

    setup_KGC_EquipExtension(actor_id)

    restore_equip
  end
  #--------------------------------------------------------------------------
  # ○ MaxEP 取得
  #--------------------------------------------------------------------------
  def maxep
    calc_exp = KGC::EquipExtension::PERSONAL_EP_CALC_EXP[self.id]
    if calc_exp == nil
      calc_exp = KGC::EquipExtension::EP_CALC_EXP
    end
    n = Integer(eval(calc_exp))
    return [[n, ep_limit].min, KGC::EquipExtension::EP_MIN].max
  end
  #--------------------------------------------------------------------------
  # ○ EP 取得
  #--------------------------------------------------------------------------
  def ep
    n = 0
    equips.compact.each { |item| n += item.ep_cost }
    return [maxep - n, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ EP 上限取得
  #--------------------------------------------------------------------------
  def ep_limit
    return KGC::EquipExtension::EP_MAX
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の取得
  #--------------------------------------------------------------------------
  def equip_type
    if @equip_type.is_a?(Array)
      return @equip_type
    else
      return KGC::EquipExtension::EQUIP_TYPE
    end
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の数
  #--------------------------------------------------------------------------
  def armor_number
    return equip_type.size
  end
  #--------------------------------------------------------------------------
  # ○ 拡張防具欄の数
  #--------------------------------------------------------------------------
  def extra_armor_number
    return [armor_number - 4, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ 防具 ID リストの取得
  #--------------------------------------------------------------------------
  def extra_armor_id
    @extra_armor_id = [] if @extra_armor_id == nil
    return @extra_armor_id
  end
  #--------------------------------------------------------------------------
  # ● 防具オブジェクトの配列取得
  #--------------------------------------------------------------------------
  alias armors_KGC_EquipExtension armors
  def armors
    result = armors_KGC_EquipExtension

    # 5番目以降の防具を追加
    extra_armor_number.times { |i|
      armor_id = extra_armor_id[i]
      result << (armor_id == nil ? nil : $data_armors[armor_id])
    }
    return result
  end
  #--------------------------------------------------------------------------
  # ● 装備の変更 (オブジェクトで指定)
  #     equip_type : 装備部位
  #     item       : 武器 or 防具 (nil なら装備解除)
  #     test       : テストフラグ (戦闘テスト、または装備画面での一時装備)
  #--------------------------------------------------------------------------
  alias change_equip_KGC_EquipExtension change_equip
  def change_equip(equip_type, item, test = false)
    change_equip_KGC_EquipExtension(equip_type, item, test)

    # 拡張防具欄がある場合のみ
    if extra_armor_number > 0
      item_id = item == nil ? 0 : item.id
      case equip_type
      when 5..armor_number  # 拡張防具欄
        @extra_armor_id = [] if @extra_armor_id == nil
        @extra_armor_id[equip_type - 5] = item_id
      end
    end

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ● 装備の破棄
  #     item : 破棄する武器 or 防具
  #    武器/防具の増減で「装備品も含める」のとき使用する。
  #--------------------------------------------------------------------------
  alias discard_equip_KGC_EquipExtension discard_equip
  def discard_equip(item)
    last_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

    discard_equip_KGC_EquipExtension(item)

    curr_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    return unless item.is_a?(RPG::Armor)  # 防具でない
    return if last_armors != curr_armors  # 既に破棄された

    # 拡張防具欄を検索
    extra_armor_number.times { |i|
      if extra_armor_id[i] == item.id
        @extra_armor_id[i] = 0
        break
      end
    }

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ● 職業 ID の変更
  #     class_id : 新しい職業 ID
  #--------------------------------------------------------------------------
  alias class_id_equal_KGC_EquipExtension class_id=
  def class_id=(class_id)
    class_id_equal_KGC_EquipExtension(class_id)

    return if extra_armor_number == 0  # 拡張防具欄がない

    # 装備できない拡張防具を外す
    for i in 5..armor_number
      change_equip(i, nil) unless equippable?(equips[i])
    end
  end
  #--------------------------------------------------------------------------
  # ○ EP 条件クリア判定
  #     equip_type : 装備部位
  #     item       : 武器 or 防具
  #--------------------------------------------------------------------------
  def ep_condition_clear?(equip_type, item)
    return true if item == nil  # nil は解除なので OK

    curr_item = equips[equip_type]
    offset = (curr_item != nil ? curr_item.ep_cost : 0)
    return false if self.ep < (item.ep_cost - offset)   # EP 不足

    return true
  end
  #--------------------------------------------------------------------------
  # ○ 装備を修復
  #--------------------------------------------------------------------------
  def restore_equip
    return if @__last_equip_type == equip_type

    # 以前の装備品・パラメータを退避
    last_equips = equips
    last_hp = self.hp
    last_mp = self.mp
    if $imported["SkillCPSystem"]
      last_battle_skill_ids = battle_skill_ids.clone
    end

    # 全装備解除
    last_equips.each_index { |i| change_equip(i, nil) }

    # 装備品・パラメータを復元
    last_equips.compact.each { |item| equip_legal_slot(item) }
    self.hp = last_hp
    self.mp = last_mp
    if $imported["SkillCPSystem"]
      last_battle_skill_ids.each_with_index { |s, i| set_battle_skill(i, s) }
    end
    @__last_equip_type = equip_type.clone
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # ○ 装備品を正しい箇所にセット
  #     item : 武器 or 防具
  #--------------------------------------------------------------------------
  def equip_legal_slot(item)
    if item.is_a?(RPG::Weapon)
      if @weapon_id == 0
        # 武器 1
        change_equip(0, item)
      elsif two_swords_style && @armor1_id == 0
        # 武器 2 (二刀流の場合)
        change_equip(1, item)
      end
    elsif item.is_a?(RPG::Armor)
      if !two_swords_style && item.kind == equip_type[0] && @armor1_id == 0
        # 先頭の防具 (二刀流でない場合)
        change_equip(1, item)
      else
        # 装備箇所リストを作成
        list = [-1, @armor2_id, @armor3_id, @armor4_id]
        list += extra_armor_id
        # 正しい、かつ空いている箇所にセット
        equip_type.each_with_index { |kind, i|
          if kind == item.kind && list[i] == 0
            change_equip(i + 1, item)
            break
          end
        }
      end
    end
  end
end

#=================================================#

#==============================================================================
# ■ Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ EP の文字色を取得
  #     actor : アクター
  #--------------------------------------------------------------------------
  def ep_color(actor)
    return knockout_color if actor.maxep > 0 && actor.ep == 0
    return normal_color
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲージの色 1 の取得
  #--------------------------------------------------------------------------
  def ep_gauge_color1
    color = KGC::EquipExtension::EP_GAUGE_START_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲージの色 2 の取得
  #--------------------------------------------------------------------------
  def ep_gauge_color2
    color = KGC::EquipExtension::EP_GAUGE_END_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ EP の描画
  #     actor : アクター
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #     width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_ep(actor, x, y, width = 120)
    draw_actor_ep_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::ep_a)
    self.contents.font.color = ep_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.ep, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.ep, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxep, 2)
    end
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ○ EP ゲージの描画
  #     actor : アクター
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #     width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_ep_gauge(actor, x, y, width = 120)
    gw = width * actor.ep / [actor.maxep, 1].max
    gc1 = ep_gauge_color1
    gc2 = ep_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # ○ 消費 EP の描画
  #     item    : 武器 or 防具
  #     rect    : 描画する領域
  #     enabled : 許可状態
  #--------------------------------------------------------------------------
  def draw_equipment_ep_cost(item, rect, enabled = true)
    return if item == nil
    # 消費 EP 0 を表示しない場合
    return if KGC::EquipExtension::HIDE_ZERO_EP_COST && item.ep_cost == 0

    color = KGC::EquipExtension::EP_COST_COLOR
    self.contents.font.color = (color.is_a?(Integer) ?
      text_color(color) : color)
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, item.ep_cost, 2)
  end
end

#=================================================#

#==============================================================================
# ■ Window_Equip
#==============================================================================

class Window_Equip < Window_Selectable
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = @actor.equips.clone
    @item_max = [@data.size, @actor.armor_number + 1].min
    create_contents

    # 装備箇所を描画
    self.contents.font.color = system_color
    if @actor.two_swords_style
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon1)
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::weapon2)
    else
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon)
      name = armor_slot_name(@actor.equip_type[0])
      self.contents.draw_text(4, WLH * 1, 92, WLH, name)
    end
    for i in 1...@actor.armor_number
      name = armor_slot_name(@actor.equip_type[i])
      self.contents.draw_text(4, WLH * (i + 1), 92, WLH, name)
    end

    # 装備品を描画
    rect = Rect.new(92, 0, self.width - 128, WLH)
    @item_max.times { |i|
      rect.y = WLH * i
      draw_item_name(@data[i], rect.x, rect.y)
      draw_equipment_ep_cost(@data[i], rect)
    }
  end
  #--------------------------------------------------------------------------
  # ○ 防具欄の名称を取得
  #     kind : 種別
  #--------------------------------------------------------------------------
  def armor_slot_name(kind)
    case kind
    when 0..3
      return eval("Vocab.armor#{kind + 1}")
    else
      return Vocab.extra_armor(kind - 4)
    end
  end

unless $imported["ExtendedEquipScene"]
  #--------------------------------------------------------------------------
  # ● カーソルを 1 ページ後ろに移動
  #--------------------------------------------------------------------------
  def cursor_pagedown
    return if Input.repeat?(Input::R)
    super
  end
  #--------------------------------------------------------------------------
  # ● カーソルを 1 ページ前に移動
  #--------------------------------------------------------------------------
  def cursor_pageup
    return if Input.repeat?(Input::L)
    super
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active

    if Input.repeat?(Input::RIGHT)
      cursor_pagedown
    elsif Input.repeat?(Input::LEFT)
      cursor_pageup
    end
  end
end

end

#=================================================#

#==============================================================================
# ■ Window_EquipItem
#==============================================================================

class Window_EquipItem < Window_Item
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    @item_enabled = []
    super
    @data.each { |item| @item_enabled << enable?(item) }
  end
  #--------------------------------------------------------------------------
  # ● アイテムをリストに含めるかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  def include?(item)
    return true if item == nil
    if @equip_type == 0
      return false unless item.is_a?(RPG::Weapon)
    else
      return false unless item.is_a?(RPG::Armor)
      return false unless item.kind == @equip_type - 1
    end
    return @actor.equippable?(item)
  end
  #--------------------------------------------------------------------------
  # ● アイテムを許可状態で表示するかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  def enable?(item)
    return false unless @actor.equippable?(item)                      # 装備不可
    return false unless @actor.ep_condition_clear?(@equip_type, item)  # EP 不足

    return true
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    super(index)    
    rect = item_rect(index)
    item = @data[index]

    # 個数表示分の幅を削る
    cw = self.contents.text_size(sprintf(":%2d", 0)).width
    rect.width -= cw + 4
    draw_equipment_ep_cost(item, rect, enable?(item))
  end
  #--------------------------------------------------------------------------
  # ○ 簡易リフレッシュ
  #     equip_type : 装備部位
  #--------------------------------------------------------------------------
  def simple_refresh(equip_type)
    # 一時的に装備部位を変更
    last_equip_type = @equip_type
    @equip_type = equip_type

    @data.each_with_index { |item, i|
      # 許可状態が変化した項目のみ再描画
      if enable?(item) != @item_enabled[i]
        draw_item(i)
        @item_enabled[i] = enable?(item)
      end
    }
    # 装備部位を戻す
    @equip_type = last_equip_type
  end
end

#=================================================#

#==============================================================================
# ■ Window_EquipStatus
#==============================================================================

class Window_EquipStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  alias refresh_KGC_EquipExtension refresh
  def refresh
    refresh_KGC_EquipExtension

    draw_actor_ep(@actor, 120, 0, 56) if KGC::EquipExtension::USE_EP_SYSTEM
  end
end

#=================================================#

#==============================================================================
# ■ Window_Status
#==============================================================================

class Window_Status < Window_Base

if KGC::EquipExtension::SHOW_STATUS_EP
  #--------------------------------------------------------------------------
  # ● 基本情報の描画
  #     x : 描画先 X 座標
  #     y : 描画先 Y 座標
  #--------------------------------------------------------------------------
  alias draw_basic_info_KGC_EquipExtension draw_basic_info
  def draw_basic_info(x, y)
    draw_basic_info_KGC_EquipExtension(x, y)

    draw_actor_ep(@actor, x + 160, y + WLH * 4)
  end
end

  #--------------------------------------------------------------------------
  # ● 装備品の描画
  #     x : 描画先 X 座標
  #     y : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)

    item_number = [@actor.equips.size, @actor.armor_number + 1].min
    item_number.times { |i|
      draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
    }
  end
end

#=================================================#

#==============================================================================
# ■ Window_ShopStatus
#==============================================================================

class Window_ShopStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● アクターの現装備と能力値変化の描画
  #     actor : アクター
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_parameter_change(actor, x, y)
    return if @item.is_a?(RPG::Item)
    enabled = actor.equippable?(@item)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(x, y, 200, WLH, actor.name)
    if @item.is_a?(RPG::Weapon)
      item1 = weaker_weapon(actor)
    elsif actor.two_swords_style and @item.kind == 0
      item1 = nil
    else
      index = actor.equip_type.index(@item.kind)
      item1 = (index != nil ? actor.equips[1 + index] : nil)
    end
    if enabled
      if @item.is_a?(RPG::Weapon)
        atk1 = item1 == nil ? 0 : item1.atk
        atk2 = @item == nil ? 0 : @item.atk
        change = atk2 - atk1
      else
        def1 = item1 == nil ? 0 : item1.def
        def2 = @item == nil ? 0 : @item.def
        change = def2 - def1
      end
      self.contents.draw_text(x, y, 200, WLH, sprintf("%+d", change), 2)
    end
    draw_item_name(item1, x, y + WLH, enabled)
  end
end

#=================================================#

#==============================================================================
# ■ Scene_Equip
#==============================================================================

class Scene_Equip < Scene_Base
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  EQUIP_TYPE_MAX = KGC::EquipExtension::EXTRA_EQUIP_KIND.size + 5
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクターインデックス
  #     equip_index : 装備インデックス
  #--------------------------------------------------------------------------
  alias initialize_KGC_EquipExtension initialize
  def initialize(actor_index = 0, equip_index = 0)
    initialize_KGC_EquipExtension(actor_index, equip_index)

    unit = ($imported["LargeParty"] ?
      $game_party.all_members : $game_party.members)
    actor = unit[actor_index]
    @equip_index = [@equip_index, actor.armor_number].min
  end
  #--------------------------------------------------------------------------
  # ● アイテムウィンドウの作成
  #--------------------------------------------------------------------------
  alias create_item_windows_KGC_EquipExtension create_item_windows
  def create_item_windows
    create_item_windows_KGC_EquipExtension

    kind = equip_kind(@equip_index)
    EQUIP_TYPE_MAX.times { |i|
      @item_windows[i].visible = (kind == i)
    }
  end
  #--------------------------------------------------------------------------
  # ● アイテムウィンドウの更新
  #--------------------------------------------------------------------------
  def update_item_windows
    kind = equip_kind(@equip_window.index)
    for i in 0...EQUIP_TYPE_MAX
      @item_windows[i].visible = (kind == i)
      @item_windows[i].update
    end
    @item_window = @item_windows[kind]
    @item_window.simple_refresh(@equip_window.index)
  end
  #--------------------------------------------------------------------------
  # ○ 装備欄の種別を取得
  #     index : 装備欄インデックス
  #--------------------------------------------------------------------------
  def equip_kind(index)
    if index == 0
      return 0
    else
      return @actor.equip_type[index - 1] + 1
    end
  end

unless $imported["ExtendedEquipScene"]
  #--------------------------------------------------------------------------
  # ● ステータスウィンドウの更新
  #--------------------------------------------------------------------------
  def update_status_window
    if @equip_window.active
      @status_window.set_new_parameters(nil, nil, nil, nil)
    elsif @item_window.active
      temp_actor = Marshal.load(Marshal.dump(@actor))
      temp_actor.change_equip(@equip_window.index, @item_window.item, true)
      new_atk = temp_actor.atk
      new_def = temp_actor.def
      new_spi = temp_actor.spi
      new_agi = temp_actor.agi
      @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
    end
    @status_window.update
  end
end

  #--------------------------------------------------------------------------
  # ● アイテム選択の更新
  #--------------------------------------------------------------------------
  alias update_item_selection_KGC_EquipExtension update_item_selection
  def update_item_selection
    if Input.trigger?(Input::C)
      # 装備不可能な場合
      index = @equip_window.index
      item = @item_window.item
      unless item == nil ||
          (@actor.equippable?(item) && @actor.ep_condition_clear?(index, item))
        Sound.play_buzzer
        return
      end
    end

    update_item_selection_KGC_EquipExtension
  end
end

#=================================================#

#==============================================================================
# ■ Scene_File
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # ● セーブデータの読み込み
  #     file : 読み込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  alias read_save_data_KGC_EquipExtension read_save_data
  def read_save_data(file)
    read_save_data_KGC_EquipExtension(file)

    KGC::Commands.restore_equip
    Graphics.frame_reset
  end
end

class Game_Actor
  alias restore_equip_shortnoparty restore_equip
  def restore_equip
    return if $game_party.nil?
    restore_equip_shortnoparty 
  end
end


Ini script dah di fix, yang bermasalah.... ingat!!! ada sistem EP (Equipment Point) yang di disable/non aktif...
kalau mau utak atik, tolong berhati hatilah.... 

Follow me on Twitter .... kalau anda cukup berani..... LOLOL~