Beschreibung :
Dieses Script verändert das Standard-Kampfsystem zu einem ATB, also einem Active-Time-Battle System.
Anhand der Beweglichkeit der Charactere wird die Geschwindigkeit berechnet mit der sie interagieren.
In diesem Script ist eine angepasste version meines CustomBattleScreens integriert
Screenshot :
(http://www.sturmf4lke.de/easy/screen/screen7.JPG)
Last Update 03.05.08 : v1.0
Changelog
-----------------------------------------------------------------------------------
v1.0
-----------------------------------------------------------------------------------
versionsprung auf 1
habs nochma komplett überarbeitet und dabei alle fehler die mir
gemeldet wurden beseitigt inkl. id bug
-----------------------------------------------------------------------------------
v0.2.3.1
-----------------------------------------------------------------------------------
ok da ich jetz endlich weiss was für ein fehler das mit auto battle war is der auch behoben , hat sich um nen fehler gehandelt der auftrag wenn man in der database auto battle auf nem character lag,
das sollte jetz endgültig funktionieren und ich hab nochma ne demo geadded
-----------------------------------------------------------------------------------
v0.2.3
-----------------------------------------------------------------------------------
das script hatte nen kleinen fehler bei helden mit ner id größer 3 , das hab ich jetz gefixed und das
auto battle hatte wohl nen tippfehler , hoff dass das jetz auch so funzt wies soll
-----------------------------------------------------------------------------------
v0.2.2
-----------------------------------------------------------------------------------
kleenes mini update , der problem mit dem fenster sollte jetz behoben sein , also das nach dem kampf und dieser komische pfeil der rechts war
und ich hab als kleines addon zu meinem kampfsystem mein inRage script / FF8 limit script dazu gepackt, das kann seperat einfach drunter kopiert werden
-----------------------------------------------------------------------------------
v0.2
-----------------------------------------------------------------------------------
Ich hab bei der PartyCommand auswahl eine AutoBattle funktion hinzugefügt, sobald sie gewählt wurde verläuft der GANZE kampf automatisch also aufpassen wo man das benutzt
desweiteren hab das UI leicht abgeändert , das linke Status fenster ist nun dauerhaft sichtbar,
dafür ist das message window dafür leicht nach rechts gewandert
würd mich freuen wenn ich zu den UI changes paar äußerungen hab wie ihr das findet im vergleich zur alten darstellung
Anmerkungen :
Wer Fehler findet kann sie hier gerne melden
Ideen zur verbesserung des scripts bzw Ideen für Addons sind willkommen
Script v1.0
#==============================================================================
# hellMinor's Active-Time-Battles
#
# Version : 1.0 - 02.04.08
# Created by : hellMinor
# Do NOT redistribute without my permission
# Description : This script changes the standard Battle-System to an
# Active-Time-Battle-System based on the agility of the
# character
# Notes : This script uses my CustomBattleScreen with some changes
#
#==============================================================================
#==============================================================================
class Scene_Battle < Scene_Base
#==============================================================================
def start
super
$game_temp.in_battle = true
@actor_wait = [0,0,0,0,0,0,0,0,0,0,0,0]
@bar_add = [0,0,0,0,0,0,0,0,0,0,0,0]
$bar_values = [0,0,0,0,0,0,0,0,0,0,0,0]
@spriteset = Spriteset_Battle.new
@message_window = Window_BattleMessage.new
@action_battlers = []
create_info_viewport
@info_viewport.visible = true
end
#------------------------------------------------------------------------------
def next_actor
# zurücksetzen
for enemy in $game_troop.members
enemy.action.clear
end
@wert = 300
@index = 0
if @actor_index == $game_party.members.size-1
start_main
return
end
# player_wait_max = Frameausgleich*(MaxSekunden*(Skalierung-(Player_AGI/Max_AGI)))
# player_bar_add = GaugeGröße / player_wait_max
for i in 0..$game_party.members.size-1
if @actor_wait[i] == 0 or @actor_wait[i] == nil
@actor_wait[i] = 60*(3.0*(1.0-($game_party.members[i].agi/1000.0)))
@bar_add[i] = 120.0/@actor_wait[i]
end
end
for i in 0..$game_troop.members.size-1
if @actor_wait[i+4] == 0 or @actor_wait[i+4] == nil
@actor_wait[i+4] = 60*(5.0*(1.0-($game_troop.members[i].agi/1000.0)))
@bar_add[i+4] = 120.0/@actor_wait[i+4]
end
end
#kleinsten agi wert raussuchen und den nächsten actor festlegen
for i in 0..@actor_wait.length-1
if @actor_wait[i] < @wert && @actor_wait[i] > 0
@wert = @actor_wait[i]
if i < $game_party.members.size
@active_battler = $game_party.members[i]
@index = i
else
@active_battler = $game_troop.members[i-4]
@index = i
end
end
end
# redrawschleife bis actor an der reihe
for i in 0..@wert
wait(1)
for j in 0..$game_party.members.size-1
$bar_values[j] += @bar_add[j]
end
@status_window.refresh
end
# neue werte berechnen + korrekturwert bei gleicher zahl
for i in 0..@actor_wait.size-1
if i == @index
@actor_wait[i] -= @wert
else
@actor_wait[i] -= @wert-0.001
end
end
if @active_battler.inputable?
if @active_battler.actor?
@status_window.index = @index
$bar_values[@index] = 0
if @autobattle || @active_battler.auto_battle
@active_battler.make_action
start_main
else
start_actor_command_selection
end
else
@active_battler.make_action
start_main
end
else
if @active_battler.actor?
$bar_values[@index] = 0
end
next_actor
end
end
#------------------------------------------------------------------------------
def update_actor_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
elsif Input.trigger?(Input::C)
case @actor_command_window.index
when 0 # ??
Sound.play_decision
@active_battler.action.set_attack
start_target_enemy_selection
when 1 # ???
Sound.play_decision
start_skill_selection
when 2 # ??
Sound.play_decision
@active_battler.action.set_guard
start_main
when 3 # ????
Sound.play_decision
start_item_selection
end
end
end
#------------------------------------------------------------------------------
def start_target_enemy_selection
@target_enemy_window = Window_TargetEnemy.new
@target_enemy_window.y = 193
@info_viewport.rect.x += @target_enemy_window.width
@info_viewport.ox += @target_enemy_window.width
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def update_target_enemy_selection
@target_enemy_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_enemy_selection
elsif Input.trigger?(Input::C)
Sound.play_decision
@active_battler.action.target_index = @target_enemy_window.enemy.index
end_target_enemy_selection
end_skill_selection
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def update_target_actor_selection
@target_actor_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_actor_selection
elsif Input.trigger?(Input::C)
Sound.play_decision
@active_battler.action.target_index = @target_actor_window.index
end_target_actor_selection
end_skill_selection
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def determine_skill
@active_battler.action.set_skill(@skill.id)
@skill_window.active = false
if @skill.need_selection?
if @skill.for_opponent?
start_target_enemy_selection
else
start_target_actor_selection
end
else
end_skill_selection
start_main
end
end
#------------------------------------------------------------------------------
def determine_item
@active_battler.action.set_item(@item.id)
@item_window.active = false
if @item.need_selection?
if @item.for_opponent?
start_target_enemy_selection
else
start_target_actor_selection
end
else
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def start_main
$game_troop.increase_turn
@info_viewport.visible = true
@info_viewport.ox = 0
@message_window.visible = true
@actor_command_window.visible = false
@party_command_window.active = false
@actor_command_window.active = false
@status_window.index = @actor_index = -1
@active_battler = nil
@message_window.clear
make_action_orders
wait(20)
end
#------------------------------------------------------------------------------
def create_info_viewport
@info_viewport = Viewport.new(0, 0, 544, 480)
@info_viewport.z = 100
@status_window = Window_BattleStatus.new
@party_command_window = Window_PartyCommand.new
@actor_command_window = Window_ActorCommand.new
@status_window.viewport = @info_viewport
@party_command_window.viewport = @info_viewport
@actor_command_window.viewport = @info_viewport
@party_command_window.x = 159
@party_command_window.y = 360
@status_window.x = 0
@actor_command_window.x = 159
@actor_command_window.y = 360
@actor_command_window.visible = false
@info_viewport.visible = false
end
#------------------------------------------------------------------------------
def update_info_viewport
@party_command_window.update
@actor_command_window.update
@status_window.update
if @party_command_window.active
@party_command_window.visible = true
@actor_command_window.visible = false
elsif @actor_command_window.active
@actor_command_window.visible = true
@party_command_window.visible = false
end
end
#------------------------------------------------------------------------------
def start_party_command_selection
if $game_temp.in_battle
@status_window.refresh
@status_window.index = @actor_index = -1
@active_battler = nil
@info_viewport.visible = true
@message_window.visible = false
@party_command_window.active = true
@party_command_window.index = 0
@actor_command_window.active = false
$game_party.clear_actions
if $game_troop.surprise or not $game_party.inputable?
start_main
end
if @autobattle
next_actor
end
end
end
#------------------------------------------------------------------------------
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # ??
@party_command_window.visible = false
Sound.play_decision
@status_window.index = @actor_index = -1
next_actor
when 1 # ??
Sound.play_decision
@status_window.index = @actor_index = -1
@party_command_window.active = false
@party_command_window.visible = false
@autobattle = true
next_actor
when 2 # ???
if $game_troop.can_escape == false
Sound.play_buzzer
return
end
Sound.play_decision
process_escape
end
end
end
#------------------------------------------------------------------------------
def start_skill_selection
@help_window = Window_Help.new
@skill_window = Window_Skill.new(0, 55, 544, 306, @active_battler)
@skill_window.help_window = @help_window
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def start_item_selection
@help_window = Window_Help.new
@item_window = Window_Item.new(0, 55, 544, 306)
@item_window.help_window = @help_window
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def process_victory
@info_viewport.visible = true
@message_window.visible = true
RPG::BGM.stop
$game_system.battle_end_me.play
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
#------------------------------------------------------------------------------
def process_defeat
@info_viewport.visible = true
@message_window.visible = true
text = sprintf(Vocab::Defeat, $game_party.name)
$game_message.texts.push(text)
wait_for_message
battle_end(2)
end
end
#==============================================================================
# CustomBattleScreen
# Version : 0.2 - Customized
# Created by : hellMinor
#==============================================================================
#==============================================================================
class Window_BattleStatus < Window_Selectable
#==============================================================================
def initialize
super(0, 0, 160, 416)
refresh
self.active = false
end
#------------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = 126
rect.height = 96
rect.y = index / @column_max * 96
return rect
end
#------------------------------------------------------------------------------
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_atb_gauge(index, 3, rect.y+10)
draw_actor_name(actor, 3, rect.y)
draw_actor_state(actor, 35, rect.y+20, 48)
draw_actor_graphic(actor,18,rect.y+55)
draw_actor_mp(actor, 35, rect.y+45, 88)
draw_actor_hp(actor, 3, rect.y+65, 120)
end
#------------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = hp_color(actor)
self.contents.draw_text(x, y, 120, WLH, actor.name, 1)
end
#------------------------------------------------------------------------------
def draw_atb_gauge(index,x, y, width = 120)
if $bar_values[index] == nil
$bar_values[index] = 0
end
if $bar_values[index] >= 120
gc1 = hp_gauge_color1
gc2 = hp_gauge_color2
else
gc1 = mp_gauge_color1
gc2 = mp_gauge_color2
end
self.contents.fill_rect(x, y, 120, 5, gauge_back_color)
self.contents.gradient_fill_rect(x, y, $bar_values[index], 5, gc1, gc2)
end
end
#==============================================================================
class Window_PartyCommand < Window_Command
#==============================================================================
def initialize
s1 = Vocab::fight
s2 = "Auto-Fight"
s3 = Vocab::escape
super(385, [s1, s2, s3], 3, 1)
draw_item(0, true)
draw_item(1, true)
draw_item(2, $game_troop.can_escape)
self.active = false
end
#------------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end
end
#==============================================================================
class Window_ActorCommand < Window_Command
#==============================================================================
def initialize
super(385, [], 4, 1)
self.active = false
end
#------------------------------------------------------------------------------
def setup(actor)
s1 = Vocab::attack
s2 = Vocab::skill
s3 = Vocab::guard
s4 = Vocab::item
if actor.class.skill_name_valid
s2 = actor.class.skill_name
end
@commands = [s1,s2, s3, s4]
@item_max = 4
refresh
self.index = 0
end
#------------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end
end
#==============================================================================
class Window_TargetEnemy < Window_Command
#==============================================================================
def initialize
commands = []
@enemies = []
for enemy in $game_troop.members
next unless enemy.exist?
commands.push(enemy.name)
@enemies.push(enemy)
end
super(160, commands, 1, 8)
end
#------------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end
end
#==============================================================================
class Window_BattleMessage < Window_Message
#==============================================================================
def initialize
super(159,288,385,128)
self.openness = 255
@lines = []
refresh
end
end
#==============================================================================
class Window_Message < Window_Selectable
#==============================================================================
def initialize(x = 0,y = 288,w = 544,h = 128)
super(x,y,w,h)
self.z = 200
self.active = false
self.index = -1
self.openness = 0
@opening = false # ??????????????
@closing = false # ??????????????
@text = nil # ??????????
@contents_x = 0 # ????????? X ??
@contents_y = 0 # ????????? Y ??
@line_count = 0 # ???????????
@wait_count = 0 # ????????
@background = 0 # ?????
@position = 2 # ????
@show_fast = false # ??????
@line_show_fast = false # ?????????
@pause_skip = false # ?????????
create_gold_window
create_number_input_window
create_back_sprite
end
end
Script v0.2.3.1
ATB-Demo v0.2.3.1 mit Addon (http://rapidshare.com/files/104327994/ATB-Demo_v0.2.3.1.exe)
[code]#==============================================================================
# hellMinor's Active-Time-Battles
#
# Version : 0.2.3.1 - 02.04.08
# Created by : hellMinor
# Description : This script changes the standard Battle-System to an
# Active-Time-Battle-System based on the agility of the
# character
# Notes : This script uses my CustomBattleScreen with some changes
# Do NOT redistribute without my permission
#
#==============================================================================
#==============================================================================
class Scene_Battle < Scene_Base
#==============================================================================
def start
super
$game_temp.in_battle = true
@spriteset = Spriteset_Battle.new
@message_window = Window_BattleMessage.new
@action_battlers = []
$playerwaitrate = [0,0,0,0]
$additionrate = [0,0,0,0]
$bar = [0,0,0,0]
$enemywaitrate = [0,0,0,0,0,0,0,0]
$enemyattackrate = [0,0,0,0,0,0,0,0]
create_info_viewport
@info_viewport.visible = true
end
#------------------------------------------------------------------------------
def next_actor
for enemy in $game_troop.members
enemy.action.clear
end
wert = 300
index = 0
if @actor_index == $game_party.members.size-1
start_main
return
end
for i in 0..$game_party.members.size-1
if $playerwaitrate[i] == 0
$playerwaitrate[i] = 60*(5.0*(1.0-($game_party.members[i].agi/500.0)))
$additionrate[i] = 120.0/$playerwaitrate[i]
end
end
for i in 0..$game_troop.members.size-1
if $enemywaitrate[i] == 0
$enemywaitrate[i] = 60*(5.0*(1.0-($game_troop.members[i].agi/500.0)))
$enemyattackrate[i] = 120.0/$enemywaitrate[i]
end
end
temp = $playerwaitrate
temp += $enemywaitrate
for i in 0..temp.length-1
if temp[i] > wert
wert = temp[i]
end
end
for i in 0..temp.length-1
if temp[i] < wert && temp[i] > 0
wert = temp[i]
if i < $game_party.members.size
@active_battler = $game_party.members[i]
index = i
else
@active_battler = $game_troop.members[i-4]
index = i
end
end
end
for i in 0..wert
wait(1)
for i in 0..$game_party.members.size-1
$bar[i] += $additionrate[i]
end
@status_window.refresh
end
for i in 0..$game_party.members.size-1
if i == index
$playerwaitrate[i] -= wert
else
$playerwaitrate[i] -= wert-0.001
end
end
for i in 0..$game_troop.members.size-1
if i == index-4
$enemywaitrate[i] -= wert
else
$enemywaitrate[i] -= wert-0.001
end
end
if @active_battler.inputable?
if @active_battler.actor?
@status_window.index = @active_battler.id-1
if @active_battler.id-1 < 4
$bar[@active_battler.id-1] = 0
else if @active_battler.id-1 < 8
$bar[@active_battler.id-5] = 0
else if @active_battler.id-1 < 12
$bar[@active_battler.id-9] = 0
end
end
end
if @autobattle || @active_battler.auto_battle
@active_battler.make_action
start_main
else
start_actor_command_selection
end
else
@active_battler.make_action
start_main
end
else
if @active_battler.actor?
$bar[@active_battler.id-1] = 0
end
next_actor
end
end
#------------------------------------------------------------------------------
def update_actor_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
elsif Input.trigger?(Input::C)
case @actor_command_window.index
when 0 # ??
Sound.play_decision
@active_battler.action.set_attack
start_target_enemy_selection
when 1 # ???
Sound.play_decision
start_skill_selection
when 2 # ??
Sound.play_decision
@active_battler.action.set_guard
start_main
when 3 # ????
Sound.play_decision
start_item_selection
end
end
end
#------------------------------------------------------------------------------
def start_target_enemy_selection
@target_enemy_window = Window_TargetEnemy.new
@target_enemy_window.y = 193
@info_viewport.rect.x += @target_enemy_window.width
@info_viewport.ox += @target_enemy_window.width
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def update_target_enemy_selection
@target_enemy_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_enemy_selection
elsif Input.trigger?(Input::C)
Sound.play_decision
@active_battler.action.target_index = @target_enemy_window.enemy.index
end_target_enemy_selection
end_skill_selection
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def update_target_actor_selection
@target_actor_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_actor_selection
elsif Input.trigger?(Input::C)
Sound.play_decision
@active_battler.action.target_index = @target_actor_window.index
end_target_actor_selection
end_skill_selection
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def determine_skill
@active_battler.action.set_skill(@skill.id)
@skill_window.active = false
if @skill.need_selection?
if @skill.for_opponent?
start_target_enemy_selection
else
start_target_actor_selection
end
else
end_skill_selection
start_main
end
end
#------------------------------------------------------------------------------
def determine_item
@active_battler.action.set_item(@item.id)
@item_window.active = false
if @item.need_selection?
if @item.for_opponent?
start_target_enemy_selection
else
start_target_actor_selection
end
else
end_item_selection
start_main
end
end
#------------------------------------------------------------------------------
def start_main
$game_troop.increase_turn
@info_viewport.visible = true
@info_viewport.ox = 0
@message_window.visible = true
@actor_command_window.visible = false
@party_command_window.active = false
@actor_command_window.active = false
@status_window.index = @actor_index = -1
@active_battler = nil
@message_window.clear
make_action_orders
wait(20)
end
#------------------------------------------------------------------------------
def create_info_viewport
@info_viewport = Viewport.new(0, 0, 544, 480)
@info_viewport.z = 100
@status_window = Window_BattleStatus.new
@party_command_window = Window_PartyCommand.new
@actor_command_window = Window_ActorCommand.new
@status_window.viewport = @info_viewport
@party_command_window.viewport = @info_viewport
@actor_command_window.viewport = @info_viewport
@party_command_window.x = 159
@party_command_window.y = 360
@status_window.x = 0
@actor_command_window.x = 159
@actor_command_window.y = 360
@actor_command_window.visible = false
@info_viewport.visible = false
end
#------------------------------------------------------------------------------
def update_info_viewport
@party_command_window.update
@actor_command_window.update
@status_window.update
if @party_command_window.active
@party_command_window.visible = true
@actor_command_window.visible = false
elsif @actor_command_window.active
@actor_command_window.visible = true
@party_command_window.visible = false
end
end
#------------------------------------------------------------------------------
def start_party_command_selection
if $game_temp.in_battle
@status_window.refresh
@status_window.index = @actor_index = -1
@active_battler = nil
@info_viewport.visible = true
@message_window.visible = false
@party_command_window.active = true
@party_command_window.index = 0
@actor_command_window.active = false
$game_party.clear_actions
if $game_troop.surprise or not $game_party.inputable?
start_main
end
if @autobattle
next_actor
end
end
end
#------------------------------------------------------------------------------
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # ??
@party_command_window.visible = false
Sound.play_decision
@status_window.index = @actor_index = -1
next_actor
when 1 # ??
Sound.play_decision
@status_window.index = @actor_index = -1
@party_command_window.active = false
@party_command_window.visible = false
@autobattle = true
next_actor
when 2 # ???
if $game_troop.can_escape == false
Sound.play_buzzer
return
end
Sound.play_decision
process_escape
end
end
end
#------------------------------------------------------------------------------
def start_skill_selection
@help_window = Window_Help.new
@skill_window = Window_Skill.new(0, 55, 544, 306, @active_battler)
@skill_window.help_window = @help_window
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def start_item_selection
@help_window = Window_Help.new
@item_window = Window_Item.new(0, 55, 544, 306)
@item_window.help_window = @help_window
@actor_command_window.active = false
end
#------------------------------------------------------------------------------
def process_victory
@info_viewport.visible = true
@message_window.visible = true
RPG::BGM.stop
$game_system.battle_end_me.play
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
#------------------------------------------------------------------------------
def process_defeat
@info_viewport.visible = true
@message_window.visible = true
text = sprintf(Vocab::Defeat, $game_party.name)
$game_message.texts.push(text)
wait_for_message
battle_end(2)
end
end
#==============================================================================
# CustomBattleScreen
# Version : 0.2 - Customized
# Created by : hellMinor
#==============================================================================
#==============================================================================
class Window_BattleStatus < Window_Selectable
#==============================================================================
def initialize
super(0, 0, 160, 416)
refresh
self.active = false
end
#------------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = 126
rect.height = 96
rect.y = index / @column_max * 96
return rect
end
#------------------------------------------------------------------------------
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_atb_gauge(index, 3, rect.y+10)
draw_actor_name(actor, 3, rect.y)
draw_actor_state(actor, 35, rect.y+20, 48)
draw_actor_graphic(actor,18,rect.y+55)
draw_actor_mp(actor, 35, rect.y+45, 88)
draw_actor_hp(actor, 3, rect.y+65, 120)
end
#------------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = hp_color(actor)
self.contents.draw_text(x, y, 120, WLH, actor.name, 1)
end
#------------------------------------------------------------------------------
def draw_atb_gauge(index,x, y, width = 120)
if $bar[index] == nil
$bar[index] = 0
end
if $bar[index] >= 120
gc1 = hp_gauge_color1
gc2 = hp_gauge_color2
else
gc1 = mp_gauge_color1
gc2 = mp_gauge_color2
end
self.contents.fill_rect(x, y, 120, 5, gauge_back_color)
self.contents.gradient_fill_rect(x, y, $bar[index], 5, gc1, gc2)
end
end
#==============================================================================
class Window_PartyCommand < Window_Command
#==============================================================================
def initialize
s1 = Vocab::fight
s2 = "Auto-Fight"
s3 = Vocab::escape
super(385, [s1, s2, s3], 3, 1)
draw_item(0, true)
draw_item(1, true)
draw_item(2, $game_troop.can_escape)
self.active = false
end
#------------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end
end
#==============================================================================
class Window_ActorCommand < Window_Command
#==============================================================================
def initialize
super(385, [], 4, 1)
self.active = false
end
#------------------------------------------------------------------------------
def setup(actor)
s1 = Vocab::attack
s2 = Vocab::skill
s3 = Vocab::guard
s4 = Vocab::item
if actor.class.skill_name_valid
s2 = actor.class.skill_name
end
@commands = [s1,s2, s3, s4]
@item_max = 4
refresh
self.index = 0
end
#------------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end
end
#====================