RPG maker VX


Unirse al foro, es rápido y fácil

RPG maker VX
RPG maker VX
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

[ Ver toda la lista ]


El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm

Guardado Estilo RM2k3

Ir abajo

Guardado Estilo RM2k3 Empty Guardado Estilo RM2k3

Mensaje por TigreX Sáb 06 Mar 2010, 12:23 pm

Bueno este es un estilo de guardado

Aqui ba la screen
Spoiler:


asi se vera
y aqui es script

Código:
CODE
#==============================================================================
# script creado por Unir
# Creado el 13 de April de 2008
#        Sitio (http://www.rpgmakerbrasil.com/forum/f43/save-estilo-2003-a-1584.html)
#
# Guardado Estilo Rpg Maker 2003
#==============================================================================
# Configuración del script
#==============================================================================

module UNIRFileConfig
  SAVE_MAX = 5    # Máximo número de ranuras de guardado.
end

#==============================================================================
# Window_SaveFile
#==============================================================================

class Window_SaveFile < Window_Base
  attr_reader  :filename
  attr_reader  :file_exist
  attr_reader  :time_stamp
  attr_reader  :selected

  def initialize(file_index, filename)
    super(0, 56 + file_index % UNIRFileConfig::SAVE_MAX * 120, 544, 120)
    @file_index = file_index
    @filename = filename
    load_gamedata
    refresh
    @selected = false
  end

  def load_gamedata
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      begin
        @characters    = Marshal.load(file)
        @frame_count    = Marshal.load(file)
        @last_bgm      = Marshal.load(file)
        @last_bgs      = Marshal.load(file)
        @game_system    = Marshal.load(file)
        @game_message  = Marshal.load(file) #
        @game_switches  = Marshal.load(file) #
        @game_variables = Marshal.load(file) #
        @game_self_switches  = Marshal.load(file) #
        @game_actors        = Marshal.load(file) #
        @game_party          = Marshal.load(file)
        @total_sec = @frame_count / Graphics.frame_rate
      rescue
        @file_exist = false
      ensure
        file.close
      end
    end
  end

  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    name = Vocab::File + " #{@file_index + 1}"
    self.contents.draw_text(4, 0, 200, WLH, name)
    @name_width = contents.text_size(name).width
    if @file_exist
      draw_party_characters(132, 0) # Cambia la posición de las Faces
      draw_money(4, 32, 128, 0)    # Cambia la posición del Dinero (X, Y, )
      draw_playtime(4, 64, 128, 0)  # Cambia la posición del Tiempo Jugado
    end
  end

  def draw_party_characters(x, y)
    for i in [Tienes que estar registrado y conectado para ver este vínculo]
      name = @characters[i][0]
      index = @characters[i][1]
      draw_face(name, index, x + i * 96, y)
    end
  end

  def draw_playtime(x, y, width, align)
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    if hour > 99
      hour = 99
      min = 00
    end
    time_string = "Tiempo:" # El nombre para el Tiempo Jugado
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, width, WLH, time_string)
    time_string = sprintf("            %02d:%02d", hour, min + 1)
    self.contents.font.color = text_color(2)
    self.contents.draw_text(x, y, width, WLH, time_string)
  end

  def draw_money(x, y, width, align)
    draw_currency_value(@game_party.gold, x, y, 120)
  end

  def selected=(selected)
    @selected = selected
    update_cursor
  end

  def update_cursor
    if @selected
      self.cursor_rect.set(0, 0, 128, height - 32)
    else
      self.cursor_rect.empty
    end
  end
end

#==============================================================================
# Scene_File
#==============================================================================

class Scene_File < Scene_Base
  def initialize(saving, from_title, from_event)
    @saving = saving
    @from_title = from_title
    @from_event = from_event
  end

  def start
    super
    @file_max = UNIRFileConfig::SAVE_MAX
    create_menu_background
    @help_window = Window_Help.new
    create_savefile_windows
    if @saving
      @index = $game_temp.last_file_index
      @help_window.set_text(Vocab::SaveMessage)
    else
      @index = self.latest_file_index
      @help_window.set_text(Vocab::LoadMessage)
    end
    @savefile_windows[@index].selected = true
    @page_file_max = ((416 - @help_window.height) / 120).truncate
    for i in 0...@file_max
      window = @savefile_windows[i]
      if @index > @page_file_max - 1
        if @index < @file_max - @page_file_max - 1
          @top_row = @index
          window.y -= @index * window.height
        elsif @index >= @file_max - @page_file_max
          @top_row = @file_max - @page_file_max
          window.y -= (@file_max - @page_file_max) * window.height
        else
          @top_row = @index
          window.y -= @index * window.height
        end
      end
      window.visible = (window.y >= @help_window.height and
      window.y < @help_window.height + @page_file_max * window.height)
    end
  end

  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    dispose_item_windows
  end

  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(4)
    end
  end

  def update
    super
    update_menu_background
    @help_window.update
    update_savefile_windows
    update_savefile_selection
  end

  def create_savefile_windows
    @top_row = 0
    @savefile_windows = []
    for i in 0...@file_max
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
  end

  def dispose_item_windows
    for window in @savefile_windows
      window.dispose
    end
  end

  def update_savefile_windows
    for window in @savefile_windows
      window.update
    end
  end

  def update_savefile_selection
    if Input.trigger?(Input::C)
      determine_savefile
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    else
      last_index = @index
      if Input.repeat?(Input::DOWN)
        cursor_down(Input.trigger?(Input::DOWN))
      end
      if Input.repeat?(Input::UP)
        cursor_up(Input.trigger?(Input::UP))
      end
      if @index != last_index
        Sound.play_cursor
        @savefile_windows[last_index].selected = false
        @savefile_windows[@index].selected = true
      end
    end
  end

  def determine_savefile
    if @saving
      Sound.play_save
      do_save
    else
      if @savefile_windows[@index].file_exist
        Sound.play_load
        do_load
      else
        Sound.play_buzzer
        return
      end
    end
    $game_temp.last_file_index = @index
  end

  def cursor_down(wrap)
    if @index < @file_max - 1 or wrap
      @index = (@index + 1) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == 0
          @top_row = 0
          window.y = @help_window.height + i % @file_max * window.height
        elsif @index - @top_row > @page_file_max - 1
          window.y -= window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row > @page_file_max - 1
        @top_row += 1
      end
    end
  end

  def cursor_up(wrap)
    if @index > 0 or wrap
      @index = (@index - 1 + @file_max) % @file_max
      for i in 0...@file_max
        window = @savefile_windows[i]
        if @index == @file_max - 1
          @top_row = @file_max - @page_file_max
          window.y = @help_window.height + i % @file_max * window.height
          window.y -= (@file_max - @page_file_max) * window.height
        elsif @index - @top_row < 0
          window.y += window.height
        end
        window.visible = (window.y >= @help_window.height and
          window.y < @help_window.height + @page_file_max * window.height)
      end
      if @index - @top_row < 0
        @top_row -= 1
      end
    end
  end

  def make_filename(file_index)
    return "Save#{file_index + 1}.rvdata"
  end

  def latest_file_index
    index = 0
    latest_time = Time.at(0)
    for i in [Tienes que estar registrado y conectado para ver este vínculo]
      if @savefile_windows[i].time_stamp > latest_time
        latest_time = @savefile_windows[i].time_stamp
        index = i
      end
    end
    return index
  end

  def do_save
    file = File.open(@savefile_windows[@index].filename, "wb")
    write_save_data(file)
    file.close
    return_scene
  end

  def do_load
    file = File.open(@savefile_windows[@index].filename, "rb")
    read_save_data(file)
    file.close
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    Graphics.fadeout(60)
    Graphics.wait(40)
    @last_bgm.play
    @last_bgs.play
  end

  def write_save_data(file)
    characters = []
    for actor in $game_party.members
      characters.push([actor.character_name, actor.character_index])
    end
    $game_system.save_count += 1
    $game_system.version_id = $data_system.version_id
    @last_bgm = RPG::BGM::last
    @last_bgs = RPG::BGS::last
    Marshal.dump(characters,          file)
    Marshal.dump(Graphics.frame_count, file)
    Marshal.dump(@last_bgm,            file)
    Marshal.dump(@last_bgs,            file)
    Marshal.dump($game_system,        file)
    Marshal.dump($game_message,        file)
    Marshal.dump($game_switches,      file)
    Marshal.dump($game_variables,      file)
    Marshal.dump($game_self_switches,  file)
    Marshal.dump($game_actors,        file)
    Marshal.dump($game_party,          file)
    Marshal.dump($game_troop,          file)
    Marshal.dump($game_map,            file)
    Marshal.dump($game_player,        file)
  end

  def read_save_data(file)
    characters          = Marshal.load(file)
    Graphics.frame_count = Marshal.load(file)
    @last_bgm            = Marshal.load(file)
    @last_bgs            = Marshal.load(file)
    $game_system        = Marshal.load(file)
    $game_message        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables      = Marshal.load(file)
    $game_self_switches  = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party          = Marshal.load(file)
    $game_troop          = Marshal.load(file)
    $game_map            = Marshal.load(file)
    $game_player        = Marshal.load(file)
    if $game_system.version_id != $data_system.version_id
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
  end
end

las instrucciones:

El script funcionará en cuanto lo coloques sobre Main. Si quieres personalizarlo un poco, sigue los comentarios en el script.

y los creditos a :

Unir


bueno eso es todo nos vemos
TigreX
TigreX
500
500

Masculino

Edad 26

Cantidad de envíos 1214

Maker Cash 1679

Reputación 105


Extras
Sobre mí::

Volver arriba Ir abajo

Volver arriba

- Temas similares

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