O TEMA DO FÓRUM ESTÁ EM MANUTENÇÃO. FEEDBACKS AQUI: ACESSAR

Dúvidas do Silver ;-;

Iniciado por Silverlake, 17/07/2016 às 00:33

17/07/2016 às 00:33 Última edição: 11/12/2016 às 02:50 por Silverlake
Olá meu povo.  :cool:

Estou com uma dificuldade aqui e nem tenho certeza se tem como fazer isso, então decidi fazer um tópico para pedir a ajuda de vocês.

Eu utilizo um script que me permite colocar uma imagem de background no meu menu principal, e eu gostaria de saber se tem como eu mudar essa imagem de fundo quando há um personagem na minha party.
Se tem como fazer isto como eu posso fazer?

Espero que não tenha ficado difícil de entender minha dúvida...

"Era uma vez um elfo encantado que morava num pé de caqui..."

E ai Silver blz?

Olha, tem como mudar sim, não sei qual o seu nível para scripts, mas você pode criar uma boolean que é ativada quando o personagem estiver no seu grupo, e quando ela é ativada você deixa a opacidade da imagem atual em 0 e coloca outra imagem com opacidade 255, isso é só um exemplo, mas há outros meios também, posta o script e as imagens pra gente, que pode facilitar pra quem for te ajudar, e se quiser eu posso dar uma olhada aqui também, mas saiba que é possível, não é muito difícil não.

Abraços do Lyca!
Fazer mapas é uma arte, faça como se fosse o seu último.




17/07/2016 às 11:02 #2 Última edição: 30/07/2016 às 13:44 por King Gerar
Eu faria um condição, se o personagem está no grupo, cria tal imagem, se não, cria a outra. Como o Lyca falou,
é de boa, acho, mas tendo o script em mãos fica mais fácil de saber o melhor método de colocar isso pra ti.

Oi, td joia  :ok:

Eu não sou leigo em lógica de programação geral porém nunca aprendi/me interessei muito pela linguagem ruby então eu dei uma boiada aqui kkkk

Mas eu acredito que esteja me dizendo para criar uma estrutura condicional no script não é? Exemplo:
se (personagem A no grupo){
  opacidade imagem 1 = 0
  opacidade imagem 2 = 255
  opacidade imagem 3 = 0
  }se não{
    se (personagem B no grupo){
      opacidade imagem 1 = 0
      opacidade imagem 2 = 0
      opacidade imagem 3 = 255
      }se não{
        opacidade imagem 1 = 255
        opacidade imagem 2 = 0
        opacidade imagem 3 = 0
      }
  }
e por aí vai.....


O problema é que não sei como fazer isso em ruby :c

A minha ideia era de tentar fazer isso metade por eventos e metade por script, ou seja, eu criaria esta estrutura condicional em um evento comum e ao invés de mudar a opacidade das imagens eu chamaria o script para mudar a imagem lá.

O script que eu uso é um que permite usar um backgroud diferente para cada sessão do menu. Essa é a parte do script que eu coloco a imagem que eu quero mostrar. A única que eu preciso que mude é a SCENE_MENU que é a do menu principal.
  Various_Backgrounds = true
  
  SCENE_MENU = "Menu"
  SCENE_ITEM = ""
  SCENE_SKILL = ""
  SCENE_EQUIP = ""
  SCENE_STATUS = ""
  SCENE_SHOP = ""
  SCENE_SAVE = ""
  SCENE_LOAD = ""
  SCENE_END = ""
  
  STANDARD_BACKGROUND = ""


Eu queria que quando não houvesse nenhum personagem na party mostrar essa imagem:
Spoiler
[close]
E quando houvesse mostraria esta (sendo que seria uma imagem diferente para cada personagem diferente que estivesse comigo):
Spoiler
[close]

Tem como eu fazer isso da maneira que eu falei ou deve ser só por script mesmo? Se tiver como eu faço? o.O

"Era uma vez um elfo encantado que morava num pé de caqui..."

17/07/2016 às 11:18 #4 Última edição: 30/07/2016 às 13:44 por King Gerar
Mas não tem como postar o script todo não? E acho que não dá para fazer essa mudança por eventos não. Essa
parte que contém os nomes das imagens parece ser um módulo, e pelo que entendo, são lidos antes mesmo
do jogo ser iniciado. De qualquer forma, fazer isso dentro do script parece ser bem mais fácil. Seria bom também
informar o id da personagem no banco de dados.

Ah entendi...

Então aqui vai o script:
Spoiler
module Eiswinds_Custom_Menu
#---------------------------------------------------------------------------------------------
# Version 1.5      Credits an Eiswind
#---------------------------------------------------------------------------------------------
#Dieses Script hat momentan vier Funktionen:
# 1. Es kann die Hintergründe der jeweiligen Menüs nach Belieben verändern
# 2. Man kann Menüpunkte aktivieren/deaktivieren ohne, dass man in den Originalscripten
#    arbeiten muss.
# 3. Man kann nun indem man "Load" auf true stellt, einen Menüpunkt einfügen, der es einem
#    erlaubt das Spiel zu laden.
# 4. Man kann den Schrittzähler und die Spielzeit im Menü einblenden und deren Position verändern,
#    sowie die Position des Gold-Fensters.
# 5. Man kann 6 verschiedene Animationen beim Aufrufen und Verlassen des Menüs auswählen.
# 6. Der Ton beim Öffnen und Schließen des Menüs lässt sich abschalten. Außerdem ist es
#    möglich einen frei wählbaren anderen Sound für die dauer der Menü-Animation abzuspielen.
#---------------------------------------------------------------------------------------------
# Hier werden die Hintergründe eingestellt. Setzt man Various_Backgrounds auf true, werden
# die darunter aufgeführten Hintergründe in den jeweiligen Szenen verwendet. Auf false
# wird der Standardhintergrund verwendet (STANDARD_BACKGROUND). Wird der STANDARD_BACKGROUND
# leer gelassen, wird die standard Menü-Ansicht verwendet (Screenshot der Map).
# Es ist empfehlenswert möglichst starke Hintergründe zu verwenden, oder den Windowskin
# möglichst transparent zu halten, damit die Hintergründe gut zur Geltung kommen.
#
# Die Hintergründe müssen in den Ordner Pictures/Bilder im Maker importiert werden. Die
# Namen in den "" werden dann einfach dementsprechend ausgetauscht.
#---------------------------------------------------------------------------------------------
  Various_Backgrounds = true
  
  SCENE_MENU = "Menu"
  SCENE_ITEM = ""
  SCENE_SKILL = ""
  SCENE_EQUIP = ""
  SCENE_STATUS = ""
  SCENE_SHOP = ""
  SCENE_SAVE = ""
  SCENE_LOAD = ""
  SCENE_END = ""
  
  STANDARD_BACKGROUND = "" 
#---------------------------------------------------------------------------------------------
# Hier werden die Menüpunkte innerhalb des Spiels verwaltet.
# Menüpunkte, die angezeigt werden sollen müssen auf true gesetzt werden.
# Menüpunkte, die ausgeblendet werden sollen müssen auf false gesetzt werden.
#
# ACHTUNG: Wenn man die Speicherfunktion hier deaktiviert, kann sie nicht über reguläre
# Events gesteuert werden.
#---------------------------------------------------------------------------------------------
  Formation = false
  Item = true
  Skill = false
  Equip = false
  Status = false
  
  Save = true
  End = true
#---------------------------------------------------------------------------------------------
# "MainStatus" legt fest, ob das Hauptfenster in der Mitte des Menüs ein- bzw. ausgeblendet
# wird.
#---------------------------------------------------------------------------------------------
  MainStatus = false

#---------------------------------------------------------------------------------------------
# Setzt man "Load" auf true bekommt man im Spielmenü die möglichkeit das Spiel über einen 
# eigenen Menüpunkt zu laden. "LOAD_NAME" bezeichnet den Namen den der Menüpunkt im Spiel
# hat.
#---------------------------------------------------------------------------------------------
  Load = true
  LOAD_NAME = ""
#---------------------------------------------------------------------------------------------
# Setzt man "Gold" auf true, wird das Gold-Fenster angezeigt. Über "GOLD_X" und
# "GOLD_Y" lässt sich die Position des Fensters verändern. Die Standardeinstellungen
# sind X = 0 und Y = 368.
#---------------------------------------------------------------------------------------------
  Gold = true
  GOLD_X = 175
  GOLD_Y = 368
#---------------------------------------------------------------------------------------------
# "Steps" zeigt die Gesamtzahl der Schritte im Menü an. "STEPS_NAME" legt die Bezeichnung
# fest. Mit "STEPS_X" und "STEPS_Y" lassen sich die Koordinaten einstellen. Die 
# Standardwerte liegen bei X = 0 und Y = 320.
#---------------------------------------------------------------------------------------------
  Steps = false
  STEPS_NAME = "Steps"
  STEPS_X = 0
  STEPS_Y = 320
#---------------------------------------------------------------------------------------------
# "Time" zeigt die aktuelle Spielzeit im Menü an. "TIME_NAME" legt die Bezeichnung fest.
# "TIME_X" und "TIME_Y" legen die Koordinaten des Fensters fest.
# Die Standardwerte liegen bei X = 0 und Y = 272.
#---------------------------------------------------------------------------------------------
  Time = false
  TIME_NAME = "Time"
  TIME_X = 0
  TIME_Y = 272
#---------------------------------------------------------------------------------------------
# ACHTUNG: Die X-Koordinaten der Fenster sollten nur verändert werden wenn "MainStatus"
# auf false steht. Ansonsten könnte das Hauptfenster überdeckt werden.
#---------------------------------------------------------------------------------------------
# "USE_FADEIN_ANIMATION" bestimmt ob beim Aufrufen des Menüs eine Animation verwendet wird.
# "USE_FADEOUT_ANIMATION" legt das Gleiche beim Verlassen des Menüs fest.
#---------------------------------------------------------------------------------------------
  USE_FADEIN_ANIMATION = false
  USE_FADEOUT_ANIMATION = false
#---------------------------------------------------------------------------------------------
# "FADEIN_TYPE" legt fest welche der 6 Animationen beim Aufrufen des Menüs verwendet wird.
# Folgende Animationen sind vorhanden:
# 1: Die linken Fenster fliegen von links ein und das Statusfenster von rechts.
# 2: Alle Fenster fliegen von rechts ein.
# 3: Alle Fenster fliegen von links ein.
# 4: Die linken Fenster fliegen von oben ein und das Statusfenster von unten.
# 5: Alle Fenster fliegen von oben ein.
# 6: Alle Fenster fliegen von unten ein.
#---------------------------------------------------------------------------------------------
  FADEIN_TYPE = 4
#---------------------------------------------------------------------------------------------
# "FADEOUT_TYPE" bestimmt welche Animation beim Verlassen des Menüs verwendet wird.
# Der Ablauf der Animationen ist genau umgekehrt wie die des Fadein_Types.
# Beispiel: Bei Animation 1 fliegen die linken Fenster nach links und das Statusfenster nach
# rechts aus.
#---------------------------------------------------------------------------------------------
  FADEOUT_TYPE = 6
#---------------------------------------------------------------------------------------------
# "ANIMATION_SPEED" bestimmt die Geschwindigkeit der Animation in Pixel pro Frame
# (1 Frame = 1 / 60 Sekunden).
#---------------------------------------------------------------------------------------------
  ANIMATION_SPEED = 8
#---------------------------------------------------------------------------------------------
# "MENU_TRIGGER_SOUND" schaltet die Standardtöne beim Aufrufen und Verlassen des Menüs ab,
# wenn man den Wert auf false setzt.
#---------------------------------------------------------------------------------------------
  MENU_TRIGGER_SOUND = true
#---------------------------------------------------------------------------------------------
# "MENU_ENTRY_SOUND" legt den Ton beim Aufrufen des Menüs fest.
# "MENU_EXIT_SOUND" legt den Ton beim Verlassen des Menüs fest.
# ACHTUNG: Die Sounds werden nur abgespielt wenn "MENU_TRIGGRE_SOUND" auf true steht
# will man die Standardtöne verwenden so lässt man die "" einfach leer.
#---------------------------------------------------------------------------------------------
  MENU_ENTRY_SOUND = ""
  MENU_EXIT_SOUND = ""
#---------------------------------------------------------------------------------------------
# Ab hier nichts mehr bearbeiten!
#---------------------------------------------------------------------------------------------
end

class Scene_MenuBase < Scene_Base
    
  alias eiswinds_create_background create_background
  def create_background
    eiswinds_create_background
    @background_sprite = Sprite.new
    if Eiswinds_Custom_Menu::Various_Backgrounds
      if SceneManager.scene_is?(Scene_Menu)
        if Eiswinds_Custom_Menu::SCENE_MENU.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_MENU)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Item)
        if Eiswinds_Custom_Menu::SCENE_ITEM.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_ITEM)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Skill)
        if Eiswinds_Custom_Menu::SCENE_SKILL.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SKILL)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Equip)
        if Eiswinds_Custom_Menu::SCENE_EQUIP.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_EQUIP)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Status)
        if Eiswinds_Custom_Menu::SCENE_STATUS.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_STATUS)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Shop)
        if Eiswinds_Custom_Menu::SCENE_SHOP.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SHOP)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Save)
        if Eiswinds_Custom_Menu::SCENE_SAVE.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SAVE)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Load)
        if Eiswinds_Custom_Menu::SCENE_LOAD.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_LOAD)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_End)
        if Eiswinds_Custom_Menu::SCENE_END.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_END)
        else
          set_standard_background
        end
      end
    else
      set_standard_background
    end
  end
      
  def set_standard_background
    if Eiswinds_Custom_Menu::STANDARD_BACKGROUND.size < 3
      @background_sprite.bitmap = SceneManager.background_bitmap
    else
      @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::STANDARD_BACKGROUND)
    end
  end
      
end
    
class Scene_Menu < Scene_MenuBase
  
  def start
    super
    create_command_window
    create_gold_window if Eiswinds_Custom_Menu::Gold
    create_status_window if Eiswinds_Custom_Menu::MainStatus
    create_steps_window if Eiswinds_Custom_Menu::Steps
    create_time_window if Eiswinds_Custom_Menu::Time
    @cancelanim = false
  end
  
  alias eiswinds_create_command_window create_command_window
    def create_command_window
      eiswinds_create_command_window
      @command_window.set_handler(:continue,      method(:command_continue))
      if animation_used?
        case Eiswinds_Custom_Menu::FADEIN_TYPE
        when 1
          @command_window.x = -265
          @command_window.y = 0
        when 2
          @command_window.x = 544
          @command_window.y = 0
        when 3
          @command_window.x = -544
          @command_window.y = 0
        when 4
          @command_window.x = 0
          @command_window.y = -416
        when 5
          @command_window.x = 0
          @command_window.y = -416
        when 6
          @command_window.x = 0
          @command_window.y = 417
        end
      end
    end
    
  def command_continue
    SceneManager.call(Scene_Load)
  end
  
  def create_status_window
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @status_window = Window_MenuStatus.new(544, 0)
      when 2
        @status_window = Window_MenuStatus.new(704, 0)
      when 3
        @status_window = Window_MenuStatus.new(-384, 0)
      when 4
        @status_window = Window_MenuStatus.new(@command_window.width, 417)
      when 5
        @status_window = Window_MenuStatus.new(@command_window.width, -416)
      when 6
        @status_window = Window_MenuStatus.new(@command_window.width, 417)
      end
    else
      @status_window = Window_MenuStatus.new(@command_window.width, 0)
    end
  end
  
  def create_steps_window
    @steps_window = Window_Steps.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @steps_window.x = -265
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 2
        @steps_window.x = 544
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 3
        @steps_window.x = -544
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 4
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = -416 + Eiswinds_Custom_Menu::STEPS_Y  
      when 5
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = -416 + Eiswinds_Custom_Menu::STEPS_Y  
      when 6
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = 417 + Eiswinds_Custom_Menu::STEPS_Y 
      end
    else
      @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
    end
  end
  
  def create_gold_window
    @gold_window = Window_Gold.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @gold_window.x = -265
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 2
        @gold_window.x = 544
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 3
        @gold_window.x = -544
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 4
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = -416 + Eiswinds_Custom_Menu::GOLD_Y
      when 5
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = -416 + Eiswinds_Custom_Menu::GOLD_Y
      when 6
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = 417 + Eiswinds_Custom_Menu::GOLD_Y
      end
    else
      @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
    end
  end
  
  def create_time_window
    @time_window = Window_Time.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @time_window.x = -265
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 2
        @time_window.x = 544
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 3
        @time_window.x = -544
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 4
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = -416 + Eiswinds_Custom_Menu::TIME_Y
      when 5
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = -416 + Eiswinds_Custom_Menu::TIME_Y
      when 6
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = 417 + Eiswinds_Custom_Menu::TIME_Y
      end
    else
      @time_window.x = Eiswinds_Custom_Menu::TIME_X
      @time_window.y = Eiswinds_Custom_Menu::TIME_Y
    end
  end
  
  def animation_used?
    if Eiswinds_Custom_Menu::USE_FADEIN_ANIMATION 
      return true
    elsif Eiswinds_Custom_Menu::USE_FADEOUT_ANIMATION
      return true
    end
  end
  
  alias eiswinds_custom_menu_update update
  def update
    eiswinds_custom_menu_update
    if @cancelanim == false
      if animation_used?
        case Eiswinds_Custom_Menu::FADEIN_TYPE
        when 1
          right_left_to_middle
        when 2
          right_to_middle
        when 3
          left_to_middle
        when 4
          top_bottom_to_middle
        when 5
          top_to_middle
        when 6
          bottom_to_middle
        end
      end
    else
      if Eiswinds_Custom_Menu::USE_FADEOUT_ANIMATION
        case Eiswinds_Custom_Menu::FADEOUT_TYPE
        when 1
          f_right_left_to_middle
          if @command_window.x == -265
            SceneManager.return
          end
        when 2
          f_right_to_middle
          if @command_window.x == 544
            SceneManager.return
          end
        when 3
          f_left_to_middle
          if @command_window.x == -544
            SceneManager.return
          end
        when 4
          f_top_bottom_to_middle
          if @command_window.y == -416
            SceneManager.return
          end
        when 5
          f_top_to_middle
          if @command_window.y == -416
            SceneManager.return
          end
        when 6
          f_bottom_to_middle
          if @command_window.y == 417
            SceneManager.return
          end
        end
      else  
        SceneManager.return
      end
    end
  end
  
  def right_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > @command_window.width
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED 
      elsif @status_window.x < @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x > Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x < 0
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def right_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > @command_window.width
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x < @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x > 0
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < @command_window.width
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x > @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x < 0
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def top_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > 0
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPSY
      end
    end
    if @command_window.y < 0
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 0
      @command_window.y = 0
    end
  end
  
  def top_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 0
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y > Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      end
    end
    if @command_window.y < 0
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 0
      @command_window.y = 0
    end
  end
  
  def bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > 0
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      end
    end
    if @command_window.y > 0
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < 0
      @command_window.y = 0
    end
  end
  
  def return_scene
    @cancelanim = true
  end
  
  def f_right_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < 544
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED 
      elsif @status_window.x > 544
        @status_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > -265
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < -265
        @gold_window.x = -265
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > -265
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < -265
        @time_window.x = -265
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > -265
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < -265
        @steps_window.x = -265
      end
    end
    if @command_window.x > -265
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x < -265
      @command_window.x = -265
    end
  end
  
  def f_right_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < 704
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x > 704
        @status_window.x = 704
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < 544
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x > 544
        @gold_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < 544
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > 544
        @time_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < 544
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > 544
        @steps_window.x = 544
      end
    end
    if @command_window.x < 544
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 544
      @command_window.x = 544
    end
  end
  
  def f_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > -384
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x < -384
        @status_window.x = -384
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > -544
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < -544
        @gold_window.x = -544
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > -544
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < -544
        @time_window.x = -544
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > -544
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < -544
        @steps_window.x = -544
      end
    end
    if @command_window.x > -544
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x < -544
      @command_window.x = -544
    end
  end
  
  def f_top_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 417
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 417
        @status_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > -416
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < -416
        @gold_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > -416
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < -416
        @time_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > -416
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < -416
        @steps_window.y = -416
      end
    end
    if @command_window.y > -416
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < -416
      @command_window.y = -416
    end
  end
  
  def f_top_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > -416
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < -416
        @status_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > -416
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < -416
        @gold_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > -416
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < -416
        @time_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > -416
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < -416
        @steps_window.y = -416
      end
    end
    if @command_window.y > -416
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < -416
      @command_window.y = -416
    end
  end
  
  def f_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 417
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 417
        @status_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < 417
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y > 417
        @gold_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < 417
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > 417
        @time_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < 417
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > 417
        @steps_window.y = 417
      end
    end
    if @command_window.y < 417
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 417
      @command_window.y = 417
    end
  end

end

class Window_MenuCommand < Window_Command

  def make_command_list
    add_main_commands
    if Eiswinds_Custom_Menu::Formation
      add_formation_command
    end
    add_original_commands
    if Eiswinds_Custom_Menu::Save
      add_save_command
    end
    if Eiswinds_Custom_Menu::Load
      add_load_command
    end
    if Eiswinds_Custom_Menu::End
      add_game_end_command
    end
  end
  
  def add_main_commands
    if Eiswinds_Custom_Menu::Item
      add_command(Vocab::item,   :item,   main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Skill
      add_command(Vocab::skill,  :skill,  main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Equip
      add_command(Vocab::equip,  :equip,  main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Status
      add_command(Vocab::status, :status, main_commands_enabled)
    end
  end
  
  def add_load_command
    add_command(Eiswinds_Custom_Menu::LOAD_NAME, :continue)
  end
  
  def process_cancel
    if Eiswinds_Custom_Menu::MENU_TRIGGER_SOUND == true
      if Eiswinds_Custom_Menu::MENU_EXIT_SOUND.size > 3
        RPG::SE.new(Eiswinds_Custom_Menu::MENU_EXIT_SOUND, 100, 100).play
      else
        Sound.play_cancel
      end
    end
    Input.update
    deactivate
    call_cancel_handler
  end
  
end

class Window_Steps < Window_Base
  
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  
  def window_width
    return 160
  end
  
  def refresh
    self.contents.clear
    self.contents.draw_text(4, 0, contents.width - 8, contents.height - 4, Eiswinds_Custom_Menu::STEPS_NAME + ": " + steps , 2)
  end
  
  def steps
    $game_party.steps.to_s
  end
  
end

class Window_Time < Window_Base
  
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  
  def window_width
    return 160
  end
  
  def refresh
    self.contents.clear
    @time = Graphics.frame_count / Graphics.frame_rate
    hour = @time / 60 / 60
    min = @time / 60 % 60
    sec = @time % 60
    fulltime = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.draw_text(4, 0, contents_width - 8, contents.height - 4, Eiswinds_Custom_Menu::TIME_NAME + ": " + fulltime, 2)
  end
  
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @time
      refresh
    end
  end
  
end

class Scene_Map < Scene_Base
  
  def call_menu
    if Eiswinds_Custom_Menu::MENU_TRIGGER_SOUND == true
      if Eiswinds_Custom_Menu::MENU_ENTRY_SOUND.size > 3
        RPG::SE.new(Eiswinds_Custom_Menu::MENU_ENTRY_SOUND, 100, 100).play
      else
        Sound.play_ok
      end
    end
    SceneManager.call(Scene_Menu)
    Window_MenuCommand::init_command_position
  end
  
end
[close]

Bom por enquanto eu só criei 2 personagens no banco de dados:
ID: 001 - Cinnamon(personagem principal)
ID: 002 - Cherry(personagem que entrará na party em certo momento do jogo)

Se a maneira mais fácil é pelo script tem como vocês me explicarem como fazer? Seria por uma estrutura condicional mesmo?

Eu acho que só se vocês me falarem como faz e em que lugar do script colocar isso eu me viro com os outros personagens. ^^

"Era uma vez um elfo encantado que morava num pé de caqui..."

17/07/2016 às 14:19 #6 Última edição: 30/07/2016 às 13:44 por King Gerar
Aqui. Adicionei só a condição e o lugar de denominar a nova imagem.

module Eiswinds_Custom_Menu
#---------------------------------------------------------------------------------------------
# Version 1.5      Credits an Eiswind
#---------------------------------------------------------------------------------------------
#Dieses Script hat momentan vier Funktionen:
# 1. Es kann die Hintergründe der jeweiligen Menüs nach Belieben verändern
# 2. Man kann Menüpunkte aktivieren/deaktivieren ohne, dass man in den Originalscripten
#    arbeiten muss.
# 3. Man kann nun indem man "Load" auf true stellt, einen Menüpunkt einfügen, der es einem
#    erlaubt das Spiel zu laden.
# 4. Man kann den Schrittzähler und die Spielzeit im Menü einblenden und deren Position verändern,
#    sowie die Position des Gold-Fensters.
# 5. Man kann 6 verschiedene Animationen beim Aufrufen und Verlassen des Menüs auswählen.
# 6. Der Ton beim Öffnen und Schließen des Menüs lässt sich abschalten. Außerdem ist es
#    möglich einen frei wählbaren anderen Sound für die dauer der Menü-Animation abzuspielen.
#---------------------------------------------------------------------------------------------
# Hier werden die Hintergründe eingestellt. Setzt man Various_Backgrounds auf true, werden
# die darunter aufgeführten Hintergründe in den jeweiligen Szenen verwendet. Auf false
# wird der Standardhintergrund verwendet (STANDARD_BACKGROUND). Wird der STANDARD_BACKGROUND
# leer gelassen, wird die standard Menü-Ansicht verwendet (Screenshot der Map).
# Es ist empfehlenswert möglichst starke Hintergründe zu verwenden, oder den Windowskin
# möglichst transparent zu halten, damit die Hintergründe gut zur Geltung kommen.
#
# Die Hintergründe müssen in den Ordner Pictures/Bilder im Maker importiert werden. Die
# Namen in den "" werden dann einfach dementsprechend ausgetauscht.
#---------------------------------------------------------------------------------------------
  Various_Backgrounds = true
  
  SCENE_MENU = "Menu"
  SCENE_MENU2 = "Menu2"
  SCENE_ITEM = ""
  SCENE_SKILL = ""
  SCENE_EQUIP = ""
  SCENE_STATUS = ""
  SCENE_SHOP = ""
  SCENE_SAVE = ""
  SCENE_LOAD = ""
  SCENE_END = ""
  
  STANDARD_BACKGROUND = "" 
#---------------------------------------------------------------------------------------------
# Hier werden die Menüpunkte innerhalb des Spiels verwaltet.
# Menüpunkte, die angezeigt werden sollen müssen auf true gesetzt werden.
# Menüpunkte, die ausgeblendet werden sollen müssen auf false gesetzt werden.
#
# ACHTUNG: Wenn man die Speicherfunktion hier deaktiviert, kann sie nicht über reguläre
# Events gesteuert werden.
#---------------------------------------------------------------------------------------------
  Formation = false
  Item = true
  Skill = false
  Equip = false
  Status = false
  
  Save = true
  End = true
#---------------------------------------------------------------------------------------------
# "MainStatus" legt fest, ob das Hauptfenster in der Mitte des Menüs ein- bzw. ausgeblendet
# wird.
#---------------------------------------------------------------------------------------------
  MainStatus = false

#---------------------------------------------------------------------------------------------
# Setzt man "Load" auf true bekommt man im Spielmenü die möglichkeit das Spiel über einen 
# eigenen Menüpunkt zu laden. "LOAD_NAME" bezeichnet den Namen den der Menüpunkt im Spiel
# hat.
#---------------------------------------------------------------------------------------------
  Load = true
  LOAD_NAME = ""
#---------------------------------------------------------------------------------------------
# Setzt man "Gold" auf true, wird das Gold-Fenster angezeigt. Über "GOLD_X" und
# "GOLD_Y" lässt sich die Position des Fensters verändern. Die Standardeinstellungen
# sind X = 0 und Y = 368.
#---------------------------------------------------------------------------------------------
  Gold = true
  GOLD_X = 175
  GOLD_Y = 368
#---------------------------------------------------------------------------------------------
# "Steps" zeigt die Gesamtzahl der Schritte im Menü an. "STEPS_NAME" legt die Bezeichnung
# fest. Mit "STEPS_X" und "STEPS_Y" lassen sich die Koordinaten einstellen. Die 
# Standardwerte liegen bei X = 0 und Y = 320.
#---------------------------------------------------------------------------------------------
  Steps = false
  STEPS_NAME = "Steps"
  STEPS_X = 0
  STEPS_Y = 320
#---------------------------------------------------------------------------------------------
# "Time" zeigt die aktuelle Spielzeit im Menü an. "TIME_NAME" legt die Bezeichnung fest.
# "TIME_X" und "TIME_Y" legen die Koordinaten des Fensters fest.
# Die Standardwerte liegen bei X = 0 und Y = 272.
#---------------------------------------------------------------------------------------------
  Time = false
  TIME_NAME = "Time"
  TIME_X = 0
  TIME_Y = 272
#---------------------------------------------------------------------------------------------
# ACHTUNG: Die X-Koordinaten der Fenster sollten nur verändert werden wenn "MainStatus"
# auf false steht. Ansonsten könnte das Hauptfenster überdeckt werden.
#---------------------------------------------------------------------------------------------
# "USE_FADEIN_ANIMATION" bestimmt ob beim Aufrufen des Menüs eine Animation verwendet wird.
# "USE_FADEOUT_ANIMATION" legt das Gleiche beim Verlassen des Menüs fest.
#---------------------------------------------------------------------------------------------
  USE_FADEIN_ANIMATION = false
  USE_FADEOUT_ANIMATION = false
#---------------------------------------------------------------------------------------------
# "FADEIN_TYPE" legt fest welche der 6 Animationen beim Aufrufen des Menüs verwendet wird.
# Folgende Animationen sind vorhanden:
# 1: Die linken Fenster fliegen von links ein und das Statusfenster von rechts.
# 2: Alle Fenster fliegen von rechts ein.
# 3: Alle Fenster fliegen von links ein.
# 4: Die linken Fenster fliegen von oben ein und das Statusfenster von unten.
# 5: Alle Fenster fliegen von oben ein.
# 6: Alle Fenster fliegen von unten ein.
#---------------------------------------------------------------------------------------------
  FADEIN_TYPE = 4
#---------------------------------------------------------------------------------------------
# "FADEOUT_TYPE" bestimmt welche Animation beim Verlassen des Menüs verwendet wird.
# Der Ablauf der Animationen ist genau umgekehrt wie die des Fadein_Types.
# Beispiel: Bei Animation 1 fliegen die linken Fenster nach links und das Statusfenster nach
# rechts aus.
#---------------------------------------------------------------------------------------------
  FADEOUT_TYPE = 6
#---------------------------------------------------------------------------------------------
# "ANIMATION_SPEED" bestimmt die Geschwindigkeit der Animation in Pixel pro Frame
# (1 Frame = 1 / 60 Sekunden).
#---------------------------------------------------------------------------------------------
  ANIMATION_SPEED = 8
#---------------------------------------------------------------------------------------------
# "MENU_TRIGGER_SOUND" schaltet die Standardtöne beim Aufrufen und Verlassen des Menüs ab,
# wenn man den Wert auf false setzt.
#---------------------------------------------------------------------------------------------
  MENU_TRIGGER_SOUND = true
#---------------------------------------------------------------------------------------------
# "MENU_ENTRY_SOUND" legt den Ton beim Aufrufen des Menüs fest.
# "MENU_EXIT_SOUND" legt den Ton beim Verlassen des Menüs fest.
# ACHTUNG: Die Sounds werden nur abgespielt wenn "MENU_TRIGGRE_SOUND" auf true steht
# will man die Standardtöne verwenden so lässt man die "" einfach leer.
#---------------------------------------------------------------------------------------------
  MENU_ENTRY_SOUND = ""
  MENU_EXIT_SOUND = ""
#---------------------------------------------------------------------------------------------
# Ab hier nichts mehr bearbeiten!
#---------------------------------------------------------------------------------------------
end

class Scene_MenuBase < Scene_Base
    
  alias eiswinds_create_background create_background
  def create_background
    eiswinds_create_background
    @background_sprite = Sprite.new
    if Eiswinds_Custom_Menu::Various_Backgrounds
      if SceneManager.scene_is?(Scene_Menu)
        if Eiswinds_Custom_Menu::SCENE_MENU.size > 3
					if $game_party.members.include?($game_actors[2])
            @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_MENU2)
          else
            @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_MENU)
          end
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Item)
        if Eiswinds_Custom_Menu::SCENE_ITEM.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_ITEM)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Skill)
        if Eiswinds_Custom_Menu::SCENE_SKILL.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SKILL)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Equip)
        if Eiswinds_Custom_Menu::SCENE_EQUIP.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_EQUIP)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Status)
        if Eiswinds_Custom_Menu::SCENE_STATUS.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_STATUS)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Shop)
        if Eiswinds_Custom_Menu::SCENE_SHOP.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SHOP)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Save)
        if Eiswinds_Custom_Menu::SCENE_SAVE.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_SAVE)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_Load)
        if Eiswinds_Custom_Menu::SCENE_LOAD.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_LOAD)
        else
          set_standard_background
        end
      end
      if SceneManager.scene_is?(Scene_End)
        if Eiswinds_Custom_Menu::SCENE_END.size > 3
          @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::SCENE_END)
        else
          set_standard_background
        end
      end
    else
      set_standard_background
    end
  end
      
  def set_standard_background
    if Eiswinds_Custom_Menu::STANDARD_BACKGROUND.size < 3
      @background_sprite.bitmap = SceneManager.background_bitmap
    else
      @background_sprite.bitmap = Cache.picture(Eiswinds_Custom_Menu::STANDARD_BACKGROUND)
    end
  end
      
end
    
class Scene_Menu < Scene_MenuBase
  
  def start
    super
    create_command_window
    create_gold_window if Eiswinds_Custom_Menu::Gold
    create_status_window if Eiswinds_Custom_Menu::MainStatus
    create_steps_window if Eiswinds_Custom_Menu::Steps
    create_time_window if Eiswinds_Custom_Menu::Time
    @cancelanim = false
  end
  
  alias eiswinds_create_command_window create_command_window
    def create_command_window
      eiswinds_create_command_window
      @command_window.set_handler(:continue,      method(:command_continue))
      if animation_used?
        case Eiswinds_Custom_Menu::FADEIN_TYPE
        when 1
          @command_window.x = -265
          @command_window.y = 0
        when 2
          @command_window.x = 544
          @command_window.y = 0
        when 3
          @command_window.x = -544
          @command_window.y = 0
        when 4
          @command_window.x = 0
          @command_window.y = -416
        when 5
          @command_window.x = 0
          @command_window.y = -416
        when 6
          @command_window.x = 0
          @command_window.y = 417
        end
      end
    end
    
  def command_continue
    SceneManager.call(Scene_Load)
  end
  
  def create_status_window
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @status_window = Window_MenuStatus.new(544, 0)
      when 2
        @status_window = Window_MenuStatus.new(704, 0)
      when 3
        @status_window = Window_MenuStatus.new(-384, 0)
      when 4
        @status_window = Window_MenuStatus.new(@command_window.width, 417)
      when 5
        @status_window = Window_MenuStatus.new(@command_window.width, -416)
      when 6
        @status_window = Window_MenuStatus.new(@command_window.width, 417)
      end
    else
      @status_window = Window_MenuStatus.new(@command_window.width, 0)
    end
  end
  
  def create_steps_window
    @steps_window = Window_Steps.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @steps_window.x = -265
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 2
        @steps_window.x = 544
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 3
        @steps_window.x = -544
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      when 4
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = -416 + Eiswinds_Custom_Menu::STEPS_Y  
      when 5
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = -416 + Eiswinds_Custom_Menu::STEPS_Y  
      when 6
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
        @steps_window.y = 417 + Eiswinds_Custom_Menu::STEPS_Y 
      end
    else
      @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
    end
  end
  
  def create_gold_window
    @gold_window = Window_Gold.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @gold_window.x = -265
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 2
        @gold_window.x = 544
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 3
        @gold_window.x = -544
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      when 4
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = -416 + Eiswinds_Custom_Menu::GOLD_Y
      when 5
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = -416 + Eiswinds_Custom_Menu::GOLD_Y
      when 6
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
        @gold_window.y = 417 + Eiswinds_Custom_Menu::GOLD_Y
      end
    else
      @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
    end
  end
  
  def create_time_window
    @time_window = Window_Time.new
    if animation_used?
      case Eiswinds_Custom_Menu::FADEIN_TYPE
      when 1
        @time_window.x = -265
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 2
        @time_window.x = 544
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 3
        @time_window.x = -544
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      when 4
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = -416 + Eiswinds_Custom_Menu::TIME_Y
      when 5
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = -416 + Eiswinds_Custom_Menu::TIME_Y
      when 6
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
        @time_window.y = 417 + Eiswinds_Custom_Menu::TIME_Y
      end
    else
      @time_window.x = Eiswinds_Custom_Menu::TIME_X
      @time_window.y = Eiswinds_Custom_Menu::TIME_Y
    end
  end
  
  def animation_used?
    if Eiswinds_Custom_Menu::USE_FADEIN_ANIMATION 
      return true
    elsif Eiswinds_Custom_Menu::USE_FADEOUT_ANIMATION
      return true
    end
  end
  
  alias eiswinds_custom_menu_update update
  def update
    eiswinds_custom_menu_update
    if @cancelanim == false
      if animation_used?
        case Eiswinds_Custom_Menu::FADEIN_TYPE
        when 1
          right_left_to_middle
        when 2
          right_to_middle
        when 3
          left_to_middle
        when 4
          top_bottom_to_middle
        when 5
          top_to_middle
        when 6
          bottom_to_middle
        end
      end
    else
      if Eiswinds_Custom_Menu::USE_FADEOUT_ANIMATION
        case Eiswinds_Custom_Menu::FADEOUT_TYPE
        when 1
          f_right_left_to_middle
          if @command_window.x == -265
            SceneManager.return
          end
        when 2
          f_right_to_middle
          if @command_window.x == 544
            SceneManager.return
          end
        when 3
          f_left_to_middle
          if @command_window.x == -544
            SceneManager.return
          end
        when 4
          f_top_bottom_to_middle
          if @command_window.y == -416
            SceneManager.return
          end
        when 5
          f_top_to_middle
          if @command_window.y == -416
            SceneManager.return
          end
        when 6
          f_bottom_to_middle
          if @command_window.y == 417
            SceneManager.return
          end
        end
      else  
        SceneManager.return
      end
    end
  end
  
  def right_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > @command_window.width
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED 
      elsif @status_window.x < @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x > Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x < 0
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def right_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > @command_window.width
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x < @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x > 0
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < @command_window.width
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x > @command_window.width
        @status_window.x = @command_window.width
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < Eiswinds_Custom_Menu::GOLD_X
        @gold_window.x = Eiswinds_Custom_Menu::GOLD_X
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < Eiswinds_Custom_Menu::TIME_X
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > Eiswinds_Custom_Menu::TIME_X
        @time_window.x = Eiswinds_Custom_Menu::TIME_X
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > Eiswinds_Custom_Menu::STEPS_X
        @steps_window.x = Eiswinds_Custom_Menu::STEPS_X
      end
    end
    if @command_window.x < 0
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 0
      @command_window.x = 0
    end
  end
  
  def top_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > 0
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPSY
      end
    end
    if @command_window.y < 0
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 0
      @command_window.y = 0
    end
  end
  
  def top_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 0
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y > Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      end
    end
    if @command_window.y < 0
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 0
      @command_window.y = 0
    end
  end
  
  def bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > 0
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < 0
        @status_window.y = 0
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < Eiswinds_Custom_Menu::GOLD_Y
        @gold_window.y = Eiswinds_Custom_Menu::GOLD_Y
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > Eiswinds_Custom_Menu::TIME_Y
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < Eiswinds_Custom_Menu::TIME_Y
        @time_window.y = Eiswinds_Custom_Menu::TIME_Y
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < Eiswinds_Custom_Menu::STEPS_Y
        @steps_window.y = Eiswinds_Custom_Menu::STEPS_Y
      end
    end
    if @command_window.y > 0
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < 0
      @command_window.y = 0
    end
  end
  
  def return_scene
    @cancelanim = true
  end
  
  def f_right_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < 544
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED 
      elsif @status_window.x > 544
        @status_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > -265
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < -265
        @gold_window.x = -265
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > -265
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < -265
        @time_window.x = -265
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > -265
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < -265
        @steps_window.x = -265
      end
    end
    if @command_window.x > -265
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x < -265
      @command_window.x = -265
    end
  end
  
  def f_right_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x < 704
        @status_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x > 704
        @status_window.x = 704
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x < 544
        @gold_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x > 544
        @gold_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x < 544
        @time_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x > 544
        @time_window.x = 544
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x < 544
        @steps_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x > 544
        @steps_window.x = 544
      end
    end
    if @command_window.x < 544
      @command_window.x += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x > 544
      @command_window.x = 544
    end
  end
  
  def f_left_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.x > -384
        @status_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.x < -384
        @status_window.x = -384
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.x > -544
        @gold_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.x < -544
        @gold_window.x = -544
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.x > -544
        @time_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.x < -544
        @time_window.x = -544
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.x > -544
        @steps_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.x < -544
        @steps_window.x = -544
      end
    end
    if @command_window.x > -544
      @command_window.x -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.x < -544
      @command_window.x = -544
    end
  end
  
  def f_top_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 417
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 417
        @status_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > -416
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < -416
        @gold_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > -416
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < -416
        @time_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > -416
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < -416
        @steps_window.y = -416
      end
    end
    if @command_window.y > -416
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < -416
      @command_window.y = -416
    end
  end
  
  def f_top_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y > -416
        @status_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y < -416
        @status_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y > -416
        @gold_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y < -416
        @gold_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y > -416
        @time_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y < -416
        @time_window.y = -416
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y > -416
        @steps_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y < -416
        @steps_window.y = -416
      end
    end
    if @command_window.y > -416
      @command_window.y -= Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y < -416
      @command_window.y = -416
    end
  end
  
  def f_bottom_to_middle
    if Eiswinds_Custom_Menu::MainStatus
      if @status_window.y < 417
        @status_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @status_window.y > 417
        @status_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Gold
      if @gold_window.y < 417
        @gold_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @gold_window.y > 417
        @gold_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Time
      if @time_window.y < 417
        @time_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @time_window.y > 417
        @time_window.y = 417
      end
    end
    if Eiswinds_Custom_Menu::Steps
      if @steps_window.y < 417
        @steps_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
      elsif @steps_window.y > 417
        @steps_window.y = 417
      end
    end
    if @command_window.y < 417
      @command_window.y += Eiswinds_Custom_Menu::ANIMATION_SPEED
    elsif @command_window.y > 417
      @command_window.y = 417
    end
  end

end

class Window_MenuCommand < Window_Command

  def make_command_list
    add_main_commands
    if Eiswinds_Custom_Menu::Formation
      add_formation_command
    end
    add_original_commands
    if Eiswinds_Custom_Menu::Save
      add_save_command
    end
    if Eiswinds_Custom_Menu::Load
      add_load_command
    end
    if Eiswinds_Custom_Menu::End
      add_game_end_command
    end
  end
  
  def add_main_commands
    if Eiswinds_Custom_Menu::Item
      add_command(Vocab::item,   :item,   main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Skill
      add_command(Vocab::skill,  :skill,  main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Equip
      add_command(Vocab::equip,  :equip,  main_commands_enabled)
    end
    if Eiswinds_Custom_Menu::Status
      add_command(Vocab::status, :status, main_commands_enabled)
    end
  end
  
  def add_load_command
    add_command(Eiswinds_Custom_Menu::LOAD_NAME, :continue)
  end
  
  def process_cancel
    if Eiswinds_Custom_Menu::MENU_TRIGGER_SOUND == true
      if Eiswinds_Custom_Menu::MENU_EXIT_SOUND.size > 3
        RPG::SE.new(Eiswinds_Custom_Menu::MENU_EXIT_SOUND, 100, 100).play
      else
        Sound.play_cancel
      end
    end
    Input.update
    deactivate
    call_cancel_handler
  end
  
end

class Window_Steps < Window_Base
  
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  
  def window_width
    return 160
  end
  
  def refresh
    self.contents.clear
    self.contents.draw_text(4, 0, contents.width - 8, contents.height - 4, Eiswinds_Custom_Menu::STEPS_NAME + ": " + steps , 2)
  end
  
  def steps
    $game_party.steps.to_s
  end
  
end

class Window_Time < Window_Base
  
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  
  def window_width
    return 160
  end
  
  def refresh
    self.contents.clear
    @time = Graphics.frame_count / Graphics.frame_rate
    hour = @time / 60 / 60
    min = @time / 60 % 60
    sec = @time % 60
    fulltime = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.draw_text(4, 0, contents_width - 8, contents.height - 4, Eiswinds_Custom_Menu::TIME_NAME + ": " + fulltime, 2)
  end
  
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @time
      refresh
    end
  end
  
end

class Scene_Map < Scene_Base
  
  def call_menu
    if Eiswinds_Custom_Menu::MENU_TRIGGER_SOUND == true
      if Eiswinds_Custom_Menu::MENU_ENTRY_SOUND.size > 3
        RPG::SE.new(Eiswinds_Custom_Menu::MENU_ENTRY_SOUND, 100, 100).play
      else
        Sound.play_ok
      end
    end
    SceneManager.call(Scene_Menu)
    Window_MenuCommand::init_command_position
  end
  
end

Aahh King valeu mesmo! Deu certo aqui.  :XD: :XD:

Eu dei uma lida geral no código e entendi o que você fez vou tentar reproduzir quando terminar de criar os outros personagens. Muito obrigado.

Só peço para não trancarem o tópico ainda, porque se eu tiver alguma dúvida eu vou retornar aqui.

"Era uma vez um elfo encantado que morava num pé de caqui..."

Olá pessoas! Vou ressuscitar este tópico e torná-lo o "Tópico de minhas dúvidas" pra não precisar criar um novo em cada uma delas.
Bom, direto ao ponto: Estou com uma dificuldade do HELL para fazer o personagem usar o item direto do menu.
Tipo, eu preciso entregar um item para o personagem(NPC), mas antes eu preciso "usar" o item nele. Eu preciso estar ao lado dele e virado pra ele depois usar o item para que algo aconteça, se eu não estiver dentro dessas condições ao usar o item, aparece uma mensagem falando que ele não pode ser usado no momento.
Eu tentei fazer isto por evento comum. Ao usar o item (é um item chave só pra deixar claro) aciona um evento comum que faria a condição e me daria a resposta. Porém, eu futriquei as estruturas condicionais do RPG Maker e nenhuma delas pareceu se adequar à minha situação.
Eu não sei se eu deixai alguma coisa passar ou se isso é realmente algo que não tem no RM...
Tem como vocês me ajudarem?

"Era uma vez um elfo encantado que morava num pé de caqui..."

Que saudade dessas dúvidas que não utilizam-se de scripts de 5000 linhas kkk

Bom, Silver, se for simples como descreveu, acho que não vai precisar de um código externo.
Já dá para se fazer um evento comum correr ao utilizar um item. O que tu precisaria fazer é
verificar as condições de uso do contrato do item.

Primeiro vai precisar configurar o item (abaixo). O item não pode ser consumível, pois se o
jogador usá-lo em local errado ele irá se perder (a menos que essa seja sua intenção); a área
de efeito deve ser "Nenhum" para não haver a necessidade de selecionar alguém como alvo
do item; deve ser sempre usável, para poder ser acessado do menu, e; o mais importante, o
"Efeito ao Usar" deve chamar o evento comum.

Spoiler
[close]

No evento comum, primeiro verifique se o jogador está no mesmo mapa que o NPC. Isso "setando"
uma variável para o ID do mapa atual, e em seguida verificando se o valor da variável é igual ao
ID do mapa em que o NPC que receberá o item está. Em seguida, verifique se o personagem está
ao lado do NPC, quando utilizar o item. Isso há como fazer só por eventos, mas precisaria de mais
variáveis e umas condições a mais, então prefiro fazer por condicional por script, para diminuir a
programação. O código está abaixo.


(($game_map.events[id do evento].x - $game_player.x).abs + ($game_map.events[id do evento].y - $game_player.y).abs) == 1


Spoiler
[close]

Yaay, deu certin!!
Até a parte de usar o item chamando o evento comum eu já tinha conseguido, mas eu não estava conseguindo fazer a estrutura condicional. Eu olhei bem atentamente e entendi bem o que o evento e o trecho de script fazem, e realmente daria pra fazer só com eventos, mas seria BEM mais complicado e eu não ia descobrir nunca alone ;-;
Muito obrigado pela ajuda, King!  :XD:
E de novo peço para não trancarem o tópico, já que vou reciclá-lo a cada uma de minhas dúvidas.  :ok:

"Era uma vez um elfo encantado que morava num pé de caqui..."

Olá pessoas maravilhosas!
Recentemente eu retornei com as minhas atividades no RPG maker VX Ace e com isso volto a reviver meu tópico de dúvidas.

Tem algumas coisas que quero perguntar aqui, quem souber me responder algumas delas vei ser uma baita ajuda.




1º: Eu to usando o Script do MOG Hunter para aparecer a imagem do ator no seu turno da batalha.
scipt
#==============================================================================
# +++ MOG - ACTOR PICTURE CM  (v1.4) +++
#==============================================================================
# By Moghunter 
# http://www.atelier-rgss.com/
#==============================================================================
# Apresenta a imagem do personagem durante a seleção de comandos, com efeitos
# animados.
#==============================================================================
# ● Definindo o nome das imagens dos battlers. 
#==============================================================================
# 1 - As imagens devem ser gravadas na pasta 
#
# GRAPHICS/PICTURES
#
# 2 - Nomeie os  arquivos de imagens da seguinte forma.
#
# 
# ACTOR + ID
#
# EG
#
# ACTOR1.png
#
#==============================================================================
module MOG_ACTOR_PICTURE_CM 
  #Posição da imagem do battler. (Para fazer ajustes)
  PICTURE_POSITION = [0, 0]  
  
  #Definição da opacidade da imagem.
  PICTURE_OPACITY = 255
  
  #Velocidade de deslize
  SLIDE_SPEED = 30  
  
  #Ativar o efeito da imagem respirando.
  BREATH_EFFECT = true
  
  #Definição da prioridade  da imagem na tela.
  PICTURE_PRIORITY_Z = 103
end

$imported = {} if $imported.nil?
$imported[:actor_picture_cm] = true

#===============================================================================
# ■ Sprite_Battler_CM
#===============================================================================
class Sprite_Battler_CM < Sprite
  include MOG_ACTOR_PICTURE_CM 
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------  
  def initialize(viewport = nil,battler_id = -1)
      super(viewport)
      filename = "Actor" + battler_id.to_s
      self.bitmap = Cache.picture(filename) rescue nil
      self.bitmap = Cache.picture("") if self.bitmap == nil
      sc = (Graphics.width / 2)  - (self.bitmap.width / 2) + PICTURE_POSITION[0]
      @size = [self.bitmap.width + PICTURE_POSITION[0] ,sc]      
      self.visible = false
      self.opacity = 0
      self.z = PICTURE_PRIORITY_Z
      self.ox = 0
      self.oy = self.bitmap.height
      self.x = -@size[0]
      self.y = (Graphics.height + 10) + PICTURE_POSITION[1]      
      @breach_effect = [1.0,0]
      @battler_id = battler_id
      @active =  false
      @cm_visible = false
  end  
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------  
  def dispose
      super
      self.bitmap.dispose
  end
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------  
  def update
      super
      update_slide
  end  
  
  #--------------------------------------------------------------------------
  # ● Active Battler
  #--------------------------------------------------------------------------      
  def active_battler(battler_id) 
      @active = @battler_id == battler_id ? true : false
      self.visible = true if @active
      @cm_visible = false if !@active 
  end
  
  #--------------------------------------------------------------------------
  # ● Refresh Battler CM
  #--------------------------------------------------------------------------        
  def refresh_battler(cm_visible, battler_index)
      @cm_visible = cm_visible
      active_battler(battler_index)
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Slide
  #--------------------------------------------------------------------------  
  def update_slide
      if !@cm_visible
           self.x -= SLIDE_SPEED if self.x > -@size[0] 
           self.opacity -= 25
           if self.x <= -@size[0] or self.opacity == 0
              self.visible = false 
              self.opacity = 0
              self.x = -@size[0]
           end   
        else
           self.x += SLIDE_SPEED if self.x < @size[1] 
           self.x = @size[1] if self.x > @size[1] 
           self.opacity += 10 if self.opacity < PICTURE_OPACITY 
           self.opacity = PICTURE_OPACITY if self.opacity > PICTURE_OPACITY 
           update_breath_effect
      end         
  end
  
  #--------------------------------------------------------------------------
  # ● Update Breath Effect
  #--------------------------------------------------------------------------    
  def update_breath_effect
      return if !BREATH_EFFECT
      @breach_effect[1] += 1
      case @breach_effect[1]
         when 0..30
             @breach_effect[0] += 0.0004
         when 31..50
             @breach_effect[0] -= 0.0004
         else  
         @breach_effect[1] = 0
         @breach_effect[0] = 1.truncate
      end
      self.zoom_y = @breach_effect[0]
  end  
  
end

#===============================================================================
# ■ Spriteset_Battle
#===============================================================================
class Spriteset_Battle
  
  #--------------------------------------------------------------------------
  # ● Create Actors
  #--------------------------------------------------------------------------    
  alias mog_battler_cm_create_actors create_actors
  def create_actors
      mog_battler_cm_create_actors
      create_battler_pictures
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------    
  alias mog_battler_cm_dispose dispose 
  def dispose
      mog_battler_cm_dispose
      dispose_battler_cm
  end  

  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------    
  alias mog_battler_cm_update update
  def update
      mog_battler_cm_update
      update_battler_cm
  end    

  #--------------------------------------------------------------------------
  # ● Create Battler Pictures
  #--------------------------------------------------------------------------    
  def create_battler_pictures
      @battler_pictures = []
      for i in $game_party.battle_members
          @battler_pictures.push(Sprite_Battler_CM.new(@viewport1,i.id))
      end    
  end   
  
  #--------------------------------------------------------------------------
  # ● Dispose Battler CM
  #--------------------------------------------------------------------------    
  def dispose_battler_cm
      return if @battler_pictures == nil
      @battler_pictures.each {|sprite| sprite.dispose }
  end  
 
  #--------------------------------------------------------------------------
  # ● Update Battler CM
  #--------------------------------------------------------------------------    
  def update_battler_cm
      return if @battler_pictures == nil
      @battler_pictures.each {|sprite| sprite.update }
  end    
     
  #--------------------------------------------------------------------------
  # ● Update CM Pictures
  #--------------------------------------------------------------------------      
  def update_cm_picture(cm_visible, battler_index)
      return if @battler_pictures == nil
      @battler_pictures.each {|sprite| sprite.refresh_battler(cm_visible, battler_index) }
  end  
  
end

#===============================================================================
# ■ Scene_Battle
#===============================================================================
class Scene_Battle < Scene_Base
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------        
  alias mog_cm_picture_update update
  def update
      mog_cm_picture_update  
      update_picture_visible
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Battler CM Active
  #--------------------------------------------------------------------------      
  def update_picture_visible
      return if @actor_command_window == nil
      cm_visible = can_cm_picture_visible?      
      cm_id = BattleManager.actor.id rescue -1
      @spriteset.update_cm_picture(cm_visible, cm_id)
  end  
  
  #--------------------------------------------------------------------------
  # ● Can CM Picture Visible
  #--------------------------------------------------------------------------        
  def can_cm_picture_visible?
      return false if (@actor_window.active or @enemy_window.active) rescue return
      return false if BattleManager.actor == nil      
      return true
  end  
  
  #--------------------------------------------------------------------------
  # ● Execute Action
  #--------------------------------------------------------------------------        
  alias mog_cm_picture_execute_action execute_action
  def execute_action
      @spriteset.update_cm_picture(false, -1) if @spriteset != nil 
      mog_cm_picture_execute_action 
  end
  
end
[close]

Para esse script funcionar eu coloco na pasta pictures a imagem que eu quero com o nome "ACTOR+ID"
Como eu não entendo muito ou nada de ruby gostaria de saber se é possível ao invés da imagem aparecer para o actor ela aparecel pela classe dele e se ao invés de ela aparecer deslizando ela apenas dar um fade in.




2º: Essa dúvida tem me tirado o sono ultimamente. É possível criar um tipo de habilidade que pode ser usado à vontade na batalha sem gastar o turno do personagem?
Eu criei um sistema de trocar a classe de um personagem no meio da batalha utilizando uma habilidade+evento comum. Até que funcionou, mas eu não queria que o personagem gastasse o seu turno para isso.
Por exemplo: Tem uma bruxa que pode alternar entre os elementos que ela controla, aí tem uma habilidade que muda sua classe para alterar todos os seus parâmetros e magias. O que eu queria é que as habilidades para ela mudar o elemento(no caso a classe) pudesse ser usada na hora e sem que ela perdesse o turno (sem que eu precise esperar todas as ações dos outros chars serem selecionadas) e o menu só passar para o próximo quando ela selecionar para atacar, usar magia e etc.
Eu já tentei pensar em uma forma de fazer isso por eventos mas não consegui nada, se alguem puder me ajudar...




Por enquanto é isso. Se tiver como ajudar eu agradeço pra sempre.  :ded:

Silver here~

"Era uma vez um elfo encantado que morava num pé de caqui..."