Jump to content
pinka

[Request] MP Vocab per actor

Recommended Posts

Hello.

I would like to request a script which does basically this: changing the MP Vocab for each actor.

For example: Actor1 got Mana, Actor2 got Fury and so on.

I don't need MP to change their behaviour, only their Vocab based on the actor.

I looked everywhere for this script, and the only one I found, by Galv, isn't really compatible with my menu, and it also modifies all other stats vocab, and it's not what I'm after.

 

Thanks to everyone who might want to try this out.

Share this post


Link to post
Share on other sites

I just tested the script in my project, but seems like it's not compatible with the menu I'm using. I'm no scripter, so I don't really know what to do to make it compatible, but if someone want to try and make it work, i can post the menu script.

Share this post


Link to post
Share on other sites

Looking at that script, I can see why it wouldn't be compatible with a custom menu. It also has a lot of extra features that you aren't looking for. I'll come up with something tomorrow morning if nobody else gets to ya first.

Share this post


Link to post
Share on other sites

Would be great! Thanks! But others are welcome as well. I just want something really simple. No color changes or whatever.

Share this post


Link to post
Share on other sites

Got it!

Just how many actors do you want? That's all i need to know~

 

EDIT: 

Okay you'll need to copy/paste for more actors though.

 

#============================================================================
#Different Mana Names
#By Ventwig
#Made for Pinka
#Version 1 - January 06 2013
#For RPGMaker VX Ace
#================================================
#Small scriplet! Changes the name for MP for each actor!
#Credit not required but appreciated if used anywhere!
#================================================
class Window_Base
  def draw_actor_mp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
    change_color(system_color)
    #=======================
    #Config
    #=======================
    #Every actor has an ID. Just copy/paste for more 
    #actors, keeping the "eslif".
    #Just fix the ID number (Default 1 is Eric, 2 is Natalie, etc)
    #And add the name in between the quotes!
    #You can also change the 30 if you want them to not be as squished,
    #but then it might run into the numbers
    #=======================
    if actor.id == 1
      draw_text(x, y, 30, line_height, "Mana")
    elsif actor.id == 2
      draw_text(x, y, 30, line_height, "Ki")
    elsif actor.id == 3
      draw_text(x, y, 30, line_height, "Rage")
    elsif actor.id == 4
      draw_text(x, y, 30, line_height, "Chain")
    #=======================
    #End Config
    #=======================
    end
    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
    mp_color(actor), normal_color)
  end
end
 

Should be easy enough, if you get confused just ask.

 

Also this won't be compatible if you're using some other scripts, such as an HP bar script and maybe a menu script, too.

If it doesn't, just link me to the script and ill see what i can do!

Edited by Ventwig

Share this post


Link to post
Share on other sites

It works perfectly with my custom menu and the battle as well! I couldn't thank you more! There's just a script which doesn't update the names of the vocab, because you have to set it in the configuration module. Could you make it so that it updates it here as well? I'll link you the script.

 

 

 

#Dekita's=======================================================================
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#===============================================================================
#                                                                       v1.2-sa
#                          ★ Perfect Status Screen ★
#                               ☆ STAND-ALONE ☆  
#
#===============================================================================
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#===============================================================================
#
# -- Last updated: 22/08/2012 <-(D/M/Y)
#
# -- Difficulty: Plug'n'play - (Easy)
#
# -- Customisation: Better than a kick in the nuts! - (Medium)
#
# -- Requires: N/A
#
# -- Recommended: N/A
#
# -- Compatable:  RPG Maker VX Ace ONLY!
#                 Yanfly Skills Cost Manager v1.03+
#                 Yanfly Engine Ace - Skill Restrictions v1.02+
#                 
#===============================================================================
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#===============================================================================
#===============================================================================
# ☆ Script Information:
#=======================
# This script will Display information regarding an actors stats,
# parameters, elemental/state resistances and attack values.
#
# NOTE: PAGEFOUR reffers to the fourth page of information i added, i have set it
# to display "PAGEFOUR" first, therefor PAGEFOUR = the first page you see on
# opening the status screen.
#===============================================================================

#===============================================================================
# ☆ TERMS OF USE:
#===============================================================================
#
# 1. You must give credit to Dekita.
#
# 2. This script is for NON-Commercial use ONLY!*
#
# 3. You CANNOT give credit to yourself for Re-posting this script
#    or Posting a modified version.*
#
# 4. Do not Re-Distribute this script.
#
# 5. You are NOT allowed to convert this script to any other engine,
#    E.G converting it from RGSS3 into RGSS2.*
#
# 6. ENJOY!
#
#-------------------------------------------------------------------------------
# * = Unless permissions are given by Dekita. < e-mail DekitaRPG@gmail.com
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#===============================================================================

#===============================================================================
# ☆ History:
#============
# D - M - Y
# 22/08/2o12 - added page four info.
# 13/08/2o12 - released Script. (v1.1-sa)
# 11/08/2o12 - Turned into seperate stand-alone version.
#            - Spiced up some shit
#            - Added "Page Three" (outbound element and status info)
# 08/08/2o12 - Released Script. (v1.0)
# 07/08/2o12 - started script.
#-------------------------------------------------------------------------------
#===============================================================================
# ☆ Thanks to :
#===============
# N/A
#
#===============================================================================

#===============================================================================
# ☆ Foresight Into The Future:
#==============================
# Nothing planned.
#
# If you have any ideas e-mail me at DekitaRPG@gmail.com
#
#===============================================================================

#===============================================================================
# ☆ Known Bugs:
#=================
# N/A
#
#===============================================================================

#===============================================================================
# ☆ INSTRUCTIONS:
#=================
# Place this script UNDER "â–¼ Materials" and ABOVE "â–¼ Main" in your script editor.
#
#===============================================================================
=begin
#===============================================================================
# ☆ Script Calls:
#=================
# Dont see why you would want to but you can use this script call to
# call the status screen.

SceneManager.call(Scene_Status)

#
# Use the script call below to change an actors "Perfect information"
# change[x] for the information number, actor_id toactors database number
# and inset your text between the inverted comma's > " "

change_perfect_info[x](actor_id, " Text goes here ")

# e.g
# change_perfect_info1(1, "This is an example")
#===============================================================================
#===============================================================================
=end

#===============================================================================
# ☆ Import:
#===========
$imported = {} if $imported.nil?
$imported["DPB-PSS-SA"] = true
#
#===============================================================================

#===============================================================================
# ☆ Perfect Status Screen Begin:
#================================
module DPB
  module PSS_SA
    
    COMMANDS =[
#~     [:pagefour,  "I"],     
    [:pageone,   "I"],
#~     [:pagetwo,   "II"],
#~     [:pagethree, "III"],
    ]#DO NOT REMOVE

#===============================================================================#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#                                                                               #
#                                   PSS_SA                                      #
#                           (Perfect Status Screen)                             #
#                           - CUSTOMISATION BEGIN -                             #
#                                                                               #
#                                                                               #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#===============================================================================#     
#===============================================================================
# ☆ Customisation = Tah-Dah
#===========================
# I have added as much customisation as i thought was needed.
#
# It is advised you take a moment to look through the cusomisation options
# to see if any apply to your current project.
#===============================================================================    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Elements Row 1
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # You can control from here which elements are viewable in row 1
    # along with their icons.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    ELEMENT_VOCAB = "Elemental Resistence" # for incomming elemental damage
    
    ATK_ELE_VOCAB = "Elementi: (attacco)" # for outgoing elemental damage
    
    ELEMENTS_ROW1  = [3..8]  # Elements shown. Maximum of 8 can be shown per row.

    ELEMENT_ICONS_ROW1   ={         # Contains element icon information.
    # Element ID => Icon,
  3  => 514,
  4  => 512,
  5  => 513,
  6  => 515,
  7  => 110,
  8  => 111,
    } # Do not remove this.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆  Elements Row 2
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # You can control from here whether you want to display a second row of
    # elemental data along with their icons.
    # Just set "SHOW_ELE_ROW_2" to "true" and change the Element ID and Icon
    # to suit your needs.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    SHOW_ELE_ROW_2 = false # made for those who want more elements in their game :D
    
    ELEMENTS_ROW2  = [8, 7, 6, 5, 4, 3]  # Elements shown. Maximum of 8 can be shown per row.
        
    ELEMENT_ICONS_ROW2   ={         # Contains element icon information.
    # Element ID => Icon,
  3  => 514,
  4  => 512,
  5  => 513,
  6  => 515,
  7  => 110,
  8  => 111,
    } # Do not remove this.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆  States Row 1
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # You can control from here what states are shown in row 1.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    STATUS_VOCAB = "Status Resistence" # for imcomming status effects

    ATK_STATUS_VOCAB = "Status: (attack)"  # for outgoing status effects
    
    STATES_ROW_1 = [2..8]     # States shown. Maximum of 8 can be shown.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆  States Row 2
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # You can control from here what states are shown in row 2.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    STATES_ROW_2 = []     # States shown. Maximum of 8 can be shown.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Font Settings
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    PROPFONTSIZE = 18 # For Displayed Properties
        
    PARAMFONTSIZE = 20 # For Parameters in point selection window and JP if
                       # Yanfly JP Manager is installed

    FONTSIZE = 20 # For Almost Everything Else.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Parameters Gauge Settings
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # Set this to "true" if you wish to have Gauges for params e.g
    # MaxHP, MaxMP, Atk, Def, Mat, Mdf, Agi, Luk
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    DRAW_PARAM_GAUGES = false
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Parameters Colour Settings
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # These settings adjust the way the parameters window visually appears.
    # Each of the stats have a non-window colour. Adjust them as you see fit.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    PARAM_COLOUR ={
    # ParamID => [:stat,       Colour1,                   Colour2          ],
            2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
            3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
            4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
            5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
            6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
            7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
    } # Do not remove this.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Draw Actor Graphic ?
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=    
        
    DRAW_ACTOR_GRAPHIC = false
    DAG_X = 332
    DAG_Y = 90
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Draw Actor Information Location
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=    
    
    DRAW_INFO_IN_MIDDLE = false
    # This option is to change the location of Actor's Name, Class, Lvl ect
    # true = middle / false = left side of the screen.

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# ☆ Properties Window Settings
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# These settings adjust the way the properties window visually appears.
# The properties have abbreviations, but leaving them as such makes things
# confusing (as it's sometimes hard to figure out what the abbreviations
# mean). Change the way the appear, whether or not they appear, and what
# order they will appear in.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    #---------------------------------------------------------------------------
    # ☆ Just for the hell of it:
    #----------------------------
    # This option is for those people who like to have large number values for
    # their stats,
    # e.g
    # accuracy = 17,982.
    # attack = 6021.
    #
    # Simply set "PROPERTIES_BIGGER_NUMBERS" to "true" to activate this option.
    #
    # NOTE:
    # This doesnt acctually increase your stats to ridiculous values
    # It just makes it appear that way :)
    # your still not gonna be hitting monsters for 6,932,123,21.5 :D
    #
    # This is also very usefull if you want your game to have a more
    # unique looking stat progression system
    # e.g
    # People cant calculate the stats as easy
    #---------------------------------------------------------------------------
    PROPERTIES_BIGGER_NUMBERS = false
    
    # This option is how much the parameters value will be multiplied by
    # IF PROPERTIES_BIGGER_NUMBERS = true
    # VISUAL PURPOSES ONLY!
    PARAMS_BIGGER_NUMBER_VALUE = 8.5

    # This option is how much the properties value will be multiplied by
    # IF PROPERTIES_BIGGER_NUMBERS = true
    # VISUAL PURPOSES ONLY!   
    # ONLY AFFECTS NON-% STATS e.g stats such as MP Cost Rate will remain a %.
    PROPERTIES_BIGGER_NUMBER_VALUE = 850
    
    # These are the parameters that appear in column 1.
    # This column's settings are only relevant if DRAW_PARAM_GAUGES = false (above)
    PROPERTIES_PARAMCOLUMN =[
      [:mhp, "Energy"],       #-------------------------------------------------
      [:mmp, "Battery"],       # <- Rename these to whatever you want your
      [:atk, "Strength"],       # <- origional parameters to be called :)
      [:def, "Durability"],      # <-
      [:mat, "Intelligence"],     # <-
      [:mdf, "Resistance"],    # <-
      [:agi, "Speed"],        # <-
      [:luk, "Luck"],         #-------------------------------------------------
    ] # Do not remove this.
 
    # These are the properties that appear in column 2.
    PROPERTIES_COLUMN1 =[
#~       [:hit, "Hit Rate"],
      [:eva, "Evasion"],
      [:hrg, "HP Regen"],
      [:mrg, "MP Regen"],
      [:trg, "PT Regen"],
      [:cri, "Critical Chance"],
      [:cev, "Critical Evasion"],
      [:mev, "Magic Evasion"],
#~       [:mrf, "Riflesso Magie"],
      [:cnt, "Counter Chance"],
      [:rec, "Heal Effect"],
      [:exr, "EXP Rate"],
      [:tcr, "PT Charge"],
      [:tgr, "Aggro Rate"],
    ] # Do not remove this.
    
    # These are the properties that appear in column 3.
    PROPERTIES_COLUMN2 =[
#~       [:hrg, "HP Regen"],
#~       [:mrg, "MP Regen"],
#~       [:trg, "TP Regen"],
#~       [:rec, "Recovery"],
#~       [:grd, "Guard Rate"],
#~       [:pha, "Item Boost"],
#~       [:exr, "EXP Rate"],
#~       [:tcr, "Carica PT"],
    ] # Do not remove this.
    
    # These are the properties that appear in column 4.
    PROPERTIES_COLUMN3 =[
      [:hcr, "HP Cost Rate"],    # Requires YEA - Skill Cost Manager
      [:mcr, "MP Cost Rate"],
      [:tcr_y, "TP Cost Rate"],    # Requires YEA - Skill Cost Manager
      [:cdr, "Cooldown Rate"],   # Requires YEA - Skill Restrictions
      [:wur, "Warmup Rate"],     # Requires YEA - Skill Restrictions
      [:pdr, "Physical Damage"],
      [:mdr, "Magical Damage"],
#~       [:fdr, "Floor Damage"],
    ] # Do not remove this.

    DRAW_ALL_COLUMNS = false # This option is for those who do not want all 4 columns
                            # Simply set this to false to only draw 3 columns
                            # e.g the param column, column1 and column2.
                            
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆  Main Actor Info
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # You can control from here what info is shown on the main page.
    # You can rearrange these in any order you like :D
    # as well as rename them to anything you want
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    
    INFO1and2LH = 0.0 # line height for PAGEFOUR_INFO 1 and 2
    
    PAGEFOUR_INFO1 =[
    [:pname,    "Name:"],
    [:plevel,   "Level:"],
#~     [:pnickname,"Title:"],
#~     [:plvlupexp,"Next Level Exp:"],
    ] # Do not remove this.
    
    PAGEFOUR_INFO2 =[
#~     [:plevel,   "Level:"],
    [:pclass,   "Class:"],    
#~     [:pexp,     "Total Exp:"],    
    ] # Do not remove this.
    
    
    INFO3LH = 2.0 # line height for PAGEFOUR_INFO 3
    
    PAGEFOUR_INFO3 =[
    [:pinfo1,   "Race:"],    
    [:pinfo2,   "Birth Planet:"],    
#~     [:pinfo3,   "Favourate Food:"],    
#~     [:pinfo4,   "Favourate Quote"],    
#~     [:pinfo5,   "Relationship Status:"],    
    ] # Do not remove this.
                
#===============================================================================#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#                                                                               #
#                                   PSS_SA                                      #
#                           (Perfect Status Screen)                             #
#                            - CUSTOMISATION END -                              #
#                                                                               #
#                                                                               #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#===============================================================================#
#                           - DekitaRPG@gmail.com -                             #
#===============================================================================#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#                                                                               #
#                                   PSS_SA                                      #
#                           (Perfect Status Screen)                             #
#                               - SCRIPT BEGIN -                                #
#                                                                               #
#                                                                               #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#===============================================================================#

#===============================================================================#
# ARE YOU MODIFYING BEYOND THIS POINT? \.\.                                     #
# YES?\.\.                                                                      #
# OMG, REALLY?                                                                  #
# WELL SLAP MY FACE AND CALL ME A DRAGON.\..\..                                 #
# I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\..                                #
#===============================================================================#

module_function
    #--------------------------------------------------------------------------
    # convert_integer_array
    #--------------------------------------------------------------------------
    def convert_integer_array(array)
      result = []
      array.each { |i|
        case i
        when Range; result |= i.to_a
        when Integer; result |=
        end }
      return result
    end
    #--------------------------------------------------------------------------
    # converted_contants
    #--------------------------------------------------------------------------
    ELEMENTS_ROW1 = convert_integer_array(ELEMENTS_ROW1)
    ELEMENTS_ROW2 = convert_integer_array(ELEMENTS_ROW2)
    STATES_ROW_1 = convert_integer_array(STATES_ROW_1)
    STATES_ROW_2 = convert_integer_array(STATES_ROW_2)    
  end # PSS_SA
end #DPB
#==============================================================================
# Icon
#==============================================================================
module Icon
  #--------------------------------------------------------------------------
  # self.element
  #--------------------------------------------------------------------------
  def self.element(id)
    return 0 unless DPB::PSS_SA::ELEMENT_ICONS_ROW1.include?(id)
    return DPB::PSS_SA::ELEMENT_ICONS_ROW1[id]
  end    
end # Icon

#==============================================================================
# Game_BattlerBase
#==============================================================================
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # new method: Get Attack Element Rate
  #--------------------------------------------------------------------------
  def atk_element_rate(element_id)
    features_sum(FEATURE_ATK_ELEMENT, element_id)
  end  
end # Game_BattlerBase
#p-----------------------------------------------------------------------------
class Game_Actor < Game_Battler
  attr_reader :perfectinfo1
  attr_reader :perfectinfo2
  attr_reader :perfectinfo3
  attr_reader :perfectinfo4
  attr_reader :perfectinfo5
  alias change_pinfo initialize
 def initialize(actor_id)
        change_pinfo(actor_id)
        @perfectinfo1 = "pinfo1"
        @perfectinfo2 = "pinfo2"
        @perfectinfo3 = "pinfo3"
        @perfectinfo4 = "pinfo4"
        @perfectinfo5 = "pinfo5"
 end
  def change_pinfo1(text)
        @perfectinfo1 = text
      end  
  def change_pinfo2(text)
        @perfectinfo2 = text
      end  
  def change_pinfo3(text)
        @perfectinfo3 = text
      end  
  def change_pinfo4(text)
        @perfectinfo4 = text
      end  
  def change_pinfo5(text)
        @perfectinfo5 = text
      end  
end # Game_Actor
#========================
class Game_Interpreter
#--------
  def change_perfect_info1(actor_id, text)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_pinfo1(text)
  end
  def change_perfect_info2(actor_id, text)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_pinfo2(text)
  end
  def change_perfect_info3(actor_id, text)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_pinfo3(text)
  end
  def change_perfect_info4(actor_id, text)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_pinfo4(text)
  end
  def change_perfect_info5(actor_id, text)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_pinfo5(text)
  end
end
#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_status_index
  attr_accessor :scene_status_oy
end # Game_Temp

#==============================================================================
# Window_StatusCommand
#==============================================================================
class Window_StatusCommand < Window_Command
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :item_window
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy)
    @actor = nil
        self.opacity = 0
  end
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 0; end
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
  #--------------------------------------------------------------------------
  # ok_enabled?
  #--------------------------------------------------------------------------
  def ok_enabled?
    return handle?(current_symbol)
  end
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    return unless @actor
    for command in DPB::PSS_SA::COMMANDS
      case command[0]
      #--- Default ---
      when :pageone, :pagetwo, :pagethree, :pagefour
        add_command(command[1], command[0])
      else
        end
    end
    if !$game_temp.scene_status_index.nil?
      select($game_temp.scene_status_index)
      self.oy = $game_temp.scene_status_oy
    end
    $game_temp.scene_status_index = nil
    $game_temp.scene_status_oy = nil
  end
  #--------------------------------------------------------------------------
  # process_ok
  #--------------------------------------------------------------------------
  def process_ok
    $game_temp.scene_status_index = index
    $game_temp.scene_status_oy = self.oy
    super
  end
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    update_item_window
  end
  #--------------------------------------------------------------------------
  # update_item_window
  #--------------------------------------------------------------------------
  def update_item_window
    return if @item_window.nil?
    return if @current_index == current_symbol
    @current_index = current_symbol
    @item_window.refresh
  end
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(window)
    @item_window = window
    update
  end
  #--------------------------------------------------------------------------
  # update_help
  #--------------------------------------------------------------------------
  def update_help
    return if @actor.nil?
    @help_window.set_text(@actor.actor.description)
  end
end # Window_StatusCommand

#==============================================================================
# Window_StatusItem
#==============================================================================
class Window_StatusItem < Window_Base
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, command_window)
    super(dx, dy, Graphics.width, Graphics.height - dy)
    @command_window = command_window
    @actor = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    reset_font_settings
    return unless @actor
    draw_window_contents
  end
  #--------------------------------------------------------------------------
  # draw_window_contents
  #--------------------------------------------------------------------------
  def draw_window_contents
    case @command_window.current_symbol
    when :pageone
        draw_block1(line_height * 1)
        draw_block2(line_height * 1)
#~         draw_block4(line_height * 14)        
        draw_page_one(0, 0)
        draw_page_two(0, 0)
    when :pagetwo
        draw_block1(line_height * 1)
        draw_block2(line_height * 1)
        draw_block4(line_height * 14)        
        draw_page_two(0, 0)
    when :pagethree
        draw_block1(line_height * 1)
        draw_block2(line_height * 1)
        draw_block4(line_height * 14)        
        draw_page_three(0, 0)
    when :pagefour
        draw_block1(line_height * 1)
        draw_block2(line_height * 1)
        draw_block3(line_height * 7)
        draw_block4(line_height * 14)        
        draw_page_four(0, 0)               
    else
      end
    end
  #--------------------------------------------------------------------------
  # * Draw Block 1
  #--------------------------------------------------------------------------
  def draw_block1(y)
#~         draw_actor_face(@actor, (window_width - 24) / 1.5, 0)
        contents.font.size = DPB::PSS_SA::FONTSIZE
     if DPB::PSS_SA::DRAW_INFO_IN_MIDDLE
#~         draw_actor_name(@actor,(window_width + 24) / 2, line_height * 0)
#~         draw_actor_class(@actor, (window_width + 24) / 2, line_height * 2)      
#~         draw_actor_level(@actor, (window_width + 24) / 2, line_height * 1)
#~         draw_actor_nickname(@actor, (window_width + 24) / 2, line_height * 3)
      else   
#~         draw_actor_name(@actor,5 , line_height * 0)
#~         draw_actor_class(@actor,5 , line_height * 2)
#~         draw_actor_level(@actor,5 , line_height * 1)
#~         draw_actor_nickname(@actor,5 , line_height * 3)
      end
      if DPB::PSS_SA::DRAW_ACTOR_GRAPHIC
    draw_actor_graphic(@actor, DPB::PSS_SA::DAG_X, DPB::PSS_SA::DAG_Y)#, 50)
  else
  end
end
  #--------------------------------------------------------------------------
  # * Draw Block 2
  #--------------------------------------------------------------------------
  def draw_block2(y)
    draw_basic_info(136, y)
    draw_exp_info(4, y+line_height * 19.5)
  end
  #--------------------------------------------------------------------------
  # * Draw Block 3
  #--------------------------------------------------------------------------
  def draw_block3(y)
#        draw_properties_paramcolumn
    draw_equipments(288, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Block 4
  #--------------------------------------------------------------------------
  def draw_block4(y)
    draw_description(4, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Horizontal Line
  #--------------------------------------------------------------------------
  def draw_horz_line(y)
    line_y = y + line_height / 2 - 1
    contents.fill_rect(0, line_y, contents_width, 2, line_color)
  end
  #--------------------------------------------------------------------------
  # * Get Color of Horizontal Line
  #--------------------------------------------------------------------------
  def line_color
    color = normal_color
    color.alpha = 48
    color
  end
  #--------------------------------------------------------------------------
  # * Draw Basic Information
  #--------------------------------------------------------------------------
  def draw_basic_info(x, y)
        draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
        if $imported["YEA-JPManager"]
          contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
        draw_actor_jp(@actor, (window_width + 24) / 3, line_height * 3.33)
         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
      else
     end
   end   
  #--------------------------------------------------------------------------
  # * Draw Page One
  #--------------------------------------------------------------------------
  def draw_page_one(x, y)
        contents.font.size = DPB::PSS_SA::FONTSIZE  
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~         draw_horz_line(line_height * 4)
        draw_pagefour_info1
        draw_pagefour_info2       
        draw_pagefour_info3       
        draw_horz_line(Graphics.height - line_height * 4)
      if DPB::PSS_SA::DRAW_PARAM_GAUGES
        draw_parameter_graph
      if DPB::PSS_SA::DRAW_ALL_COLUMNS
        draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 4 - 12)
        draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 4 - 12)
        else  
        draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 3 - 24)
        draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 3 - 24)
        end
      else
        draw_properties_paramcolumn
      end
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~         draw_horz_line(line_height * 4)
#~         draw_horz_line(Graphics.height - line_height * 4)
        draw_properties_column1
        draw_properties_column2
        if DPB::PSS_SA::DRAW_ALL_COLUMNS
        draw_properties_column3
      else
      end
        reset_font_settings
      end
    def draw_pagefour_info1
    dx = 5
    dw = (window_width - 24) / 4
    dy = line_height * DPB::PSS_SA::INFO1and2LH
    for info in DPB::PSS_SA::PAGEFOUR_INFO1
      dy = draw_info(info, dx, dy, dw)
    end
  end
 def draw_pagefour_info2
    dx = 5 + (window_width - 24) / 4
    dw = (window_width - 24) / 4
    dy = line_height * DPB::PSS_SA::INFO1and2LH
    for info in DPB::PSS_SA::PAGEFOUR_INFO2
      dy = draw_info(info, dx, dy, dw)
    end
  end
 def draw_pagefour_info3
    dx = 5
    dw = (window_width - 24) / 2
    dy = line_height * DPB::PSS_SA::INFO3LH
    for info in DPB::PSS_SA::PAGEFOUR_INFO3
      dy = draw_info(info, dx, dy, dw)
    end
end
  #--------------------------------------------------------------------------
  # * Draw Page two
  #--------------------------------------------------------------------------
  def draw_page_two(x, y)
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~         draw_horz_line(line_height * 4)
        draw_elements
      if DPB::PSS_SA::SHOW_ELE_ROW_2
        draw_elements_row2
      else
        end
      draw_states
      draw_states_row_2
#~       draw_horz_line(Graphics.height - line_height * 4)
      draw_actor_picture(@actor, 320, contents_height-460, true)
      reset_font_settings        
    end
  #--------------------------------------------------------------------------
  # * Draw Page three
  #--------------------------------------------------------------------------
  def draw_page_three(x, y)
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~         draw_horz_line(line_height * 4)
        draw_atk_elements
      if DPB::PSS_SA::SHOW_ELE_ROW_2
        draw_atk_elements_row2
      else
        end
      draw_atk_states
      draw_atk_states_row_2
#~         draw_horz_line(Graphics.height - line_height * 4)
        reset_font_settings        
      end
      
#~   #--------------------------------------------------------------------------
#~   # * Draw Page four
#~   #--------------------------------------------------------------------------
#~   def draw_page_four(x, y)
#~         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~         draw_horz_line(line_height * 4)
#~        draw_pagefour_info1
#~        draw_pagefour_info2       
#~        draw_pagefour_info3       
#~         draw_horz_line(Graphics.height - line_height * 4)
#~         reset_font_settings        
#~       end
#~  def draw_pagefour_info1
#~     dx = 5
#~     dw = (window_width - 24) / 4
#~     dy = line_height * DPB::PSS_SA::INFO1and2LH
#~     for info in DPB::PSS_SA::PAGEFOUR_INFO1
#~       dy = draw_info(info, dx, dy, dw)
#~     end
#~   end
#~  def draw_pagefour_info2
#~     dx = 5 + (window_width - 24) / 4
#~     dw = (window_width - 24) / 4
#~     dy = line_height * DPB::PSS_SA::INFO1and2LH
#~     for info in DPB::PSS_SA::PAGEFOUR_INFO2
#~       dy = draw_info(info, dx, dy, dw)
#~     end
#~   end
#~  def draw_pagefour_info3
#~     dx = 5
#~     dw = (window_width - 24) / 2
#~     dy = line_height * DPB::PSS_SA::INFO3LH
#~     for info in DPB::PSS_SA::PAGEFOUR_INFO3
#~       dy = draw_info(info, dx, dy, dw)
#~     end
#~   end
  #--------------------------------------------------------------------------
  # draw_info
  #--------------------------------------------------------------------------
  def draw_info(info, dx, dy, dw)
    case info[0]
    #---
    when :pname
    text = @actor.name
    when :pnickname
    text = @actor.nickname
    when :plevel
    text = @actor.level         
    when :pclass
    text = @actor.class.name
    when :pexp
    text = @actor.exp
    when :plvlupexp
    text = @actor.next_level_exp - @actor.exp
    when :pinfo1
    text = @actor.perfectinfo1
    when :pinfo2
    text = @actor.perfectinfo2
    when :pinfo3
    text = @actor.perfectinfo3
    when :pinfo4
    text = @actor.perfectinfo4
    when :pinfo5
    text = @actor.perfectinfo5
    #---
    else; return dy
    end
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, info[1], 0)
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
    return dy + line_height
  end        
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
    6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
  end
  #--------------------------------------------------------------------------
  # * Draw Experience Information
  #--------------------------------------------------------------------------
  def draw_exp_info(x, y)
        contents.font.size = DPB::PSS_SA::PROPFONTSIZE
        s1 = @actor.max_level? ? "----" : @actor.exp
        s2 = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
        s_next = sprintf(Vocab::ExpNext, Vocab::level)
        change_color(system_color)
#~         draw_text((window_width - 24) / 4 * 3, y-140, 180, line_height, "Prox Lvl")
 draw_text(0, y-140, 180, line_height, "Prox Lvl")
 draw_text(0, y-170, 180, line_height, "Exp Totale")
        change_color(normal_color)
        draw_text(0, y-155, 180, line_height, s1, 2)
        draw_text(0, y-120, 180, line_height, s2, 2)
#~         draw_text((window_width - 24) / 4 * 3, y-170, 180, line_height, "Exp Totale")
#~         change_color(normal_color)
#~         draw_text((window_width - 24) / 1.7, y-155, 180, line_height, s1, 2)
#~         draw_text((window_width - 24) / 1.7, y-120, 180, line_height, s2, 2)
      end
  #--------------------------------------------------------------------------
  # * Draw Equipment
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    @actor.equips.each_with_index do |item, i|
      draw_item_name(item, x, y + line_height * i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Description
  #--------------------------------------------------------------------------
  def draw_description(x, y)
    draw_text_ex(x, y, @actor.description)
  end
 
  if DPB::PSS_SA::SHOW_ELE_ROW_2
  #--------------------------------------------------------------------------
  # draw_elements
  #--------------------------------------------------------------------------
  def draw_elements
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
      draw_element_info(ele_id, 12, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_elements_row2
  #--------------------------------------------------------------------------
  def draw_elements_row2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
      draw_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_elements
  #--------------------------------------------------------------------------
  def draw_atk_elements
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
      draw_atk_element_info(ele_id, 12, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_elements_row2
  #--------------------------------------------------------------------------
  def draw_atk_elements_row2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
      draw_atk_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_states
  #--------------------------------------------------------------------------
  def draw_states
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
    draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
    for state_id in DPB::PSS_SA::STATES_ROW_1
      draw_state_info(state_id, (window_width - 0) / 4 * 2, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_states_row_2
  #--------------------------------------------------------------------------
  def draw_states_row_2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for state_id in DPB::PSS_SA::STATES_ROW_2
      draw_state_info(state_id, (window_width - 12) / 4 * 3, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_states
  #--------------------------------------------------------------------------
  def draw_atk_states
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
    draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
    for state_id in DPB::PSS_SA::STATES_ROW_1
      draw_atk_state_info(state_id, (window_width - 0) / 4 * 2, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_states_row_2
  #--------------------------------------------------------------------------
  def draw_atk_states_row_2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for state_id in DPB::PSS_SA::STATES_ROW_2
      draw_atk_state_info(state_id, (window_width - 12) / 4 * 3, dy)
      dx = dx == 1 ? contents.width / 4 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_element_info
  #--------------------------------------------------------------------------
  def draw_element_info(ele_id, dx, dy)
    dw = (contents.width - 24) / 4.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon(Icon.element(ele_id), dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_atk_element_info
  #--------------------------------------------------------------------------
  def draw_atk_element_info(ele_id, dx, dy)
    dw = (contents.width - 24) / 4.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon(Icon.element(ele_id), dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_state_info
  #--------------------------------------------------------------------------
  def draw_state_info(state_id, dx, dy)
    dw = (contents.width - 24) / 10.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon($data_states[state_id].icon_index, dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_atk_state_info
  #--------------------------------------------------------------------------
  def draw_atk_state_info(state_id, dx, dy)
    dw = (contents.width - 24) / 4.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon($data_states[state_id].icon_index, dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
 
else
  #--------------------------------------------------------------------------
  # draw_elements
  #--------------------------------------------------------------------------
#~   def draw_elements
#~     dx = 0; dy = 130
#~     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~     for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
#~       draw_element_info(ele_id, 12, dy)
#~       dx = dx == 1 ? contents.width / 3 : 0
#~       dy += dx == 0 ? line_height : 0
#~     end
#~   end
  def draw_elements
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
      draw_element_info(ele_id, (window_width - 12) / 3 * 2, dy)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_elements
  #--------------------------------------------------------------------------
  def draw_atk_elements
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
      draw_atk_element_info(ele_id, 12, dy)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_states
  #--------------------------------------------------------------------------
  def draw_states
    dx = 100; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
#~     draw_text((window_width - 24) / 2 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
#~     draw_text((window_width - 24) / 2 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
draw_text(x + 405, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
draw_text(x + 405, line_height * 11.3, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
    contents.font.size = 16
    for state_id in DPB::PSS_SA::STATES_ROW_1
      draw_state_info(state_id, (window_width - 12) / 3 * 2, dy + 160)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_states_row_2
  #--------------------------------------------------------------------------
  def draw_states_row_2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for state_id in DPB::PSS_SA::STATES_ROW_2
      draw_state_info(state_id, (window_width - 12) / 3 * 2, dy)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_states
  #--------------------------------------------------------------------------
  def draw_atk_states
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
    draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
    contents.font.size = 16
    for state_id in DPB::PSS_SA::STATES_ROW_1
      draw_atk_state_info(state_id, (window_width - 0) / 3 * 1, dy)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_atk_states_row_2
  #--------------------------------------------------------------------------
  def draw_atk_states_row_2
    dx = 0; dy = 130
    contents.font.size = DPB::PSS_SA::PROPFONTSIZE
    for state_id in DPB::PSS_SA::STATES_ROW_2
      draw_atk_state_info(state_id, (window_width - 12) / 3 * 2, dy)
      dx = dx == 1 ? contents.width / 3 : 0
      dy += dx == 0 ? line_height : 0
    end
  end
  #--------------------------------------------------------------------------
  # draw_element_info
  #--------------------------------------------------------------------------
  def draw_element_info(ele_id, dx, dy)
    dw = (contents.width - 24) / 3.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon(Icon.element(ele_id), dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_atk_element_info
  #--------------------------------------------------------------------------
  def draw_atk_element_info(ele_id, dx, dy)
    dw = (contents.width - 24) / 3.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon(Icon.element(ele_id), dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_state_info
  #--------------------------------------------------------------------------
  def draw_state_info(state_id, dx, dy)
    dw = (contents.width - 24) / 3.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon($data_states[state_id].icon_index, dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  #--------------------------------------------------------------------------
  # draw_atk_state_info
  #--------------------------------------------------------------------------
  def draw_atk_state_info(state_id, dx, dy)
    dw = (contents.width - 24) / 3.2
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
    contents.fill_rect(rect, colour)
    draw_icon($data_states[state_id].icon_index, dx, dy)
    change_color(system_color)
    draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
    change_color(normal_color)
    text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
end

  #--------------------------------------------------------------------------
  # * Draw Parameters
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
        6.times {|i| draw_actor_param(@actor, x, y + 7 + line_height * i, i + 2) }
      end  
if DPB::PSS_SA::DRAW_ALL_COLUMNS      
  #--------------------------------------------------------------------------
  # draw_parameter_graph
  #--------------------------------------------------------------------------
  def draw_parameter_graph
    dy = line_height * 3/2
    maximum = 1
    minimum = @actor.param_max(2)
    for i in 2..7
      maximum = [@actor.param(i), maximum].max
      minimum = [@actor.param(i), minimum].min
    end
    maximum += minimum * 0.33 unless maximum == minimum
    for i in 2..7
      rate = calculate_rate(maximum, minimum, i)
      dy = line_height * i - line_height/2
      draw_param_gauge(i, dy, rate)
      self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
      change_color(system_color)
      draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
      dw = (contents.width - 48) * rate - 8
      change_color(normal_color)
      draw_text((window_width - 24) / 4 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
    end
  end
else
  #--------------------------------------------------------------------------
  # draw_parameter_graph
  #--------------------------------------------------------------------------
  def draw_parameter_graph
    dy = line_height * 3/2
    maximum = 1
    minimum = @actor.param_max(2)
    for i in 2..7
      maximum = [@actor.param(i), maximum].max
      minimum = [@actor.param(i), minimum].min
    end
    maximum += minimum * 0.33 unless maximum == minimum
    for i in 2..7
      rate = calculate_rate(maximum, minimum, i)
      dy = line_height * i - line_height/2
      draw_param_gauge(i, dy, rate)
      self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
      change_color(system_color)
      draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
      dw = (contents.width - 48) * rate - 8
      change_color(normal_color)
      draw_text((window_width - 60) / 3 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
    end
  end
end
  #--------------------------------------------------------------------------
  # calculate_rate
  #--------------------------------------------------------------------------
  def calculate_rate(maximum, minimum, param_id)
    return 1.0 if maximum == minimum
    rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
    rate *= 0.67
    rate += 0.33
    return rate
  end
 
  if DPB::PSS_SA::DRAW_ALL_COLUMNS
  #--------------------------------------------------------------------------
  # draw_param_gauge
  #--------------------------------------------------------------------------
  def draw_param_gauge(param_id, dy, rate)
    dw = (window_width - 24) / 4 - 12
    colour1 = param_gauge1(param_id)
    colour2 = param_gauge2(param_id)
    draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  end
else
  #--------------------------------------------------------------------------
  # draw_param_gauge
  #--------------------------------------------------------------------------
  def draw_param_gauge(param_id, dy, rate)
    dw = (window_width - 24) / 3 - 24
    colour1 = param_gauge1(param_id)
    colour2 = param_gauge2(param_id)
    draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  end
end
  #--------------------------------------------------------------------------
  # param_gauge1
  #--------------------------------------------------------------------------
  def param_gauge1(param_id)
    return DPB::PSS_SA::PARAM_COLOUR[param_id][1]
  end
  #--------------------------------------------------------------------------
  # param_gauge2
  #--------------------------------------------------------------------------
  def param_gauge2(param_id)
    return DPB::PSS_SA::PARAM_COLOUR[param_id][2]
  end
 
    if DPB::PSS_SA::DRAW_ALL_COLUMNS
  #--------------------------------------------------------------------------
  # draw_properties_column1
  #--------------------------------------------------------------------------
  def draw_properties_column1
    dx = 5 + (window_width - 24) / 4
    dw = (window_width - 24) / 3.6 - 24
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_COLUMN1
      dy = draw_property(property, dx, dy, dw)
    end
  end
  #--------------------------------------------------------------------------
  # draw_properties_column2
  #--------------------------------------------------------------------------
  def draw_properties_column2
    dx = 5 + (window_width - 24) / 2
    dw = (window_width - 24) / 3.6 - 24
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_COLUMN2
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column3
  #--------------------------------------------------------------------------
  def draw_properties_column3
    dx = 5 + (window_width - 24) / 2 + (window_width / 4.15)    
    dw = (window_width - 24) / 3.6 - 24
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_COLUMN3
      dy = draw_property(property, dx, dy, dw)
    end
  end
  #--------------------------------------------------------------------------
  # draw_properties_column4
  #--------------------------------------------------------------------------
  def draw_properties_paramcolumn
    dx = 5
    dw = (window_width - 24) / 3.6 - 24
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
      dy = draw_property(property, dx, dy, dw)
    end
  end
else

  #--------------------------------------------------------------------------
  # draw_properties_column1
  #--------------------------------------------------------------------------
  def draw_properties_column1
    dx = 5 + (window_width - 24) / 3
    dw = (window_width - 24) / 3 - 12
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_COLUMN1
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column2
  #--------------------------------------------------------------------------
  def draw_properties_column2
    dx = 5 + (window_width - 24) / 3 * 2
    dw = (window_width - 24) / 3 - 12
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_COLUMN2
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column4
  #--------------------------------------------------------------------------
  def draw_properties_paramcolumn
    dx = 5
    dw = (window_width - 24) / 3 - 12
    dy = 130
    for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
      dy = draw_property(property, dx, dy, dw)
    end
  end
end

  if DPB::PSS_SA::PROPERTIES_BIGGER_NUMBERS
  #--------------------------------------------------------------------------
  # draw_property
  #--------------------------------------------------------------------------
  def draw_property(property, dx, dy, dw)
    fmt = "%1.2f%%"
    dpb = "%1.0f"
    case property[0]
    #---
    when :mhp
       value = sprintf(dpb, @actor.mhp)
    when :mmp
       value = sprintf(dpb, @actor.mmp)
    when :atk
       value = sprintf(dpb, @actor.atk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)   
    when :def
       value = sprintf(dpb, @actor.def * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
    when :mat
       value = sprintf(dpb, @actor.mat * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
    when :mdf
       value = sprintf(dpb, @actor.mdf * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
    when :agi
       value = sprintf(dpb, @actor.agi * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
    when :luk
       value = sprintf(dpb, @actor.luk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
    when :vit_pts
      value = sprintf(dpb, @actor.vit_pts)
    when :str_pts
      value = sprintf(dpb, @actor.str_pts)
    when :dex_pts
      value = sprintf(dpb, @actor.dex_pts)
    when :mag_pts
      value = sprintf(dpb, @actor.mag_pts)
    when :hit
      value = sprintf(dpb, @actor.hit * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)    
    when :eva
      value = sprintf(dpb, @actor.eva * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
    when :cri
      value = sprintf(fmt, @actor.cri * 100)
    when :cev
      value = sprintf(dpb, @actor.cev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
    when :mev
      value = sprintf(dpb, @actor.mev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
    when :mrf
      value = sprintf(fmt, @actor.mrf * 100)
    when :cnt
      value = sprintf(fmt, @actor.cnt * 100)
    when :hrg
      value = sprintf(fmt, @actor.hrg * 100)
    when :mrg
      value = sprintf(fmt, @actor.mrg * 100)
    when :trg
      value = sprintf(fmt, @actor.trg * 100)
    when :tgr
      value = sprintf(fmt, @actor.tgr * 100)
    when :grd
      value = sprintf(fmt, @actor.grd * 100)
    when :rec
      value = sprintf(fmt, @actor.rec * 100)
    when :pha
      value = sprintf(fmt, @actor.pha * 100)
    when :mcr
      value = sprintf(fmt, @actor.mcr * 100)
    when :tcr
      value = sprintf(fmt, @actor.tcr * 100)
    when :pdr
      value = sprintf(fmt, @actor.pdr * 100)
    when :mdr
      value = sprintf(fmt, @actor.mdr * 100)
    when :fdr
      value = sprintf(fmt, @actor.fdr * 100)
    when :exr
      value = sprintf(fmt, @actor.exr * 100)
    when :hcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.hcr * 100)
    when :tcr_y
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.tcr_y * 100)
    when :gcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.gcr * 100)
    when :cdr
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.cdr * 100)
    when :wur
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.wur * 100)
    #---
    else; return dy
    end
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, value, 2)
    return dy + line_height
  end
else
  #--------------------------------------------------------------------------
  # draw_property
  #--------------------------------------------------------------------------
  def draw_property(property, dx, dy, dw)
    fmt = "%1.2f%%"
    dpb = "%1.0f"
    case property[0]
    #---
    when :mhp
       value = sprintf(dpb, @actor.mhp)
    when :mmp
       value = sprintf(dpb, @actor.mmp)
    when :atk
       value = sprintf(dpb, @actor.atk)   
    when :def
       value = sprintf(dpb, @actor.def)
    when :mat
       value = sprintf(dpb, @actor.mat)
    when :mdf
       value = sprintf(dpb, @actor.mdf)
    when :agi
       value = sprintf(dpb, @actor.agi)
    when :luk
       value = sprintf(dpb, @actor.luk)
    when :vit_pts
      value = sprintf(dpb, @actor.vit_pts)
    when :str_pts
      value = sprintf(dpb, @actor.str_pts)
    when :dex_pts
      value = sprintf(dpb, @actor.dex_pts)
    when :mag_pts
      value = sprintf(dpb, @actor.mag_pts)       
    when :hit
      value = sprintf(fmt, @actor.hit * 100)
    when :eva
      value = sprintf(fmt, @actor.eva * 100)
    when :cri
      value = sprintf(fmt, @actor.cri * 100)
    when :cev
      value = sprintf(fmt, @actor.cev * 100)
    when :mev
      value = sprintf(fmt, @actor.mev * 100)
    when :mrf
      value = sprintf(fmt, @actor.mrf * 100)
    when :cnt
      value = sprintf(fmt, @actor.cnt * 100)
    when :hrg
      value = sprintf(fmt, @actor.hrg * 100)
    when :mrg
      value = sprintf(fmt, @actor.mrg * 100)
    when :trg
      value = sprintf(fmt, @actor.trg * 100)
    when :tgr
      value = sprintf(fmt, @actor.tgr * 100)
    when :grd
      value = sprintf(fmt, @actor.grd * 100)
    when :rec
      value = sprintf(fmt, @actor.rec * 100)
    when :pha
      value = sprintf(fmt, @actor.pha * 100)
    when :mcr
      value = sprintf(fmt, @actor.mcr * 100)
    when :tcr
      value = sprintf(fmt, @actor.tcr * 100)
    when :pdr
      value = sprintf(fmt, @actor.pdr * 100)
    when :mdr
      value = sprintf(fmt, @actor.mdr * 100)
    when :fdr
      value = sprintf(fmt, @actor.fdr * 100)
    when :exr
      value = sprintf(fmt, @actor.exr * 100)
    when :hcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.hcr * 100)
    when :tcr_y
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.tcr_y * 100)
    when :gcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.gcr * 100)
    when :cdr
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.cdr * 100)
    when :wur
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.wur * 100)
    #---
    else; return dy
    end
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, value, 2)
    return dy + line_height
  end
end
  #--------------------------------------------------------------------------
  # window width
  #--------------------------------------------------------------------------
def window_width
  Graphics.width - 0
 end
  #--------------------------------------------------------------------------
  # window height
  #--------------------------------------------------------------------------
def window_height
  Graphics.height - 0
 end
end #WindowStatusItem

#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
#  This class performs the status screen processing.
#==============================================================================
class Scene_Status < Scene_MenuBase
  #--------------------------------------------------------------------------
  # start
  #--------------------------------------------------------------------------
  def start
    super
    create_status_window
    create_command_window
    create_item_window
  end
 
  #--------------------------------------------------------------------------
  # create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
    wy = 0
    @command_window = Window_StatusCommand.new(0, wy)
    @command_window.viewport = @viewport
    @command_window.actor = @actor
    @command_window.help_window = @help_window
    @command_window.set_handler(:cancel,   method(:return_scene))
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,   method(:prev_actor))
  end
  #--------------------------------------------------------------------------
  # create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wy = 0
  end
  #--------------------------------------------------------------------------
  # create_item_window
  #--------------------------------------------------------------------------
  def create_item_window
    dy = 0
    @item_window = Window_StatusItem.new(0, dy, @command_window)
    @item_window.viewport = @viewport
    @item_window.actor = @actor
    @command_window.item_window = @item_window
  end
  #--------------------------------------------------------------------------
  # on_actor_change
  #--------------------------------------------------------------------------
  def on_actor_change
    @command_window.actor = @actor
    @item_window.actor = @actor
    @command_window.activate
  end  
end # Scene_Status
#===============================================================================#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#                                                                               #
#                                   PSS_SA                                      #
#                           (Perfect Status Screen)                             #
#                                - SCRIPT END -                                 #
#                                                                               #
#                                                                               #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
#===============================================================================#
#                           - DekitaRPG@gmail.com -                             #
#===============================================================================#

 

 

Edited by pinka

Share this post


Link to post
Share on other sites

The script doesn't seem to be working for me :P

 

Where did you put the scriplet, above or below the status screen?

Maybe if you try it the other position it might work

 

EDIT: I get what you mean now, he/she set it up so that you can rename the stats then and there.

Sorry, i have no idea how to fix that =/

Edited by Ventwig

Share this post


Link to post
Share on other sites

Oh sorry for not answering!

Well, i cant do that right now, but you could try searching for a "def draw_actor_mp"

somewhere in one of those scripts. If it's there, try replacing it with mine

Share this post


Link to post
Share on other sites

In Yanfly's script there isn't a draw_actor_mp method. Because MP are included in the parameters.

 

 

#==============================================================================
# â–  Window_EquipStatus
#==============================================================================

class Window_EquipStatus < Window_Base
  
  #--------------------------------------------------------------------------
  # overwrite method: initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy, window_width, Graphics.height - dy)
    @actor = nil
    @temp_actor = nil
    refresh
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: window_width
  #--------------------------------------------------------------------------
  def window_width; return Graphics.width * 2 / 5; end
  
  #--------------------------------------------------------------------------
  # overwrite method: refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    8.times {|i| draw_item(0, line_height * i, i) }
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(dx, dy, param_id)
    draw_background_colour(dx, dy)
    draw_param_name(dx + 4, dy, param_id)
    draw_current_param(dx + 4, dy, param_id) if @actor
    drx = (contents.width + 22) / 2
    draw_right_arrow(drx, dy)
    draw_new_param(drx + 22, dy, param_id) if @temp_actor
    reset_font_settings
  end
  
  #--------------------------------------------------------------------------
  # new method: draw_background_colour
  #--------------------------------------------------------------------------
  def draw_background_colour(dx, dy)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)
    contents.fill_rect(rect, colour)
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: draw_param_name
  #--------------------------------------------------------------------------
  def draw_param_name(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    change_color(system_color)
    draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: draw_current_param
  #--------------------------------------------------------------------------
  def draw_current_param(dx, dy, param_id)
    change_color(normal_color)
    dw = (contents.width + 22) / 2
    draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)
    reset_font_settings
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: draw_new_param
  #--------------------------------------------------------------------------
  def draw_new_param(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    new_value = @temp_actor.param(param_id)
    change_color(param_change_color(new_value - @actor.param(param_id)))
    draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
    reset_font_settings
  end
  
end # Window_EquipStatus

 

 

This is actually the part of his script which shows the box with the current parameters and the new parameters.

I think the part to modify it's here, although I'm not sure how to achieve this.

Can anyone help out?

Share this post


Link to post
Share on other sites

hmmm try this. I don't know if it'll work...

#--------------------------------------------------------------------------
# overwrite method: draw_param_name
#--------------------------------------------------------------------------
def draw_param_name(dx, dy, param_id)
contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
change_color(system_color)
if param_id == 1
if actor.id == 1
draw_text(dx, dy, contents.width, line_height, "Mana")
elsif actor.id == 2
draw_text(dx, dy, contents.width, line_height, "Ki")
elsif actor.id == 3
draw_text(dx, dy, contents.width, line_height, "Rage")
elsif actor.id == 4
draw_text(dx, dy, contents.width, line_height, "Chain")
else
draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
end
end

The just configure it from there?

Sorry about the spacing, when i was trying to space it with the spacebar, it triple posted (sorry about that)

I'm not exactly sure if this works.

If it replaces HP (which i dont think will happen but might) change the param_id to 2.

Edited by Ventwig

Share this post


Link to post
Share on other sites

How exactly? I get undefined method 'actor' when writing it like this:

 

 

    #--------------------------------------------------------------------------
    # overwrite method: draw_param_name
    #--------------------------------------------------------------------------
    def draw_param_name(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    change_color(system_color)
    if param_id == 1
    if @actor.actor.id == 1
      draw_text(dx, dy, contents.width, line_height, "Mana")
    elsif @actor.actor.id == 2
     draw_text(dx, dy, contents.width, line_height, "Ki")
    elsif @actor.actor.id == 3
     draw_text(dx, dy, contents.width, line_height, "Rage")
    elsif @actor.actor.id == 4
     draw_text(dx, dy, contents.width, line_height, "Chain")
    else
     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
    end
  end
end

 

 

 

EDIT: I tried with @actor_id and I finally get no error, but it only shows the MP vocab set in the database and no other parameter. If I change

if param_id == 1

to 2 instead of 1, i get this: http://img832.imageshack.us/img832/4483/imagehcg.jpg

Edited by pinka

Share this post


Link to post
Share on other sites

oh! error in the coooode!

now try it both ways!

    #--------------------------------------------------------------------------
    # overwrite method: draw_param_name
    #--------------------------------------------------------------------------
    def draw_param_name(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    change_color(system_color)
    if param_id == 1
    if @actor.actor.id == 1
      draw_text(dx, dy, contents.width, line_height, "Mana")
    elsif @actor.actor.id == 2
     draw_text(dx, dy, contents.width, line_height, "Ki")
    elsif @actor.actor.id == 3
     draw_text(dx, dy, contents.width, line_height, "Rage")
    elsif @actor.actor.id == 4
     draw_text(dx, dy, contents.width, line_height, "Chain")
    end
    else
     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
    end
  end
end

(There might be an extra end in the bottom...if it says so, just take out that last one from this script part

Share this post


Link to post
Share on other sites

oh! error in the coooode!

now try it both ways!

    #--------------------------------------------------------------------------
    # overwrite method: draw_param_name
    #--------------------------------------------------------------------------
    def draw_param_name(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    change_color(system_color)
    if param_id == 1
    if @actor.actor.id == 1
      draw_text(dx, dy, contents.width, line_height, "Mana")
    elsif @actor.actor.id == 2
     draw_text(dx, dy, contents.width, line_height, "Ki")
    elsif @actor.actor.id == 3
     draw_text(dx, dy, contents.width, line_height, "Rage")
    elsif @actor.actor.id == 4
     draw_text(dx, dy, contents.width, line_height, "Chain")
    end
    else
     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
    end
  end
end

(There might be an extra end in the bottom...if it says so, just take out that last one from this script part

i guess that's might be wrong. since the structure is like this:

if parameter is mp

  if certain id met then print custom

  no else so it will do nothing if certain id not met means all other actor beside 1-4 will not printed #<<< here's the problem

else

  print default vocab

end

 

let me fix that for you...

 


  def draw_param_name(dx, dy, param_id)

     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE

     change_color(system_color)

     if param_id == 1

        case @actor.actor.id

        when 1

          draw_text(dx, dy, contents.width, line_height, "Mana")

        when 2

          draw_text(dx, dy, contents.width, line_height, "Ki")

        when 3

          draw_text(dx, dy, contents.width, line_height, "Rage")

        when 4

          draw_text(dx, dy, contents.width, line_height, "Chain")

        else

          draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))

        end #end case

      else

        draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))

      end #endif

  end #end def

Share this post


Link to post
Share on other sites

I had to change @actor.actor.id with @actor_id so it doesn't pop up any error. But this doesn't work yet. It now shows all the parameters but the mp vocab doesn't change.

Someone suggested me that there should be a way for it to know which actor you're corrently looking at, which is an information you can get from the scene itself, then use it in the window class.

Share this post


Link to post
Share on other sites

hmm i guess yanfly do some parameter drawing before the @actor set.

i try using puts to print @actor and when i open equip menu. it shows nil for 6-7 times before showing game actor object.

so i'm guessing that he do call that method once before the @actor is set.

try this instead then:


  def draw_param_name(dx, dy, param_id)     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE     change_color(system_color)     return draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id)) if !@actor      if param_id == 1            case @actor.actor.id        when 1          draw_text(dx, dy, contents.width, line_height, "Mana")        when 2          draw_text(dx, dy, contents.width, line_height, "Ki")        when 3          draw_text(dx, dy, contents.width, line_height, "Rage")        when 4          draw_text(dx, dy, contents.width, line_height, "Chain")        else          draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))        end #end case      else        draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))      end #endif  end #end def

 

i add return default vocab if the @actor is nil. try that and tell me it works or not.

Edited by estriole

Share this post


Link to post
Share on other sites

Now, if you enter the scene by choosing an actor in the main menu, the mp vocab doesn't change. But if you press change, optimize or remove all, it updates with the correct mp vocab for each actor.

Still, if you use Q and W buttons to switch actors, it doesn't update the mp vocab.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted