Sign in to follow this  
Followers 0
Fegarur

Sistema Sencillo de Día/Noche

12 posts in this topic

Descripción:
Con este script se notará el paso del tiempo en el juego. Aunque eso de tiempo es relativo, porque puede ir según el tiempo o según el número de pasos. En cualquier momento se puede forzar a que sea un determinado momento del dí­a (dí­a-anochecer-noche-amanecer).

Screens:
[SPOILER]Anocheciendo: user posted image[/SPOILER]
[SPOILER]De Noche: user posted image[/SPOILER]
[SPOILER]Amaneciendo: user posted image[/SPOILER]

Script:
[SPOILER]
CODE
#===============================================================================
#  Script Simple de Dí­a y Noche
#
#  Versión : 0.3.2 - 28.03.08
#  Creado por: hellMinor
#  Descripción: Un simple script que cambia el tono de la pantalla para emular
#               el dí­a o la noche. Se basa en los pasos o la hora del sistema.
#
#===============================================================================

#===============================================================================
# Map-Detection F.A.Q.
#===============================================================================
# Si tienes un mapa interior en el que no se muestran efectos de dí­a y noche
# simplemente pon [int] al comienzo del nombre del mapa.
# Al entrar a este tipo de mapas, el script cambiará inmediatamente el
# tono de pantalla a $daytone y todos los cambios hechos por el scrip serán
# ignorados.
#
# Algunos mapas interiores necesitan ser oscuros,como cuevas. Sólo pon [dint]
# al comienzo del nombre dle mapa para marcarlo como mapa interior oscuro.
# El script cambiará el tono a $nighttone en vez de $daytone
#
# Mientras, el tiempo sigue pasando en el mapa interior, y cuando salgas del
# interior se cambiará al tono de tiempo actual del juego.
#===============================================================================
# Get-Time F.A.Q.
#===============================================================================
# Si necesitas obtener el tiempo actual, puedes usar esto en Llamar Script:
# para obtener el tiempo actual:
# $game_variables[0001] = $dayandnight.getTime
# para obtener la hora actual:
# $game_variables[0001] = $dayandnight.getHour
# o para obtener el minuto actual:
# $game_variables[0001] = $dayandnight.getMinute
#
# $game_variables[0001] será la primera variable en la base de datos.
# Para usar otra variable, cambia el 0001 a algo >5000
#
#===============================================================================

class DayAndNight < Game_Screen
#===============================================================================
# Configuración Principal
#------------------------------------------------------------------------------
 $active = true        # Activa/Desactiva el script
 $timesystem = 1       # Determina qué tipo de sistema está activo
                       # 0 = Sistema por Pasos
                       # 1 = Sistema por Hora
 $fadingtime = 4       # Velocidad a la que cambia el tono (en segundos)
#-------------------------------------------------------------------------------
 $dusktone = Tone.new(-68, -51, -9, 25)      # Tono al Anochecer
 $nighttone = Tone.new(-136, -102, -17, 51)  # Tono por la Noche
 $dawntone = Tone.new(-20, -51, -68, 0)      # Tono al Amanecer
 $daytone = Tone.new(0, 0, 0, 0)             # Tono por el Dí­a
#-------------------------------------------------------------------------------
# Timesystem config
#-------------------------------------------------------------------------------
$starting_time = "night" # Determina la fase de inicio
                         # "day" para dí­a ,"dusk" para anochecer
                         # "dawn" para amanecer y "night" para noche.
                         # Notas: Por defecto es "night".
                         # ¡¡Cualquier otro cambiará TODOS los cálculos
                         # hechos con Graphics.frame_counter!!
                       
 $divider = 1            # Decide la velocidad a la que corre el Sistema Temporal
                         # Ej: 2 = Doble velocidad (30 segundos = 1 hora)
                         # Ej: 0,5 = Mitad de Velocidad (2 minutos = 1 hora)
 $dusktime =   7         # Cambia al anochecer en $dusktime
 $daytime =    8         # Cambia al dí­a en $daytime
 $dawntime =   19        # Cambia al amanecer en $dawntime
 $nighttime =  20        # Cambia a la noche en $nighttime
#------------------------------------------------------------------------------
# Configuración de los Pasos
#------------------------------------------------------------------------------
 $count = 0            # Cuenta cuántos pasos hay entre un periodo
 $maxsteps = 200       # Cuántos pasos hay entre el cambio dí­a/noche
#-------------------------------------------------------------------------------
# Comprobaciones
#------------------------------------------------------------------------------
 $day = true           # Comprueba si es de dí­a
 $dusk = false         # Comprueba si anochece
 $dawn = false         # Comprueba si amanece
 $night = false        # Comprueba si es de noche
#-------------------------------------------------------------------------------
def change?
  if $count >= $maxsteps
    if $day
      doDusk
    end
    if $dusk
      doNight
    end
    if $night
      doDawn
    end
    if $dawn
      doDay
    end
  end
end
#-------------------------------------------------------------------------------
def doNight
  if $dayandnight.exterior?
    $game_map.screen.start_tone_change($nighttone,$fadingtime*60)
  end
  $count = 0
  $day = false
  $dusk = false
  $dawn = false
  $night = true
end
#-------------------------------------------------------------------------------
def doDay
  if $dayandnight.exterior?
    $game_map.screen.start_tone_change($daytone,$fadingtime*60)
  end
  $count = 0
  $day = true
  $night = false
  $dawn = false
  $dusk = false
end
#-------------------------------------------------------------------------------
def doDawn
  if $dayandnight.exterior?
    $game_map.screen.start_tone_change($dawntone,$fadingtime*60)
  end
  $count = 0
  $day = false
  $night = false
  $dusk = false
  $dawn = true
end
#-------------------------------------------------------------------------------
def doDusk
  if $dayandnight.exterior?
    $game_map.screen.start_tone_change($dusktone,$fadingtime*60)
  end
  $count = 0
  $day = false
  $night = false
  $dusk = true
  $dawn = false
end
#-------------------------------------------------------------------------------
def updateclock
  clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
  hour = clocktime / 60 % 24
  minutes = clocktime % 60
  if hour == $dawntime && minutes == 0
    doDawn
  end
  if hour == $daytime && minutes == 0
    doDay
  end
  if hour == $dusktime && minutes == 0
    doDusk
  end
  if hour == $nighttime && minutes == 0
    doNight
  end
end
#-------------------------------------------------------------------------------
def interior?
  if($game_map.name.to_s.index("[int]") != nil)
    return true
  end
end
#-------------------------------------------------------------------------------
def exterior?
  if($game_map.name.to_s.index("[int]") == nil &&
    $game_map.name.to_s.index("[dint]") == nil)
    return true
  end
end
#-------------------------------------------------------------------------------  
def dark_interior?
  if($game_map.name.to_s.index("[dint]") != nil)
    return true
  end
end
#-------------------------------------------------------------------------------
def get_state_tone
  if $dawn
    return $dawntone
  end
  if $day
    return $daytone
  end
  if $dusk
    return $dusktone
  end
  if $night
    return $nighttone
  end
end
#-------------------------------------------------------------------------------
def getTime
  clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
  hour = clocktime / 60 % 24
  minutes = clocktime % 60
  return hour.to_s+":"+minutes.to_s
end
#-------------------------------------------------------------------------------  
def getHour
  clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
  hour = clocktime / 60 % 24
  return hour
end
#-------------------------------------------------------------------------------  
def getMinute
  clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
  minutes = clocktime % 60
  return minutes
end

end
#===============================================================================

class Game_Character
#===============================================================================

def increase_steps
  @stop_count = 0
  if $active && $timesystem == 0
    $count += 1
    $dayandnight = DayAndNight.new
    $dayandnight.change?
  end
  update_bush_depth
end

end
#===============================================================================

class Game_Map
#===============================================================================

def initialize
  @screen = Game_Screen.new
  if $active && $timesystem == 1
    $dayandnight = DayAndNight.new
  end
  @interpreter = Game_Interpreter.new(0, true)
  @map_id = 0
  @display_x = 0
  @display_y = 0
  create_vehicles
end
#-------------------------------------------------------------------------------
def update
  refresh if $game_map.need_refresh
  update_scroll
  update_events
  update_vehicles
  update_parallax
  if $active && $timesystem == 1
    $dayandnight.updateclock
  end
  @screen.update
end

def name
  $data_mapinfos[@map_id]
end
 
end
#===============================================================================

class Scene_Map
#===============================================================================

def fadein(duration)
  Graphics.transition(0)
  if $active && $dayandnight.interior?
    $game_map.screen.start_tone_change($daytone,1)
  else if $active && $dayandnight.dark_interior?
    $game_map.screen.start_tone_change($nighttone,1)
  else if $active && $dayandnight.exterior?
      $game_map.screen.start_tone_change($dayandnight.get_state_tone,1)
    end
    end
  end
  for i in 0..duration-1
    Graphics.brightness = 255 * i / duration
    update_basic
  end
  Graphics.brightness = 255
end

end
#===============================================================================

class Scene_Title
#===============================================================================

alias load_database_additions load_database
def load_database
  load_database_additions
  $data_mapinfos      = load_data("Data/MapInfos.rvdata")
  for key in $data_mapinfos.keys
    $data_mapinfos[key] = $data_mapinfos[key].name
  end
end

alias command_new_game_additions command_new_game
def command_new_game
  command_new_game_additions
  Graphics.frame_count += 25200/$divider if $starting_time == "dawn"
  Graphics.frame_count += 28800/$divider if $starting_time == "day"
  Graphics.frame_count += 68400/$divider if $starting_time == "dusk"
end

end

#===============================================================================
# Game-Time-Hotfix
#===============================================================================

#===============================================================================

class Window_SaveFile < Window_Base
#===============================================================================

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)
      case $starting_time
        when "night"
          @total_sec = @frame_count / Graphics.frame_rate
        when "dawn"
          @total_sec = @frame_count-(25200/$divider) / Graphics.frame_rate
        when "day"
          @total_sec = @frame_count-(28800/$divider) / Graphics.frame_rate
        when "dusk"
          @total_sec = @frame_count-(68400/$divider) / Graphics.frame_rate
      end
    rescue
      @file_exist = false
    ensure
      file.close
    end
  end
end

end
[/SPOILER]

Instrucciones:
Como viene siendo habitual, está todo en el script, y en español. Si tenéis alguna duda posteadla aquí­ e intentaré resolverla.

Créditos:
Script creado por hellMinor. Edited by Fegarur
0

Share this post


Link to post
Share on other sites
esto se puede hacer fácilmente con un engine no??????
0

Share this post


Link to post
Share on other sites
QUOTE(jorgefer @ Mar 24 2008, 01:13 PM)
esto se puede hacer fácilmente con un engine no??????
[right][snapback]54221[/snapback][/right]


claro que si, si te quieres llenar de eventos en proc. paralelo, y condiciones, para estas cosas un script siempre es mas limpio que un engine xD.png al menos para el que hace el juego por que para el consumidor final le va a dar lo mismo.

por cierto, excelente aporte fer icon13.gif
0

Share this post


Link to post
Share on other sites
Ua pregunta, cuando pego el script sale todo verde. ¿Está bien hecho el script?, como suelen tener varios colores, negro azul rojo etc.
0

Share this post


Link to post
Share on other sites
No entiendo lo que quieres decir con 'todo verde', pero deberías de obtener resultados similares a los de las screens (las hice yo, por eso es 100% seguro que funciona así).
0

Share this post


Link to post
Share on other sites
QUOTE(Jorge-maker-vx @ Apr 5 2008, 08:17 AM)
Ua pregunta, cuando pego el script sale todo verde. ¿Está bien hecho el script?, como suelen tener varios colores, negro azul rojo etc.
[right][snapback]54398[/snapback][/right]

Creo qe te refieres a:
En el lenguaje de script, cuando colocas # toda la siguiente linea, qeda como nota en forma de breve explicacion, o lo qe qiera poner xD.pngD
0

Share this post


Link to post
Share on other sites
Me refiero a que el script entero es de color verde. Vamos que solo es texto. Probé a jugar y me dice que hay varios errores en el scripts...
0

Share this post


Link to post
Share on other sites
parece que nuestro amigo fer se confundio al pegar el script, lo raro es que nadie se dio cuenta por que el error esta en la primera linea ojomorado.gif

bue si todavia no lo encuentran al problema, aca les dejo la solucion xD.png

[spoiler]
CODE

#==============================================================================
#  Script de Día y Noche Simple
#
#  Versión: 0.2.1 - 02.02.08
#  Creado por: hellMinor
#  Descripción: Un simple script que cambia el tono de la pantalla para emular
#               el día o la noche. Se basa en los pasos o la hora del sistema.
#
#==============================================================================
#==============================================================================
class DayAndNight < Game_Screen
#==============================================================================
# Para cambiar día/noche usando un simple evento añade esto en Llamar Script:
#------------------------------------------------------------------------------
# dayandnight = DayAndNight.new
# dayandnight.doNight # Para la Noche
# o
# dayandnight.doDay   # Para el Día
# o
# dayandnight.doDusk  # Para el Anochecer
# o
# dayandnight.doDawn  # Para el Amanecer
#==============================================================================
# Configuración Principal
#------------------------------------------------------------------------------
$active = true        # Activa/Desactiva el script
$timesystem = 1       # Determina qué tipo de sistema está activo
                      # 0 = Sistema por Pasos
                      # 1 = Sistema por Hora
$fadingtime = 4       # Velocidad a la que cambia el tono (en segundos)
#------------------------------------------------------------------------------
$dusktone = Tone.new(-68, -51, -9, 25)      # Tono al Anochecer
$nighttone = Tone.new(-136, -102, -17, 51)  # Tono por la Noche
$dawntone = Tone.new(-20, -51, -68, 0)      # Tono al Amanecer
$daytone = Tone.new(0, 0, 0, 0)             # Tono por el Día
#------------------------------------------------------------------------------
# Configuración del Sistema Temporal
#------------------------------------------------------------------------------
$divider = 1          # Decide la velocidad a la que corre l Sistema Temporal
                      # Ej: 2 = Doble velocidad (30 segundos = 1 hora)
                      # Ej: 0,5 = Mitad de Velocidad (2 minutos = 1 hora)
$dusktime =   7       # Cambia al anochecer en $dusktime
$daytime =    8       # Cambia al día en $daytime
$dawntime =   19      # Cambia al amanecer en $dawntime
$nighttime =  20      # Cambia a la noche en $nighttime
#------------------------------------------------------------------------------
# Configuración de los Pasos
#------------------------------------------------------------------------------
$count = 0            # Cuenta cuántos pasos hay entre un periodo
$maxsteps = 200       # Cuántos pasos hay entre el cambio día/noche
#------------------------------------------------------------------------------
# Comprobaciones
#------------------------------------------------------------------------------
$day = true           # Comprueba si es de día
$dusk = false         # Comprueba si anochece
$dawn = false         # Comprueba si amanece
$night = false        # Comprueba si es de noche
#------------------------------------------------------------------------------  
def change?
  if $count >= $maxsteps
    if $day
      doDusk
    end
    if $dusk
      doNight
    end
    if $night
      doDawn
    end
    if $dawn
      doDay
    end
  end
end
#------------------------------------------------------------------------------
def doNight
  $game_map.screen.start_tone_change($nighttone,$fadingtime*60)
  $count = 0
  $day = false
  $dusk = false
  $dawn = false
  $night = true
end
#------------------------------------------------------------------------------
def doDay
  $game_map.screen.start_tone_change($daytone,$fadingtime*60)
  $count = 0
  $day = true
  $night = false
  $dawn = false
  $dusk = false
end
#------------------------------------------------------------------------------  
def doDawn
  $game_map.screen.start_tone_change($dawntone,$fadingtime*60)
  $count = 0
  $day = false
  $night = false
  $dusk = false
  $dawn = true
end
#------------------------------------------------------------------------------  
def doDusk
  $game_map.screen.start_tone_change($dusktone,$fadingtime*60)
  $count = 0
  $day = false
  $night = false
  $dusk = true
  $dawn = false
end
#------------------------------------------------------------------------------  
def updateclock
  clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
  hour = clocktime / 60 % 24
  minutes = clocktime % 60
  if hour == $dawntime && minutes == 0
    doDawn
  end
  if hour == $daytime && minutes == 0
    doDay
  end
  if hour == $dusktime && minutes == 0
    doDusk
  end
  if hour == $nighttime && minutes == 0
    doNight
  end
end

end
#==============================================================================
class Game_Character
#==============================================================================  
def increase_steps
  @stop_count = 0
  if $active && $timesystem == 0
    $count += 1
    dayandnight = DayAndNight.new
    dayandnight.change?
  end
  update_bush_depth
end

end
#==============================================================================
class Game_Map
#==============================================================================
def initialize
  @screen = Game_Screen.new
  if $active && $timesystem == 1
    @dayandnight = DayAndNight.new
  end
  @interpreter = Game_Interpreter.new(0, true)
  @map_id = 0
  @display_x = 0
  @display_y = 0
  create_vehicles
end
#------------------------------------------------------------------------------
def update
  refresh if $game_map.need_refresh
  update_scroll
  update_events
  update_vehicles
  update_parallax
  if $active && $timesystem == 1
    @dayandnight.updateclock
  end
  @screen.update
end

end

[/spoiler]
0

Share this post


Link to post
Share on other sites
Recuerdo que pasó eso y lo cambié. ¿Se volvió a cambiar él solito?
En fin, arreglado también en el primer post.
0

Share this post


Link to post
Share on other sites
para que arreglar la 0.2.1 cuando el script ya va por la 0.3.2? LOL

[spoiler]
CODE

#===============================================================================
#  Simple Day and Night Script
#
#  Version : 0.3.2 - 28.03.08
#  Created by : hellMinor
#  Description : A simple script which tones the screen to emulate a day and
#                night system on the basis of your footsteps or a time system.
#
#===============================================================================
#===============================================================================
# Map-Detection F.A.Q.
#===============================================================================
# If you have an interior map on which most likely no day and night effects
# are shown just put [int] to front of the mapname.
# When entering such a map the script will immediately change the screen tone
# to the $daytone and all tone changes done by the script will be ignored.
#
# Sometimes interior maps need to be dark ,i.e. caves, just put [dint]
# to the front of the mapname to mark this map as a dark interior map.
# The script while change the tone to the $nighttone instead of $daytone
#
# While in the interior map the time will still pass and when you leave the
# interior map it will tone the screen to the current game time
#===============================================================================
# Get-Time F.A.Q.
#===============================================================================
# If you need to get current time, you can use this code in a call script.
# to get the current time :
# $game_variables[0001] = $dayandnight.getTime
# to get the current hour :
# $game_variables[0001] = $dayandnight.getHour
# or to get the current minute :
# $game_variables[0001] = $dayandnight.getMinute
#
# $game_variables[0001] will be for example the first variable in your database.
# To use another variable just change the 0001 to something >5000
#
#===============================================================================
class DayAndNight < Game_Screen
#===============================================================================
# Main config
#-------------------------------------------------------------------------------
 $active = true     # Activates/Deactives the script
 $timesystem = 1    # Determines which time system is active
                    # 0 = Footstep-System
                    # 1 = Time-System
 $fadingtime = 4    # How fast the tone changes (in seconds)
#-------------------------------------------------------------------------------
 $dusktone = Tone.new(-68, -51, -9, 25)      # Dusk-Screen-Tone
 $nighttone = Tone.new(-136, -102, -17, 51)  # Night-Screen-Tone
 $dawntone = Tone.new(-20, -51, -68, 0)      # Dawn-Screen-Tone
 $daytone = Tone.new(0, 0, 0, 0)             # Day-Screen-Tone
#-------------------------------------------------------------------------------
# Timesystem config
#-------------------------------------------------------------------------------
 $starting_time = "night"  # Determines the starting phase
                         # "day" for day ,"dusk" for dusk
                         # "dawn" for dawn and "night" for night
                         # Notes : The default is "night",
                         # any other than night will change ALL calculations
                         # made with Graphics.frame_counter once !!!!!
                         
 $divider = 1            # Decides how fast the Time-System runs
                         # i.e. 2 = twice as fast (30 seconds = 1 hour)
                         # i.e. 0,5 = twice as slow (2 minutes = 1 hour)
                         
 $dawntime =   7         # turns into dawn on $dawntime
 $daytime =    8         # turns into day on $daytime
 $dusktime =   19        # turns into dusk on $dusktime
 $nighttime =  20        # turns into night on $nighttime
#-------------------------------------------------------------------------------
# Footstep config
#-------------------------------------------------------------------------------
 $count = 0            # Counter how many steps are made between one period
 $maxsteps = 200       # How many footsteps between each phase
#-------------------------------------------------------------------------------
# boolean checks
#-------------------------------------------------------------------------------
 $day = false           # Checker if its day
 $dusk = false          # Checker if its dusk
 $dawn = false          # Checker if its dawn
 $night = true          # Checker if its night
#-------------------------------------------------------------------------------
 def change?
   if $count >= $maxsteps
     if $day
       doDusk
     end
     if $dusk
       doNight
     end
     if $night
       doDawn
     end
     if $dawn
       doDay
     end
   end
 end
#-------------------------------------------------------------------------------
 def doNight
   if $dayandnight.exterior?
     $game_map.screen.start_tone_change($nighttone,$fadingtime*60)
   end
   $count = 0
   $day = false
   $dusk = false
   $dawn = false
   $night = true
 end
#-------------------------------------------------------------------------------
 def doDay
   if $dayandnight.exterior?
     $game_map.screen.start_tone_change($daytone,$fadingtime*60)
   end
   $count = 0
   $day = true
   $night = false
   $dawn = false
   $dusk = false
 end
#-------------------------------------------------------------------------------
 def doDawn
   if $dayandnight.exterior?
     $game_map.screen.start_tone_change($dawntone,$fadingtime*60)
   end
   $count = 0
   $day = false
   $night = false
   $dusk = false
   $dawn = true
 end
#-------------------------------------------------------------------------------
 def doDusk
   if $dayandnight.exterior?
     $game_map.screen.start_tone_change($dusktone,$fadingtime*60)
   end
   $count = 0
   $day = false
   $night = false
   $dusk = true
   $dawn = false
 end
#-------------------------------------------------------------------------------
 def updateclock
   clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
   hour = clocktime / 60 % 24
   minutes = clocktime % 60
   if hour == $dawntime && minutes == 0
     doDawn
   end
   if hour == $daytime && minutes == 0
     doDay
   end
   if hour == $dusktime && minutes == 0
     doDusk
   end
   if hour == $nighttime && minutes == 0
     doNight
   end
 end
#-------------------------------------------------------------------------------
 def interior?
   if($game_map.name.to_s.index("[int]") != nil)
     return true
   end
 end
#-------------------------------------------------------------------------------
 def exterior?
   if($game_map.name.to_s.index("[int]") == nil &&
     $game_map.name.to_s.index("[dint]") == nil)
     return true
   end
 end
#-------------------------------------------------------------------------------  
 def dark_interior?
   if($game_map.name.to_s.index("[dint]") != nil)
     return true
   end
 end
#-------------------------------------------------------------------------------
 def get_state_tone
   if $dawn
     return $dawntone
   end
   if $day
     return $daytone
   end
   if $dusk
     return $dusktone
   end
   if $night
     return $nighttone
   end
 end
#-------------------------------------------------------------------------------
 def getTime
   clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
   hour = clocktime / 60 % 24
   minutes = clocktime % 60
   return hour.to_s+":"+minutes.to_s
 end
#-------------------------------------------------------------------------------  
 def getHour
   clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
   hour = clocktime / 60 % 24
   return hour
 end
#-------------------------------------------------------------------------------  
 def getMinute
   clocktime = Graphics.frame_count / (Graphics.frame_rate/$divider)
   minutes = clocktime % 60
   return minutes
 end
 
end
#===============================================================================
class Game_Character
#===============================================================================
 def increase_steps
   @stop_count = 0
   if $active && $timesystem == 0
     $count += 1
     $dayandnight = DayAndNight.new
     $dayandnight.change?
   end
   update_bush_depth
 end
 
end
#===============================================================================
class Game_Map
#===============================================================================
 def initialize
   @screen = Game_Screen.new
   if $active && $timesystem == 1
     $dayandnight = DayAndNight.new
   end
   @interpreter = Game_Interpreter.new(0, true)
   @map_id = 0
   @display_x = 0
   @display_y = 0
   create_vehicles
 end
#-------------------------------------------------------------------------------
 def update
   refresh if $game_map.need_refresh
   update_scroll
   update_events
   update_vehicles
   update_parallax
   if $active && $timesystem == 1
     $dayandnight.updateclock
   end
   @screen.update
 end

 def name
   $data_mapinfos[@map_id]
 end
   
end
#===============================================================================
class Scene_Map
#===============================================================================
 def fadein(duration)
   Graphics.transition(0)
   if $active && $dayandnight.interior?
     $game_map.screen.start_tone_change($daytone,1)
   else if $active && $dayandnight.dark_interior?
     $game_map.screen.start_tone_change($nighttone,1)
   else if $active && $dayandnight.exterior?
       $game_map.screen.start_tone_change($dayandnight.get_state_tone,1)
     end
     end
   end
   for i in 0..duration-1
     Graphics.brightness = 255 * i / duration
     update_basic
   end
   Graphics.brightness = 255
 end

end
#===============================================================================
class Scene_Title
#===============================================================================
 alias load_database_additions load_database
 def load_database
   load_database_additions
   $data_mapinfos      = load_data("Data/MapInfos.rvdata")
   for key in $data_mapinfos.keys
     $data_mapinfos[key] = $data_mapinfos[key].name
   end
 end
 
 alias command_new_game_additions command_new_game
 def command_new_game
   command_new_game_additions
   Graphics.frame_count += 25200/$divider if $starting_time == "dawn"
   Graphics.frame_count += 28800/$divider if $starting_time == "day"
   Graphics.frame_count += 68400/$divider if $starting_time == "dusk"
 end
 
end

#===============================================================================
# Game-Time-Hotfix
#===============================================================================
#===============================================================================
class Window_SaveFile < Window_Base
#===============================================================================
 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)
       case $starting_time
         when "night"
           @total_sec = @frame_count / Graphics.frame_rate
         when "dawn"
           @total_sec = @frame_count-(25200/$divider) / Graphics.frame_rate
         when "day"
           @total_sec = @frame_count-(28800/$divider) / Graphics.frame_rate
         when "dusk"
           @total_sec = @frame_count-(68400/$divider) / Graphics.frame_rate
       end
     rescue
       @file_exist = false
     ensure
       file.close
     end
   end
 end
 
end

[/spoiler]

algun voluntario para traducirlo?
0

Share this post


Link to post
Share on other sites
Traducido y actualizado el primer post. icon13.gif
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0