class Scene_Battle
alias create_info_viewport_old create_info_viewport unless $@
def create_info_viewport
create_info_viewport_old
@actor_command_window.dispose
@actor_command_window = nil
#~ @actor_command_window.visible = false
end
def create_options
# Create empty options with no graphics, with just block of instructions
@command_name = Sprite.new
opt = [
RMenu_Option.new("Attack", 1) , # Bitmap.new("Graphics\Whatever\Filename")
RMenu_Option.new("Skill", 100) ,
RMenu_Option. new("Guard", 52) ,
RMenu_Option.new("Item", 64) ,
]
end
alias old_terminate terminate unless $@
def terminate
old_terminate
@actor_command_window.dispose
end
#-----------------------------------------------
alias old_update update unless $@
def update
old_update
animate_menu if @animate
#@actor_command_window.update
@actor_command_window.selected.call if Input.trigger? Input::C
end
#-----------------------------------------------
def animate_menu
if Graphics.frame_count < 120
@actor_command_window.x +=2
@actor_command_window.y -=1
@actor_command_window.z = self.z - 1
end
if Graphics.frame_count.between?(120,240)
@actor_command_window.x -= 2
@actor_command_window.y +=1
@actor_command_window.z = self.z - 1
end
if Graphics.frame_count.between?(400,500)
@actor_command_window.opacity -=2
else
@actor_command_window.opacity +=2
end
Graphics.frame_count %= 500
end
# ID Battler 1 Battler 2 Battler 3 Battler 4
ABATVX_FORMATION = { 0 => [ [350, 200], [395, 235], [440, 270], [485, 305] ],
1 => [ [485, 200], [440, 235], [395, 270], [350, 305] ] }
def start_actor_command_selection
@actor_command_window = Ring_Menu.new(30,10,[Graphics.width/2,Graphics.height/2-60], create_options)
@actor_command_window.visible = false
@actor_command_window.x = @active_battler.screen_x - 0
@actor_command_window.y = @active_battler.screen_y - 65
@party_command_window.active = false
#@actor_command_window.setup(@active_battler)
@actor_command_window.visible = true
@actor_command_window.active = true
@actor_command_window.index = 0
@active_battler.action.basic = 3 if @active_battler.action.basic == 1
end
def start_skill_selection
@help_window = Window_HelpArcheia.new
@skill_window = Window_SkillArcheia.new(-3, 135, 530, 80, @active_battler)
@skill_window.help_window = @help_window
@actor_command_window.active = false
@actor_command_window.visible = false
end
def end_skill_selection
if @skill_window != nil
@skill_window.dispose
@skill_window = nil
@help_window.dispose
@help_window = nil
end
@actor_command_window.active = true
@actor_command_window.visible = true
end
def start_item_selection
@help_window = Window_HelpArcheia.new
@item_window = Window_ItemArcheia.new(-3, 135, 530, 80)
@item_window.help_window = @help_window
@actor_command_window.active = false
@actor_command_window.visible = false
end
def end_item_selection
if @item_window != nil
@item_window.dispose
@item_window = nil
@help_window.dispose
@help_window = nil
end
@actor_command_window.active = true
@actor_command_window.visible = true
end
def start_party_command_selection(skip = false)
if skip
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 = false
@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
@status_window.index = @actor_index = -1
next_actor
end
else
#Process the original
vxctb_start_party_command_selection
end
end
def update_info_viewport
@party_command_window.update
@actor_command_window.update if @actor_command_window != nil
@status_window.update
end
end