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

Script de tiempo segun la hora del PC.

Ir abajo

Script de tiempo segun la hora del PC. Empty Script de tiempo segun la hora del PC.

Mensaje por Rpg-xd Vie 04 Feb 2011, 2:44 pm

Introducción:

Este script sirve para hacer el efecto de dia y noche segun la hora de su pc.

Características:

Cambia el tono de pantalla automaticamente segun la hora de su pc,aunque tambien puede que use los pasos dados en el juego.
Capturas de Pantalla:
De momento no tengo.

Instalación:
Coloca una nueva clase sobre main con el nombre que quieras.
Instrucciones:
Bienen en el scrip

Compatibilidad:
No estoy seguro si es compatible con todo.
Script:
Código:
#===============================================================================
#  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 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 = true        # Comprueba si anochece
  $dawn = true        # Comprueba si amanece
  $night = true        # 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
Autor:hellMinor

Demo:pronte se subira.

Espero que os alla gustado y k ahora ya este bien postedo XD
Rpg-xd
Rpg-xd
30
30

Masculino

Edad 31

Cantidad de envíos 45

Maker Cash 37

Reputación 4


Extras
Sobre mí:: ANIME_FAN Y MAKER_FAN

Volver arriba Ir abajo

Volver arriba

- Temas similares

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