Mundo Maker
¡Bienvenid@ a Mundo Maker!

¿Quieres aprender todo sobre el RPG Maker?



Regístrate y forma parte de Mundo Maker.
Conectarse

Recuperar mi contraseña

Temas importantes
----------------------------------------
Páginas con recursos RPG Maker
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
Afiliados
Estadísticas
Tenemos 3768 miembros registrados.
El último usuario registrado es lMac.

Nuestros miembros han publicado un total de 85827 mensajes en 12223 argumentos.

Ppik Scene Status

Ver el tema anterior Ver el tema siguiente Ir abajo

RPG Maker XP Ppik Scene Status

Mensaje por Wecoc el 2011-05-01, 09:20

Este script es un edit del MOG_Scene_Status, dedicado a Pokepik, a Raven (me hicieron el pedido) y al foro Mundo Maker. El diseño está inspirado en los menús (no para RPG maker) de maxarkes.
Autor: Wecoc

(Pegar encima de main)

Screeny:


Código:
#//////////////////////////////////////////////////////////
# Ppik_Scene_Status
#//////////////////////////////////////////////////////////
#                  POKEPIK SCENE STATUS
# Este script es un edit del MOG_Scene_Status, dedicado a la
# Pokepik, a Raven y al foro Mundo Maker. El diseño está
# inspirado en los menús (no para RPG maker) de maxarkes.
# Autor: Wecoc
# Pegar encima de main
#//////////////////////////////////////////////////////////

#//////////////////////////////////////////////////////////
# Window_Base
#//////////////////////////////////////////////////////////

class Window_Base < Window 
 
  def status_color
    return Color.new(200, 178, 116, 255)
  end
  def shadow_color
    return Color.new(0, 0, 0, 128)
  end
 
  def draw_heroface4(actor,x,y) # Battler gráfico
    face = RPG::Cache.picture(actor.name + "_fc2") rescue
    face = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    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 + 35 , y - ch - 150, face, src_rect)   
    else 
      self.contents.blt(x, y - ch, face, src_rect)   
    end
  end 

  def draw_actor_parameter2(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk # Ataque
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef # Def Física
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef # Dec Mágica
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.str # Fuerza
      parameter_value = actor.str
    when 4
      parameter_name = $data_system.words.dex # Destreza
      parameter_value = actor.dex
    when 5
      parameter_name = $data_system.words.agi # Agilidad
      parameter_value = actor.agi
    when 6
      parameter_name = $data_system.words.int # Inteligencia
      parameter_value = actor.int
    end

    self.contents.font.size = 32
    #bitmap = RPG::Cache.icon(parameter_name)
    #self.contents.blt(x, y+4, bitmap, Rect.new(0, 0, 24, 24))
   
    self.contents.font.color = shadow_color
    self.contents.draw_text(x + 52, y+2, 36, 32, parameter_value.to_s, 2)
    self.contents.font.color = status_color
    self.contents.draw_text(x + 50, y, 36, 32, parameter_value.to_s, 2)
  end
 
  def draw_next(x, y) # Change Character / Return
    self.contents.font.size = 28
    self.contents.font.color = shadow_color
    self.contents.draw_text(x+2, y+2, 240, 32, "Q/W", 0)
    self.contents.draw_text(x+222, y+2, 240, 32, "X", 0)
    self.contents.draw_text(x+52, y+2, 240, 32, "Change Character", 0)
    self.contents.draw_text(x+252, y+2, 240, 32, "Return", 0)
     
    if $game_party.actors.size == 1
      self.contents.font.color = disabled_color
      self.contents.draw_text(x, y, 240, 32, "Q/W", 0)
      self.contents.draw_text(x+50, y, 240, 32, "Change Character", 0)
    else
      self.contents.font.color = system_color
      self.contents.draw_text(x, y, 240, 32, "Q/W", 0)
      self.contents.font.color = status_color
      self.contents.draw_text(x+50, y, 240, 32, "Change Character", 0)
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x+220, y, 240, 32, "X", 0)
    self.contents.font.color = status_color
    self.contents.draw_text(x+250, y, 240, 32, "Return", 0)
  end

  def draw_maphp5(actor, x, y) # Barra HP (Vida)
    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 

  def draw_mapsp5(actor, x, y) # Barra SP (Magia)
    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

  def draw_actor_name2(actor, x, y)
    # Name
    self.contents.font.size = 48
    self.contents.font.color = shadow_color
    self.contents.draw_text(x+2, y+2, 120, 48, actor.name)
    self.contents.font.color = status_color
    self.contents.draw_text(x, y, 120, 48, actor.name)
    # Lv
    self.contents.font.size = 48
    self.contents.font.color = shadow_color
    self.contents.draw_text(x+192, y+2, 48, 48, "Lv")
    self.contents.draw_text(x+227, y+2, 48, 48, actor.level.to_s, 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(x+190, y, 48, 48, "Lv")
    self.contents.font.color = status_color
    self.contents.draw_text(x+225, y, 48, 48, actor.level.to_s, 2)
    # Class
    if actor.level >= 1 and actor.level <= 4
      self.contents.font.size = 30
      self.contents.font.color = shadow_color
      self.contents.draw_text(x+2, y+38, 236, 32, actor.class_name+" novato")
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y+36, 236, 32, actor.class_name+" novato")
    end
    if actor.level >= 5 and actor.level <= 9
      self.contents.font.size = 30
      self.contents.font.color = shadow_color
      self.contents.draw_text(x+2, y+38, 236, 32, actor.class_name+" aficionado")
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y+36, 236, 32, actor.class_name+" aficionado")
    end
    if actor.level >= 10 and actor.level <= 19
      self.contents.font.size = 30
      self.contents.font.color = shadow_color
      self.contents.draw_text(x+2, y+38, 236, 32, actor.class_name+" principiante")
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y+36, 236, 32, actor.class_name+"principiante")
    end
    if actor.level >= 20 and actor.level <= 49
      self.contents.font.size = 30
      self.contents.font.color = shadow_color
      self.contents.draw_text(x+2, y+38, 236, 32, actor.class_name+" experto")
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y+36, 236, 32, actor.class_name+" experto")
    end
    if actor.level >= 50 and actor.level <= 100
      self.contents.font.size = 30
      self.contents.font.color = shadow_color
      self.contents.draw_text(x+2, y+38, 236, 32, "Maestro "+actor.class_name)
      self.contents.font.color = normal_color
      self.contents.draw_text(x, y+36, 236, 32, "Maestro "+actor.class_name)
    end
    #Exp
    #self.contents.font.size = 30
    #self.contents.font.color = shadow_color
  end
 
  def draw_enemy_element_radar_graph(enemy, x, y, radius = 40) #Gráfico
    cx = x + radius + 17 + 48
    cy = y + radius + 17 + 32
    for loop_i in 0..8
    if loop_i == 0
    else
      @pre_x = @now_x
      @pre_y = @now_y
      @pre_ex = @now_ex
      @pre_ey = @now_ey
      @color1 = @color2
    end
    if loop_i == 8
      eo = [1,2,3,4,5,6,7,8][0]
    else
      eo = [1,2,3,4,5,6,7,8][loop_i]
    end
    er = element_pourcent(enemy, eo)
    estr = $data_system.elements[eo]
    @color2 = Color.new(200, 178, 116, 255)
    @color3 = Color.new(0, 0, 0, 128)
    th = Math::PI * (0.5 - 2.0 * loop_i / 8)
    if er > 0
      @now_ex = cx + (er*radius/100 * Math.cos(th)).floor
      @now_ey = cy - (er*radius/100 * Math.sin(th)).floor
    else
      @now_ex = cx.floor
      @now_ey = cy.floor
    end
    if loop_i == 0
      @pre_x = @now_x
      @pre_y = @now_y
      @pre_ex = @now_ex
      @pre_ey = @now_ey
      @color1 = @color2
    end
    next if loop_i == 0
    self.contents.draw_line(@pre_ex,@pre_ey, @now_ex,@now_ey, @color3, 2, @color3)
    self.contents.draw_line(@pre_ex-1,@pre_ey-1, @now_ex-1,@now_ey-1, @color1, 2, @color2)
    end
  end
 
  def element_pourcent(enemy, element_id)
    table = [0,200,150,100,50,0,-100]
    return table[enemy.element_ranks[element_id]]
  end
end

#//////////////////////////////////////////////////////////
# Window_Status
#//////////////////////////////////////////////////////////

class Window_Status < Window_Base

  def initialize(actor)
    super(0, 0, 680, 500)
    self.contents = Bitmap.new(width, height)
    @actor = actor
    self.opacity = 0
    refresh
  end

  def refresh
    self.contents.clear
    self.contents.font.name = "Cataneo BT"
    draw_actor_graphic(@actor, 360, 240)
    draw_heroface4(@actor,20,495) 
    draw_actor_name2(@actor, 8, 4)
    self.contents.font.size = 24
    draw_maphp5(@actor, 325, 185)
    draw_mapsp5(@actor, 325, 210)
    draw_actor_parameter2(@actor, 350, 280, 0) #Ataque
    draw_actor_parameter2(@actor, 490, 280, 1) #Def Física
   
    draw_actor_parameter2(@actor, 350, 320, 6) #Magia (Inteligencia)
    draw_actor_parameter2(@actor, 490, 320, 2) #Def Magica
   
#    draw_actor_parameter2(@actor, 230, 360, 3) #Fuerza
    draw_actor_parameter2(@actor, 350, 360, 4) #Puntería (Destreza)
    draw_actor_parameter2(@actor, 490, 360, 5) #Agilidad
   
    draw_next(250, 415)
   
    #draw_enemy_element_radar_graph($data_classes[@actor.class_id], 330,self.contents.height / 7 - 20, 40) #normal
    draw_enemy_element_radar_graph($data_classes[@actor.class_id], 380, 5, 40)
  end
end

#//////////////////////////////////////////////////////////
# Window_Face
#//////////////////////////////////////////////////////////

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

#//////////////////////////////////////////////////////////
# Scene_Status
#//////////////////////////////////////////////////////////
class Scene_Status

  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end

  def main
    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status.new(@actor)
    @status_face = Window_Face.new(@actor)
    @status_face.z = 2000
    @status_face.y = -15
    @status_face.contents_opacity = 0
    @mst_lay = Sprite.new
    @mst_lay.bitmap = RPG::Cache.picture("Fondo")
    @mst_lay.z = 100
   
    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.y -= 25 
      @status_face.contents_opacity -= 20
      Graphics.update
    end 
    Graphics.freeze
    @mst_lay.dispose
    @status_face.dispose
    @status_window.dispose
  end
     
  def update
    if @status_face.y < 0
      @status_face.y + 1
      @status_face.contents_opacity + 15
    elsif @status_face.y >= 0 
      @status_face.y = 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)
      if $game_party.actors.size == 1
        $game_system.se_play($data_system.buzzer_se)
      else
        $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
    end
    if Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
      if $game_party.actors.size == 1
        $game_system.se_play($data_system.buzzer_se)
      else
        $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
end

#//////////////////////////////////////////////////////////
# Bitmap
#//////////////////////////////////////////////////////////

class Bitmap
    def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color) #Gráfico
    distance = (start_x - end_x).abs + (start_y - end_y).abs
    for i in 1..distance
      x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
      y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
      self.fill_rect(x, y, width, width, start_color)
    end
  end
end

Demo:
Link: Pokepik Scene Status
avatar
Wecoc
Administrador
Administrador



Créditos 12083

Gracias : 519

Volver arriba Ir abajo

RPG Maker XP Re: Ppik Scene Status

Mensaje por znl el 2011-05-01, 10:13

Graficamente me encanta... pero todo eso que trae... tambien lo incluye el script?

Osea, la cosa esa de arriba a la derecha, por ejemplo.

PD si lo modifico un poco graficamente lo puedo poner y lo metes en el post? e.e
avatar
znl
Aventurero
Aventurero

0/3

Créditos 1589

Gracias : 58

Volver arriba Ir abajo

RPG Maker XP Re: Ppik Scene Status

Mensaje por Wecoc el 2011-05-01, 10:43

Sí, el script hace la línea de la gráfica esa, lo de debajo es parte del fondo.
Y sí, si quieres puedes modificarlo, usarlo, subirlo, etc xD
avatar
Wecoc
Administrador
Administrador



Créditos 12083

Gracias : 519

Volver arriba Ir abajo

RPG Maker XP Re: Ppik Scene Status

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


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