Últimos temas
» [Ace]Movimiento Libre
por brrt Ayer a las 3:57 pm

» Virtual Kingom (Old Version)
por NinjaLOL Ayer a las 3:22 am

» Concurso de relatos - Septiembre/Octubre 2018 [Inscripción]
por raffael_0 Ayer a las 3:18 am

» Laminación [VXACE] [PROYECTO EN CURSO]
por Pocari Vie Oct 12, 2018 12:08 pm

» QUITAR VENTANA DEL MENU (VX ACE)
por THESHINYMISTERXD Sáb Oct 06, 2018 7:46 pm

» Condición para saber si el jugador está caminando
por Sonik Sáb Oct 06, 2018 5:03 pm

» ¿Tileset de un futbolín?
por MCarlos15 Jue Oct 04, 2018 9:07 pm

» RPG Maker VX Ace en MAC
por Er1ck_92 Mar Oct 02, 2018 8:42 am

» Distrito 0 [VXACE]
por BREAK93 Mar Oct 02, 2018 6:08 am

» Necesito taileset modernos pero que no tengan estilo anime por favor
por Doble D Mar Oct 02, 2018 12:36 am

» Fantasy World XP (+ de 200 para o grupo)
por DecinBR Sáb Sep 29, 2018 6:28 pm

» Problemas con un archivo
por AetherIssei Dom Sep 23, 2018 4:08 am


[ACE] One-Player Menu

Ir abajo

[ACE] One-Player Menu

Mensaje por Sonik el Jue Nov 24, 2016 12:12 am

Buen día, amigos del foro RMakercom. Hoy les vengo a traer un script creado por Tigurus y traducido por mí, que es ideal para juegos en los que haya un sólo actor. Se trata de un nuevo menú, que aunque sólo muestra un actor, permite utilizar las teclas "Q" y "W" para ir cambiando entre actores. Lamentablemente este script es incompatible con algunos scripts de HUDs, así que hay que tener cuidado.
Este nuevo menú muestra la localización de nuestro personaje, la cantidad de dinero que tiene, y la mayoría de su información. Aquí hay una captura para que puedan verlo mejor:



Los pasos que hay que seguir para instalar este script, es crear en Graphics una carpeta llamada Icons, en la que pondremos este ícono:  , luego de realizar estos pasos tendremos que abrir nuestro proyecto de RPG Maker y entrar al Editor de Scripts (F11), en el que pegaremos el script encima de Main.

Y por último, aquí tienen el script.

Código:
#==============================================================================#
# Script por: Tigurus Fay
# Traducción por: Sonik Games
#==============================================================================#
# Script: One-Player Menu Script                                              #
# Versión: v1.1.2 (ACE)                                                        #
# Instalación: Presionar F11 y pegar el script encima de [Main].              #
# Descripción: Este script añade un menú optimizado para un jugador.          #
#==============================================================================#
#==============================================================================#
# ** Soporte                                                                  #
#------------------------------------------------------------------------------#
# Si necesitas ayuda debido a un error en el script, puedes contactar con el  #
# creador en la siguiente página:                                              #
#                                                                              #
#- RPGMaker.org    - http://www.rpgmaker.org/resources/view.asp?id=57          #
#                                                                              #
#==============================================================================#
# ** Compatibilidad                                                            #
#------------------------------------------------------------------------------#
# Este script puede ser incompatible con:                                      #
# - Scripts de HUDs                                                            #
# - Otros scripts de menú                                                      #               
#==============================================================================#
# ** Términos y Condiciones                                                    #
#------------------------------------------------------------------------------#
#  - Puedes usar este script para tu videojuego
#  - Puedes modificar este script
#  - Puedes distribuir este script en otras páginas
#  - No puedes usar este script en videojuegos de pago
#  - ¡Siempre ponme en los créditos de tu proyecto!
#==============================================================================#
# ** Configuración                                                            #
#------------------------------------------------------------------------------#
#  Aquí puedes configurar lo más importante del script.                        #
#==============================================================================#

module TOPSVOCAB
 
  # Aquí puedes cambiar algunos textos del menú.
     
  # Cambiar ícono:
  # ¡No te olvides de crear una carpeta llamada Icons en Graphics para poner este ícono!
  # El ícono de la carpeta de Icons debe tener el mismo nombre que has puesto aquí abajo (Localización por defecto)
  # Ícono de localización
  LOCATION        = "Localización" # Para mejores resultados: 24x24 máx
 
 
  # Cambiar nombres de:
  # Menú de actores
    EXP          =    "EXP"
    Equipped      =    "Equipamiento"
    Wequipped    =    "Arma no equipada"
    Hequipped    =    "Casco no equipado"
    ARequipped    =    "Armadura no equipada"
    Sequipped    =    "Escudo no equipado"
    ACequipped    =    "Accesorio no equipado"
   
  # Salir del juego
    TOTITLE      =    "Al título"
    EXIT          =    "Salir del juego"
    CANCEL        =    "Cancelar"
     
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a super class of all windows within the game.
#==============================================================================
 class Window_Base

  def exp_gauge_color1;      text_color(7);  end;  # EXP gauge added lower half
  def exp_gauge_color2;      text_color(8);  end;  # EXP gauge added upper half
  def exp_gauge_back_color;  text_color(19);  end;  # EXP Gauge background
 
  # draws the EXP bar on the Menu
  def draw_expgauge(x, y, width, rate, color1, color2)
    fill_w = (width * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width, 6, exp_gauge_back_color)
    contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
  end
 
    def draw_exp(actor, x, y, width = 124)
        s1 = actor.max_level? ? "---------" : actor.exp
        s2 = actor.max_level? ? "0" : actor.next_level_exp - actor.exp
        if actor.max_level? ?
          draw_expgauge(x, y, width, 1, exp_gauge_color1, exp_gauge_color2) :
          draw_gauge(x, y,width,((((actor.exp - actor.current_level_exp).to_f/100) / ((actor.next_level_exp.to_f - actor.current_level_exp.to_f)/100))), 
          exp_gauge_color1, exp_gauge_color2)
        end
        change_color(system_color)
        draw_text(x, y, 30, line_height, TOPSVOCAB::EXP)
        change_color(normal_color)
        if actor.max_level? ?
          draw_text(x + width - 72, y, 72, line_height, "------------", 2) :
          draw_text(x + width - 72, y, 72, line_height, actor.next_level_exp.to_i - actor.exp.to_i, 2)
        end
      end   
     
  #--------------------------------------------------------------------------
  # * Draw Class
  #--------------------------------------------------------------------------
  def draw_actor_class_opm(actor, x, y, width = 200)
    change_color(normal_color)
    draw_text(x, y, width, line_height, actor.class.name)
  end
end

#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
#  This window displays the party's location
#==============================================================================

class Window_Location < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, Graphics.width - 340, window_height)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def window_height
    return 80
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_location_opm
  end

  def draw_location_opm
    bitmap = Bitmap.new("Graphics/Icons/" + TOPSVOCAB::LOCATION + ".png")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    ret_rect = Rect.new(contents.width - 25, 28, bitmap.width, bitmap.height)
    contents.stretch_blt(ret_rect, bitmap, src_rect)
    draw_text(contents.width - 232, 25, 204, line_height, $game_map.display_name, 2)
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end

#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays the party's gold.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, Graphics.width - 340, fitting_height(1))
    refresh
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_currency_value(value, currency_unit, 4, 0, contents.width - 8)
  end
  #--------------------------------------------------------------------------
  # * Get Party Gold
  #--------------------------------------------------------------------------
  def value
    $game_party.gold
  end
  #--------------------------------------------------------------------------
  # Get Currency Unit
  #--------------------------------------------------------------------------
  def currency_unit
    Vocab::currency_unit
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end

#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
#  This command window appears on the menu screen.
#==============================================================================

class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Initialize Command Selection Position (Class Method)
  #--------------------------------------------------------------------------
  def self.init_command_position
    @@last_command_symbol = nil
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
    select_last
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 340
  end
 
  def window_height
    return 128
  end
 
  def col_max
    return 2
  end
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_main_commands
    add_original_commands
    add_save_command
    add_game_end_command
  end
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    add_command(Vocab::item,  :item,  main_commands_enabled)
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end

  #--------------------------------------------------------------------------
  # * For Adding Original Commands
  #--------------------------------------------------------------------------
  def add_original_commands
  end
  #--------------------------------------------------------------------------
  # * Add Save to Command List
  #--------------------------------------------------------------------------
  def add_save_command
    add_command(Vocab::save, :save, save_enabled)
  end
  #--------------------------------------------------------------------------
  # * Add Exit Game to Command List
  #--------------------------------------------------------------------------
  def add_game_end_command
    add_command(TOPSVOCAB::TOTITLE, :to_title)
    add_command(TOPSVOCAB::EXIT, :shutdown)
    add_command(TOPSVOCAB::CANCEL, :cancel)
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Main Commands
  #--------------------------------------------------------------------------
  def main_commands_enabled
    $game_party.exists
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Formation
  #--------------------------------------------------------------------------
  def formation_enabled
    $game_party.members.size >= 2 && !$game_system.formation_disabled
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Save
  #--------------------------------------------------------------------------
  def save_enabled
    !$game_system.save_disabled
  end
  #--------------------------------------------------------------------------
  # * Processing When OK Button Is Pressed
  #--------------------------------------------------------------------------
  def process_ok
    @@last_command_symbol = current_symbol
    super
  end
  #--------------------------------------------------------------------------
  # * Restore Previous Selection Position
  #--------------------------------------------------------------------------
  def select_last
    select_symbol(@@last_command_symbol)
  end
end

#==============================================================================
# ** Window_MenuStatus_Opm
#------------------------------------------------------------------------------
#  This window displays full status specs on the menu screen.
#==============================================================================

class Window_MenuStatus_Opm < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, actor)
    super(0, 128, Graphics.width, Graphics.height - 128)
    @actor = $game_party.members[0]
    refresh
  end
  #--------------------------------------------------------------------------
  # * Set Actor
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_geninfo  (line_height * 0)
    draw_basicinfo  (line_height * 2)
    draw_parablock  (line_height * 1)
    draw_horz_line(line_height * 7)
    draw_equipblock (line_height * 8)
  end
  #--------------------------------------------------------------------------
  # * Draw general info
  #--------------------------------------------------------------------------
  def draw_geninfo(y)
    draw_actor_face(@actor, 8, y)
    draw_actor_fullname(120, y)
    draw_actor_level(@actor, 120, y + line_height * 1)
    draw_actor_class_opm(@actor, 120, y + line_height * 2)
    draw_actor_icons(@actor, 120, y + line_height * 3)
  end
 
  #--------------------------------------------------------------------------
  # * Draw basic info
  #--------------------------------------------------------------------------
  def draw_basicinfo(y)
    draw_basic_info(8, y)
  end

  #--------------------------------------------------------------------------
  # * Draw parablock
  #--------------------------------------------------------------------------
  def draw_parablock(y)
    draw_parameters(330, y)
  end

  #--------------------------------------------------------------------------
  # * Draw equipblock
  #--------------------------------------------------------------------------
  def draw_equipblock(y)
    draw_equipments(8, y)
  end

  #--------------------------------------------------------------------------
  # * Draw Horizontal Line
  #--------------------------------------------------------------------------
  def draw_horz_line(y)
    line_y = y + line_height / 2 - 1
    contents.fill_rect(0, line_y, contents_width, 2, line_color)
  end
  #--------------------------------------------------------------------------
  # * Get Color of Horizontal Line
  #--------------------------------------------------------------------------
  def line_color
    color = normal_color
    color.alpha = 48
    color
  end
  #--------------------------------------------------------------------------
  # * Draw Basic Information
  #--------------------------------------------------------------------------
  def draw_basic_info(x, y)
    draw_actor_hp(@actor, x, y + line_height * 2)
    draw_actor_mp(@actor, x, y + line_height * 3)
    draw_exp(@actor, x, y + line_height * 4)
  end
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
    6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
  end
  #--------------------------------------------------------------------------
  # * Draw Experience Information
  #--------------------------------------------------------------------------
  def draw_exp_info(x, y)
    s1 = @actor.max_level? ? "-------" : @actor.exp
    s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
    s_next = sprintf(Vocab::ExpNext, Vocab::level)
    change_color(system_color)
    draw_text(x, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
    draw_text(x, y + line_height * 2, 180, line_height, s_next)
    change_color(normal_color)
    draw_text(x, y + line_height * 1, 180, line_height, s1, 2)
    draw_text(x, y + line_height * 3, 180, line_height, s2, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Equipment
  #--------------------------------------------------------------------------
  def draw_equipments(x, y)
    change_color(system_color)
    draw_text(x, y, 180, line_height, TOPSVOCAB::Equipped, 0)
    change_color(normal_color)
      weapon = @actor.equips[0]
      shield = @actor.equips[1]
      helmet = @actor.equips[2]
      armor  = @actor.equips[3]
      acces  = @actor.equips[4]
    if weapon == nil
      change_color(knockout_color)
      draw_text(x, y + line_height + 10, 170, line_height, TOPSVOCAB::Wequipped)
      change_color(normal_color)
    else     
      draw_item_name(weapon, x, y + line_height + 10)
    end
    if shield == nil
      draw_text(x + 350, y + line_height + 10, 170, line_height, TOPSVOCAB::Sequipped)
    else     
      draw_item_name(shield, x + 350, y + line_height + 10)
    end
    if helmet == nil
      draw_text(x + 170, y, 170, line_height, TOPSVOCAB::Hequipped)
    else     
      draw_item_name(helmet, x + 170, y)
    end
    if armor == nil
      draw_text(x + 170, y + line_height + 10, 180, line_height, TOPSVOCAB::ARequipped)
    else     
      draw_item_name(armor, x + 170, y + line_height + 10, 0)
    end 
    if acces == nil
      draw_text(x + 350, y, 180, line_height, TOPSVOCAB::ACequipped)
    else     
      draw_item_name(acces, x + 350, y)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Description
  #--------------------------------------------------------------------------
  def draw_description(x, y)
    draw_text_ex(x, y, @actor.description)
  end
 
  #--------------------------------------------------------------------------
  # * Draw name + nickname
  #--------------------------------------------------------------------------
  def draw_actor_fullname(x, y)
    draw_text(x, y + line_height * 0, 180, line_height, @actor.name + " " + @actor.nickname)
  end
end

#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
#  This class performs skill screen processing. Skills are handled as items for
# the sake of process sharing.
#==============================================================================

class Scene_Skill

  def on_item_ok
    if $game_party.members.size == 1
      use_item
      activate_item_window
    else
      @actor.last_skill.object = item
      determine_item
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_command_window
    create_status_window
    create_location_window
    create_gold_window
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_MenuCommand.new
    @command_window.set_handler(:status,      method(:command_op_status))
    @command_window.set_handler(:item,        method(:command_item))
    @command_window.set_handler(:equip,      method(:command_op_equip))
    @command_window.set_handler(:skill,      method(:command_op_skill))
    @command_window.set_handler(:save,      method(:command_save))
    @command_window.set_handler(:to_title,  method(:command_game_to_titleTOPS))
    @command_window.set_handler(:shutdown,  method(:command_game_to_exitTOPS))
    @command_window.set_handler(:cancel,    method(:return_scene))
    # Makes it possible to change actors in the menu.
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,  method(:prev_actor))
  end
 
  #--------------------------------------------------------------------------
  # * Create Location Window
  #--------------------------------------------------------------------------
  def create_location_window
    @location_window = Window_Location.new
    @location_window.x = 340
    @location_window.y = 0
  end
 
  #--------------------------------------------------------------------------
  # * Create Gold Window
  #--------------------------------------------------------------------------
  def create_gold_window
    @gold_window = Window_Gold.new
    @gold_window.x = 340
    @gold_window.y = 80
  end
 
  #--------------------------------------------------------------------------
  # * Create Status Window
  #--------------------------------------------------------------------------
  def create_status_window
    @status_window = Window_MenuStatus_Opm.new(0, 128, @actor)
  end

  #--------------------------------------------------------------------------
  # * [Item] Command
  #--------------------------------------------------------------------------
  def command_item
    SceneManager.call(Scene_Item)
  end
  #--------------------------------------------------------------------------
  # * [Skill] Commands
  #--------------------------------------------------------------------------

  def command_op_skill
    @status_window.activate
    SceneManager.call(Scene_Skill)
  end
 
  #--------------------------------------------------------------------------
  # * [Equipment] Commands
  #--------------------------------------------------------------------------

  def command_op_equip
    @status_window.activate
    SceneManager.call(Scene_Equip)
  end
 
  #--------------------------------------------------------------------------
  # * [Status] Commands
  #--------------------------------------------------------------------------

  def command_op_status
    @status_window.activate
    SceneManager.call(Scene_Status)
  end
 
  #--------------------------------------------------------------------------
  # * [Save] Command
  #--------------------------------------------------------------------------
  def command_save
    SceneManager.call(Scene_Save)
  end
 
  #--------------------------------------------------------------------------
  # * [To Title] Command
  #--------------------------------------------------------------------------
  def command_game_to_titleTOPS
      fadeout_all
      SceneManager.goto(Scene_Title)
  end

  #--------------------------------------------------------------------------
  # * [Exit Command
  #--------------------------------------------------------------------------
  def command_game_to_exitTOPS
      fadeout_all
      SceneManager.exit
  end
   
  #--------------------------------------------------------------------------
  # * [Cancel] Personal Command
  #--------------------------------------------------------------------------
  def on_personal_cancel
    @status_window.unselect
    @command_window.activate
  end
 
  def on_actor_change
    @status_window.actor = @actor
    @command_window.activate
  end
end
avatar
Sonik
PJ Recurrente
PJ Recurrente

Masculino
Venezuela
RPG Maker : Ace
Mensajes : 82
Monedas : 267
Reputación : 12
Edad : 15
Localización : El infierno

Volver arriba Ir abajo

Re: [ACE] One-Player Menu

Mensaje por KRiZaLiD el Jue Nov 24, 2016 4:45 pm

Está bonito, de seguro le servirá a más de alguno, pues he visto a muchos creando proyectos en donde solo se usa 1 actor. Te doy mi +1, por compartirlo y darte el tiempo de traducirlo.
saludos
KriZ

_________________
Mi Proyecto:


KRiZaLiD apoya:
avatar
KRiZaLiD
Moderador
Moderador

Masculino
Chile
RPG Maker : Vx
Mensajes : 801
Monedas : 4192
Reputación : 102
Edad : 33
Localización : Florida (pueblo fantasma), Chile

Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.