[Menu Principal] Breath of Fire Menu 1 (Atualizado para v.1.3)

    Compartilhe
    avatar
    jiraya
    Administrador
    Administrador

    Mensagens : 1299
    Credibilidade : 54

    [Menu Principal] Breath of Fire Menu 1 (Atualizado para v.1.3)

    Mensagem por jiraya em Qua Jan 12, 2011 6:51 pm

    [Autor: Alucard_2]
    Breath of Fire Menu v1.3
    por Alucard_2
    Introdução
    Este script muda algumas janelas do menu principal para um estilo parecido com o menu do jogo "Breath of Fire 1" para SNES.
    Características
    Este script faz o menu ter até 6 membros no grupo, mostrando, na tela principal, os atributos: LV, Nome, HP e MP de cada membro do grupo, faz a janela de comandos ficar na horizontal.
    Na tela de Itens, os itens são separados em 3 colunas ao invés de 2 e a janela de seleção do item e skills é menor e mais compacta (acho que é esta palavra que devo usar).
    No menu de Status, aparecem 3 janelas: uma com alguns atributos, o char e o nome do herói, a outra com o Nível, Experiência total/para o próximo nível, HP, MP e mais outros atributos e na terceira, os equipamentos do herói.
    [V.1.3 - News:]
    Mais customizável:
    []
    Agora é possível colocar faces em vez dos characters, podendo definir se usará o nome do battler ou um nome personalizado para cada herói!;
    Agora é possível colocar ícones em vez de palavras, com ajuste de suas coordenadas e infinitas definições de ícones para reduzir seu esforço para torná-lo compatível com outros scripts![/li]

    Ambas as alterações foram feitas baseadas no meu original para SNES!
    É possivel ver essa mudança a partir desta screenshot:
    Spoiler:
    ]
    OBS: A window_help e a Window_command não foram alteradas, aumentando a compatibilidade com outros scripts.
    Como Usar
    Apenas cole-o acima do script "Main".
    Para configurá-lo da maneira desejada, vá na linha 24 até a 53 script.
    Para Adicionar mais membros, apenas use o comando "Mudar Grupo" e adicione o membro ao grupo.
    Script
    Spoiler:
    Código:
    ################################################################################
    ###------------------------------=Descrição=---------------------------------###
    ### ###
    ### Breath of Fire Menu v.1 by Alucard_2 ###
    ###------------------------------=Créditos=----------------------------------###
    ### ###
    ### Créditos apenas para Alucard_2 ###
    ################################################################################
    ###------------------------------=Instruções=--------------------------------###
    ### ###
    ### 1. ###
    ### Cole todos os scripts acima do Script "Main" ###
    ### 2. ###
    ### Caso Use_Face seja igual a true, as imagens de face devem estar na pasta ###
    ### "Graphics/Faces" do seu jogo, do contrário não é necessário esta pasta. ###
    ### 3. ###
    ### Caso Use_Icons seja igual a true, as imagens de ícone devem estar na ###
    ### pasta "Graphics/Icons" do seu jogo. ###
    ################################################################################
    module Alucard_2
    Face_Name = []
    Option_Icon = []
    ###----------------------------=Configurações=-------------------------------###
    # - Vocabulário diversos - #
    Item_X = "x"
    Level = "L"
    Normal_Status = "[Normal]"
    EXP_Total = "EXP"
    EXP_for_Next_Level = "NEXT"
    No_Description = "''Selecione um item.''"
    # - Vocabulário de opções - #
    Status = "Status"
    Save_Game = "Salvar Jogo"
    Quit_Game = "Fechar o Jogo"
    # - Configurações de Faces - #
    Use_Face = true
    Face_Size = 80
    Face_is_BattlerName = true # Nome da face é o nome da imagem de battler?
    # Caso Face_is_BattlerName seja: false
    # Face_Name[ID_do_herói_no_database] = "nome_da_imagem"
    Face_Name[1] = '001-Fighter01'
    Face_Name[2] = "010-Lancer02"
    Face_Name[3] = "029-Cleric05"
    Face_Name[4] = "038-Mage06"
    # - Configurações de ícones #
    Use_Icons = true
    Option_Icon[0] = "032-Item01"
    Option_Icon[1] = "001-Weapon01"
    Option_Icon[2] = "036-Item05"
    Option_Icon[3] = "038-Item07"
    Option_Icon[4] = "035-Item04"
    Option_Icon[5] = "047-Skill04"
    Icon_Adjust = 2.3
    ###----------------------=Fim das configurações=-----------------------------###
    end
    module BOF
    include Alucard_2
    end
    #==============================================================================
    # Cache
    #------------------------------------------------------------------------------
    # Nesta classe vários gráficos são carregados e guardados como Bitmaps. Para
    # acelerar o processo e preservar a memória, os Bitmaps são guardados em cache
    # para uso futuro.
    #==============================================================================
    module Cache
    def self.face(filename)
    load_bitmap("Graphics/Faces/", filename)
    end
    #--------------------------------------------------------------------------
    # Limpeza do cache
    #--------------------------------------------------------------------------
    def self.clear
    @cache = {} if @cache == nil
    @cache.clear
    GC.start
    end
    #--------------------------------------------------------------------------
    # Carregamento dos bitmaps
    #--------------------------------------------------------------------------
    def self.load_bitmap(folder_name, filename, hue = 0)
    @cache = {} if @cache == nil
    path = folder_name + filename
    if not @cache.include?(path) or @cache[path].disposed?
    if filename.empty?
    @cache[path] = Bitmap.new(32, 32)
    else
    @cache[path] = Bitmap.new(path)
    end
    end
    if hue == 0
    return @cache[path]
    else
    key = [path, hue]
    if not @cache.include?(key) or @cache[key].disposed?
    @cache[key] = @cache[path].clone
    @cache[key].hue_change(hue)
    end
    return @cache[key]
    end
    end
    end
    #==============================================================================
    # Scene_Base
    #------------------------------------------------------------------------------
    # Classe superior à todas as classes Scene_.
    #==============================================================================
    class Scene_Base
    #--------------------------------------------------------------------------
    # Processo principal
    #--------------------------------------------------------------------------
    def main
    start # Inicia o processo
    perform_transition # Executa a transição
    post_start # Processo pós-inicialização
    Input.update # Atualiza as informações inseridas
    loop do
    Graphics.update # Atualiza os gráficos
    Input.update # Atualiza as informações inseridas
    update # Atualização
    break if $scene != self # Descontinuação do loop
    end
    Graphics.update
    pre_terminate # Preparação para finalização
    Graphics.freeze # Congelamento dos gráficos
    terminate # Fim
    end
    #--------------------------------------------------------------------------
    # Inicialização do processo
    #--------------------------------------------------------------------------
    def start
    end
    #--------------------------------------------------------------------------
    # Execução da transição
    #--------------------------------------------------------------------------
    def perform_transition
    Graphics.transition(10)
    end
    #--------------------------------------------------------------------------
    # Processo pós-inicialização
    #--------------------------------------------------------------------------
    def post_start
    end
    #--------------------------------------------------------------------------
    # Atualização da tela
    #--------------------------------------------------------------------------
    def update
    end
    #--------------------------------------------------------------------------
    # Preparação para finalização
    #--------------------------------------------------------------------------
    def pre_terminate
    end
    #--------------------------------------------------------------------------
    # Fim do processo
    #--------------------------------------------------------------------------
    def terminate
    end
    end
    class Game_Actor < Game_Battler
    attr_reader :name # Nome
    attr_reader :character_name # Nome do Herói
    attr_reader :character_hue # Cor do Herói
    attr_reader :class_id # ID da classe
    attr_reader :weapon_id # ID da Arma
    attr_reader :armor1_id # ID do Escudo
    attr_reader :armor2_id # ID do Elmo
    attr_reader :armor3_id # ID da Armadura
    attr_reader :armor4_id # ID do Acessório
    attr_reader :level # Nível
    attr_reader :exp # Experiencia (EXP)
    attr_reader :skills # Habilidades
    attr_accessor :face_name
    def setup(actor_id)
    actor = $data_actors[actor_id]
    @actor_id = actor_id
    @name = actor.name
    @character_name = actor.character_name
    @character_hue = actor.character_hue
    @battler_name = actor.battler_name
    @battler_hue = actor.battler_hue
    @class_id = actor.class_id
    @weapon_id = actor.weapon_id
    @armor1_id = actor.armor1_id
    @armor2_id = actor.armor2_id
    @armor3_id = actor.armor3_id
    @armor4_id = actor.armor4_id
    @level = actor.initial_level
    @exp_list = Array.new(101)
    make_exp_list
    @exp = @exp_list[@level]
    @skills = []
    @hp = maxhp
    @sp = maxsp
    @states = []
    @states_turn = {}
    @maxhp_plus = 0
    @maxsp_plus = 0
    @str_plus = 0
    @dex_plus = 0
    @agi_plus = 0
    @int_plus = 0
    if BOF::Face_is_BattlerName
    @face_name = actor.battler_name
    else
    @face_name = BOF::Face_Name[actor.id]
    end
    @face_name = "" if @face_name == nil
    for i in [email=1..@level]1..@level[/email]
    for j in $data_classes[@class_id].learnings
    if j.level == i
    learn_skill(j.skill_id)
    end
    end
    end
    update_auto_state(nil, $data_armors[@armor1_id])
    update_auto_state(nil, $data_armors[@armor2_id])
    update_auto_state(nil, $data_armors[@armor3_id])
    update_auto_state(nil, $data_armors[@armor4_id])
    end
    end
    ################################################################################
    ###-------------------------------=Scene_Menu=-------------------------------###
    ################################################################################
    class Scene_Menu < Scene_Base
    #-----------------------------------------------------------------------------
    # Inicialização da classe
    # menu_index: Índice inicial do cursor do menu
    #-----------------------------------------------------------------------------
    def initialize(menu_index = 0)
    @menu_index = menu_index
    end
    #-----------------------------------------------------------------------------
    # Execuçõao principal da classe
    #-----------------------------------------------------------------------------
    def start
    create_command_window
    # Criar janela de Status
    @status_window = Window_MenuStatus2.new
    @status_window.x = 20
    @status_window.y = 20
    @status_window.width = 600
    @status_window.z = 0
    # Criar janela de Dinheiro
    @gold_window = Window_Gold.new
    @gold_window.x = 640/2 - @gold_window.width/2
    @gold_window.y = 480 - @gold_window.height
    end
    def terminate
    @command_window.dispose
    @status_window.dispose
    @gold_window.dispose
    end
    def create_command_window
    # Criar opções para a janela de comando
    s1 = $data_system.words.item
    s2 = $data_system.words.equip
    s3 = $data_system.words.skill
    s4 = BOF::Status
    s5 = BOF::Save_Game
    s6 = BOF::Quit_Game
    # Criar janela de comando com as opções
    @command_window = Window_Command2.new(400, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.z = 2
    @command_window.x = 150
    @command_window.y = 30
    @command_window.width = 400
    @command_window.height = 65
    @command_window.opacity = 255
    # Se o número de membros do Grupo de Heróis for 0
    if $game_party.actors.size == 0
    # Desabilitar as opções Item, Habilidades, Equipamento e Status
    @command_window.disable_item(0)
    @command_window.disable_item(1)
    @command_window.disable_item(2)
    @command_window.disable_item(3)
    end
    # Se Salvar for Proibido
    if $game_system.save_disabled
    # Desabilitar Salvar
    @command_window.disable_item(4)
    end
    end
    # Processo de atualização da classe
    def update
    # Atualizar janelas
    @command_window.update
    @status_window.update
    @gold_window.update
    # Se a janela de comandos estiver ativo: chamar update_command
    if @command_window.active
    update_command
    return
    end
    # Se a janela de Status estiver ativa: call update_status
    if @status_window.active
    update_status
    return
    end
    end
    # Atualização da seleção da janela de comandos
    def update_command
    # Se o botão B for pressionado
    if Input.trigger?(Input::B)
    # Reproduzir SE de cancelamento
    $game_system.se_play($data_system.cancel_se)
    # Alternar para a tela do mapa
    $scene = Scene_Map.new
    return
    end
    # Se o botão C for pressionado
    if Input.trigger?(Input::C)
    # Se o comando for outro senão Salvar, Fim de Jogo e o número de Heróis no
    # Grupo for 0
    if $game_party.actors.size == 0 and @command_window.index < 4
    # Reproduzir SE de erro
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Ramificação por posição do cursor na janela de comandos
    case @command_window.index
    when 0 # Itens
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de Itens
    $scene = Scene_Item.new
    when 2 # Habilidades
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Ativar o status da janela
    @command_window.active = false
    @status_window.active = true
    @status_window.index = 0
    when 1 # Equipamentos
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Ativar o status da janela
    @command_window.active = false
    @status_window.active = true
    @status_window.index = 0
    when 3 # Status
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Ativar o status da janela
    @command_window.active = false
    @status_window.active = true
    @status_window.index = 0
    when 4 # Salvar
    # Se Salvar for proibido
    if $game_system.save_disabled
    # Reproduzir SE de erro
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de save
    $scene = Scene_Save.new
    when 5 # Fim de Jogo
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de Fim de Jogo
    $scene = Scene_End.new
    end
    return
    end
    end
    # Atualização da seleção da janela de status
    def update_status
    # Se o botão B for pressionado
    if Input.trigger?(Input::B)
    # Reproduzir SE de cancelamento
    $game_system.se_play($data_system.cancel_se)
    # Torna a janela de comandos ativa
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    return
    end
    # Se o botão C for pressionado
    if Input.trigger?(Input::C)
    # Ramificação por posição do cursor na janela de comandos
    case @command_window.index
    when 2 # Habilidades
    # Se o limite de ação deste Herói for de 2 ou mais
    if $game_party.actors[@status_window.index].restriction >= 2
    # Reproduzir SE de erro
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de Habilidades
    $scene = Scene_Skill.new(@status_window.index)
    when 1 # Equipamento
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de Equipamento
    $scene = Scene_Equip.new(@status_window.index)
    when 3 # Status
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Alternar para a tela de Status
    $scene = Scene_Status2.new(@status_window.index)
    end
    return
    end
    end
    end
    ###############
    # Scene_Equip #
    ###############
    class Scene_Equip
    def update_right
    # Se o botão B for pressionado
    if Input.trigger?(Input::B)
    # Reproduzir SE de cancelamento
    $game_system.se_play($data_system.cancel_se)
    # Alternar para a tela de Menu
    $scene = Scene_Menu.new(1)
    return
    end
    # Se o botão C for pressionado
    if Input.trigger?(Input::C)
    # Se o equipamento for fixo
    if @actor.equip_fix?(@right_window.index)
    # Reproduzir SE de erro
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Ativar janela de Itens
    @right_window.active = false
    @item_window.active = true
    @item_window.index = 0
    return
    end
    # Se o botão R for pressionado
    if Input.trigger?(Input::R)
    # Reproduzir SE de cursor
    $game_system.se_play($data_system.cursor_se)
    # O cursor se move para o próximo Herói
    @actor_index += 1
    @actor_index %= $game_party.actors.size
    # Alternar para uma tela de equipamento diferente
    $scene = Scene_Equip.new(@actor_index, @right_window.index)
    return
    end
    # Se o botão L for precionado
    if Input.trigger?(Input::L)
    # Reproduzir SE de cursor
    $game_system.se_play($data_system.cursor_se)
    # O cursor se move para o Herói anterior
    @actor_index += $game_party.actors.size - 1
    @actor_index %= $game_party.actors.size
    # Alternar para uma tela de equipamento diferente
    $scene = Scene_Equip.new(@actor_index, @right_window.index)
    return
    end
    end
    end
    ###############
    # Scene_Skill #
    ###############
    class Scene_Skill
    def update_skill
    # Se o botão B for pressionado
    if Input.trigger?(Input::B)
    # Reproduzir SE de cancelamento
    $game_system.se_play($data_system.cancel_se)
    # Alternar para a tela de Menu
    $scene = Scene_Menu.new(2)
    return
    end
    # Se o botão C for pressionado
    if Input.trigger?(Input::C)
    # Selecionar dados escolhidos na janela de Habilidades
    @skill = @skill_window.skill
    # Aqui é verificado se é possível utilizar a Habilidade
    if @skill == nil or not @actor.skill_can_use?(@skill.id)
    # Reproduzir SE de erro
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Reproduzir SE de OK
    $game_system.se_play($data_system.decision_se)
    # Se o efeito da Habilidade for um aliado
    if @skill.scope >= 3
    # Ativar janela alvo
    @skill_window.active = false
    @target_window.x = (@skill_window.index + 1) % 2 * 304
    @target_window.visible = true
    @target_window.active = true
    # Definir se o alcance é um aliado ou todo o grupo
    if @skill.scope == 4 || @skill.scope == 6
    @target_window.index = -1
    elsif @skill.scope == 7
    @target_window.index = @actor_index - 10
    else
    @target_window.index = 0
    end
    # Se o efeito for outro senão para um aliado
    else
    # Se o ID do evento comum for válido
    if @skill.common_event_id > 0
    # Chamar evento comum da reserva
    $game_temp.common_event_id = @skill.common_event_id
    # Reproduzir SE da Habilidade
    $game_system.se_play(@skill.menu_se)
    # Descontar MP
    @actor.sp -= @skill.sp_cost
    # Recriar cada conteúdo das janelas
    @status_window.refresh
    @skill_window.refresh
    @target_window.refresh
    # Alternar para a tela do Mapa
    $scene = Scene_Map.new
    return
    end
    end
    return
    end
    # Se o botão R for pressionado
    if Input.trigger?(Input::R)
    # Reproduzir SE de cursor
    $game_system.se_play($data_system.cursor_se)
    # O comando leva ao próximo Herói
    @actor_index += 1
    @actor_index %= $game_party.actors.size
    # Alternar para uma tela de Habilidades diferente
    $scene = Scene_Skill.new(@actor_index)
    return
    end
    # Se o botão L for pressionado
    if Input.trigger?(Input::L)
    # Reproduzir SE de cursor
    $game_system.se_play($data_system.cursor_se)
    # O comando leva ao Herói anterior
    @actor_index += $game_party.actors.size - 1
    @actor_index %= $game_party.actors.size
    # Alternar para uma tela de Habilidades diferente
    $scene = Scene_Skill.new(@actor_index)
    return
    end
    end
    end
    ##############
    # Scene_Item #
    ##############
    class Scene_Item
    def main
    # Aqui são criadas as janelas de Ajuda e de Itens
    @help_window = Window_Help2.new
    @help_window.width = 600
    @help_window.y = 20
    @help_window.x = 20
    @item_window = Window_Item.new
    @item_window.width = 600
    @item_window.x = 20
    @item_window.y = 64 + 20
    @item_window.height = 416 - 40
    # Associar a janela de Ajuda
    @item_window.help_window = @help_window
    # Criar janela alvo (definir como invisível / inativa)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    # Executar transição
    Graphics.transition
    # Loop principal
    loop do
    # Atualizar a tela de jogo
    Graphics.update
    # Atualizar a entrada de informações
    Input.update
    # Atualização do frame
    update
    # Abortar o loop se a tela foi alterada
    if $scene != self
    break
    end
    end
    # Prepara para transição
    Graphics.freeze
    # Exibição das janelas
    @help_window.dispose
    @item_window.dispose
    @target_window.dispose
    end
    def update_item
    # Se o botão B for pressionado
    if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    # Alternar para a tela de Menu
    $scene = Scene_Menu.new(0)
    return
    end
    # Se o botão C for pressionado
    if Input.trigger?(Input::C)
    # Selecionar os dados escolhidos na janela de Itens
    @item = @item_window.item
    # Se não for um Item usável
    unless @item.is_a?(RPG::Item)
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    # Se não puder ser usado
    unless $game_party.item_can_use?(@item.id)
    $game_system.se_play($data_system.buzzer_se)
    return
    end
    $game_system.se_play($data_system.decision_se)
    # Se o alcance do Item for um aliado
    if @item.scope >= 3
    # Ativar a janela alvo
    @item_window.active = false
    @target_window.x = 0
    @target_window.y = 120
    @target_window.visible = true
    @target_window.active = true
    if @item.scope == 4 || @item.scope == 6
    @target_window.index = -1
    else
    @target_window.index = 0
    end
    else
    # Se o ID do evento comum for inválido
    if @item.common_event_id > 0
    # Chamar evento comum da reserva
    $game_temp.common_event_id = @item.common_event_id
    $game_system.se_play(@item.menu_se)
    # Se for consumível
    if @item.consumable
    # Diminui 1 Item da quantidade total
    $game_party.lose_item(@item.id, 1)
    @item_window.draw_item(@item_window.index)
    end
    # Alternar para a tela do Mapa
    $scene = Scene_Map.new
    return
    end
    end
    return
    end
    end
    end
    ################
    # Window_Help2 #
    ################
    class Window_Help2 < Window_Base
    def initialize
    super(0, 0, 600, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    end
    def set_text(text, align = 1)
    # Caso algum alinhamento do texto ficar diferente de alguma outra parte...
    if text != @text or align != @align
    # O texto é redesenhado.
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
    @text = text
    @align = align
    @actor = nil
    end
    self.visible = true
    end
    def set_actor(actor)
    if actor != @actor
    self.contents.clear
    draw_actor_name(actor, 4, 0)
    draw_actor_state(actor, 140, 0)
    draw_actor_hp(actor, 284, 0)
    draw_actor_sp(actor, 460, 0)
    @actor = actor
    @text = nil
    self.visible = true
    end
    end
    def set_enemy(enemy)
    text = enemy.name
    state_text = make_battler_state_text(enemy, 112, false)
    if state_text != ""
    text += " " + state_text
    end
    set_text(text, 1)
    end
    end
    #################
    # Window_Target #
    #################
    class Window_Target < Window_Selectable
    def initialize
    super(0, 0, 640, 32*$game_party.actors.size + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.z += 10
    @item_max = $game_party.actors.size
    refresh
    end
    def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
    x = 4
    y = i * 32
    actor = $game_party.actors[i]
    draw_actor_name(actor, x, y)
    draw_actor_level2(actor, x + 120, y)
    draw_actor_state(actor, x + 180, y)
    draw_actor_hp2(actor, x + 280, y)
    draw_actor_sp2(actor, x + 460, y)
    end
    end
    def update_cursor_rect
    if @index < 0
    self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
    else
    self.cursor_rect.set(0, @index * 32, self.width - 32, 32)
    end
    end
    def draw_actor_level2(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, (BOF::Level))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 15, y, 24, 32, actor.level.to_s, 2)
    end
    end
    ###############
    # Window_Item #
    ###############
    class Window_Item < Window_Selectable
    def initialize
    super(0, 64, 600, 416)
    @column_max = 3
    refresh
    self.index = 0
    if $game_temp.in_battle
    self.y = 64
    self.height = 256
    self.back_opacity = 160
    end
    end
    def item
    return @data[self.index]
    end
    def refresh
    if self.contents != nil
    self.contents.dispose
    self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
    if $game_party.item_number(i) > 0
    @data.push($data_items[i])
    end
    end
    unless $game_temp.in_battle
    for i in 1...$data_weapons.size
    if $game_party.weapon_number(i) > 0
    @data.push($data_weapons[i])
    end
    end
    for i in 1...$data_armors.size
    if $game_party.armor_number(i) > 0
    @data.push($data_armors[i])
    end
    end
    end
    @item_max = @data.size
    if @item_max > 0
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in [email=0...@item_max]0...@item_max[/email]
    draw_item(i)
    end
    end
    end
    def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
    number = $game_party.item_number(item.id)
    when RPG::Weapon
    number = $game_party.weapon_number(item.id)
    when RPG::Armor
    number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
    $game_party.item_can_use?(item.id)
    self.contents.font.color = normal_color
    else
    self.contents.font.color = disabled_color
    end
    x = 4 + index % 3 * (167 + 32)
    y = index / 3 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 106, 32, item.name, 0)
    self.contents.draw_text(x + 126, y, 16, 32, BOF::Item_X, 1)
    self.contents.draw_text(x + 136, y, 24, 32, number.to_s, 2)
    end
    def update_help
    @help_window.set_text(self.item == nil ? Alucard_2::No_Description : self.item.description)
    end
    end
    class Window_SkillStatus < Window_Base
    def initialize(actor)
    super(0, 64, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
    end
    def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_state(@actor, 140, 0)
    draw_actor_hp2(@actor, 254, 0)
    draw_actor_sp2(@actor, 430, 0)
    end
    end
    class Window_Command2 < Window_Selectable
    def initialize(width, commands)
    super(0, 0, commands.size * 18 + 18, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    @column_max = commands.size if Use_Icons
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
    end
    def refresh
    self.contents.clear
    for i in [email=0...@item_max]0...@item_max[/email]
    draw_item(i, normal_color)
    end
    end
    def draw_item(index, color)
    self.contents.font.color = color
    if Use_Icons == true
    bitmap = RPG::Cache.icon(Option_Icon[index])
    x = (self.contents.width / (bitmap.width/2) * index) * Icon_Adjust
    rect = Rect.new(0, 0, bitmap.width, 32)
    self.contents.blt(x, 0, bitmap, rect)
    else
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 1))
    self.contents.draw_text(rect, @commands[index], 1)
    end
    end
    def update_cursor_rect
    if @index < 0
    self.cursor_rect.empty
    return
    end
    row = @index / @column_max
    if row < self.top_row
    self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
    self.top_row = row - (self.page_row_max - 1)
    end
    if Use_Icons == true
    bitmap = RPG::Cache.icon(Option_Icon[index])
    cursor_width = (self.contents.width / (bitmap.width/2))+2
    x = (self.contents.width / (bitmap.width/2) * index) * Icon_Adjust - 2
    y = -2
    self.cursor_rect.set(x, y, cursor_width, 32+2)
    else
    cursor_width = self.width / @column_max - 32
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y, cursor_width, 32)
    end
    end
    def disable_item(index)
    draw_item(index, disabled_color)
    end
    end
    class Window_Base
    include BOF
    def initialize(x, y, width, height)
    super()
    @windowskin_name = $game_system.windowskin_name
    self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
    $file = []
    end
    def make_battler_state_text(battler, width, need_normal)
    # Selecionar comrpimento dos Colchetes
    brackets_width = self.contents.text_size("[]").width
    # Criar um string de Status para texto
    text = ""
    for i in battler.states
    if $data_states[i].rating >= 1
    if text == ""
    text = $data_states[i].name
    else
    new_text = text + "/" + $data_states[i].name
    text_width = self.contents.text_size(new_text).width
    if text_width > width - brackets_width
    break
    end
    text = new_text
    end
    end
    end
    # Caso esteja vazio o string de texto, tornar isto Normal
    if text == ""
    if need_normal
    text = (BOF::Normal_Status)
    end
    else
    # Anexar Colchetes
    text = "[" + text + "]"
    end
    # Retornar string de texto
    return text
    end
    def useface
    return BOF::Use_Face
    end
    def draw_actor_face(actor, x, y, n)
    $file[n] = Sprite.new
    $file[n].bitmap = Cache.face("#{actor.face_name}")
    $file[n].x = x
    $file[n].y = y
    end
    def draw_actor_hp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    if width - 32 >= 108
    hp_x = x + width - 108
    flag = true
    elsif width - 32 >= 48
    hp_x = x + width - 48
    flag = false
    end
    self.contents.font.color = actor.hp == 0 ? knockout_color :
    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x + 30, y, 48, 32, actor.hp.to_s, 2)
    if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(hp_x + 88, y, 12, 32, "/", 1)
    self.contents.draw_text(hp_x + 110, y, 48, 32, actor.maxhp.to_s)
    end
    end
    def draw_actor_sp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    if width - 32 >= 108
    sp_x = x + width - 108
    flag = true
    elsif width - 32 >= 48
    sp_x = x + width - 48
    flag = false
    end
    self.contents.font.color = actor.sp == 0 ? knockout_color :
    actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x + 30, y, 48, 32, actor.sp.to_s, 2)
    if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(sp_x + 88, y, 12, 32, "/", 1)
    self.contents.draw_text(sp_x + 110, y, 48, 32, actor.maxsp.to_s)
    end
    end
    def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, (BOF::Level))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
    end
    def draw_actor_hp2(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    if width - 32 >= 108
    hp_x = x + width - 108
    flag = true
    elsif width - 32 >= 48
    hp_x = x + width - 48
    flag = false
    end
    self.contents.font.color = actor.hp == 0 ? knockout_color :
    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
    self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
    end
    end
    def draw_actor_sp2(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    if width - 32 >= 108
    sp_x = x + width - 108
    flag = true
    elsif width - 32 >= 48
    sp_x = x + width - 48
    flag = false
    end
    self.contents.font.color = actor.sp == 0 ? knockout_color :
    actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
    self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
    end
    end
    end
    class Game_Party
    def add_actor(actor_id)
    # Selecionar Herói
    actor = $game_actors[actor_id]
    # Se o Grupo tiver menos do que 4 Heróis e o Herói já não estiver no Grupo
    if @actors.size < 6 and not @actors.include?(actor)
    # Adicionar Herói
    @actors.push(actor)
    # Atualizar Jogador
    $game_player.refresh
    end
    end
    end
    class Scene_Status2
    def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    end
    def main
    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status2.new(@actor, 20, 132)
    @status_window.z = 1
    @status2_window = Window_Status2x2.new(@actor, 20, 20)
    @status2_window.z = 1
    @status3_window = Window_Status2x3.new(@actor, 20, 328)
    @status3_window.z = 1
    Graphics.transition
    loop do
    Graphics.update
    Input.update
    update
    if $scene != self
    break
    end
    end
    Graphics.freeze
    @status_window.dispose
    @status2_window.dispose
    @status3_window.dispose
    end
    def update
    if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(3)
    return
    end
    if Input.trigger?(Input::R)
    $game_system.se_play($data_system.cursor_se)
    @actor_index += 1
    @actor_index %= $game_party.actors.size
    $scene = Scene_Status2.new(@actor_index)
    return
    end
    if Input.trigger?(Input::L)
    $game_system.se_play($data_system.cursor_se)
    @actor_index += $game_party.actors.size - 1
    @actor_index %= $game_party.actors.size
    $scene = Scene_Status2.new(@actor_index)
    return
    end
    end
    end
    class Window_Status2 < Window_Base
    def initialize(actor, x, y)
    super(x, y, 600, 200)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
    end
    def refresh
    self.contents.clear
    draw_actor_level(@actor, 30, 5)
    draw_actor_state(@actor, 30, 27)
    draw_actor_hp(@actor, 30, 112, 172)
    draw_actor_sp(@actor, 30, 144, 172)
    draw_actor_parameter(@actor, 296, 5, 3)
    draw_actor_parameter(@actor, 296, 37, 1)
    draw_actor_parameter(@actor, 296, 69, 5)
    draw_actor_parameter(@actor, 296, 101, 6)
    draw_actor_parameter(@actor, 296, 133, 4)
    self.contents.font.color = system_color
    self.contents.draw_text(30, 48, 80, 32, (BOF::EXP_Total))
    self.contents.draw_text(30, 80, 80, 32, (BOF::EXP_for_Next_Level))
    self.contents.font.color = normal_color
    self.contents.draw_text(30 + 150, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(30 + 150, 80, 84, 32, @actor.next_rest_exp_s, 2)
    end
    def dummy
    refresh
    end
    end
    class Window_Status2x2 < Window_Base
    def initialize(actor, x, y)
    super(x, y, 600, 125)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
    end
    def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 30, 60)
    draw_actor_name(@actor, 10, 65)
    draw_actor_parameter(@actor, 96, 0, 0)
    draw_actor_parameter(@actor, 96, 32, 4)
    draw_actor_parameter(@actor, 96, 64, 2)
    draw_actor_parameter(@actor, 296, 0, 1)
    draw_actor_parameter(@actor, 296, 32, 5)
    draw_actor_parameter(@actor, 296, 64, 6)
    end
    def dummy
    refresh
    end
    end
    class Window_Status2x3 < Window_Base
    def initialize(actor, x, y)
    super(x, y, 600, 125)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    @actor = actor
    refresh
    end
    def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(5, 0, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(300, 0, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(5, 32, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(300, 32, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(5, 64, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 5 + 96, 0)
    draw_item_name($data_armors[@actor.armor1_id], 300 + 96, 0)
    draw_item_name($data_armors[@actor.armor2_id], 5 + 96, 32)
    draw_item_name($data_armors[@actor.armor3_id], 300 + 96, 32)
    draw_item_name($data_armors[@actor.armor4_id], 5 + 96, 64)
    end
    def dummy
    refresh
    end
    end
    ######################
    # Window_MenuStatus2 #
    ######################
    class Window_MenuStatus2 < Window_Selectable
    def initialize
    super(0, 0, 600, 440)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    [email=#@column_max]#@column_max[/email] = 2
    refresh
    @item_max = $game_party.actors.size
    self.active = false
    self.index = -1
    $file = []
    end
    def update_cursor_rect
    if @index < 0
    self.cursor_rect.empty
    else
    w = self.contents.width/2#319+(useface ? BOF::Face_Size/2 : 0) - 64
    x = 319 - 49
    case self.index
    when 0
    self.cursor_rect.set(0, 100, w, 96)
    when 1
    self.cursor_rect.set(x, 100, w, 96)
    when 2
    self.cursor_rect.set(0, 200, w, 96)
    when 3
    self.cursor_rect.set(x, 200, w, 96)
    when 4
    self.cursor_rect.set(0, 300, w, 96)
    when 5
    self.cursor_rect.set(x, 300, w, 96)
    end
    end
    end
    def update
    super
    if self.active and @item_max > 0 and @index >= 0
    if Input.trigger?(Input::DOWN)
    if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
    @index < @item_max - @column_max
    $game_system.se_play($data_system.cursor_se)
    end
    case self.index
    when 0
    self.index = 1
    when 1
    self.index = 2
    when 2
    self.index = 3
    when 3
    self.index = 4
    when 4
    self.index = 5
    when 5
    self.index = 0
    end
    end
    if Input.trigger?(Input::UP)
    if (@column_max == 1 and Input.trigger?(Input::UP)) or
    @index >= @column_max
    $game_system.se_play($data_system.cursor_se)
    end
    case self.index
    when 0
    self.index = 5
    when 1
    self.index = 0
    when 2
    self.index = 1
    when 3
    self.index = 2
    when 4
    self.index = 3
    when 5
    self.index = 4
    end
    end
    if Input.trigger?(Input::RIGHT)
    $game_system.se_play($data_system.cursor_se)
    self.index += 1
    end
    if Input.trigger?(Input::LEFT)
    $game_system.se_play($data_system.cursor_se)
    self.index -= 1
    end
    if self.index > $game_party.actors.size-1
    self.index = 0
    elsif self.index < 0
    self.index = $game_party.actors.size-1
    end
    end
    if self.active and @help_window != nil
    update_help
    end
    for i in $file
    $file[i].update
    end
    update_cursor_rect
    end
    def refresh
    self.contents.clear
    cruckets = -1
    x = 54
    y = 100
    @item_max = $game_party.actors.size
    c = []
    for i in 0...$game_party.actors.size
    c[i] = i
    end
    for actor in $game_party.actors
    cruckets += 1
    if c[cruckets] != nil
    c.delete(cruckets) if c[cruckets] % 2 != 1 and c[cruckets] != 2
    end
    facesize = BOF::Face_Size/2
    x = 319 + (useface ? facesize : 0) if cruckets % 2 == 1
    x = 49 + (useface ? facesize : 0) if cruckets % 2 != 1
    y += 100 if cruckets == 2 or cruckets == 4
    useface ? draw_actor_face(actor, x - facesize, y + facesize, cruckets) : draw_actor_graphic(actor, x - 40, y + 80)
    x += 10
    draw_actor_name(actor, x, y)
    draw_actor_level(actor, x, y + 20)
    draw_actor_hp(actor, x, y + 40)
    draw_actor_sp(actor, x, y + 60)
    end
    end
    end
    Perguntas Possíveis
    Q: Funciona no VX?
    R: Não.
    Créditos
    Créditos para Alucard_2, por criar e disponibilizar.

      Data/hora atual: Seg Jan 21, 2019 6:16 pm