[REQUEST]I am looking to make these scripts compatible.

Started by Calintz, March 10, 2009, 10:09:01 pm

Previous topic - Next topic

Calintz

March 10, 2009, 10:09:01 pm Last Edit: March 13, 2009, 11:49:11 pm by Calintz16438
So what I need is just a little help from someone with some general scripting knowledge. I simply need to make these scripts compatible with one another. I have been told that it is possible, and that it can be done quite easily, however I just can't do it... :^_^':

**From what I know, the edits should take place in the HBACW script.

The scripts are:
Reno--s-Joker's VBACW
Spoiler: ShowHide

#==============================================================================
# ** Vertical Battle Actor Command Window with Icons v 1.0
#------------------------------------------------------------------------------
#  Based off of Reno-s--Joker's HBACW(I require that you give him full credit)
#  Brought to you by Calintz16438(I don't require any credit)
#------------------------------------------------------------------------------
# ** Window_BattleCommands
#------------------------------------------------------------------------------
# This window will replace your actor command window.
#==============================================================================

class Window_BattleCommands < Window_Selectable

  #-----------------------------------------------------------------------------
  # CONFIG INFORMATION
  #-----------------------------------------------------------------------------
 
  # CHOOSE YOUR SIZE!! XD
  # You have the ability to choose what size you would like the help window's
  # text, and the help window's shade to be. Simply change the value of either
  # 'HELP_WINDOW_SHADE_SIZE,' or 'HELP_WINDOW_FONT_SIZE' to your desired size.
  # I personally recommend that you do not make one size larger than the other.
  # It doesn't look professional...
  # **This feature was already implemented in the default script. I did not add
  #   it, I simply made the access to it much easier.
 
  # TOGGLE TEXT FEATURES!! XD
  # You have the option to add the 'bold' or 'italic' feature now. This feature
  # mimics that of any bold or italic you have seen in many of today's word
  # editing programs and some photo editors(Microsoft Word, Wordpad, Adobe, etc)
  # Toggle these features using the key terms (true, false). Be sure that when
  # entering your value, that all letters are lower case...
  # **The bold feature was already implemented in the default script. I did not
  # add it, I simply made the access to it much easier.
 
  # CHOOSE YOUR COLOR!! XD
  # When selecting your font and shade colors, you currently have 9options (0-8)
  # as defined below. Enjoy XD...
  # == 0 = White  ==
  # == 1 = Blue   ==
  # == 2 = Red    ==
  # == 3 = Green  ==
  # == 4 = Cyan   ==
  # == 5 = Purple ==
  # == 6 = Yellow ==
  # == 7 = Gray   ==
 
  # MOVE YOUR SHADOW!! XD
  # 'HELP_WINDOW_DROPSHADOW_X' contains the x-coordinates for the shade of the
  # help window's text. Increasing or decreasing this value will move the
  # location of the text's shade by your specified amount. *Measured in pixels*
  # 'HELP_WINDOW_DROPSHADOW_Y' contains the y-coordinates for the shade of the
  # help window's text. Increasing or decreasing this value will move the
  # location of the text's shade by your specified amount. *Measured in pixels*
 
  # CHOOSE YOUR ICON!! XD
  # Don't care too much for the default icons!? Well today is your lucky day XD.
  # You have the ability to change your icons as you see fit. simply remove the
  # string value from the quotations, and enter the exact name of the file you
  # would like to use as your icons. 
  # **This feature was already implemented in the default script. I did not add
  #   it, I simply made the access to it much easier.
 
  # SET TIP TEXT BY INDEX NUMBER
  # Type a string describing each of your commands. This has been newly reworked
  # to make customisation easier.
 
  # WINDOWSKIN
  # It's recommended to use a windowskin which does not use a rectangular
  # graphic for selections (like the poor example in the demo). Choose the
  # windowskin for the command window.
 
  HELP_WINDOW_FONT_SIZE   = 24    # Default is 18
  HELP_WINDOW_FONT_BOLD   = true  # Default is 'true'
  HELP_WINDOW_FONT_ITALIC = false # Default is 'false'
  HELP_WINDOW_FONT_COLOR  = 0     # Default is 0(White)
 
  ATTACK_ICON = 'C-attack02'      # Default is 'C-attack'
  SKILL_ICON  = 'C-skill02'       # Default is 'C-skill'
  DEFEND_ICON = 'C-defend02'      # Default is 'C-defend'
  ITEM_ICON   = 'C-item01'        # Default is 'C-item'
 
  TIP_TEXT_0 = 'Attack the enemy with your weapon'          # Self-explanatory
  TIP_TEXT_1 = 'Use spells or skills that you have learned' # Self-explanatory
  TIP_TEXT_2 = 'Defend against enemy attacks'               # Self-explanatory
  TIP_TEXT_3 = 'Use an item from your bag'                  # Self-explanatory
 
  WINDOWSKIN = '001-Blue01'       # Change the Battle Scene's Windowskin here.
 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
   
    # These are the names of your command options in battle.
    # You have the ability to change these at will, as they will not actually
    # be shown at any time. We are using icons!! XD
    @battle_commands = ['Attack', 'Skill', 'Defend', 'Item']
   
    #Don't change this:
    @item_max = @battle_commands.size
   
    # This section will keep the window centered, no matter how many objects are
    # included into the battle command window.
    super (0, 0, 80, (56*@item_max)+32)
    self.contents = Bitmap.new(self.width-32, self.height-32)
    self.y = (256-self.height)/2 + 64
    self.x = (640-self.width)/2
   
    # You can customize these options to change opacity of the window.
    self.opacity = 0
    self.back_opacity = 0
   
    # Change the icons in this section if you're re-ordering the commands
    for i in 0..@battle_commands.size
      case i
      when 0
        icon = ATTACK_ICON # See top for customization information.
      when 1
        icon = SKILL_ICON  # See top for customization information.
      when 2
        icon = DEFEND_ICON # See top for customization information.
      when 3
        icon = ITEM_ICON   # See top for customization information.
    end
    # Drawing the icon. 
    draw_item(i, 0, 8+(56*i),icon, 235)
    end
 
    self.windowskin = RPG::Cache.windowskin(WINDOWSKIN)
    self.active = false
    self.visible = false
    self.index = 0
   
  #--------------------------------------------------------------------------
  # * Set up the icon tip window
  #--------------------------------------------------------------------------
    helpw = (@battle_commands.size * 64) + 384
    helph = 64
 
    @help_window = Window_Help.new
    @help_window.contents = Bitmap.new(helpw - 32, helph - 32)
    @help_window.contents.font.size = HELP_WINDOW_FONT_SIZE
    @help_window.contents.font.color = text_color(HELP_WINDOW_FONT_COLOR)
    @help_window.contents.font.bold = HELP_WINDOW_FONT_BOLD
    @help_window.contents.font.italic = HELP_WINDOW_FONT_ITALIC
    @help_window.width  = 640 # The help window's width.
    @help_window.height = 64  # The help window's height.
    @help_window.x = 0 # The x-coordinate of the help window.
    @help_window.y = 0 # The y-coordinate of the help window.
    @help_window.opacity      = 164 # The 'actual' opacity for the help window.
    @help_window.back_opacity = 164 # The back opacity for the help window.
    @help_window.active  = false
    @help_window.visible = false
  end
 
  #--------------------------------------------------------------------------
  # * Define method draw_item (used for making the icons appear)
  #--------------------------------------------------------------------------
  def draw_item(index, x, y, picture, opacity) 
    bitmap = RPG::Cache.icon(picture)
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 48, 48), opacity)
  end
 
  #--------------------------------------------------------------------------
  # * Define the swap commands feature for compatibility with Blizzard's EOS
  #--------------------------------------------------------------------------
  def swap_commands
    @battle_commands[1], @battle_commands2 = @battle_commands2, @battle_commands[1]
    refresh
  end
 
  #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0 and @index <=(@battle_commands.size-1)
      self.cursor_rect.set(0, 8 + index * 56, 48, 48)
    end
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    if self.active and @index >= 0 and @index <=(@battle_commands.size-1)
      # If the down directional button was pressed
      if Input.repeat?(Input::DOWN)
          $game_system.se_play($data_system.cursor_se)
          @index += 1
      end
      # If the up directional button was pressed
      if Input.repeat?(Input::UP)
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
      end
      # Update help text (update_help is defined by the subclasses)
      if self.active and @help_window != nil
        update_help
          if Input.repeat?(Input::C)
              help_window.visible = false
          end
          if Input.repeat?(Input::B)
              @help_window.visible = false
          end
        end
      # Update cursor rectangle
      update_cursor_rect
      elsif self.active
      # Creating a "loop" feature when the cursor positions exceeds the max
        if @index=0
          if Input.press?(Input::UP)
              @index=(@battle_commands.size-1)
              update_help
          end
        end
        if @index>=@battle_commands.size
          @index=0
        end
        update_cursor_rect
    end
  end
 
  #--------------------------------------------------------------------------
  # * Update the tip window text when you 'hover' over commands
  #--------------------------------------------------------------------------
  def update_help
    case index
    when 0
      @help_window.visible = true
      @help_window.set_text(TIP_TEXT_0, 1)
      # Change the above to the description for your first command
    when 1
      @help_window.visible = true
      @help_window.set_text(TIP_TEXT_1, 1)
      # Change the above to the description for your second command
    when 2
      @help_window.visible = true
      @help_window.set_text(TIP_TEXT_2, 1)
      # ... etc.
    when 3
      @help_window.visible = true
      @help_window.set_text(TIP_TEXT_3, 1)
      # ... etc.
    else
      # Remove the help window.
      @help_window.visible = false
    end
  end
end

#==============================================================================
# ** End of Main Script
#==============================================================================

class Scene_Battle
 
  # MOVE YOUR WINDOW!! XD
  # By default, the vertical battle actor command window has been aligned to
  # the right edge of the screen. by decreasing this value, you can further
  # distance the command window from it's original alignment
 
  VERTICAL_X = 560 # Default is '560'
 
  alias start_phase1_mod start_phase1
  def start_phase1
    start_phase1_mod
    if @actor_command_window.is_a?(Window_Command)
      @actor_command_window.dispose
      @actor_command_window = Window_BattleCommands.new
    end
  end
 
  alias phase3_setup_command_window_mod phase3_setup_command_window
  def phase3_setup_command_window
    phase3_setup_command_window_mod
    @actor_command_window.x = VERTICAL_X
  end
end


Blizzard's EOS(Easy Overdrive System)
Spoiler: ShowHide

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Easy Overdrive System by Blizzard
# Version: 2.01b
# Type: Limit Break / Overdrive System
# Date 2.0b: 7.3.2009
# Date 2.01b: 8.3.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   99% compatible with SDK 1.x. 90% compatible with SDK 2.x. WILL corrupt your
#   old savegames. Can cause incompatibilty issues with following scripts
#   and/or systems:
#   - exotic CBS-es
#   - other Limit Break / Overdrive systems
#   
#   Not compatible with:
#   - Chaos Rage Limit System
#   
#   
# Features:
#
#   - extremely simple Overdrive System
#   - using Blizzard gradient styler 4.x with 7 different styles
#   - compatible with Tons of Add-ons
#   - compatible with Blizz-ABS
#   - compatible with RTAB
#   - maximum compatibility with other scripts
#   - moving Overdrive command in defineable color and a faster animated cursor
#   - actors learn Overdrive skills seperately
#
# new in v2.01b:
#   - fixed an issue with RTAB
#
#
# Explanation:
#
#   This script allows actors to use an alternative set of skills which
#   consumes the OD attribute. OD is gained when losing HP.
#   
#   
# Configuration:
#
#   OVERDRIVE_RATE         - set the filling rate of the SR, 1000 is standard,
#                            500 is 2 times slower and 2000 would be 2 times
#                            faster
#   DRAW_OVERDRIVE         - set this value to false if you don't want OD%
#                            display at all
#   DRAW_OVERDRIVE_BAR     - set this value to false if you don't want an OD
#                            bar at all (does not work if you don't have a
#                            script for HP/SP/EXP bars)
#   OVERDRIVE_ENABLED      - add any actor ID of actors who actually have the
#                            OD attribute drawn in battle
#   OVERDRIVE_NAME         - this is the name of the OD %
#   OVERDRIVE_COMMAND_NAME - this is the name of the Overdrive Command
#   OVERDRIVE_COLOR        - set the values in the () to numbers between 0-255,
#                            also note that they determine the color ammount in
#                            the color like this example:
#                            (RED, GREEN, BLUE, ALPHA) - note: alpha = opacity
#   RTAB_ACTIVE            - set to true if using RTAB
#   
# Additional info:
#
#   If you want to change the value of the OD % ingame use the "Call script"
#   event command and use this syntax:
#
#     $game_actors[X].overdrive = Y
#
#   X - ID of the hero in the database
#   Y - new value of the OD
#
#   You can also use another syntax:
#
#     $game_party.actors[X].overdrive = Y
#
#   X - position of the hero in the party
#   Y - new value of the OD
#
#   Note that X starts from 0 and NOT 1. The ammount is shown as 100,0%, this
#   is 1000 OD. i.e. 59,1% would be 591 OD.
#
#   To add a new Overdrive to a characer use the "Call Script" event command
#   and use following syntax:
#
#     $game_actors[ID].learn_overdrive(CD)
#
#   To remove a Overdrive from a character use this syntax:
#
#     $game_actors[ID].forget_overdrive(CD)
#
#   ID - ID of the actor in the database
#   CD - ID of the Overdrive skill in the database
#
# Note:
#
#   Using Overdrive skills as normal skills will work without problems. Though,
#   it is better you create a different skill if you want to use it as
#   Overdrive. BUT IF YOU ARE USING BLIZZ-ABS, YOU SHOULD NOT DO THIS!!!
#   Create new skills for Overdrive Skills!
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

$easy_overdrive = 2.01

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG
 
  OVERDRIVE_KIND = 11
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  OVERDRIVE_RATE = 1000
  DRAW_OVERDRIVE = true
  DRAW_OVERDRIVE_BAR = true
  OVERDRIVE_ENABLED = [1, 2, 3, 4]
  OVERDRIVE_USERS = [1, 2, 3, 4]
  OVERDRIVE_NAME = 'OD'
  OVERDRIVE_COMMAND_NAME = 'Spirit Break'
  OVERDRIVE_COLOR = Color.new(0, 128, 255)
  RTAB_ACTIVE = false
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
end

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  alias hp_is_equal_to_eos_later hp=
  def hp=(val)
    last_hp = self.hp
    hp_is_equal_to_eos_later(val)
    if self.is_a?(Game_Actor)
      if self.dead?
        self.overdrive = 0
      elsif self.hp < last_hp
        self.overdrive += (last_hp - self.hp) * BlizzCFG::OVERDRIVE_RATE /
            [last_hp, self.hp].min
      end
    end
  end
 
end

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor
 
  attr_reader :overdrive
  attr_reader :overdrive_skills
 
  alias setup_eos_later setup
  def setup(actor_id)
    @overdrive = 0
    @overdrive_skills = []
    setup_eos_later(actor_id)
  end
 
  def overdrive=(val)
    @overdrive = val
    @overdrive = 0 if @overdrive < 0
    @overdrive = 1000 if @overdrive > 1000
  end
 
  def learn_overdrive(skill_id)
    if skill_id > 0 && !@overdrive_skills.include?(skill_id)
      @overdrive_skills.push(skill_id)
      @overdrive_skills.sort!
    end
  end
 
  def forget_overdrive(skill_id)
    @overdrive_skills.delete(skill_id)
  end
 
  def overdrive_can_use?(id)
    return (item_req_test(id) && overdrive_left(id) != 0)
  end
 
  def overdrive_left(id)
    return -1 if $data_skills[id].sp_cost == 0
    return (self.overdrive / 10 / $data_skills[id].sp_cost)
  end
 
  def item_req_test(id)
    if $tons_version != nil && $tons_version >= 6.0 &&
        $game_system.ITEM_REQUIREMENT
      data = BlizzCFG.item_reqs(id)
      return ($game_party.item_number(data[0]) >= data[1])
    end
    return true
  end
 
  def overdrive_text
    return "#{@overdrive/10}.#{@overdrive%10}%"
  end
 
end

#==============================================================================
# Window_Base
#==============================================================================

class Window_Base
 
  def draw_actor_overdrive(actor, x, y, w = 144)
    w = 120 if !$scene.is_a?(Scene_Menu) && !BlizzCFG::RTAB_ACTIVE
    self.contents.font.color = system_color
    self.contents.draw_text(x, y-16, width, 64, BlizzCFG::OVERDRIVE_NAME)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, w, 32, actor.overdrive_text, 2)
  end
 
  def draw_actor_overdrive_with_bar(actor, x, y, w = 148)
    w -= 12
    rate = actor.overdrive.to_f / 1000
    color1 = Color.new(80, 0, 0, 192)
    color2 = Color.new(240, 0, 0, 192)
    color3 = Color.new(80, 0, 0, 192)
    if BlizzCFG::RTAB_ACTIVE
      color1.alpha = color2.alpha = 255
      draw_slant_bar(x, y + 12, actor.overdrive, 1000, w, 6, color1, color2)
    else
      self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
    end
    if $scene.is_a?(Scene_Battle)
      draw_actor_overdrive(actor, x, y, w)
    else
      draw_actor_overdrive(actor, x, y)
    end
  end
 
end

#==============================================================================
# Window_BattleStatus
#==============================================================================

class Window_BattleStatus
 
  alias refresh_eos_later refresh
  def refresh(number = 0)
    if BlizzCFG::RTAB_ACTIVE
      refresh_eos_later(number)
      return
    elsif !BlizzCFG::DRAW_OVERDRIVE
      refresh_eos_later
      return
    end
    self.contents.clear
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    $game_party.actors.each_index {|i|
        if $tons_version != nil && $tons_version >= 4.82 &&
            $game_system.CENTER_BATTLER
          actor_x = case $game_party.actors.size
          when 1 then 4 + 240
          when 2 then 4 + 80 + i * 320
          when 3 then 4 + 80 + i * 160
          when 4 then 4 + i * 160
          end
        else
          actor_x = i * 160 + 4
        end
        draw_actor_name($game_party.actors[i], actor_x, -8)
        draw_actor_hp($game_party.actors[i], actor_x, 14, 120)
        draw_actor_sp($game_party.actors[i], actor_x, 44, 120)
        if BlizzCFG::OVERDRIVE_ENABLED.include?($game_party.actors[i].id)
          if BlizzCFG::DRAW_OVERDRIVE_BAR && $tons_version != nil &&
              $tons_version >= 4.82
            draw_actor_overdrive_with_bar($game_party.actors[i], actor_x, 74, 120)
          else
            draw_actor_overdrive($game_party.actors[i], actor_x, 74, 120)
          end
        end
        if @level_up_flags[i]
          self.contents.font.color = normal_color
          self.contents.draw_text(actor_x, 100, 120, 32, 'LEVEL UP!')
        else
          draw_actor_state($game_party.actors[i], actor_x, 100)
        end}
  end
 
end

# if using RTAB
if BlizzCFG::RTAB_ACTIVE
#==============================================================================
# Window_DetailsStatus
#==============================================================================

class Window_ActorStatus < Window_Base
 
  alias refresh_eos_later refresh
  def refresh(level_up_flags)
    refresh_eos_later(level_up_flags)
    @status_window[1].refresh($game_party.actors[@actor_num])
  end
 
end

#==============================================================================
# Window_DetailsStatus
#==============================================================================

class Window_DetailsStatus
 
  def refresh(actor, level_up_flags = false)
    self.contents.clear
    if $bstat_align == 0
      case @status_id
      when 0 then draw_actor_name(actor, 4, -8)
      when 1
        draw_actor_hp(actor, 84, -8, 80)
        draw_actor_overdrive_with_bar(actor, 266, -8, 112)
      when 2 then draw_actor_sp(actor, 180, -8, 80)
      when 3
        if level_up_flags
          self.contents.font.color = normal_color
          self.contents.draw_text(324, -8, 120, 32, 'LEVEL UP!')
        else
          draw_actor_state(actor, 324, -8)
        end
      when 4 then draw_actor_atg(actor, 488, -8, 120)
      end
    else 
      case @status_id
      when 0 then draw_actor_name(actor, 488, -8)
      when 1
        draw_actor_hp(actor, 228, -8, 80)
        draw_actor_overdrive_with_bar(actor, 420, -8, 112)
      when 2 then draw_actor_sp(actor, 324, -8, 80)
      when 3
        if level_up_flags
          self.contents.font.color = normal_color
          self.contents.draw_text(140, -8, 120, 32, 'LEVEL UP!')
        else
          draw_actor_state(actor, 140, -8)
        end
      when 4 then draw_actor_atg(actor, 0, -8, 120)
      end
    end
  end
 
end

end

#==============================================================================
# Window_Command
#==============================================================================

class Window_Command
 
  attr_accessor :commands
  attr_accessor :actor
 
  alias initialize_eos_later initialize
  def initialize(width, commands)
    initialize_eos_later(width, commands)
    @command2 = BlizzCFG::OVERDRIVE_COMMAND_NAME
  end
 
  def swap_commands
    @commands[1], @command2 = @command2, @commands[1]
    refresh
  end
 
  alias refresh_eos_later refresh
  def refresh
    refresh_eos_later
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    if @actor != nil
      if BlizzCFG::OVERDRIVE_USERS.include?(@actor.id)
        if self.index != 1 || @commands[1] != BlizzCFG::OVERDRIVE_COMMAND_NAME
          draw_item(1, normal_color)
          self.contents.draw_text(4, 31, width-40, 32, '››', 2)
        elsif @commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME
          self.contents.font.color = BlizzCFG::OVERDRIVE_COLOR
          (0...6).each {|j|
              self.contents.fill_rect(0, 32, width-32, 32, Color.new(0, 0, 0, 0))
              rect = Rect.new(164-j * 32, 32, width-40, 32)
              self.contents.draw_text(rect, @commands[1])
              Graphics.update}
        end
      else
        draw_item(1, normal_color)
      end
    end
  end
 
end

#==============================================================================
# Window_Overdrive
#==============================================================================

class Window_Overdrive < Window_Skill
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    @actor.overdrive_skills.each {|i| @data.push($data_skills[i]) if $data_skills[i] != nil}
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      if $fontface != nil
        self.contents.font.name = $fontface
        self.contents.font.size = $fontsize
      elsif $defaultfonttype != nil
        self.contents.font.name = $defaultfonttype
        self.contents.font.size = $defaultfontsize
      end
      (0...@item_max).each {|i| draw_item(i)}
    end
  end
 
  def draw_item(i)
    skill = @data[i]
    if @actor.overdrive_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + i % 2 * (288 + 32)
    y = i / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    self.contents.draw_text(x + 232, y, 48, 32, "#{skill.sp_cost}%", 2)
  end
 
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias main_eos_later main
  def main
    main_eos_later
    @overdrive_window.dispose if @overdrive_window != nil
  end
 
  alias phase3_setup_command_window_crls_later phase3_setup_command_window
  def phase3_setup_command_window
    phase3_setup_command_window_crls_later
    if BlizzCFG::RTAB_ACTIVE
      @actor_command_window.actor = @active_actor
    else
      @actor_command_window.actor = @active_battler
    end
    @actor_command_window.refresh
  end
 
  alias update_phase3_eos_later update_phase3
  def update_phase3
    if @overdrive_window != nil && @overdrive_window.visible
      @overdrive_window.update unless defined?(SDK)
      update_phase3_overdrive_select
    else
      update_phase3_eos_later
    end
  end
 
  alias update_phase3_enemy_select_eos_later update_phase3_enemy_select
  def update_phase3_enemy_select
    end_overdrive_select_plus if Input.trigger?(Input::B)
    if BlizzCFG::RTAB_ACTIVE && Input.trigger?(Input::C)
      kind = @active_actor.current_action.kind
      update_phase3_enemy_select_eos_later
      if kind == BlizzCFG::OVERDRIVE_KIND
        @active_actor.current_action.kind = kind
      end
    else
      update_phase3_enemy_select_eos_later
    end
  end
 
  alias update_phase3_actor_select_eos_later update_phase3_actor_select
  def update_phase3_actor_select
    end_overdrive_select_plus if Input.trigger?(Input::B)
    if BlizzCFG::RTAB_ACTIVE && Input.trigger?(Input::C)
      kind = @active_actor.current_action.kind
      update_phase3_actor_select_eos_later
      if kind == BlizzCFG::OVERDRIVE_KIND
        @active_actor.current_action.kind = kind
      end
    else
      update_phase3_actor_select_eos_later
    end
  end
 
  alias phase3_next_actor_eos_later phase3_next_actor
  def phase3_next_actor
    end_overdrive_select if @overdrive_window != nil
    phase3_next_actor_eos_later
  end
 
  def update_phase3_overdrive_select
    battler = (BlizzCFG::RTAB_ACTIVE ? @active_actor : @active_battler)
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      end_overdrive_select if @overdrive_window.visible
    elsif Input.trigger?(Input::C)
      @skill = @overdrive_window.skill
      if @skill == nil || !battler.overdrive_can_use?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      battler.current_action.skill_id = @skill.id
      @overdrive_window.visible = false
      if @skill.scope == 1
        start_enemy_select
      elsif [3, 5].include?(@skill.scope)
        start_actor_select
      else
        phase3_next_actor
      end
    end
  end
 
  def start_overdrive_select
    battler = (BlizzCFG::RTAB_ACTIVE ? @active_actor : @active_battler)
    @overdrive_window = Window_Overdrive.new(battler)
    @overdrive_window.help_window = @help_window
    @actor_command_window.active = @actor_command_window.visible = false
  end
 
  def end_overdrive_select
    end_overdrive_select_plus
    @actor_command_window.swap_commands
    @overdrive_window.dispose
    @overdrive_window, @help_window.visible = nil, false
  end
 
  def end_overdrive_select_plus
    if @overdrive_window != nil
      if @overdrive_window.visible
        @actor_command_window.active = @actor_command_window.visible = true
        @help_window.visible = false
      else
        @overdrive_window.active = @overdrive_window.visible = true
      end
    end
  end
 
  def make_overdrive_action_result(battler)
    @skill = $data_skills[battler.current_action.skill_id]
    unless battler.current_action.forcing || battler.overdrive_can_use?(@skill.id)
      $game_temp.forcing_battler = nil
      @phase4_step = 1
      return
    end
    if !BlizzCFG::RTAB_ACTIVE && $tons_version != nil && $tons_version >= 5.0
      battler.overdrive -= @skill.sp_cost * 10 if @repeat[0] <= 1
    else
      battler.overdrive -= @skill.sp_cost * 10
    end
    @status_window.refresh
    @help_window.set_text(@skill.name, 1)
    @animation1_id, @animation2_id = @skill.animation1_id, @skill.animation2_id
    @common_event_id = @skill.common_event_id
    if BlizzCFG::RTAB_ACTIVE
      set_target_battlers(@skill.scope, battler)
      battler.target.each {|target| target.skill_effect(battler, @skill)}
    else
      set_target_battlers(@skill.scope)
      @target_battlers.each {|target| target.skill_effect(battler, @skill)}
    end
  end
 
  alias update_phase4_step2_eos_later update_phase4_step2
  def update_phase4_step2(battler = nil)
    if BlizzCFG::RTAB_ACTIVE
      update_phase4_step2_eos_later(battler)
    else
      update_phase4_step2_eos_later
      battler = @active_battler
    end
    if battler.current_action.kind == BlizzCFG::OVERDRIVE_KIND
      make_overdrive_action_result(battler)
    end
  end
 
  alias update_phase3_basic_command_eos_later update_phase3_basic_command
  def update_phase3_basic_command
    battler = (BlizzCFG::RTAB_ACTIVE ? @active_actor : @active_battler)
    restore_commands(battler)
    return if update_overdrive_input(battler)
    if !BlizzCFG::RTAB_ACTIVE || !Input.press?(Input::LEFT) &&
        !Input.press?(Input::RIGHT)
      update_phase3_basic_command_eos_later
    end
  end
 
  def restore_commands(battler)
    if @actor_command_window.index != 1 &&
        @actor_command_window.commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME
      @actor_command_window.swap_commands
    end
  end
 
  def update_overdrive_input(battler)
    if BlizzCFG::OVERDRIVE_USERS.include?(battler.id)
      if @actor_command_window.index == 1 && Input.press?(Input::RIGHT)
        if @actor_command_window.commands[1] != BlizzCFG::OVERDRIVE_COMMAND_NAME
          $game_system.se_play($data_system.decision_se)
          @actor_command_window.swap_commands
        end
        if !Input.press?(Input::UP) && !Input.press?(Input::DOWN)
          @actor_command_window.update
        end
      elsif @actor_command_window.commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME
        $game_system.se_play($data_system.cancel_se)
        @actor_command_window.swap_commands
      end
      if @actor_command_window.commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME &&
          Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        battler.current_action.kind = BlizzCFG::OVERDRIVE_KIND
        start_overdrive_select
        return true
      end
    end
    return false
  end
 
end

if $BlizzABS && BlizzABS::VERSION >= 2.2

#==============================================================================
# BlizzABS::Utility
#==============================================================================

class BlizzABS::Utility
 
  alias get_actor_skills_eos_later get_actor_skills
  def get_actor_skills(actor)
    return actor.overdrive_skills.clone
  end
 
end

#==============================================================================
# Map_Battler
#------------------------------------------------------------------------------
#  This class serves as superclass for characters that fight on the map and
#  can use pixel movement.
#==============================================================================

class Map_Battler
 
  alias skill_can_use_eos_later? skill_can_use?
  def skill_can_use?(id)
    if self.is_a?(Map_Actor)
      return @battler.overdrive_can_use?(id) if @battler.overdrive_skills.include?(id)
    end
    return skill_can_use_eos_later?(id)
  end
 
  alias skill_consumption_eos_later skill_consumption
  def skill_consumption(skill)
    unless self.is_a?(Map_Actor)
      skill_consumption_eos_later(skill)
      return
    end
    if @battler.overdrive_skills.include?(skill.id)
      @battler.overdrive -= skill.sp_cost * 10
    else
      skill_consumption_eos_later(skill)
    end
  end
 
end

#==============================================================================
# Hud
#==============================================================================

class Hud < Sprite
 
  if BlizzCFG::DRAW_OVERDRIVE
  alias create_positions_eos_later create_positions
  def create_positions
    create_positions_eos_later
    @od_x, @od_y = 4, 49 + @hud_height - @original_height
    @hud_height += 16
    @hot_y += 16
    @left_y += 16
  end
 
  alias draw_basic_eos_later draw_basic
  def draw_basic
    draw_basic_eos_later
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    self.bitmap.fill_rect(@od_x+32, @od_y+3, 116, 14, color) if color.is_a?(Color)
    self.bitmap.fill_rect(@od_x, @od_y, 32, 20, Color.new(0, 0, 0, 128))
    self.bitmap.font.color = system_color
    self.bitmap.draw_text_full(@od_x, @od_y, 80, 20, BlizzCFG::OVERDRIVE_NAME)
    self.bitmap.font.color = normal_color
  end
 
  alias draw_empty_eos_later draw_empty
  def draw_empty
    draw_empty_eos_later
    self.bitmap.gradient_bar_hud(@od_x+32, @od_y+3, 114, 0, 'hud_red_bar')
    self.bitmap.font.color = disabled_color
    self.bitmap.draw_text_full(@od_x+54, @od_y, 84, 20, '0,0%', 2)
    @overdrive = nil
  end
 
  def draw_overdrive
    @overdrive = actor.overdrive
    rate = actor.overdrive / 1000.0
    self.bitmap.gradient_bar_hud(@od_x+32, @od_y+3, 114, rate, 'hud_red_bar')
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(@od_x+54, @od_y, 84, 20, actor.overdrive_text, 2)
  end
 
  alias upd_eos_later update
  def update
    $game_temp.hud_refresh ? draw_overdrive : test_overdrive if actor != nil
    upd_eos_later
  end
 
  def test_overdrive
    draw_overdrive if actor.overdrive != @overdrive
  end
  end

  alias get_skills_left_crls_later get_skills_left
  def get_skills_left
    if @skill != nil && @skill > 0
      if actor.overdrive_skills.include?(@skill)
        return actor.overdrive_left(@skill)
      end
    end
    return get_skills_left_crls_later
  end
 
end

#==============================================================================
# Window_Skill_Hotkey
#==============================================================================

class Window_Skill_Hotkey < Window_Skill
 
  alias setup_skills_eos_later setup_skills
  def setup_skills
    setup_skills_eos_later
    @overdrive_skills = []
    if BlizzCFG::OVERDRIVE_USERS.include?(@actor.id)
      @actor.overdrive_skills.each {|id| @overdrive_skills.push($data_skills[id])}
    end
    @item_max += @overdrive_skills.size
  end
 
  alias draw_skills_eos_later draw_skills
  def draw_skills
    @item_max -= @overdrive_skills.size + 1
    draw_skills_eos_later
    @data.pop
    @data += @overdrive_skills + [nil]
    size_overdrive = @item_max + @overdrive_skills.size
    (@item_max...size_overdrive).each {|i| draw_overdrive(i)}
    @item_max = size_overdrive + 1
    draw_item(size_overdrive)
  end
 
  def draw_overdrive(i)
    if @actor.overdrive_can_use?(@data[i].id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    draw_data(i, BlizzCFG::OVERDRIVE_NAME + ' ')
    self.contents.draw_text(236, i*32, 48, 32, "#{@data[i].sp_cost}%", 2)
  end
 
  def draw_data(i, add)
    self.contents.fill_rect(Rect.new(4, i*32, 288, 32), Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(@data[i].icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(4, 4+i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(32, i*32, 204, 32, add + @data[i].name)
  end
 
end

end

G_G

Yes teh edits would be in teh horizontal command. I can try but can I have a graphic for the overdriv e command? Or do you not have one.

Calintz

March 10, 2009, 10:44:21 pm #2 Last Edit: March 14, 2009, 12:23:09 am by Calintz16438
**Thank you for trying...

winkio

If you don't get this solved up, post again during the weekend and I should be able to do it.  I'm just busy right now.

Calintz

Okay I appreciate that Winkio. That's good news. I have faith in Game_Guy XD.

G_G

I'll have to try tomorrow but I'll tell you this I might not be able to make it work mostly because I'm more of an event guy xD and I'm not very good with scripts :P but I'll try! Tomorrow of course after school :)

Calintz


Reno-s--Joker

;;____;; ....so you weren't happy with my attempt to merge my script with CRLS? :'(

I'm still not sure what exact incompatibility you're having with it other than the fact that it doesn't animate. Do you get an error message? Are you not seeing something properly? :???:

Well, I hope someone solves this and lets me know what I did wrong.

Calintz

I posted a screenshot of the exact error message I get when I use them both together...

Also, I renewed the code for the HBACW to the same version I am using in my project right now. This way, there is no question whether or not there will be incompatibility issues with Reno's default, to my edit.

**Please help.
I have been dicking for hours. I can't do this.

Reno-s--Joker

March 13, 2009, 04:45:58 am #9 Last Edit: March 13, 2009, 04:49:49 am by Reno-s--Joker
D: Yellow text... ;___;
:V:

To get past that error, shove this with the other 'attr' stuff near the top of my script:
  attr_accessor   :actor


HOWEVER after comes the issue of the fact that the hbacw doesn't use refresh... I've been waiting for Fantasist to help me out but he's taking a break. :'(

EDIT: Lmao at
Quote from: Calintz16438 on March 13, 2009, 02:13:37 am
I have been dicking for hours.

I haven't heard that used before but I like it! :haha:

Fantasist

@Reno: You should've asked :D I'm still bisy these days but I'll take a look at the script when I have time.

@Calintz: Same goes for this thread :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews





Calintz

Well, since it doesn't use refresh, why can't you simply remove the refresh line from the script??

Reno-s--Joker

I did that last time by changing it to update and putting the command changing section in update, but apparently that didn't work for you either. D: It worked fine for me.
...:???:

Calintz

I never did that...
Could you tell me how to do that step by step??

P.S.
Is that why you were able to solve the compatibility issue, but the window didn't animate??

Reno-s--Joker

Well it's quite hard to explain but I'll give it a go ... HOWEVER I haven't tried merging the EOS with my script yet - this is just similar to what I did with the CRLS.

woooo major: ShowHide

Firstly, you deal with initialize by putting this from EOS
@command2 = BlizzCFG::OVERDRIVE_COMMAND_NAME

under this from HBACW
@commands = ["attack", "skills", "defend", "item"] 


Then you add the swap_commands from EOS
  def swap_commands
    @commands[1], @command2 = @command2, @commands[1]
    refresh
  end

anywhere in the HBACW

This last bit is the tricky part - you'll have to play around with it yourself.
In the refresh alias in EOS
  alias refresh_eos_later refresh
  def refresh
    refresh_eos_later
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    if @actor != nil
      if BlizzCFG::OVERDRIVE_USERS.include?(@actor.id)
        if self.index != 1 || @commands[1] != BlizzCFG::OVERDRIVE_COMMAND_NAME
          draw_item(1, normal_color)
          self.contents.draw_text(4, 31, width-40, 32, '››', 2)
        elsif @commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME
          self.contents.font.color = BlizzCFG::OVERDRIVE_COLOR
          (0...6).each {|j|
              self.contents.fill_rect(0, 32, width-32, 32, Color.new(0, 0, 0, 0))
              rect = Rect.new(164-j * 32, 32, width-40, 32)
              self.contents.draw_text(rect, @commands[1])
              Graphics.update}
        end
      else
        draw_item(1, normal_color)
      end
    end
  end

...you basically just need the part which deals with the swapping commands (because the hbacw doesn't use text).
This is the part you'd be looking at, and I shoved it in the refresh method of the HBACW, under the other stuff.
    if @actor != nil
      if BlizzCFG::OVERDRIVE_USERS.include?(@actor.id)
        if self.index != 1 || @commands[1] != BlizzCFG::OVERDRIVE_COMMAND_NAME
          draw_item(1, normal_color)
          self.contents.draw_text(4, 31, width-40, 32, '››', 2)
        elsif @commands[1] == BlizzCFG::OVERDRIVE_COMMAND_NAME
          self.contents.font.color = BlizzCFG::OVERDRIVE_COLOR
          (0...6).each {|j|
              self.contents.fill_rect(0, 32, width-32, 32, Color.new(0, 0, 0, 0))
              rect = Rect.new(164-j * 32, 32, width-40, 32)
              self.contents.draw_text(rect, @commands[1])
              Graphics.update}
        end
      else
        draw_item(1, normal_color)
      end
    end


YOU STILL NEED FURTHER MODIFICATION D: It's quite hard to explain. If you're good at learning from code, take a look at the demo I gave you, in the update and update_help sections.

Basically I used self.contents.blt instead of the draw_text parts and I got rid of the animation as it didn't seem to work very well (it animates but doesn't stop).

For update help I had to test if UP was being pressed to update the tip_window text to "Soul Rage", etc.

Instead of text arrows I made an arrow graphic to overlay over the icon, and a separate graphic for each of soul rage, chaos drive, etc.


There was more stuff but I've forgotten.... ;____; Feel free to ask me when you encounter it.

Basically yeah - it appears to work perfectly fine on the surface (no errors or anything) - it's only the aesthetic part which looks gay without the animation. It does animate, but I have no idea how to stop it looking like it's looping around all the time. D:

...Good luck with it...? >.<;

Calintz


Reno-s--Joker

I'd be more than happy to help you - you'll probably encounter the same issues I did so I'd hope I should know something about it. ^-^

Calintz

I...can't do this.
I just don't know enough about scripts to do this.

Reno-s--Joker

D: Aww... I understand though. How urgent is it? I'm about to be bogged down with exams (again) but maybe there's hope if someone else expresses interest in this. ^-^