Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Ninjason

1
Outstanding!
All is set and works as envisioned - again, thank you very much :)
You have made a stranger on the internet and his small playerbase very happy all the best to you and this forum :D
2
KK20, thank you again, this is magnificent!

I have just completed configuring each scale and introduced several sub-ranks (E-, E+, C-, C+...)

I have just one last question and I think it's a small one, but too complicated for me and searching the web has so far produced no answer.
I feel a bit awkward to ask this, as I do not want to seem picky or ungrateful - I am SO happy with this, I cannot even articulate it  :D
My question is: "Is there a way for me to align the grades shown in the eqip screen to their left instead of their center?"


 (I'm kind of surprised, I thought the answer would be some easy snippet like "text.align = left" or something of that sort and being mentioned on a multitude of "how-to-ruby scripting"-websites...)

The problem is, now that I have introduced strings of different lengths 'C' vs. 'C +' their right-alignment produces a jumpy look &feel.
The stat values to their left seem to be right-aligned also, but this looks quite neatly. I want to align the ranks on their left, so the letters are always ordered in a straight line downwards with an occasional + or - to their right
I have tried working with additional spaces within the strings like  'C +' vs. 'C  ' but ' ', '-' and '+' all have different widths when displayed onscreen (different to the apparent lengths of their strings in the script), so it just does not work properly.


3
First of all: KK20, thank you very much, this is an awesome addition!

I actually had three follow-up questions, but I was so inspired by how happy I am with your addition, that (almost by accident) I finally successfully hid the EVASION stat, which I have tried for years, since it is a stat I do not use in my game  :haha:
Also, when showing the new stats during equip selection, I managed to reduce all stats who do not change in font size to highlight what's important right now, since there are a lot of colours now on the screen.



I felt empowered and this, I credit to you :)

My last question then is the following:
Currently, there is only a single section to define a scale which all stats use, but since my stats follow different scalings ingame, I would need more and each referring to a single stat (maybe grouping STR/DEX/INT and MDEF/PDEF would work, but AGI and ATK would definitely need a seperate one)

Can I multiply the section def letter_grade_for(value) which you created somehow and make it refer to a specific stat each time?
So far I haven't gotten it to work, I tried chaning "value" to equate a specific stat (like value = actor.atk just to try if it would work) but that nets me is an error message when opening the equip screen, saying

"NameERROR occured. undefined local variable or method 'actor' for #<Window_EquipLeft:0xe9ffc70>"

I tried moving the sections around a bit, but I'm guessing I'm just on a completely wrong track here.


4
Greetings, I have a a custom equipscreen script made by "The Law G14" which is incredible.
I have been using it in my game which I am making since 2009 and I absolutely adore it.

Now, my game has been getting longer and longer and more and more complex over the years and I recently had a request in my forum for an indicator to be shown next to each individual stat so that players can check which "rank" they are in each stat. I have a huge cast of playable characters with different specialisations and have recently completed a huge storypart where 60% of them are playable at the same time and my players were a bit overwhelmed with the task to re-equip them all with all the gear that is available to them at that point in time.

I have tried to manipulate the script a little, but I have next to zero experience in coding  :wacko: and up to now only ever had to make tiny adjustments to scripts I used. I think I have a good idea of what I want the script to do, but I am in need of someone who could actually edit the script for me - would that be possible?

This is what the script does right now:

(left image) in the top right corner of the screen, the script shows a list of stats and their current value
(right image) when selecting another item to equip, the top right corner shows and highlights the gains and losses to stats (if applicable) in red/green.


What I would like to add is this:


I would love to add a section to the script, wherein I can define a scale to each stat individually, ranging from S (very good) to F (very bad) - like 0-25 = Rank F, 26-50 = Rank E, 51-100 = Rank D, etc.) and to have the letter shown next to the stat when viewing the equip screen.
Also, when changing equipment, next to each stat which gained or lost values, I would love to show the new ranking letter, even if there is no acutal change in rank. The script already has a section where it identifies changes to be highlighted in red/green, I'm guessing there is a road paved to my goal there, but I am unable to program it.

The section where you can define the scales of each stat would also need to be for each stat individually, since my stat system is actually quite custom (this is just a generic screenshot I made with a new game for clarification).

If someone could help me or guide me I am very happy to learn how to do it - I have made some edits, tried some things, but again, I have next to zero experience in acutal coding and I think this is way over my head.

All the scripts I am currently using are in my signature.

I have a set of gradient colours already prepared (red to blue)
  S_COLOR = Color.new(53, 214, 237)
  A_COLOR = Color.new(105, 179, 76)
  B_COLOR = Color.new(172, 179, 52)
  C_COLOR = Color.new(250, 183, 51)
  D_COLOR = Color.new(255, 142, 21)
  E_COLOR = Color.new(255, 78, 17)
  F_COLOR = Color.new(255, 13, 13)

This is the script:
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#====================*Law's Custom Equipment Screen*===========================
#=========================Author: The Law G14==================================
#============================Version 2.?=======================================
#==============================================================================
#------------------------------------------------------------------------------
#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(224, 64, 415, 232)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Draw Parameter
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : parameter type (0-6)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
  when 0
      parameter_name = $data_system.words.atk
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.dex
      parameter_value = actor.dex
    when 4
      parameter_name = $data_system.words.int
      parameter_value = actor.int
    when 5
      parameter_name = $data_system.words.str
      parameter_value = actor.str
    when 6
      parameter_name = $data_system.words.agi
      parameter_value = actor.agi
    when 7
      parameter_name = "Evasion"
      parameter_value = actor.eva
    end
    self.contents.font.size = 16
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Face Graphic
  #--------------------------------------------------------------------------
  def draw_actor_face_graphic(actor, x, y)
    #bitmap = RPG::Cache.picture(actor.id.to_s)
    bitmap = RPG::Cache.battler(actor.battler_name, 0)
    x -= bitmap.width / 2 - 30
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------   
  def refresh
    self.contents.clear
    draw_actor_face_graphic(@actor, x + 50, y - 40)
    self.contents.font.size = 18
    draw_actor_level(@actor, 4, -3)
    for i in 0..7
      draw_actor_parameter(@actor, 4, i * 22 + 19, i)
    end
    [[@new_atk, @actor.atk], [@new_pdef, @actor.pdef], [@new_mdef, @actor.mdef],
     [@new_dex, @actor.dex], [@new_int, @actor.int], [@new_str, @actor.str],
     [@new_agi, @actor.agi], [@new_eva, @actor.eva]].each_with_index { |stat, i|
      if stat[0] != nil
         self.contents.font.color = normal_color
         self.contents.draw_text(160, i * 22 + 19, 40, 32, '->', 1)
       if stat[0] > stat[1]
         self.contents.font.color = Color.new(128, 255, 128)
       elsif (stat[0] < stat[1])
         self.contents.font.color = Color.new(255, 128, 128)
       end
         self.contents.draw_text(200, i * 22 + 19, 36, 32, stat[0].to_s, 2)
       end
     }
  end
  #--------------------------------------------------------------------------
  # * Set parameters after changing equipment
  #     new_atk  : attack power after changing equipment
  #     new_pdef : physical defense after changing equipment
  #     new_mdef : magic defense after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex,
                         new_agi, new_int, new_eva)
    if @new_atk != new_atk || @new_pdef != new_pdef || @new_mdef != new_mdef ||
        @new_str != new_str || @new_dex != new_dex || @new_agi != new_agi ||
        @new_int != new_int || @new_eva != new_eva
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      @new_eva = new_eva
      refresh
    end
  end
end



#==============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
#  This window displays items the actor is currently equipped with on the
#  equipment screen.
#==============================================================================

class Window_EquipRight < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(224, 295, 415, 185)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Item Acquisition
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.size = 16
    @data = []
    @data.push($data_weapons[@actor.weapon_id])
    @data.push($data_armors[@actor.armor1_id])
    @data.push($data_armors[@actor.armor2_id])
    @data.push($data_armors[@actor.armor3_id])
    @data.push($data_armors[@actor.armor4_id])
    @item_max = @data.size
    self.contents.font.color = system_color
    self.contents.draw_text(4, 32 * 0, 160, 32, $data_system.words.weapon)
    self.contents.draw_text(4, 32 * 1, 160, 32, $data_system.words.armor1)
    self.contents.draw_text(4, 32 * 2, 160, 32, $data_system.words.armor2)
    self.contents.draw_text(4, 32 * 3, 160, 32, $data_system.words.armor3)
    self.contents.draw_text(5, 32 * 4, 160, 32, $data_system.words.armor4)
    draw_item_name(@data[0], 140, 32 * 0)
    draw_item_name(@data[1], 140, 32 * 1)
    draw_item_name(@data[2], 140, 32 * 2)
    draw_item_name(@data[3], 140, 32 * 3)
    draw_item_name(@data[4], 140, 32 * 4)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end



#==============================================================================
# ** Window_EquipItem
#------------------------------------------------------------------------------
#  This window displays choices when opting to change equipment on the
#  equipment screen.
#==============================================================================

class Window_EquipItem < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor      : actor
  #     equip_type : equip region (0-3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(0, 64, 224, 231)
    @actor = actor
    @equip_type = equip_type
    @column_max = 1
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Item Acquisition
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Add equippable weapons
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    # Add equippable armor
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    # Add blank page
    @data.push(nil)
    # Make a bit map and draw all items
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 1 * (288 + 32)
    y = index / 1 * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.font.size = 16
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 160, y, 16, 32, "x", 1)
    self.contents.draw_text(x + 163, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end



#==============================================================================
# ** Window_EquipElement
#------------------------------------------------------------------------------
#  This window shows the State and Elemental changes for each armor/weapon.
#==============================================================================

class Window_EquipElement < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 295, 224, 185)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item = nil
  end
  #--------------------------------------------------------------------------
  # * Set Item
  #--------------------------------------------------------------------------
  def set_item(item)
    @item = item
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Clear the screen
    self.contents.clear
    # Don't draw anything if the item isn't set
    return if @item == nil
    # If the item is a weapon/armor, setup the text
    if @item.is_a?(RPG::Weapon)
      text1 = 'Schadenstyp:'
      text2 = array_2_css(@item.element_set, :ELEMENT)
      text3 = 'Statusveränderungen:'
      text4 = array_2_css(@item.plus_state_set, :STATE)
    elsif @item.is_a?(RPG::Armor)
      text1 = 'senkt Schaden von:'
      text2 = array_2_css(@item.guard_element_set, :ELEMENT)
      text3 = 'schützt vor Statusveränderung:'
      text4 = array_2_css(@item.guard_state_set, :STATE)
    else
      return
    end
    # Set the default font size
    self.contents.font.size = 16
    # Loop remaking the text (resized to the window)
    loop do
      ftext1 = string_to_array(text1)
      ftext2 = string_to_array(text2)
      ftext3 = string_to_array(text3)
      ftext4 = string_to_array(text4)
      # Set the height each line takes
      dh = self.contents.text_size('Hello World!').height
      # If the text's height is greateer than the windows height
      if ((dh*(ftext1 + ftext2 + ftext3 + ftext3).size) >= self.height-32) and
          self.contents.font.size > 2
        # Resize the font, and try again
        self.contents.font.size -= 1
      # Else: done (or font size too small
      else
        y = 0
        self.contents.font.color = system_color
        y = display_array(ftext1, y, dh)
        self.contents.font.color = normal_color
        y = display_array(ftext2, y, dh)
        self.contents.font.color = system_color
        y = display_array(ftext3, y, dh)
        self.contents.font.color = normal_color
        y = display_array(ftext4, y, dh)
        self.contents.font.size = Font.default_size
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Array to Comma Seperated String
  #--------------------------------------------------------------------------
  def array_2_css(array, type)
    output_text = ''
    array.each_with_index do |id, index|
      if (type == :ELEMENT)
        item = $data_system.elements[id]
      elsif type == :STATE
        item = $data_states[id].name
      end
      if (index + 1) < array.size
        output_text += (item + ', ')
      else
        output_text += (item + '.')
      end
    end
    return output_text
  end
  #--------------------------------------------------------------------------
  # * String to Window Fitted array
  #--------------------------------------------------------------------------
  def string_to_array(text)
    tmp_txt = ''; output_array = []
    for word in text.to_s.split(' ')
      if self.contents.text_size(tmp_txt + word).width > self.width - 32
        output_array.push(tmp_txt)
        tmp_txt = word + ' '
      else
        tmp_txt += (word + ' ')
      end
    end
    return output_array + (tmp_txt + ' ').to_a
  end
  #--------------------------------------------------------------------------
  # * Display Array
  #--------------------------------------------------------------------------
  def display_array(array, y, dy)
    for item in array
      self.contents.draw_text(0, y * dy, self.width, dy, item.to_s)
      y += 1
    end
    return y
  end
end

 


#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#  This class performs equipment screen processing.
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #     equip_index : equipment index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Get actor
    @actor = $game_party.actors[@actor_index]
    # Make windows
    @help_window = Window_Help.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @element_window = Window_EquipElement.new
    @old_equip = -9
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    # Associate help window
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # Set cursor position
    @right_window.index = @equip_index
    refresh
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @element_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Set item window to visible
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # Get currently equipped item
    item1 = @right_window.item
    # Set current item window to @item_window
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # If right window is active
    if @right_window.active
      # Erase parameters for after equipment change
      @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil)
    end
    # If item window is active
    if @item_window.active
      # Get currently selected item
      item2 = @item_window.item
      # Change equipment
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # Get parameters for after equipment change
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      new_eva = @actor.eva
      # Return equipment
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # Draw in left window
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int, new_eva)
    end
    # If a new right window index is highlighted, update element window
    if @right_window.active
      new_equip = @actor.equip?(@right_window.index)
    elsif @item_window.active
      new_equip = @item_window.item
    else
      return
    end
    unless (@old_equip == new_equip)
      case @right_window.index
      when 0 then item = new_equip || RPG::Weapon.new
      else        item = new_equip || RPG::Armor.new
      end
      @element_window.set_item(item)
      @old_equip = new_equip
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    unless Input.trigger?(Input::R) or Input.trigger?(Input::L)
      @left_window.update
      @right_window.update
      @item_window.update
    end
    refresh
    # If right window is active: call update_right
    if @right_window.active
      update_right
      return
    end
    # If item window is active: call update_item
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(2)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If equipment is fixed
      if @actor.equip_fix?(@right_window.index)
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Activate item window
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when item window is active)
  #--------------------------------------------------------------------------
  def update_item
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Play equip SE
      $game_system.se_play($data_system.equip_se)
      # Get currently selected data on the item window
      item = @item_window.item
      # Change equipment
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # Remake right window and item window contents
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end


#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  Edited to show the item equip at a certain place
#==============================================================================

class Game_Actor
  #--------------------------------------------------------------------------
  # * Equip?
  #     index : 0 = weapon, 1 = head, 2 = body, etc
  #--------------------------------------------------------------------------
  def equip?(index)
    case index
    when 0 then return $data_weapons[@weapon_id]
    when 1 then return $data_armors[@armor1_id]
    when 2 then return $data_armors[@armor2_id]
    when 3 then return $data_armors[@armor3_id]
    when 4 then return $data_armors[@armor4_id]
    when 5 then return $data_armors[@armor5_id]
    end
  end
end
5
Zer0 you are a GOD among us mortals.

especially that application got me bursting "kraaasser Scheiß!"

which roughly translates to "insaaaane Shit!"  :ninja:

I am stunned. Thank you.
6
RMXP Script Database / Re: [XP] Blacksmith System
April 21, 2011, 03:53:07 pm
Sounds nice
7
RMXP Script Database / Re: [XP] Blacksmith System
April 18, 2011, 06:08:25 pm
Sorry, I'm not meaning to "bump" this, as I think, bumping is quite impolite but I'm seriously concerned, that you might scrap this whole post at some point/ have done it already and I'm the one, who kinda got this one here reactivated because I REALLY REALLY like this idea and where you were aiming to go with it.

Please don't scrap this script, it really has a lot potential as I think the blacksmith-part in general hasn't got its fill yet in the variety of scripts available for the RPG XP.
8
RMXP Script Database / Re: [XP] Blacksmith System
December 27, 2010, 02:20:42 am
I have another one:

How about a function to deconstruct more than 1 (eg: Iron sword) if you have more than one in stock?
9
RMXP Script Database / Re: [XP] Blacksmith System
December 22, 2010, 05:12:30 pm
I'll second that - some crafted Items should not be able to be deconstructed.
10
RMXP Script Database / Re: [XP] Blacksmith System
December 21, 2010, 02:46:20 pm
I'd have one too:

At the moment it is just possible to build Weapons/Armors with items.

How about inserting weapons and armors into the creationprocess?

Like "steel sword" (weapon) + "Gold" (Item) = Gold Sword?

By that you could enhance Weapons...
11
RMXP Script Database / Re: [XP] Blacksmith System
December 20, 2010, 04:27:56 pm
Btw i cleared my error message - I used a dot (.) instead of a comma (,) in the formulas. :ninja:
12
RMXP Script Database / Re: [XP] Blacksmith System
December 20, 2010, 04:10:42 pm
Actually, yes - When you extract items from the weapon/armor on the very bottom of your list and deplete your stock, you have the possibility, to stay on that empty slot and keep extracting even though you have no more items left.

But it works nevertheless - you can get an infinite number of extracted items by that.

Here's a screenshot to help my explanation (did it with your demo):
13
RMXP Script Database / Re: [XP] Blacksmith System
December 16, 2010, 02:38:11 pm
Hey, great script, quite the thing I was looking for.

I inserted it, configured it - but upon using it, I get this error message every time I would get the item #434 among other things out of a deconstruction:



What could that be?
14
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 04, 2009, 08:45:53 am
You, Sir, are a genius. It works perfectly, thank you again.

But just fyi: you noted the versions as being created in November 09, when it is really December.
15
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 04, 2009, 07:33:31 am
This error occured:

Screenshot
Spoiler: ShowHide
16
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 03, 2009, 04:50:37 pm
There are some really strange letters mixed into this code, but it does a nice ATB (not on the map)
Placing your script beneath it does work, however the atb's level up pop up wont disappear...

Screenshot
Spoiler: ShowHide



Script
Spoiler: ShowHide
#==============================================================================
# ¦ New_Battle
#------------------------------------------------------------------------------
# Compiled By : MakirouAru
#==============================================================================
# ¥£¥ XRXS_BP 3. Ÿ--˜ŽžHP‰ñ•œ ver.1.01 ¥£¥
# by fukuyama, ÷‰ë Ý"y

# Battle_End_Recovery
#
# í"¬Œã,̉ñ•œˆ--ƒ,ƒWƒ...[ƒ‹
#
# Request: stay
# Script: fukuyama
# Test: ƒmƒRƒmŽq
#
# URL: http://www4.big.or.jp/~fukuyama/rgss/Battle_End_Recovery.txt
#

module Battle_End_Recovery

module Scene_Battle_Module

  # ‰ñ•œ--¦•ϐ",ÌID
  @@recovery_rate_variable_id = nil

  # ‰ñ•œ--¦,ÌŽæ"¾
  def battle_end_recovery_rate
    if @@recovery_rate_variable_id.nil?
      @@recovery_rate_variable_id =
        $data_system.variables.index 'í"¬Œã,̉ñ•œ--¦'
      if @@recovery_rate_variable_id.nil?
        @@recovery_rate_variable_id = false
      end
    end
    return 0 unless @@recovery_rate_variable_id
    return $game_variables[@@recovery_rate_variable_id]
  end

  # í"¬Œã,̉ñ•œˆ--
  def battle_end_recovery

    # ‰ñ•œ--¦
    recovery_rate = battle_end_recovery_rate
   
    # ‰ñ•œ--¦•ϐ",ª,OˆÈŠO,©,ƒAƒNƒ^[,ª¶'¶,µ,Ä,¢,éê‡Aí"¬Œã,̉ñ•œˆ--,ðs,¤
    if recovery_rate != 0 and not actor.dead?

      # ƒp[ƒeƒB,̃AƒNƒ^[-ˆ,Ƀ‹[ƒv
      $game_party.actors.each do |actor|

        # ‰ñ•œ--ÊŒvŽZ
        recovery_hp = (actor.maxhp / 100.0 * recovery_rate).truncate
        recovery_sp = (actor.maxsp / 100.0 * recovery_rate).truncate

        # ŽÀÛ,ɉñ•œ
        actor.hp += recovery_hp
        actor.sp += recovery_sp

        # ƒAƒjƒ[ƒVƒ‡ƒ"Ý'è
        actor.damage = - recovery_hp
        actor.damage_pop = true

      end

      # ƒXƒe[ƒ^ƒXƒEƒBƒ"ƒhƒE,ðXV
      @status_window.refresh

    end
  end

end # module Scene_Battle_Module
end # module Battle_End_Recovery

#------------------------------
# í"¬ƒV[ƒ",̍Ä'è‹`
#------------------------------
class Scene_Battle

# Scene_Battle--pƒ,ƒWƒ...[ƒ‹,ðƒCƒ"ƒNƒ‹[ƒh
include Battle_End_Recovery::Scene_Battle_Module

# Œ³,̃tƒF[ƒY,TŠJŽn,É•Ê-¼,ð,Â,¯,é
alias battle_end_recovery_original_start_phase5 start_phase5

# ƒtƒF[ƒY,TŠJŽn,ðÄ'è‹`
def start_phase5

  # í"¬Œã,̉ñ•œˆ--,ðŒÄ,яo,·
  battle_end_recovery

  # Œ³,̃tƒF[ƒY,TŠJŽn,ðŒÄ,яo,·
  battle_end_recovery_original_start_phase5

end
end

# Battle_End_Recovery
# ¥£¥ XRXS_BP10. LEVEL UP!ƒEƒBƒ"ƒhƒE ¥£¥
# by ÷‰ë Ý"y

$data_system_level_up_se = ""                       # ƒŒƒxƒ‹ƒAƒbƒvSEB"",Å-³,µB
$data_system_level_up_me = "Audio/ME/007-Fanfare01" # ƒŒƒxƒ‹ƒAƒbƒvME

#==============================================================================
# ¡ Window_LevelUpWindow
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹I--¹ŽžAƒŒƒxƒ‹ƒAƒbƒv,µ,½ê‡,ɃXƒe[ƒ^ƒX,ð•\ަ,·,éƒEƒBƒ"ƒhƒE,Å,·B
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
  super(0, 128, 160, 192)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.visible = false
  refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
  self.contents.clear
  self.contents.font.color = system_color
  self.contents.font.name = "Arial"
  self.contents.font.size = 16
  self.contents.draw_text( 0,   0, 160, 24, "LEVEL UP!!")
  self.contents.font.size = 14
  self.contents.draw_text( 0,  28, 160, 24, $data_system.words.hp)
  self.contents.draw_text( 0,  50, 160, 24, $data_system.words.sp)
  self.contents.font.size = 14
  self.contents.draw_text( 0,  72,  80, 24, $data_system.words.str)
  self.contents.draw_text( 0,  94,  80, 24, $data_system.words.dex)
  self.contents.draw_text( 0, 116,  80, 24, $data_system.words.agi)
  self.contents.draw_text( 0, 138,  80, 24, $data_system.words.int)
  self.contents.draw_text(92,   0, 128, 24, "¨")
  self.contents.draw_text(76,  28, 128, 24, "=")
  self.contents.draw_text(76,  50, 128, 24, "=")
  self.contents.draw_text(76,  72, 128, 24, "=")
  self.contents.draw_text(76,  94, 128, 24, "=")
  self.contents.draw_text(76, 116, 128, 24, "=")
  self.contents.draw_text(76, 138, 128, 24, "=")
  self.contents.font.color = normal_color
  self.contents.draw_text( 0,   0,  88, 24, last_lv.to_s, 2)
  self.contents.draw_text( 0,  28,  72, 24, "+" + up_hp.to_s, 2)
  self.contents.draw_text( 0,  50,  72, 24, "+" + up_sp.to_s, 2)
  self.contents.draw_text( 0,  72,  72, 24, "+" + up_str.to_s, 2)
  self.contents.draw_text( 0,  94,  72, 24, "+" + up_dex.to_s, 2)
  self.contents.draw_text( 0, 116,  72, 24, "+" + up_agi.to_s, 2)
  self.contents.draw_text( 0, 138,  72, 24, "+" + up_int.to_s, 2)
  self.contents.font.size = 14
  self.contents.draw_text( 0,   0, 128, 24, actor.level.to_s, 2)
  self.contents.draw_text( 0,  26, 128, 24, actor.maxhp.to_s, 2)
  self.contents.draw_text( 0,  48, 128, 24, actor.maxsp.to_s, 2)
  self.contents.draw_text( 0,  70, 128, 24, actor.str.to_s, 2)
  self.contents.draw_text( 0,  92, 128, 24, actor.dex.to_s, 2)
  self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
  self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ 'ljÁEŒöŠJƒCƒ"ƒXƒ^ƒ"ƒX•ϐ"
#--------------------------------------------------------------------------
  attr_accessor :level_up_flags             # LEVEL UP!•\ަ
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# œ 'ljÁEŒöŠJƒCƒ"ƒXƒ^ƒ"ƒX•ϐ"
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban             # EXPŽæ"¾ˆêŽž‹ÖŽ~
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
  @exp_gain_ban = false
  xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg [EXP ,ðŠl"¾,Å,«,È,¢] "»'è
#--------------------------------------------------------------------------
alias xrxs_bp10_cant_get_exp? cant_get_exp?
def cant_get_exp?
  if @exp_gain_ban == true
    return true
  else
    return xrxs_bp10_cant_get_exp?
  end
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# œ ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
  # EXP Šl"¾‹ÖŽ~
  for i in 0...$game_party.actors.size
    $game_party.actors[i].exp_gain_ban = true
  end
  xrxs_bp10_start_phase5
  # EXP Šl"¾‹ÖŽ~,̉ðœ
  for i in 0...$game_party.actors.size
    $game_party.actors[i].exp_gain_ban = false
  end
  # EXP,ð‰Šú‰»
  @exp_gained = 0
  for enemy in $game_troop.enemies
    # Šl"¾ EXP,ð'ljÁ         # ƒGƒlƒ~[,ª‰B,êó'Ô,Å,È,¢ê‡
    @exp_gained += enemy.exp if not enemy.hidden
  end
  # Ý'è
  @phase5_step       = 0
  @exp_gain_actor    = -1
  # ƒŠƒUƒ‹ƒgƒEƒBƒ"ƒhƒE,ð•\ަ
  @result_window.y -= 64
  @result_window.visible = true
  # ƒŒƒxƒ‹ƒAƒbƒv"»'è,Ö
  phase5_next_levelup
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
  case @phase5_step
  when 1
    update_phase5_step1
  else
    xrxs_bp10_update_phase5
    # ƒŒƒxƒ‹ƒAƒbƒv,µ,Ä,¢,éê‡,Í‹­§ƒoƒgƒ‹I--¹
    battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
  end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY 1 : ƒŒƒxƒ‹ƒAƒbƒv)
#--------------------------------------------------------------------------
def update_phase5_step1
  # C ƒ{ƒ^ƒ",ª‰Ÿ,³,ê,½ê‡
  if Input.trigger?(Input::C)
    # ƒEƒBƒ"ƒhƒE,ð•Â,¶,ÄŽŸ,̃AƒNƒ^[,Ö
    @levelup_window.visible = false if @levelup_window != nil
    @status_window.level_up_flags[@exp_gain_actor] = false
    phase5_next_levelup
  end
end
#--------------------------------------------------------------------------
# œ ŽŸ,̃AƒNƒ^[,̃Œƒxƒ‹ƒAƒbƒv•\ަ,Ö
#--------------------------------------------------------------------------
def phase5_next_levelup
  begin
    # ŽŸ,̃AƒNƒ^[,Ö
    @exp_gain_actor += 1
    # ÅŒã,̃AƒNƒ^[,̏ꍇ
    if @exp_gain_actor >= $game_party.actors.size
      # ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
      @phase5_step = 0
      return
    end
    actor = $game_party.actors[@exp_gain_actor]
    if actor.cant_get_exp? == false
      # Œ»Ý,Ì"\--Í'l,ð•ÛŽ
      last_level = actor.level
      last_maxhp = actor.maxhp
      last_maxsp = actor.maxsp
      last_str = actor.str
      last_dex = actor.dex
      last_agi = actor.agi
      last_int = actor.int
      # ŒoŒ±'lŽæ"¾,ÌŒˆ'è"IuŠÔ("ä
      actor.exp += @exp_gained
      # "»'è
      if actor.level > last_level
        # ƒŒƒxƒ‹ƒAƒbƒv,µ,½ê‡
        @status_window.level_up(@exp_gain_actor)
        if $data_system_level_up_se != ""
          Audio.se_stop
          Audio.se_play($data_system_level_up_se)
        end
        if $data_system_level_up_me != ""
          Audio.me_stop
          Audio.me_play($data_system_level_up_me)
        end
        @levelup_window = Window_LevelUpWindow.new(actor, last_level,
          actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str - last_str,
          actor.dex - last_dex, actor.agi - last_agi, actor.int - last_int)
        @levelup_window.x = 160 * @exp_gain_actor
        @levelup_window.visible = true
        @phase5_wait_count = 40
        @phase5_step       =  1
        # ƒXƒe[ƒ^ƒXƒEƒBƒ"ƒhƒE,ðƒŠƒtƒŒƒbƒVƒ...
        @status_window.refresh
        return
      end
    end
  end until false
end
end
# ¥£¥ XRXS_17. ƒXƒŠƒbƒvƒ_ƒ[ƒW-hŒä^Œø‰Ê--ʏڍ׉» ver.1.51 ¥£¥
# by ÷‰ë Ý"y, fukuyama

#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# œ ƒXƒŠƒbƒvƒ_ƒ[ƒW,ÌŒø‰Ê"K--p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
  # "'l,̏‰Šú‰»
  slip_damage_percent = 0
  slip_damage_plus = 0
  # Œ»Ý•t‰Á,³,ê,Ä,¢,éƒXƒe[ƒg,Ì'†,©,çƒXƒŠƒbƒvƒ_ƒ[ƒW--L,è,̃,ƒm,ð'T,·
  for i in @states
    if $data_states[i].slip_damage
      # ,»,̃Xƒe[ƒg,ªŽ,Á,Ä,¢,éƒXƒŠƒbƒvƒ_ƒ[ƒW,Ì
      # Lvƒvƒ‰ƒXƒXƒe[ƒg,Ü,½,ÍLvƒ}ƒCƒiƒXƒXƒe[ƒg,ð"»'èB
      for j in $data_states[i].plus_state_set
        if $data_states[j] != nil
          if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|")/
            slip_damage_percent += $1.to_i
          elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
            slip_damage_plus += $1.to_i
          end
        end
      end
      for j in $data_states[i].minus_state_set
        if $data_states[j] != nil
          if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|")/
            slip_damage_percent -= $1.to_i
          elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
            slip_damage_plus -= $1.to_i
          end
        end
      end
    end
  end
  if slip_damage_percent == 0 and slip_damage_plus == 0
    xrxs_bp7_slip_damage_effect
  else
    # -h‹ï,ªƒXƒŠƒbƒv-hŒä,ª, ,éê‡,ð"»'è
    for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
      armor = $data_armors[i]
      next if armor == nil
      for j in armor.guard_state_set
        if $data_states[j] != nil
          if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|")/
            if slip_damage_percent > 0
              slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
            end
          end
          if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
            if slip_damage_percent > 0
              slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
            end
          end
        end
      end
    end
    # ƒ_ƒ[ƒW,ðÝ'è
    self.damage = self.maxhp * slip_damage_percent / 100 + slip_damage_plus
    # •ªŽU
    if self.damage.abs > 0
      amp = [self.damage.abs * 15 / 100, 1].max
      self.damage += rand(amp+1) + rand(amp+1) - amp
    end
    # HP ,©,çƒ_ƒ[ƒW,ðŒ¸ŽZ
    self.hp -= self.damage
    # ƒƒ\ƒbƒhI--¹
    return true
  end
end
end
# ¥£¥ XRXS_BP 1. CP§"±"ü ver.15 ¥£¥
# by ÷‰ë Ý"y, ˜aŠó, Jack-R

#==============================================================================
# ¡ Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ"ƒXƒ^ƒ"ƒX•ϐ"
#--------------------------------------------------------------------------
attr_accessor   :stop                   # CP‰ÁŽZƒXƒgƒbƒv
#----------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg,̏‰Šú‰»
#----------------------------------------------------------------------------
def initialize
  @battlers = []
  @cancel = false
  @agi_total = 0
  # "z--ñ @count_battlers ,ð‰Šú‰»
  @count_battlers = []
  # ƒGƒlƒ~[,ð"z--ñ @count_battlers ,É'ljÁ
  for enemy in $game_troop.enemies
    @count_battlers.push(enemy)
  end
  # ƒAƒNƒ^[,ð"z--ñ @count_battlers ,É'ljÁ
  for actor in $game_party.actors
    @count_battlers.push(actor)
  end
  for battler in @count_battlers
    @agi_total += battler.agi
  end
  for battler in @count_battlers
    battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
  end
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ"ƒg,ÌŠJŽn
#----------------------------------------------------------------------------
def start
  if @cp_thread != nil then
    return
  end
  @cancel = false
  @stop = false
  # ,±,±,©,çƒXƒŒƒbƒh
  @cp_thread = Thread.new do
    while @cancel != true
      if @stop != true
        self.update # XV
        sleep(0.05)
      end
    end
  end
  # ,±,±,Ü,ŃXƒŒƒbƒh
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ"ƒgƒAƒbƒv
#----------------------------------------------------------------------------
def update
  if @count_battlers != nil then
    for battler in @count_battlers
      # s"®o--ˆ,È,¯,ê,Î-³Ž‹
      if battler.dead? == true #or battler.movable? == false then
        battler.cp = 0
        next
      end
      # ,±,±,Ì 1.3,ð•Ï,¦,é,±,Æ,Ł«ƒXƒs[ƒh,ð•ύX‰Â"\B,½,¾,µ¬""_,ÍŽg--p,·,é,±,ƁB
      battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total, 0].max, 65535].min
    end
  end
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ"ƒg,ÌŠJŽn
#----------------------------------------------------------------------------
def stop
  @cancel = true
  if @cp_thread != nil then
    @cp_thread.join
    @cp_thread = nil
  end
end
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
attr_accessor :now_guarding             # Œ»Ý-hŒä'†ƒtƒ‰ƒO
attr_accessor :cp                       # Œ»ÝCP
attr_accessor :slip_state_update_ban    # ƒXƒŠƒbƒvEƒXƒe[ƒgŽ©"®ˆ--,̋֎~
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ"ƒh"ü--͉Â"\"»'è
#--------------------------------------------------------------------------
def inputable?
  return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg [ƒXƒŠƒbƒvƒ_ƒ[ƒW] "»'è
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
  return false if @slip_state_update_ban
  return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒgŽ©'R‰ðœ (ƒ^[ƒ",²,Æ,ÉŒÄ,яo,µ)
#--------------------------------------------------------------------------
alias xrxs_bp1_remove_states_auto remove_states_auto
def remove_states_auto
  return if @slip_state_update_ban
  xrxs_bp1_remove_states_auto
end
end
#==============================================================================
# ¡ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# œ ƒZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
alias xrxs_bp1_setup setup
def setup(actor_id)
  xrxs_bp1_setup(actor_id)
  @hate = 100  # init-value is 100
  @cp = 0
  @now_guarding = false
  @slip_state_update_ban = false
end
end
#==============================================================================
# ¡ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize(troop_id, member_index)
  xrxs_bp1_initialize(troop_id, member_index)
  @hate = 100  # init-value is 100
  @cp = 0
  @now_guarding = false
  @slip_state_update_ban = false
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ"ƒXƒ^ƒ"ƒX•ϐ"
#--------------------------------------------------------------------------
attr_accessor   :update_cp_only                   # CPƒ[ƒ^[,Ì,Ý,̍XV
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
  @update_cp_only = false
  xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
  if @update_cp_only == false
    xrxs_bp1_refresh
  end
  for i in 0...$game_party.actors.size
    actor = $game_party.actors[i]
    actor_x = i * 160 + 4
    draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
  end
end
#--------------------------------------------------------------------------
# œ CPƒ[ƒ^[ ,Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
  self.contents.font.color = system_color
  self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  if actor.cp == nil
    actor.cp = 0
  end
  w = width * [actor.cp,65535].min / 65535
  self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
  self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
  self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
  self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
# ,±,±,ÉŒø‰Ê‰¹,ðÝ'è,·,é,ƁAƒAƒNƒ^[ƒRƒ}ƒ"ƒh,ªƒ|ƒbƒv,µ,½,Æ,«,ÉŒø‰Ê‰¹,ðÄ¶
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹I--¹
#     result : Œ‹‰Ê (0:Ÿ--˜ 1:"s-k 2:"¦'-)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
  # CPƒJƒEƒ"ƒg'âŽ~
  @cp_thread.stop
  xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# œ ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
  @agi_total = 0
  @cp_thread = Scene_Battle_CP.new
  # ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,ðÄì¬
  s1 = $data_system.words.attack
  s2 = $data_system.words.skill
  s3 = $data_system.words.guard
  s4 = $data_system.words.item
  @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4, "Fliehen"])
  @actor_command_window.y = 128
  @actor_command_window.back_opacity = 160
  @actor_command_window.active = false
  @actor_command_window.visible = false
  @actor_command_window.draw_item(4, $game_temp.battle_can_escape ? @actor_command_window.normal_color : @actor_command_window.disabled_color)
  xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# œ ƒp[ƒeƒBƒRƒ}ƒ"ƒhƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
  xrxs_bp1_start_phase2
  @party_command_window.active = false
  @party_command_window.visible = false
  # ŽŸ,Ö
  start_phase3
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒp[ƒeƒBƒRƒ}ƒ"ƒhƒtƒF[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
  # C ƒ{ƒ^ƒ",ª‰Ÿ,³,ê,½ê‡
  if Input.trigger?(Input::C)
    # ƒp[ƒeƒBƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,̃J[ƒ\ƒ‹ˆÊ'u,Å•ªŠò
    case @party_command_window.index
    when 0  # í,¤
      # Œˆ'è SE ,ð‰‰'t
      $game_system.se_play($data_system.decision_se)
      @cp_thread.start
      # ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒtƒF[ƒYŠJŽn
      start_phase3
    end
    return
  end
  xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# œ ŽŸ,̃AƒNƒ^[,̃Rƒ}ƒ"ƒh"ü--Í,Ö
#--------------------------------------------------------------------------
def phase3_next_actor
  # ƒ‹[ƒv
  begin
    # ƒAƒNƒ^[,Ì-¾-ŃGƒtƒFƒNƒg OFF
    if @active_battler != nil
      @active_battler.blink = false
    end
    # ÅŒã,̃AƒNƒ^[,̏ꍇ
    if @actor_index == $game_party.actors.size-1
      # ƒƒCƒ"ƒtƒF[ƒYŠJŽn
      @cp_thread.start
      start_phase4
      return
    end
    # ƒAƒNƒ^[,̃Cƒ"ƒfƒbƒNƒX,ði,ß,é
    @actor_index += 1
    @active_battler = $game_party.actors[@actor_index]
    @active_battler.blink = true
    if @active_battler.inputable? == false
      @active_battler.current_action.kind = -1
    end
    # ƒAƒNƒ^[,ªƒRƒ}ƒ"ƒh"ü--Í,ðŽó,¯•t,¯,È,¢ó'Ô,È,ç,à,¤ˆê"x
  end until @active_battler.inputable?
  @cp_thread.stop
  # ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,ðƒZƒbƒgƒAƒbƒv
  @active_battler.now_guarding = false
  phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ 'O,̃AƒNƒ^[,̃Rƒ}ƒ"ƒh"ü--Í,Ö
#--------------------------------------------------------------------------
def phase3_prior_actor
  # ƒ‹[ƒv
  begin
    # ƒAƒNƒ^[,Ì-¾-ŃGƒtƒFƒNƒg OFF
    if @active_battler != nil
      @active_battler.blink = false
    end
    # Å‰,̃AƒNƒ^[,̏ꍇ
    if @actor_index == 0
      # Å‰,Ö-ß,é
      start_phase3
      return
    end
    # ƒAƒNƒ^[,̃Cƒ"ƒfƒbƒNƒX,ð-ß,·
    @actor_index -= 1
    @active_battler = $game_party.actors[@actor_index]
    @active_battler.blink = true
    # ƒAƒNƒ^[,ªƒRƒ}ƒ"ƒh"ü--Í,ðŽó,¯•t,¯,È,¢ó'Ô,È,ç,à,¤ˆê"x
  end until @active_battler.inputable?
  @cp_thread.stop
  # ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,ðƒZƒbƒgƒAƒbƒv
  @active_battler.now_guarding = false
  phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,̃ZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
  # Œø‰Ê‰¹,̍ж
  Audio.se_play($data_system_command_up_se) if $data_system_command_up_se != ""
  # -ß,·
  xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒtƒF[ƒY : Šî-{ƒRƒ}ƒ"ƒh)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
  # C ƒ{ƒ^ƒ",ª‰Ÿ,³,ê,½ê‡
  if Input.trigger?(Input::C)
    # ƒAƒNƒ^[ƒRƒ}ƒ"ƒhƒEƒBƒ"ƒhƒE,̃J[ƒ\ƒ‹ˆÊ'u,Å•ªŠò
    case @actor_command_window.index
    when 4  # "¦,°,é
      if $game_temp.battle_can_escape
        # Œˆ'è SE ,ð‰‰'t
        $game_system.se_play($data_system.decision_se)
        # ƒAƒNƒVƒ‡ƒ",ðÝ'è
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 4
        # ŽŸ,̃AƒNƒ^[,̃Rƒ}ƒ"ƒh"ü--Í,Ö
        phase3_next_actor
      else
        # ƒuƒU[ SE ,ð‰‰'t
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
  xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# œ ƒƒCƒ"ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
  xrxs_bp1_start_phase4
  # ƒGƒlƒ~[ƒAƒNƒVƒ‡ƒ"ì¬
  for enemy in $game_troop.enemies
    if enemy.cp < 65535
      enemy.current_action.clear
      enemy.current_action.kind = -1 # ƒ^[ƒ""ò,Î,µB
      next
    end
    enemy.make_action
  end
  # s"®‡˜ì¬
  make_action_orders
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ"ƒtƒF[ƒY ƒXƒeƒbƒv 1 : ƒAƒNƒVƒ‡ƒ"€"õ)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
  # ‰Šú‰»
  @phase4_act_continuation = 0
  # Ÿ"s"»'è
  if judge
    @cp_thread.stop
    # Ÿ--˜,Ü,½,Í"s-k,̏ꍇ : ƒƒ\ƒbƒhI--¹
    return
  end
  # -¢s"®ƒoƒgƒ‰["z--ñ,̐æ"ª,©,çŽæ"¾
  @active_battler = @action_battlers[0]
  # ƒXƒe[ƒ^ƒXXV,ðCP,¾,¯,ÉŒÀ'èB
  @status_window.update_cp_only = true
  # ƒXƒe[ƒgXV,ð‹ÖŽ~B
  @active_battler.slip_state_update_ban = true if @active_battler != nil
  # -ß,·
  xrxs_bp1_update_phase4_step1
  # ‹ÖŽ~,ð‰ðœ
  @status_window.update_cp_only = false
  @active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ"ƒtƒF[ƒY ƒXƒeƒbƒv 2 : ƒAƒNƒVƒ‡ƒ"ŠJŽn)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
  # ‹­§ƒAƒNƒVƒ‡ƒ",Å,È,¯,ê,Î
  unless @active_battler.current_action.forcing
    # CP,ª'«,è,Ä,¢,È,¢ê‡
    if @phase4_act_continuation == 0 and @active_battler.cp < 65535
      @phase4_step = 6
      return
    end
    # §-ñ,ª ["G,ð'ʏíUŒ,,·,é] ,© [-¡•û,ð'ʏíUŒ,,·,é] ,̏ꍇ
    if @active_battler.restriction == 2 or @active_battler.restriction == 3
      # ƒAƒNƒVƒ‡ƒ",ɍUŒ,,ðÝ'è
      @active_battler.current_action.kind = 0
      @active_battler.current_action.basic = 0
    end
    # §-ñ,ª [s"®,Å,«,È,¢] ,̏ꍇ
    if @active_battler.restriction == 4
      # ƒAƒNƒVƒ‡ƒ"‹­§'ΏÛ,̃oƒgƒ‰[,ðƒNƒŠƒA
      $game_temp.forcing_battler = nil
      if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
        # ƒXƒe[ƒgŽ©'R‰ðœ
        @active_battler.remove_states_auto
        # CPÁ"ï
        @active_battler.cp = [(@active_battler.cp - 65535),0].max
        # ƒXƒe[ƒ^ƒXƒEƒBƒ"ƒhƒE,ðƒŠƒtƒŒƒbƒVƒ...
        @status_window.refresh
      end
      # ƒXƒeƒbƒv 1 ,Ɉڍs
      @phase4_step = 1
      return
    end
  end
  # ƒAƒNƒVƒ‡ƒ",ÌŽí•Ê,Å•ªŠò
  case @active_battler.current_action.kind
  when 0
    # UŒ,¥-hŒäE"¦,°,éE‰½,à,µ,È,¢Žž,Ì‹¤'ʏÁ"ïCP
    @active_battler.cp -=     0 if @phase4_act_continuation == 0
  when 1
    # ƒXƒLƒ‹Žg--pŽž,̏Á"ïCP
    @active_battler.cp -= 65535 if @phase4_act_continuation == 0
  when 2
    # ƒAƒCƒeƒ€Žg--pŽž,̏Á"ïCP
    @active_battler.cp -= 65535 if @phase4_act_continuation == 0
  when -1
    # CP,ª--­,Ü,Á,Ä,¢,È,¢
    @phase4_step = 6
    return
  end
  # CP‰ÁŽZ,ðˆêŽž'âŽ~,·,é
  @cp_thread.stop = true
  # ƒXƒe[ƒgŽ©'R‰ðœ
  @active_battler.remove_states_auto
  xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# œ Šî-{ƒAƒNƒVƒ‡ƒ" Œ‹‰Êì¬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
  # UŒ,,̏ꍇ
  if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
    @active_battler.cp -= 65535 # UŒ,Žž,ÌCPÁ"ï
  end
  # -hŒä,̏ꍇ
  if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
    @active_battler.cp -= 32767 # -hŒäŽž,ÌCPÁ"ï
  end
  # "G,Ì"¦,°,é,̏ꍇ
  if @active_battler.is_a?(Game_Enemy) and
     @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
    @active_battler.cp -= 65535 # "¦'-Žž,ÌCPÁ"ï
  end
  # ‰½,à,µ,È,¢,̏ꍇ
  if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
    @active_battler.cp -= 32767 # ‰½,à,µ,È,¢Žž,ÌCPÁ"ï
  end
  # "¦,°,é,̏ꍇ
  if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
    @active_battler.cp -= 65535 # "¦'-Žž,ÌCPÁ"ï
    # "¦'-‰Â"\,Å,Í,È,¢ê‡
    if $game_temp.battle_can_escape == false
      # ƒuƒU[ SE ,ð‰‰'t
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # Œˆ'è SE ,ð‰‰'t
    $game_system.se_play($data_system.decision_se)
    # "¦'-ˆ--
    update_phase2_escape
    return
  end
  xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ"ƒtƒF[ƒY ƒXƒeƒbƒv 5 : ƒ_ƒ[ƒW•\ަ)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
  # ƒXƒŠƒbƒvƒ_ƒ[ƒW
  if @active_battler.hp > 0 and @active_battler.slip_damage?
    @active_battler.slip_damage_effect
    @active_battler.damage_pop = true
  end
  xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ"ƒtƒF[ƒY ƒXƒeƒbƒv 6 : ƒŠƒtƒŒƒbƒVƒ...)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
  # CP‰ÁŽZ,ðÄŠJ,·,é
  @cp_thread.stop = false
  # ƒwƒ‹ƒvƒEƒBƒ"ƒhƒE,ð‰B,·
  @help_window.visible = false
  xrxs_bp1_update_phase4_step6
end
end
# ¥£¥ XRXS_BP 7. ƒoƒgƒ‹ƒXƒe[ƒ^ƒXEƒNƒŠƒAƒfƒUƒCƒ" ver.1.02 ¥£¥
# by ÷‰ë Ý"y, TOMY

#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ"ƒXƒ^ƒ"ƒX•ϐ"
#--------------------------------------------------------------------------
attr_accessor   :update_cp_only                   # CPƒ[ƒ^[,Ì,Ý,̍XV
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
  xrxs_bp7_initialize
  # «Full-View,̏ꍇ,͉º"ñs,Ì # ,ðÁ,µ,Ä,­,¾,³,¢B
  #self.opacity = 0
  #self.back_opacity = 0
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ...
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
  if @update_cp_only
    xrxs_bp7_refresh
    return
  end
  # •`ŽÊ,ð‹ÖŽ~,µ,È,ª,ç-ß,·
  @draw_ban = true
  xrxs_bp7_refresh
  # •`ŽÊ,̋֎~,ð‰ðœ
  @draw_ban = false
  # •`ŽÊ,ðŠJŽn
  @item_max = $game_party.actors.size
  for i in 0...$game_party.actors.size
    actor = $game_party.actors[i]
    actor_x = i * 160 + 21
    # •àsƒLƒƒƒ‰ƒOƒ‰ƒtƒBƒbƒN,Ì•`ŽÊ
    draw_actor_graphic(actor, actor_x - 9, 116)
    # HP/SPƒ[ƒ^[,Ì•`ŽÊ
    draw_actor_hp_meter_line(actor, actor_x,  72, 96, 12)
    draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
    # HP"'l,Ì•`ŽÊ
    self.contents.font.size = 24            # HP/SP"'l,Ì•¶Žš,Ì'å,«,³
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
    # SP"'l,Ì•`ŽÊ
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
    # --pŒêuHPv,Æ--pŒêuSPv,Ì•`ŽÊ
    self.contents.font.size = 12            # --pŒêuHP/SPv,Ì•¶Žš,Ì'å,«,³
    self.contents.font.color = system_color # --pŒêuHP/SPv,Ì•¶Žš,̐F
    draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp)
    draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp)
   
    draw_actor_state(actor, actor_x, 100)
  end
end
end
#==============================================================================
# ¡ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# œ HPƒ[ƒ^[ ,Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  w = width * actor.hp / actor.maxhp
  hp_color_1 = Color.new(255,   0,   0, 192)
  hp_color_2 = Color.new(255, 255,   0, 192)
  self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  x -= 1
  y += (height/4).floor
  self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  x -= 1
  y += (height/4).ceil
  self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  x -= 1
  y += (height/4).ceil
  self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ SPƒ[ƒ^[ ,Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  w = width * actor.sp / actor.maxsp
  hp_color_1 = Color.new(  0,   0, 255, 192)
  hp_color_2 = Color.new(  0, 255, 255, 192)
  self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  x -= 1
  y += (height/4).floor
  self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  x -= 1
  y += (height/4).ceil
  self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  x -= 1
  y += (height/4).ceil
  self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ -¼'O,Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
  xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg,Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
  xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ HP ,Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
  xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ SP ,Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
  xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ž ŠO•"ƒ‰ƒCƒuƒ‰ƒŠ
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# œ ƒ‰ƒCƒ"•`‰æ by ÷‰ë Ý"y
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  # •`ŽÊ‹----£,ÌŒvŽZB'å,«,ß,É'¼ŠpŽž,Ì'·,³B
  distance = (start_x - end_x).abs + (start_y - end_y).abs
  # •`ŽÊŠJŽn
  if end_color == start_color
    for i in 1..distance
      x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
      y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
      self.contents.fill_rect(x, y, width, width, start_color)
    end
  else
    for i in 1..distance
      x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
      y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
      r = start_color.red   * (distance-i)/distance + end_color.red   * i/distance
      g = start_color.green * (distance-i)/distance + end_color.green * i/distance
      b = start_color.blue  * (distance-i)/distance + end_color.blue  * i/distance
      a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
      self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
    end
  end
end

#--------------------------------------------------------------------------
# œ ‰e•¶Žš•`‰æ by TOMY
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
  # Œ³,̐F,ð•Û'¶,µ,Ä,¨,­
  color = self.contents.font.color.dup
  # •Žš,ʼne•`‰æ
  self.contents.font.color = Color.new(0, 0, 0)
  self.contents.draw_text(x + 2, y + 2, width, height, string, align)
  # Œ³,̐F,É-ß,µ,Ä•`‰æ
  self.contents.font.color = color
  self.contents.draw_text(x, y, width, height, string, align)
end
end


Please use [code][/code] tags when posting code ~ G_G
17
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 03, 2009, 12:16:44 pm
Thank you. It works perfectly now.

I was wondering... Custom battle systems - do they always mess up this script?

Because now that I looked a little into how your script works,
I find that the ATB script im using in another game,
also uses a Lvlup notifier, but has no skill notifier and refuses to let your skill notifier work with it.
19
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 02, 2009, 04:00:10 pm
I will do that, but cant do it right now unfortunately.

I even tried to isolate the problem and even with only Ccoas UMS-script and your modified level notifier the problem is stil the same

I will upload the demo later tonight.

Thank you for you effort and time.
20
RMXP Script Database / Re: [XP] Easy LvlUp Notifier
December 02, 2009, 10:45:56 am
Its the last one above main,
and yes I do in the game where I tested it in
but I figured that it would cause a problem and cut it out, then saved and re-opened it beforehands