MisterSaturn
Member
Well I have this battle message system script created by RM2000, I couldn't find his name in the members list otherwise I would have just PM'd him with this question. But by looking at this script, does anyone know how I can get the battle message's on the top of the screen instead of the bottom? Because the topic where I got this script from (cant find it now) showed the screenshots with the message's on the top and for some reason it was on the bottom when I used it.
Here is a screenshot of how it is now.
Here is the script.
Here is a screenshot of how it is now.
http://img249.imageshack.us/img249/5946/battlemessage8qr.png[/IMG]you can see the message on the bottom is interfering with the HP numbers in the scrolling HP meter script im using. So thats why I need it on the top.
Code:
#==============================================================================
# Battle Message --- RM2000
#------------------------------------------------------------------------------
# RM2000
# class Scene_Battle : text_hash, add_text, check_states, set_text
# class Spriteset_Battle : actor_sprites(attr_accessor)
#------------------------------------------------------------------------------
# ver 2.05 05/11/01 by Hako (http://aea.to/hako/)
# Tranlated and edited by Lockheart.
#==============================================================================
class Window_BattleMessage < Window_Base
#--------------------------------------------------------------------------
# â— Main Set up
#--------------------------------------------------------------------------
# Maxium number of lines (1..4)
WBM200_MAX_LINE = 4
# The width of the window
WBM200_WIDTH = 640
# The height of the window (0:自動調整)
WBM200_HEIGHT = 0
# Windows X and width
WBM200_X = (640 - WBM200_WIDTH) / 2 # ç”»é¢ã®ä¸å¿ƒã¸
# Windows Y axis
WBM200_Y = 0
# Windows pixel(0..10)
WBM200_LINE_SPACE = 3
# Border opactity (0..255)
WBM200_OPACITY = 255
# Back opactity (0..255)
WBM200_BACK_OPACITY = 255
# Font used and size.
WBM200_TEXT_FONT = Font.new("Orange Kid", 22)
# Font color
WBM200_TEXT_FONT.color = Color.new(255, 255, 255)
# Shadowed text, true or false.
WBM200_TEXT_SHADOW = true
end
class Scene_Battle
#--------------------------------------------------------------------------
# â— Set up
#--------------------------------------------------------------------------
# Show party battlers?
WBM200_ACTOR_VISIBLE = false
# Show animation over actor battlers?
WBM200_ACTOR_ANIMATION = true
# Show the damage appearing over the battlers?
WBM200_DAMAGE_POP = false
# Timer for how long the text remains on screen, in frames.
WBM200_TEXT_WAIT = 30
#--------------------------------------------------------------------------
# â— Has lines
#--------------------------------------------------------------------------
def text_hash
@wbm_set1 = {
# Do not modify this line
"**no" => "",
#--------------------------------------------------
# Base Text
#--------------------------------------------------
# Text shown when an enemy appears
"**start" => " wants to fight!",
# Victory text
"**win" => "You Win!",
# Successful escape
"**escape" => "Tried to get away, and did.",
# Failed Escape
"**no_escape" => "Tried to get away, but couldn't.",
#--------------------------------------------------
# These words go at the end of the lines, be sure to set them up correctly
# or else you'll end up with words like, ghost caused 100 attacks or something.
#--------------------------------------------------
# When an attack is made
"**attack" => " attacks",
# Actors Critical word
"**actor_critical" => " SMAAAAASH!",
# Enemys Critical word
"**enemy_critical" => " SMAAAAASH!",
# Actor/Enemy guarding text
"**guard" => " guards",
# Text for when an enemy flees
"**enemy_action1" => " fled",
# Text used for the 'do nothing' command, this could be, 'stands around'
# 'watchs the party', etc, etc,
"**enemy_action2" => " does nothing",
# Skill usage(For physical skills F >= 1)
"**skill1" => "!",
# Skill usage(For magical skills F == 0)
"**skill2" => "!",
# Item usage
"**item" => "!",
#--------------------------------------------------
# These words go at the end of the lines, be sure to set them up correctly
# or else you'll end up with words like, ghost caused HP 100 attacks or something
#--------------------------------------------------
# Enemy attack damage text
"**enemy_damage" => " Hp",
# Damage, no hit. failed hit text for enemy
"**enemy_no_damage" => " wasn't harmed",
# Actor attack damage text
"**actor_damage" => " Hp",
# Damage, no hit. failed hit text for actor
"**actor_no_damage" => " wasn't harmed",
# Damage, no hit. failed hit text
"**no_damage1" => " wasn't harmed",
# Miss
"**miss" => " dodged the attack.",
# Recovery text for healing HP and SP
"**cure" => "!",
# SP damage text
"**damage_sp" => " lost",
# Stats up text
"**up" => " Increased!",
# Stats down text
"**down" => " Decreased!"
}
#--------------------------------------------------
# Skill casting text
# * This area allows you to give custom text for skills and spells
# * Fro example, casting Heal would cause the text, Heal was used to recover the party.
# * If not spell/skill is listed here, then the default text is used, which was filled in above.
# To set up your own skills use copy the following samples and replace the names with your own.
# You can use $data_skills[x].name in place of the actual name and it will use the name from the database
# this command can also be used within the text itself.
#--------------------------------------------------
@wbm_set1["Heal"] = ": Heal was used to recover the party."
@wbm_set1[$data_skills[2].name] = " #{$data_skills[2].name} was cast"
#--------------------------------------------------
# State text
# * To show text for the states.
# * replace Statename with the name of your state from the database
# * You can also use the line $data_states[x].name + "_0" where x is the
# number of the state in th database.
# * 0, 1, 2, 3 meanings are as follows.
#--------------------------------------------------
# Statename_0 : When used on Actor
# Statename_1 : When used on enemy
# Statename_2 : When cancelled/removed
# Statename_3 : when used on yourself
#--------------------------------------------------
@wbm_set1[$data_states[2].name + "_0"] = " was stunned"
@wbm_set1[$data_states[2].name + "_1"] = " was stunned"
@wbm_set1[$data_states[2].name + "_2"] = " is no longer stunned"
#-----------------------------------------
@wbm_set1["Knockout_0"] = " was knocked out"
@wbm_set1["Knockout_1"] = " was knocked out"
@wbm_set1["Knockout_2"] = " was revived"
@wbm_set1["Knockout_3"] = " Dies"
#-----------------------------------------
@wbm_set1["Venom_0"] = " was posioned"
@wbm_set1["Venom_1"] = " was posioned"
@wbm_set1["Venom_2"] = " is no longer poisoned"
end
#--------------------------------------------------------------------------
# â— Add blank text
#--------------------------------------------------------------------------
def add_text(set0, key)
# Blank return
if key == nil or key == []
return ""
end
# Blank
if not @wbm_set1.include?(key)
set0 = ""
key = "**no"
end
text = set0 + @wbm_set1[key]
return text
end
#---------------------------------------------------------------------------
# â— This checks the states
#---------------------------------------------------------------------------
def check_states
@states0.clear
@live.clear
@target_sp.clear
for target in @target_battlers
st = [] # If state is
target.states.each_index do |i|
st << $data_states[target.states[i]].name
end
@states0[target] = st
# If actor/enemy lives
@live[target] = (target.hp > 0)
@target_sp[target] = target.sp
end
end
#---------------------------------------------------------------------------
# â— Sets up the command lines
# command : "**attack", "**skill", "**item"
#---------------------------------------------------------------------------
def set_text(command)
if command == "**item"
@text_0 = [@active_battler.name + " uses " + @item.name]
else
@text_0 = [@active_battler.name]
end
if command == "**skill"
@text_key = [@skill.name]
# Skill casting line
if not @wbm_set1.include?(@text_key[0])
@text_0 = [@active_battler.name + " casts " + @skill.name]
# If attack power is over 1
@text_key = @skill.atk_f > 0 ? ["**skill1"] : ["**skill2"]
end
else
@text_key = [command]
end
states1 = []
states_p = []
states_m = []
for target in @target_battlers
damage = target.damage
name = target.name
index = target.index
st = []
target.states.each_index do |i|
st << $data_states[target.states[i]].name.dup
end
states1 = st
states_p = states1 - @states0[target]
states_m = @states0[target] - states1
if damage.to_s != "Miss"
# HP damage
if damage.to_i > 0
if target.critical # Critical
@critical = true # if critical set
@text_0 << ""
if @active_battler.is_a?(Game_Actor)
@text_key << "**actor_critical"
else
@text_key << "**enemy_critical"
end
end
if target.is_a?(Game_Enemy)
@text_0 << "#{name} lost #{damage}"
@text_key << "**enemy_damage"
else
@text_0 << "#{name} lost #{damage}"
@text_key << "**actor_damage"
end
# HP Recovery
elsif damage.to_i < 0 and @live[target] == true
damage *= -1
@text_0 << "#{name} Recovered #{damage} #{$data_system.words.hp}"
@text_key << "**cure"
end
sp = target.sp - @target_sp[target] # SP
# SP Damage
if sp < 0
sp *= -1
@text_0 << "#{name} lost #{sp} #{$data_system.words.sp}"
@text_key << "**damage_sp"
# SP Recovery
elsif sp > 0
@text_0 << "#{name} #{sp} #{$data_system.words.sp}"
@text_key << "**cure"
end
if command == "**item"
# Parameter Set
if @item.parameter_type > 0 and @item.parameter_points != 0
points = @item.parameter_points
case @item.parameter_type
when 1 # MaxHP
words = "" + $data_system.words.hp
when 2 # MaxSP
words = "" + $data_system.words.sp
when 3 # Str
words = $data_system.words.str
when 4 # Dex
words = $data_system.words.dex
when 5 # Agi
words = $data_system.words.agi
when 6 # Int
words = $data_system.words.int
end
if points > 0 # If points go up
@text_0 << "#{name} #{words} #{points}"
@text_key << "**up"
else # If points go down
points *= -1
@text_0 << "#{name} #{words} #{points}"
@text_key << "**down"
end
end
end
# States
if states_p != []
states_p.each_index do |i|
@text_key << "_STATES_" if damage.to_i != 0
@text_0 << name
if target.is_a?(Game_Enemy)
@text_key << states_p[i] + "_1"
else
@text_key << states_p[i] + "_0"
end
end
# States 2
elsif states_m != [] and target.hp > 0
states_m.each_index do |i|
if damage.to_i != 0 and @live[target] == true
@text_key << "_STATES_"
end
@text_0 << name
@text_key << states_m[i] + "_2"
end
# Attack zero damage
elsif damage.to_i == 0 and command == "**attack"
@text_0 << name
if target.is_a?(Game_Enemy)
@text_key << "**enemy_no_damage"
else
@text_key << "**actor_no_damage"
end
elsif damage.to_i == 0 and command == "**skill"
@text_0 << name
@text_key << "**no_damage1"
end
# Miss
else
@text_0 << name
@text_key << "**miss"
end
@text_key << "NEXT_TARGET"
end # for target
end
end
#==============================================================================
# â– Window_BattleMessage
#==============================================================================
class Window_BattleMessage < Window_Base
#--------------------------------------------------------------------------
# â— initialize
#--------------------------------------------------------------------------
def initialize
h = WBM200_HEIGHT == 0 ?
(WBM200_TEXT_FONT.size + WBM200_LINE_SPACE) * WBM200_MAX_LINE + 32 :
WBM200_HEIGHT
#super(WBM200_X, WBM200_Y, WBM200_WIDTH, h)
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = WBM200_OPACITY
self.back_opacity = WBM200_BACK_OPACITY
self.contents.font = WBM200_TEXT_FONT
self.z = 104
self.visible = false
end
#--------------------------------------------------------------------------
# â— Base of text
# text :
# line : Line (0: first row, 1: econd row, 2:third row, 3: fourth row)
# line_over : Lines going over (true: goes over, false: doesn't go over)
#--------------------------------------------------------------------------
def draw_text(text, line, line_over = false)
x = 4
y = 0
w = WBM200_WIDTH - 32
h = WBM200_TEXT_FONT.size + WBM200_LINE_SPACE
sx = sy = 2
# Max lines
if line > WBM200_MAX_LINE - 1
line = line_over ? line % WBM200_MAX_LINE : WBM200_MAX_LINE - 1
end
self.contents.clear
alpha = WBM200_TEXT_SHADOW ? 255 : 0
self.contents.font.color = Color.new(0, 0, 0, alpha)
color = WBM200_TEXT_FONT.color
case line
when 0 # Line 1
@text = [text, "", ""]
when 1 # Line 2
self.contents.draw_text(x+sx, y+sy, w, h, @text[0], 0)
self.contents.font.color = color
self.contents.draw_text(x, y, w, h, @text[0], 0)
@text[1] = text
when 2 # Line 3
self.contents.draw_text(x+sx, y+sy, w, h, @text[0], 0)
self.contents.draw_text(x+sx, y+h+sy, w, h, @text[1], 0)
self.contents.font.color = color
self.contents.draw_text(x, y, w, h, @text[0], 0)
self.contents.draw_text(x, y+h, w, h, @text[1], 0)
@text[2] = text
when 3 # Line 4
self.contents.draw_text(x+sx, y+sy, w, h, @text[0], 0)
self.contents.draw_text(x+sx, y+h+sy, w, h, @text[1], 0)
self.contents.draw_text(x+sx, y+h+h+sy, w, h, @text[2], 0)
self.contents.font.color = color
self.contents.draw_text(x, y, w, h, @text[0], 0)
self.contents.draw_text(x, y+h, w, h, @text[1], 0)
self.contents.draw_text(x, y+h+h, w, h, @text[2], 0)
end
self.contents.font.color = Color.new(0, 0, 0, alpha)
self.contents.draw_text(x + sx, line*h + sy, w, h, text, 0)
self.contents.font.color = color
self.contents.draw_text(x, line*h, w, h, text, 0)
self.visible = true
end
end
#==============================================================================
# â– Spriteset_Battle
#==============================================================================
class Spriteset_Battle
attr_accessor :actor_sprites # Sprite_Battler
end
#==============================================================================
# â– Scene_Battle 1
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# â— Main Processing
#--------------------------------------------------------------------------
alias window_battle_message_200_main main
def main
text_hash
@bwin_wbm = Window_BattleMessage.new
@critcal = false
@wbm_loop = 0
@wbm_loop1 = 0
@states0 = {}
@live = {}
@target_sp = {}
window_battle_message_200_main
@bwin_wbm.dispose
@bwin_wbm = nil
end
end
#==============================================================================
# â– Scene_Battle 2
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
alias window_battle_message_200_start_phase1 start_phase1
def start_phase1
if not WBM200_ACTOR_VISIBLE
for i in 0...$game_party.actors.size
@spriteset.actor_sprites[i].visible = false
end
end
window_battle_message_200_start_phase1
end
#--------------------------------------------------------------------------
# â— Frame Update (pre-battle phase)
#--------------------------------------------------------------------------
alias window_battle_message_200_update_phase1 update_phase1
def update_phase1
if $game_troop.enemies[@wbm_loop] != nil
unless $game_troop.enemies[@wbm_loop].hidden
text = add_text($game_troop.enemies[@wbm_loop].name, "**start")
@bwin_wbm.draw_text(text, @wbm_loop1, true)
@wbm_loop1 += 1 # Message Line +1
@wait_count = WBM200_TEXT_WAIT
end
@wbm_loop += 1 # Enemy Index +1
return
elsif @wbm_loop == $game_troop.enemies.size
@wbm_loop = @wbm_loop1 = 0
window_battle_message_200_update_phase1
end
end
#--------------------------------------------------------------------------
# â— Wait text
# Text wait before moving to next phase
#--------------------------------------------------------------------------
alias window_battle_message_200_start_phase2 start_phase2
def start_phase2
@wait_count = WBM200_TEXT_WAIT
@bwin_wbm.visible = false
window_battle_message_200_start_phase2
end
#--------------------------------------------------------------------------
# â— Escape
#--------------------------------------------------------------------------
alias window_battle_message_200_update_phase2 update_phase2
def update_phase2
# Escaping
if @success != nil
update_phase2_escape
end
window_battle_message_200_update_phase2
end
#--------------------------------------------------------------------------
# â— Frame Update (party command phase: escape)
#--------------------------------------------------------------------------
def update_phase2_escape
# Calculate enemy agility average
enemies_agi = 0
enemies_number = 0
for enemy in $game_troop.enemies
if enemy.exist?
enemies_agi += enemy.agi
enemies_number += 1
end
end
if enemies_number > 0
enemies_agi /= enemies_number
end
# Calculate actor agility average
actors_agi = 0
actors_number = 0
for actor in $game_party.actors
if actor.exist?
actors_agi += actor.agi
actors_number += 1
end
end
if actors_number > 0
actors_agi /= actors_number
end
# Determine if escape is successful
@success ||= rand(100) < 50 * actors_agi / enemies_agi
# If escape is successful
if @success
#--------------------------------------
# If successful escape
if @wbm_loop == 0
@party_command_window.active = false
@party_command_window.visible = false
text = add_text("", "**escape")
@bwin_wbm.draw_text(text, 0)
@wait_count = 20
@wbm_loop = 1
# Return call
return
end
@bwin_wbm.visible = false
#--------------------------------------
# Escaping SFX
$game_system.se_play($data_system.escape_se)
# Starts Map BGM
$game_system.bgm_play($game_temp.map_bgm)
# Ends battle
battle_end(1)
# Else
else
#--------------------------------------
# For failed escapse
@party_command_window.visible = false
text = add_text("", "**no_escape")
@bwin_wbm.draw_text(text, 0)
@text_0 = [""]
@text_key = ["**no"]
@success = nil
@wait_count = 20
#--------------------------------------
# Clearing actions
$game_party.clear_actions
# Starts Phase 4
start_phase4
end
end
#--------------------------------------------------------------------------
# â— Victory text
#--------------------------------------------------------------------------
alias window_battle_message_200_start_phase5 start_phase5
def start_phase5
# Victory text
text = add_text("", "**win")
@bwin_wbm.draw_text(text, 0)
window_battle_message_200_start_phase5
end
end
#==============================================================================
# â– Scene_Battle 4
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# â— Frame Update (main phase step 1 : action preparation)
#--------------------------------------------------------------------------
def update_phase4_step1
# Hide help window
@help_window.visible = false
# Determine win/loss
if judge
# If won, or if lost : end method
return
end
# If an action forcing battler doesn't exist
if $game_temp.forcing_battler == nil
# Set up battle event
setup_battle_event
# If battle event is running
if $game_system.battle_interpreter.running?
return
end
end
# If an action forcing battler exists
if $game_temp.forcing_battler != nil
# Add to head, or move
@action_battlers.delete($game_temp.forcing_battler)
@action_battlers.unshift($game_temp.forcing_battler)
end
# If no actionless battlers exist (all have performed an action)
if @action_battlers.size == 0
# Start party command phase
start_phase2
return
end
# Initialize animation ID and common event ID
@animation1_id = 0
@animation2_id = 0
@common_event_id = 0
# Shift from head of actionless battlers
@active_battler = @action_battlers.shift
# If already removed from battle
if @active_battler.index == nil
return
end
#------------------------------â–¼
# Active battler name
text_0 = @active_battler.name
st0 = []
st1 = []
@active_battler.states.each_index do |i|
st0 << $data_states[@active_battler.states[i]].name
end
# Slip damage
if @active_battler.hp > 0 and @active_battler.slip_damage?
for i in @active_battler.states
if $data_states[i].slip_damage
text_key = $data_states[i].name + "_3"
if @wbm_set1[text_key] != nil
text = text_0 + @wbm_set1[text_key]
@bwin_wbm.draw_text(text, 0)
@wait_count = WBM200_TEXT_WAIT
end
end
end
# Slip damage
@active_battler.slip_damage_effect
@active_battler.states.each_index do |i|
st1 << $data_states[@active_battler.states[i]].name
end
states_p = st1 - st0
# If battler dies
if @active_battler.hp <= 0
text_key = "**no"
for i in 1...$data_states.size
if $data_states[i].zero_hp
text_key = $data_states[i].name + "_0"
break
end
end
if @wbm_set1[text_key] != nil
text = text_0 + @wbm_set1[text_key]
@bwin_wbm.draw_text(text, 1)
@wait_count = WBM200_TEXT_WAIT
end
end
# If Damage pop available
if WBM200_DAMAGE_POP
@active_battler.damage_pop = true
else
@active_battler.damage_pop = false
@active_battler.damage = nil
@wait_count += WBM200_TEXT_WAIT
end
# Active battler
elsif @active_battler.hp > 0 and @active_battler.states[0] != nil
st1 = $data_states[@active_battler.states[0]].name
text_key = st1 + "_3"
if @wbm_set1[text_key] != nil
text = text_0 + @wbm_set1[text_key]
@bwin_wbm.draw_text(text, 0)
@wait_count = WBM200_TEXT_WAIT
end
end
# Natural removal of states
@active_battler.remove_states_auto
st1 = []
@active_battler.states.each_index do |i|
st1 << $data_states[@active_battler.states[i]].name
end
states_m = st0 - st1
if states_m[0] != nil and @active_battler.hp > 0
text_key = states_m[0] + "_2"
if @wbm_set1[text_key] != nil
text = text_0 + @wbm_set1[text_key]
@bwin_wbm.draw_text(text, 0)
@wait_count = WBM200_TEXT_WAIT
end
end
#------------------------------â–²
# efresh status window
@status_window.refresh
# Shift to step 2
@phase4_step = 2
end
#--------------------------------------------------------------------------
# â— Make Basic Action Results
#--------------------------------------------------------------------------
def make_basic_action_result
# If attack
if @active_battler.current_action.basic == 0
# Set anaimation ID
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
# If action battler is enemy
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3 # if attack enemy state
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2 # If attack actor state
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
end
# If action battler is actor
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
end
# Set array of targeted battlers
@target_battlers = [target]
check_states #Checks the states
# Apply normal attack results
for target in @target_battlers
target.attack_effect(@active_battler)
end
set_text("**attack") #Text call command
return
end
# If guard
if @active_battler.current_action.basic == 1
#-----------------------------------------------------------------
@text_0 = [@active_battler.name]
@text_key = ["**guard"]
#-----------------------------------------------------------------
# Display "Guard" in help window
#@help_window.set_text($data_system.words.guard, 1)
return
end
# If battler performing action is enemy
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2
#-----------------------------------------------------------------
@text_0 = [@active_battler.name]
@text_key = ["**enemy_action1"]
#-----------------------------------------------------------------
# Display "Escape" in help window
#@help_window.set_text("Escape", 1)
# Escape
@active_battler.escape
return
end
# If doing nothing
if @active_battler.current_action.basic == 3
#-----------------------------------------------------------------
# If action battler is enemy
if @active_battler.is_a?(Game_Enemy) and ! @active_battler.hidden and
@active_battler.restriction != 4
@text_0 = [@active_battler.name]
@text_key = ["**enemy_action2"]
else
@text_0 = [""]
@text_key = ["**no"]
end
#★★-----------------------------------------------------------------
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
#@phase4_step = 1
return
end
end
#--------------------------------------------------------------------------
# â— Make Skill Action Results
#--------------------------------------------------------------------------
def make_skill_action_result
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# If unable to use due to SP running out
unless @active_battler.skill_can_use?(@skill.id)
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Use up SP
@active_battler.sp -= @skill.sp_cost
# Refresh status window
@status_window.refresh
# Show skill name on help window
#@help_window.set_text(@skill.name, 1)
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
check_states #Checks states
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
set_text("**skill") #Text call command
end
#--------------------------------------------------------------------------
# â— Make Item Action Results
#--------------------------------------------------------------------------
def make_item_action_result
# Get item
@item = $data_items[@active_battler.current_action.item_id]
# If unable to use due to items running out
unless $game_party.item_can_use?(@item.id)
# Shift to step 1
@phase4_step = 1
return
end
# If consumable
if @item.consumable
# Decrease used item by 1
$game_party.lose_item(@item.id, 1)
end
# Display item name on help window
#@help_window.set_text(@item.name, 1)
# Set animation ID
@animation1_id = @item.animation1_id
@animation2_id = @item.animation2_id
# Set common event ID
@common_event_id = @item.common_event_id
# Decide on target
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
# Set target battlers
set_target_battlers(@item.scope)
check_states #Checks states
# Apply item effect
for target in @target_battlers
target.item_effect(@item)
end
set_text("**item") #Text call command
end
#--------------------------------------------------------------------------
# â— Frame Update (main phase step 3 : animation for action performer)
#--------------------------------------------------------------------------
alias window_battle_message_200_update_phase4_step3 update_phase4_step3
def update_phase4_step3
if @text_0 == nil or @text_key == nil
@text_0 = [""]
@text_key = ["**no"]
end
text = add_text(@text_0[0], @text_key[0])
@bwin_wbm.draw_text(text, 0)
@text_0.delete_at 0
@text_key.delete_at 0
window_battle_message_200_update_phase4_step3
if not WBM200_ACTOR_ANIMATION and @active_battler.is_a?(Game_Actor)
@active_battler.animation_id = 0
end
@help_window.visible = false
end
#--------------------------------------------------------------------------
# â— Frame Update (main phase step 4 : animation for target)
#--------------------------------------------------------------------------
alias window_battle_message_200_update_phase4_step4 update_phase4_step4
def update_phase4_step4
if @critical
text = add_text(@text_0[0], @text_key[0])
@bwin_wbm.draw_text(text, 1)
@text_0.delete_at 0
@text_key.delete_at 0
end
window_battle_message_200_update_phase4_step4
for target in @target_battlers
if not WBM200_ACTOR_ANIMATION and target.is_a?(Game_Actor)
target.animation_id = 0
end
end
end
#--------------------------------------------------------------------------
# â— Frame Update (main phase step 5 : damage display)
#--------------------------------------------------------------------------
alias window_battle_message_200_update_phase4_step5 update_phase4_step5
def update_phase4_step5
#
line = @critical ? 2 : 1
if @text_key[@wbm_loop] == "_STATES_"
@text_key.delete_at @wbm_loop
text = add_text(@text_0[@wbm_loop], @text_key[@wbm_loop])
@bwin_wbm.draw_text(text, line + 1)
else
text = add_text(@text_0[@wbm_loop], @text_key[@wbm_loop])
@bwin_wbm.draw_text(text, line)
end
@wbm_loop += 1
if @text_key[@wbm_loop] == "NEXT_TARGET"
@text_key.delete_at @wbm_loop
if @target_battlers[@wbm_loop1].damage != nil
if WBM200_DAMAGE_POP
@target_battlers[@wbm_loop1].damage_pop = true
else
@target_battlers[@wbm_loop1].damage = nil
@wait_count = WBM200_TEXT_WAIT
end
end
@wbm_loop1 += 1
end
if @wbm_loop < @text_0.size
if @wbm_set1[@text_key[@wbm_loop - 1]] != nil
@wait_count = WBM200_TEXT_WAIT
return
end
end
@critical = false
@wbm_loop = @wbm_loop1 = 0
window_battle_message_200_update_phase4_step5
for target in @target_battlers
if target.damage != nil and not WBM200_DAMAGE_POP
@wait_count = WBM200_TEXT_WAIT
target.damage_pop = false
target.damage = nil
end
end
end
end