MOG Menu Status Eva V1.2

17 de junho de 2014

MOG Menu Status Eva (ou MOG Scene Status) é mais um script de menu com movimento e layout que utiliza pictures, desenvolvido pelo Moghunter, jogo ou projeto do RPG Maker XP.

Para utilizar, dê uma olhadinha na demo que está disponível para download, que já vem com as pictures e o script, para você ver como foi feito e já pegar os recursos necessários para rodar o MOG Menu Status Eva.

Screenshot

Menu Eva

#_______________________________________________________________________________
# MOG_Scene_Status V1.6           
#_______________________________________________________________________________
# By Moghunter  
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
  #Transition Time.  
  MST_TT = 10
  #Transition Type(Name).  
  MST_TTT = "004-Blind04"
  # Set Maximum (STR,DEX,AGL,INT)
  MST_ST = 999
  # Set Maximum (ATK,PDEF,MDEF)
  MST_STE = 999
end

#===============================================================================
# Game_Actor
#===============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# Now_Exp
#--------------------------------------------------------------------------  
  def now_exp
    return @exp - @exp_list[@level]
  end
#--------------------------------------------------------------------------
# Next Exp
#--------------------------------------------------------------------------  
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

#===============================================================================
# Window_Base
#===============================================================================
class Window_Base < Window   
#--------------------------------------------------------------------------
# Nada2
#--------------------------------------------------------------------------    
  def nada2(actor)
    face = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  end    
#--------------------------------------------------------------------------
# Draw_heroface4
#--------------------------------------------------------------------------  
  def draw_heroface4(actor,x,y)
    face = RPG::Cache.picture(actor.name + "_fc2") rescue nada2(actor)
    cw = face.width 
    ch = face.height 
    src_rect = Rect.new(0, 0, cw, ch)
    if face == RPG::Cache.battler(actor.battler_name, actor.battler_hue)
      self.contents.blt(x + 45 , y - ch - 150, face, src_rect)    
    else  
      self.contents.blt(x , y - ch, face, src_rect)    
    end
  end   
#--------------------------------------------------------------------------
# Draw_Actor_Parameter2
#--------------------------------------------------------------------------  
  def draw_actor_parameter2(actor, x, y, type)
    back = RPG::Cache.picture("STBAR_Back")    
    cw = back.width  
    ch = back.height 
    src_rect = Rect.new(0, 0, cw, ch)    
    self.contents.blt(x + 50 , y - ch + 20, back, src_rect)  
    meter = RPG::Cache.picture("STBAR.png")    
    case type
      when 0
        parameter_value = actor.atk
        cw = meter.width  * actor.atk / MOG::MST_STE
      when 1
        parameter_value = actor.pdef
        cw = meter.width  * actor.pdef / MOG::MST_STE
      when 2
        parameter_value = actor.mdef
        cw = meter.width  * actor.mdef / MOG::MST_STE
      when 3
        parameter_value = actor.str
        cw = meter.width  * actor.str / MOG::MST_ST
      when 4
        parameter_value = actor.dex
        cw = meter.width  * actor.dex / MOG::MST_ST
      when 5
        parameter_value = actor.agi
        cw = meter.width  * actor.agi / MOG::MST_ST
      when 6
        parameter_value = actor.int
        cw = meter.width  * actor.int / MOG::MST_ST
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y - 2, 36, 32, parameter_value.to_s, 2)
    ch = meter.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 50 , y - ch + 20, meter, src_rect) 
  end
#--------------------------------------------------------------------------
# Draw_Maphp5
#--------------------------------------------------------------------------  
  def draw_maphp5(actor, x, y)
    back = RPG::Cache.picture("BAR")    
    cw = back.width  
    ch = back.height 
    src_rect = Rect.new(0, 0, cw, ch)    
    self.contents.blt(x + 65, y - ch + 30, back, src_rect)
    meter = RPG::Cache.picture("HP_Bar2")    
    cw = meter.width  * actor.hp / actor.maxhp
    ch = meter.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
    self.contents.font.color = Color.new(0,0,0,255)
    self.contents.draw_text(x + 66, y - 1, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  
    self.contents.font.color = Color.new(250,255,255,255) 
    self.contents.draw_text(x + 65, y - 2, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  
  end  
#--------------------------------------------------------------------------
# Draw_Maphs5
#--------------------------------------------------------------------------  
  def draw_mapsp5(actor, x, y)
    back = RPG::Cache.picture("BAR")    
    cw = back.width  
    ch = back.height 
    src_rect = Rect.new(0, 0, cw, ch)    
    self.contents.blt(x + 65 , y - ch + 30, back, src_rect)
    meter = RPG::Cache.picture("SP_Bar2")    
    cw = meter.width  * actor.sp / actor.maxsp
    ch = meter.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65 , y - ch + 30, meter, src_rect)
    self.contents.font.color = Color.new(0,0,0,255)
    self.contents.draw_text(x + 66, y - 1, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  
    self.contents.font.color = Color.new(250,255,255,255) 
    self.contents.draw_text(x + 65, y - 2, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  
  end
#--------------------------------------------------------------------------
# Draw_Mexp5
#--------------------------------------------------------------------------  
  def draw_mexp5(actor, x, y)
    bitmap2 = RPG::Cache.picture("Exp_Back")
    cw = bitmap2.width 
    ch = bitmap2.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
    if actor.next_exp != 0
      rate = actor.now_exp.to_f / actor.next_exp
    else
      rate = 1
    end
    bitmap = RPG::Cache.picture("Exp_Meter")
    if actor.level < 99
      cw = bitmap.width * rate 
    else
      cw = bitmap.width
    end   
    ch = bitmap.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
    self.contents.font.color = Color.new(0,0,0,255)
    self.contents.draw_text(x + 51, y , 84, 32, actor.next_rest_exp_s.to_s, 1)    
    self.contents.font.color = Color.new(55,255,55,255)
    self.contents.draw_text(x + 52, y + 1, 84, 32, actor.next_rest_exp_s.to_s, 1)    
    self.contents.font.color = Color.new(0,0,0,255)
    self.contents.draw_text(x + 45, y + 7, 84, 32, "N",0)
    self.contents.font.color = Color.new(55,255,155,255)    
    self.contents.draw_text(x + 44, y + 8, 84, 32, "N",0)
    self.contents.font.color = Color.new(0,0,0,255)
    self.contents.draw_text(x + 10, y + 5, 30, 32, actor.level.to_s, 1)
    self.contents.font.color = Color.new(255,255,255,255)    
    self.contents.draw_text(x + 11, y + 6, 30, 32, actor.level.to_s, 1)    
  end
end

#===============================================================================
# Window_Status
#===============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------    
  def initialize(actor)
    super(0, 0, 660, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    self.opacity = 0
    refresh
  end
#--------------------------------------------------------------------------
# Refresh
#--------------------------------------------------------------------------      
  def refresh
    self.contents.clear
    self.contents.font.name = "Georgia"
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 510, -5 )
    draw_mexp5(@actor,310,130)
    draw_actor_state(@actor, 450, 20)
    draw_maphp5(@actor, 275, 165)
    draw_mapsp5(@actor, 430, 165)
    draw_actor_parameter2(@actor, 280, 108, 0)
    draw_actor_parameter2(@actor, 460, 137, 1)
    draw_actor_parameter2(@actor, 460, 108, 2)
    draw_actor_parameter2(@actor, 280, 53, 3)
    draw_actor_parameter2(@actor, 460, 53, 4)
    draw_actor_parameter2(@actor, 280, 80, 5)
    draw_actor_parameter2(@actor, 460, 80, 6)
    self.contents.font.color = system_color
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 228)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 258)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 288)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 318)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 348)
  end
#--------------------------------------------------------------------------
# Dummy
#--------------------------------------------------------------------------      
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208) 
    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  end
end

#===============================================================================
# Window_Face
#===============================================================================
class Window_Face < Window_Base
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------        
def initialize(actor)
  super(0, -20, 300, 520)
  self.contents = Bitmap.new(width - 32, height - 32)
  @actor = actor
  self.opacity = 0
  refresh
end
#--------------------------------------------------------------------------
# Refreh
#--------------------------------------------------------------------------      
def refresh
  self.contents.clear
  draw_heroface4(@actor,10,485)        
end
end

#===============================================================================
# Scene Status
#===============================================================================
class Scene_Status
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------        
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------      
  def main
    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status.new(@actor)
    @status_face = Window_Face.new(@actor)
    @status_face.z = 20
    @status_face.x = -300
    @status_face.contents_opacity = 0
    @mst_lay = Sprite.new
    @mst_lay.bitmap = RPG::Cache.picture("MST_Lay")
    @mst_lay.z = 100
    @mst_back1 = Plane.new
    @mst_back1.bitmap = RPG::Cache.picture("MN_BK")
    @mst_back1.z = 10
    Graphics.transition(MOG::MST_TT, "Graphics/Transitions/" + MOG::MST_TTT)
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    for i in 0..10
      @status_face.x -= 25  
      @status_face.contents_opacity -= 20
      Graphics.update
    end  
    Graphics.freeze
    @mst_lay.dispose
    @mst_back1.dispose
    @status_face.dispose
    @status_window.dispose
  end
  
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------      
  def update
    @mst_back1.ox += 1
    @mst_back1.oy += 1
    if @status_face.x < 0
      @status_face.x += 20
      @status_face.contents_opacity += 15
    elsif @status_face.x >= 0   
      @status_face.x = 0   
      @status_face.contents_opacity = 255
    end   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(3)
      return
    end
    if Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
  end
end


$mog_rgss_Scene_Status = true

Download e ficha técnica

  • Download (clique com o botão esquerdo do mouse ou toque no link).
  • Desenvolvedor, publisher e/ou distribuidor: Moghunter
  • SO: Windows 98/98SE/Me/2000/XP/Vista/7
  • Tamanho: 487KB
  • Licença: Grátis
  • Categoria: Programação XP
  • Tag: RPG Maker XP
  • Adicionado por: LichKing
  • Acessos: 85

Observação: se você gostou deste post ou ele lhe foi útil de alguma forma, por favor considere apoiar financeiramente a Gaming Room. Fico feliz só de ajudar, mas a contribuição do visitante é muito importante para que este site continua existindo e para que eu possa continuar provendo este tipo de conteúdo e melhorar cada vez mais. Acesse aqui e saiba como. Obrigado!

Deixe um comentário

Inscreva-se na nossa newsletter!