#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# $game_actors[x].description = string
# Changes the biography description for actor x to that of the string. Use \n
# to designate linebreaks in the string. If you wish to use text codes, write
# them in the strings as \\n[2] or \\c[3] to make them work properly.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
module YEA
module PARAMETERS
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - 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.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PROPERTIES_FONT_SIZE = 16 # Font size used for properties.
# These are the properties that appear in column 1.
PROPERTIES_COLUMN1 =[
[:hit, "Hit Rate"],
[:eva, "Evasion"],
[:cri, "Critical Hit"],
[:cev, "Critical Evade"],
[:mev, "Magic Evasion"],
[:mrf, "Magic Reflect"],
[:cnt, "Counter Rate"],
[:tgr, "Target Rate"],
] # Do not remove this.
# These are the properties that appear in column 2.
PROPERTIES_COLUMN2 =[
[:hrg, "HP Regen"],
[:mrg, "MP Regen"],
[:trg, "TP Regen"],
[:rec, "Recovery"],
[:grd, "Guard Rate"],
[:pha, "Item Boost"],
[:exr, "EXP Rate"],
[:tcr, "TP Charge"],
] # Do not remove this.
# These are the properties that appear in column 3.
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.
end # PARAMETERS
end # YEA
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# new method: description=
#--------------------------------------------------------------------------
def description=(text)
@description = text
end
#--------------------------------------------------------------------------
# overwrite method: description
#--------------------------------------------------------------------------
def description
return @description unless @description.nil?
return actor.description
end
end # Game_Actor
#==============================================================================
# ■ Window_StatusActor
#==============================================================================
class Window_StatusActor < Window_Base
#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
def initialize(dx, dy)
super(dx, dy, window_width, fitting_height(4))
@actor = nil
end
#--------------------------------------------------------------------------
# window_width
#--------------------------------------------------------------------------
def window_width; return Graphics.width; end
#--------------------------------------------------------------------------
# actor=
#--------------------------------------------------------------------------
def actor=(actor)
return if @actor == actor
@actor = actor
end
#--------------------------------------------------------------------------
# actor=
#--------------------------------------------------------------------------
def help_window=(window)
@help_window = window
refresh
end
#--------------------------------------------------------------------------
# refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
return unless @actor
draw_actor_face(@actor, 0, 0)
draw_actor_simple_status(@actor, 108, line_height / 2)
@help_window.set_text(@actor.actor.description)
end
end # Window_StatusActor
#==============================================================================
# ■ Window_StatusItem
#==============================================================================
class Window_StatusItem < Window_Selectable
#--------------------------------------------------------------------------
# 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_properties_list
end
#--------------------------------------------------------------------------
# draw_properties_list
#--------------------------------------------------------------------------
def draw_properties_list
contents.font.size = YEA::PARAMETERS::PROPERTIES_FONT_SIZE
draw_properties_column1
draw_properties_column2
draw_properties_column3
reset_font_settings
end
#--------------------------------------------------------------------------
# draw_properties_column1
#--------------------------------------------------------------------------
def draw_properties_column1
dx = 24
dw = (contents.width - 24) / 3 - 24
dy = 0
for property in YEA::PARAMETERS::PROPERTIES_COLUMN1
dy = draw_property(property, dx, dy, dw)
end
end
#--------------------------------------------------------------------------
# draw_properties_column2
#--------------------------------------------------------------------------
def draw_properties_column2
dx = 24 + (contents.width - 24) / 3
dw = (contents.width - 24) / 3 - 24
dy = 0
for property in YEA::PARAMETERS::PROPERTIES_COLUMN2
dy = draw_property(property, dx, dy, dw)
end
end
#--------------------------------------------------------------------------
# draw_properties_column3
#--------------------------------------------------------------------------
def draw_properties_column3
dx = 24 + (contents.width - 24) / 3 * 2
dw = (contents.width - 24) / 3 - 24
dy = 0
for property in YEA::PARAMETERS::PROPERTIES_COLUMN3
dy = draw_property(property, dx, dy, dw)
end
end
#--------------------------------------------------------------------------
# draw_property
#--------------------------------------------------------------------------
def draw_property(property, dx, dy, dw)
fmt = "%1.2f%%"
case property[0]
#---
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_StatusItem
#==============================================================================
# ■ Scene_Status
#==============================================================================
class Scene_Parameters < Scene_MenuBase
#--------------------------------------------------------------------------
# start
#--------------------------------------------------------------------------
def start
super
create_help_window
create_status_window
create_item_window
relocate_windows
end
#--------------------------------------------------------------------------
# create_status_window
#--------------------------------------------------------------------------
def create_status_window
wy = @help_window.height
@status_window = Window_StatusActor.new(0, wy)
@status_window.viewport = @viewport
@status_window.actor = @actor
@status_window.help_window = @help_window
end
#--------------------------------------------------------------------------
# create_item_window
#--------------------------------------------------------------------------
def create_item_window
dy = @status_window.y + @status_window.height
@item_window = Window_StatusItem.new(0, dy, @status_window)
@item_window.viewport = @viewport
@item_window.actor = @actor
@item_window.set_handler(:pagedown, method(:next_actor))
@item_window.set_handler(:pageup, method(:prev_actor))
@item_window.set_handler(:cancel, method(:return_scene))
@item_window.activate
end
#--------------------------------------------------------------------------
# relocate_windows
#--------------------------------------------------------------------------
def relocate_windows
return unless $imported["YEA-AceMenuEngine"]
case Menu.help_window_location
when 0 # Top
@help_window.y = 0
@status_window.y = @help_window.height
@item_window.y = @status_window.y + @status_window.height
when 1 # Middle
@status_window.y = 0
@help_window.y = @status_window.height
@item_window.y = @help_window.y + @help_window.height
else # Bottom
@status_window.y = 0
@item_window.y = @status_window.height
@help_window.y = @item_window.y + @item_window.height
end
@status_window.y = @status_window.y
end
#--------------------------------------------------------------------------
# on_actor_change
#--------------------------------------------------------------------------
def on_actor_change
@status_window.actor = @actor
@item_window.actor = @actor
@status_window.refresh
@item_window.refresh
@item_window.activate
end
end # Scene_Parameters