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 2 usuarios en línea: 0 Registrados, 0 Ocultos y 2 Invitados

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 Dia/Noche + reloj Ace

3 participantes

Ir abajo

Script Dia/Noche + reloj Ace Empty Script Dia/Noche + reloj Ace

Mensaje por Muzgar Mar 18 Dic 2012, 10:02 am

Segundo script colgado, este algo más útil xD me remito a lo mismo, he empezado a usarlo y a crear la demo desde 0 sin tener ni idea de script xD Por lo tanto si he podido crearlo y utilizarlo es posible que lo haga cualquiera xD

Nombre: Basic Game Time + Night/Day (Sistema de tiempo dia y noche)

Descripción: Añade un reloj marcando la hora y cambia los tonos de pantalla según la hora del día.

Instrucciones: Instalarlo como siempre colocandolo encima de Main, Usar los comandos específicos que encontrareis en el script desde la linea 8 a la 14, y configurais el reloj a partirpara más detalles mirar la demo.

Linea 37-configurais los frames que tienen que pasar para que pase un minuto, recordar(60 frames= 1 segundo)
Linea 39-Poner False si no quereis usar Tintes
El tiempo se pausa en los mensajes, pero no en los combates, si quereis modificar esto está en la linea 48-50

Podeis configurar a que hora quereis que cambien los tonos de pantalla a partir de la linea 54 60 y el color de los tonos justo debajo.

SCRIPT


En pastebin: [Tienes que estar registrado y conectado para ver este vínculo]

Código:
#Basic Game Time + Night/Day
#----------#
#Features: Provides a series of functions to set and recall current game time
#          as well customizable tints based on current game time to give the
#          appearance of night and day.
#
#Usage:  Script calls:
#          GameTime::minute?  - returns the current minute
#          GameTime::hour?    - returns the current hour
#          GameTime::set(time) - sets the game time to time, in frames (max:1440)
#          GameTime::change(time) - increments the game time! (can be negative)
#          GameTime::pause_time(set) - stops time for events and stuff, true or false
#          GameTime::pause_tint(set) - time runs, but tints do not update
#          GameTime::clock(set) - sets whether clock is visible or not
#       
#Customization: Set below, in comments.
#
#Examples: GameTime::set(360)
#
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given

#---Game Clock---#
#USE_CLOCK to true to display game time clock
#CLOCK_POSITION for position of clock
#  1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
#CLOCK_TOGGLE is any input button available, see the INPUT help file for options
#------#
USE_CLOCK      = true
CLOCK_POSITION  = 4
CLOCK_TOGGLE    = :SHIFT

module GameTime
  #---Game Time Details---#
  #Number of frames in a game minute, 60 frames = 1 second
  TIME_COUNT      = 60
  #Sets whether to tint screen based on game time
  USE_TINT        = true

  #Switch to denote day or night time
  USE_SWITCH = false
  NIGHT_DAY_SWITCH = 1
  DAY_TIME_START = 6
  NIGHT_TIME_START = 18

  #True to pause time while not in map or while during a message
  PAUSE_IN_COMBAT  = false
  PAUSE_NOT_IN_MAP = true
  PAUSE_IN_MESSAGE = true

  #Sets time frames of tints by minute count, one day is 1440 minutes
  # 0 = 12am, 360 = 6am, 720 = 12pm, 1080 = 6pm  etc...
  PRESUNRISE_TIME = 240
  SUNRISE_TIME    = 360
  NOONSTART_TIME  = 660
  NOONEND_TIME    = 900
  PRESUNSET_TIME  = 1080
  SUNSET_TIME    = 1260
  MIDNIGHT_TIME  = 60  #Must be greater than 0

  #Sets custome tints
  PRESUNRISE_TONE = Tone.new(-75,-75,0,50)
  SUNRISE_TONE    = Tone.new(0,0,0,0)
  NOONSTART_TONE  = Tone.new(45,45,0,-25)
  NOONEND_TONE    = Tone.new(0,0,0,0)
  PRESUNSET_TONE  = Tone.new(-50,-50,0,25)
  SUNSET_TONE    = Tone.new(-75,-100,0,75)
  MIDNIGHT_TONE  = Tone.new(-125,-125,0,125)

  #Include the ids of any maps not to be tinted based on time
  # Usually reserved for indoor maps
  NOTINTMAPS = [2]
 
  #Store current time in a variable?
  USE_VARIABLE = false
  TIME_VARIABLE = 1

  #---END---#

  def self.init
    $game_time = 0
    $game_time_pause_time = false
    $game_time_pause_tint = false
  end
  def self.update
    if $game_time_pause_time then return else end
    case SceneManager::scene_is?(Scene_Map)
    when true
      if $game_message.visible == true && PAUSE_IN_MESSAGE then else
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    when false

      if !PAUSE_NOT_IN_MAP and !SceneManager::scene_is?(Scene_Battle)
        $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
      if SceneManager::scene_is?(Scene_Battle) && PAUSE_IN_COMBAT != true
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    end
    if $game_time == 1440 then $game_time = 0 end
    $game_variables[TIME_VARIABLE] = $game_time if USE_VARIABLE
    update_night_swith if USE_SWITCH
    GameTime::tint if $game_time_pause_tint != true
  end
  def update_night_switch
    if hour? > DAY_TIME_START and hour? < NIGHT_TIME_START
      $game_switches[NIGHT_DAY_SWITCH] = true unless $game_switches[NIGHT_DAY_SWITCH] == true
    else
      $game_switches[NIGHT_DAY_SWITCH] = false unless $game_switches[NIGHT_DAY_SWITCH] == false
    end
  end
  def self.hour?
    return $game_time / 60
  end
  def self.minute?
    return $game_time % 60
  end
  def self.time?
    meri = "AM"
    hour = GameTime::hour?
    minute = GameTime::minute?
    if hour > 11 then meri = "PM" end
    if hour == 0 then hour = 12; meri = "AM" end
    if hour > 12 then hour -= 12 end
    if hour < 10 then hour = " " + hour.to_s else hour.to_s end
    if minute < 10 then minute = "0" + minute.to_s else minute.to_s end
    return hour.to_s + ":" + minute.to_s + " " + meri
  end
  def self.set(number)
    $game_time = number if number < 1440
    GameTime::tint(0)
  end
  def self.change(number)
    $game_time += number
    $game_time -= 1440 if $game_time > 1440
    $game_time += 1440 if $game_time < 0
    GameTime::tint(0)
  end
  def self.tint(tint = 60)
    if USE_TINT != true then return end
    for i in NOTINTMAPS
      if $game_map.map_id == i
        $game_map.screen.start_tone_change(Tone.new(0,0,0,0),0)
        return
      end
    end
    if SceneManager::scene_is?(Scene_Map) then else return end
    case $game_time
    when PRESUNRISE_TIME .. SUNRISE_TIME
      $game_map.screen.start_tone_change(PRESUNRISE_TONE, tint)
    when SUNRISE_TIME .. NOONSTART_TIME
      $game_map.screen.start_tone_change(SUNRISE_TONE, tint)
    when NOONSTART_TIME .. NOONEND_TIME
      $game_map.screen.start_tone_change(NOONSTART_TONE, tint)
    when NOONEND_TIME .. PRESUNSET_TIME
      $game_map.screen.start_tone_change(NOONEND_TONE, tint)
    when PRESUNSET_TIME .. SUNSET_TIME
      $game_map.screen.start_tone_change(PRESUNSET_TONE, tint)
    when SUNSET_TIME .. 1440
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when 0 .. MIDNIGHT_TIME
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when MIDNIGHT_TIME .. PRESUNRISE_TIME
      $game_map.screen.start_tone_change(MIDNIGHT_TONE, tint)
    end
  end
  def self.pause_time(set)
    $game_time_pause_time = set
  end
  def self.pause_tint(set)
    $game_time_pause_tint = set
  end
  def self.clock(set)
    SceneManager.scene.clock_visible?(set)
  end

  class Window_Clock < Window_Base
    def initialize
      case CLOCK_POSITION
      when 1
        super(0,0,115,56)
      when 2
        super(429,0,115,56)
      when 3
        super(0,360,115,56)
      when 4
        super(429,360,115,56)
      end
      self.visible = $game_time_clock_visibility unless $game_time_clock_visibility.nil?
    end
    def update
      self.contents.clear
      self.contents.draw_text(0,0,100,24,GameTime::time?)
      $game_time_clock_visibility = self.visible
    end
  end

end

module DataManager
  class << self
  alias gametime_msc make_save_contents
  alias gametime_esc extract_save_contents
  end
  def self.make_save_contents
    contents = gametime_msc
    contents[:gametime] = $game_time
    contents
  end
  def self.extract_save_contents(contents)
    gametime_esc(contents)
    $game_time = contents[:gametime]
  end
end


class Scene_Map < Scene_Base
  alias gametime_post_transfer post_transfer
  alias gametime_create_all_windows create_all_windows
  alias gametime_update_map update
  def post_transfer
    GameTime::tint(0)
    gametime_post_transfer
  end
  def create_all_windows
    gametime_create_all_windows
    @gametimeclock = GameTime::Window_Clock.new if USE_CLOCK
  end
  def update
    gametime_update_map
    @gametimeclock.update if @gametimeclock.nil? == false
    if Input.trigger?(CLOCK_TOGGLE) and @gametimeclock.nil? == false
      @gametimeclock.visible ? @gametimeclock.visible = false : @gametimeclock.visible = true
    end
  end
  def clock_visible?(set)
    @gametimeclock.visible = set
  end
end

class Scene_Base
  alias gametime_update update
  def update
    gametime_update
    GameTime::update
  end
end

GameTime::init

Imagenes:
[Tienes que estar registrado y conectado para ver esa imagen]

Demo

Script día y noche
¡En el baluarte de los dioses! xD
Cualquier duda preguntar.

Espero que os sea de utilidad.
Muzgar
Muzgar
500
500

Masculino

Edad 32

Cantidad de envíos 700

Maker Cash 2736

Reputación 78


Volver arriba Ir abajo

Script Dia/Noche + reloj Ace Empty Re: Script Dia/Noche + reloj Ace

Mensaje por junior molina Jue 28 Mar 2013, 4:21 pm

Como le hago para editar que el reloj no muestre esa ventana y poner alguna imagen debajo de los numeros?

O que simplemente no muestre la ventana, nada mas los numeros, es que se ve muy ordinario O.O
junior molina
junior molina
15
15

Masculino

Edad 28

Cantidad de envíos 25

Maker Cash 35

Reputación 0


Extras
Sobre mí::

Volver arriba Ir abajo

Script Dia/Noche + reloj Ace Empty Re: Script Dia/Noche + reloj Ace

Mensaje por Mike_182 Jue 28 Mar 2013, 4:53 pm

Puedo ayudarte haciendo desaparecer la ventana.
Ve a la linea 226 donde dice:
@gametimeclock = GameTime::Window_Clock.new if USE_CLOCK

Y debajo de esa linea escribe lo siguiente:
@gametimeclock.opacity = 0

O tal y como te muestro en la imagen:
[Tienes que estar registrado y conectado para ver esa imagen]
(Los "#===" solo los puse para remarcar que era, no es necesario ponerlo)

Si de plano no pudiste te dejo el script:
Código:
#Usage:  Script calls:
#          GameTime::minute?  - returns the current minute
#          GameTime::hour?    - returns the current hour
#          GameTime::set(time) - sets the game time to time, in frames (max:1440)
#          GameTime::change(time) - increments the game time! (can be negative)
#          GameTime::pause_time(set) - stops time for events and stuff, true or false
#          GameTime::pause_tint(set) - time runs, but tints do not update
#          GameTime::clock(set) - sets whether clock is visible or not
#       
#Customization: Set below, in comments.
#
#Examples: GameTime::set(360)
#
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given

#---Game Clock---#
#USE_CLOCK to true to display game time clock
#CLOCK_POSITION for position of clock
#  1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
#CLOCK_TOGGLE is any input button available, see the INPUT help file for options
#------#
USE_CLOCK      = true
CLOCK_POSITION  = 4
CLOCK_TOGGLE    = :SHIFT

module GameTime
  #---Game Time Details---#
  #Number of frames in a game minute, 60 frames = 1 second
  TIME_COUNT      = 60
  #Sets whether to tint screen based on game time
  USE_TINT        = true

  #Switch to denote day or night time
  USE_SWITCH = false
  NIGHT_DAY_SWITCH = 1
  DAY_TIME_START = 6
  NIGHT_TIME_START = 18

  #True to pause time while not in map or while during a message
  PAUSE_IN_COMBAT  = false
  PAUSE_NOT_IN_MAP = true
  PAUSE_IN_MESSAGE = true

  #Sets time frames of tints by minute count, one day is 1440 minutes
  # 0 = 12am, 360 = 6am, 720 = 12pm, 1080 = 6pm  etc...
  PRESUNRISE_TIME = 240
  SUNRISE_TIME    = 360
  NOONSTART_TIME  = 660
  NOONEND_TIME    = 900
  PRESUNSET_TIME  = 1080
  SUNSET_TIME    = 1260
  MIDNIGHT_TIME  = 60  #Must be greater than 0

  #Sets custome tints
  PRESUNRISE_TONE = Tone.new(-75,-75,0,50)
  SUNRISE_TONE    = Tone.new(0,0,0,0)
  NOONSTART_TONE  = Tone.new(45,45,0,-25)
  NOONEND_TONE    = Tone.new(0,0,0,0)
  PRESUNSET_TONE  = Tone.new(-50,-50,0,25)
  SUNSET_TONE    = Tone.new(-75,-100,0,75)
  MIDNIGHT_TONE  = Tone.new(-125,-125,0,125)

  #Include the ids of any maps not to be tinted based on time
  # Usually reserved for indoor maps
  NOTINTMAPS = [2]
 
  #Store current time in a variable?
  USE_VARIABLE = false
  TIME_VARIABLE = 1

  #---END---#

  def self.init
    $game_time = 0
    $game_time_pause_time = false
    $game_time_pause_tint = false
  end
  def self.update
    if $game_time_pause_time then return else end
    case SceneManager::scene_is?(Scene_Map)
    when true
      if $game_message.visible == true && PAUSE_IN_MESSAGE then else
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    when false

      if !PAUSE_NOT_IN_MAP and !SceneManager::scene_is?(Scene_Battle)
        $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
      if SceneManager::scene_is?(Scene_Battle) && PAUSE_IN_COMBAT != true
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    end
    if $game_time == 1440 then $game_time = 0 end
    $game_variables[TIME_VARIABLE] = $game_time if USE_VARIABLE
    update_night_swith if USE_SWITCH
    GameTime::tint if $game_time_pause_tint != true
  end
  def update_night_switch
    if hour? > DAY_TIME_START and hour? < NIGHT_TIME_START
      $game_switches[NIGHT_DAY_SWITCH] = true unless $game_switches[NIGHT_DAY_SWITCH] == true
    else
      $game_switches[NIGHT_DAY_SWITCH] = false unless $game_switches[NIGHT_DAY_SWITCH] == false
    end
  end
  def self.hour?
    return $game_time / 60
  end
  def self.minute?
    return $game_time % 60
  end
  def self.time?
    meri = "AM"
    hour = GameTime::hour?
    minute = GameTime::minute?
    if hour > 11 then meri = "PM" end
    if hour == 0 then hour = 12; meri = "AM" end
    if hour > 12 then hour -= 12 end
    if hour < 10 then hour = " " + hour.to_s else hour.to_s end
    if minute < 10 then minute = "0" + minute.to_s else minute.to_s end
    return hour.to_s + ":" + minute.to_s + " " + meri
  end
  def self.set(number)
    $game_time = number if number < 1440
    GameTime::tint(0)
  end
  def self.change(number)
    $game_time += number
    $game_time -= 1440 if $game_time > 1440
    $game_time += 1440 if $game_time < 0
    GameTime::tint(0)
  end
  def self.tint(tint = 60)
    if USE_TINT != true then return end
    for i in NOTINTMAPS
      if $game_map.map_id == i
        $game_map.screen.start_tone_change(Tone.new(0,0,0,0),0)
        return
      end
    end
    if SceneManager::scene_is?(Scene_Map) then else return end
    case $game_time
    when PRESUNRISE_TIME .. SUNRISE_TIME
      $game_map.screen.start_tone_change(PRESUNRISE_TONE, tint)
    when SUNRISE_TIME .. NOONSTART_TIME
      $game_map.screen.start_tone_change(SUNRISE_TONE, tint)
    when NOONSTART_TIME .. NOONEND_TIME
      $game_map.screen.start_tone_change(NOONSTART_TONE, tint)
    when NOONEND_TIME .. PRESUNSET_TIME
      $game_map.screen.start_tone_change(NOONEND_TONE, tint)
    when PRESUNSET_TIME .. SUNSET_TIME
      $game_map.screen.start_tone_change(PRESUNSET_TONE, tint)
    when SUNSET_TIME .. 1440
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when 0 .. MIDNIGHT_TIME
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when MIDNIGHT_TIME .. PRESUNRISE_TIME
      $game_map.screen.start_tone_change(MIDNIGHT_TONE, tint)
    end
  end
  def self.pause_time(set)
    $game_time_pause_time = set
  end
  def self.pause_tint(set)
    $game_time_pause_tint = set
  end
  def self.clock(set)
    SceneManager.scene.clock_visible?(set)
  end

  class Window_Clock < Window_Base
    def initialize
      case CLOCK_POSITION
      when 1
        super(0,0,115,56)
      when 2
        super(429,0,115,56)
      when 3
        super(0,360,115,56)
      when 4
        super(429,360,115,56)
      end
      self.visible = $game_time_clock_visibility unless $game_time_clock_visibility.nil?
    end
    def update
      self.contents.clear
      self.contents.draw_text(0,0,100,24,GameTime::time?)
      $game_time_clock_visibility = self.visible
    end
  end

end

module DataManager
  class << self
  alias gametime_msc make_save_contents
  alias gametime_esc extract_save_contents
  end
  def self.make_save_contents
    contents = gametime_msc
    contents[:gametime] = $game_time
    contents
  end
  def self.extract_save_contents(contents)
    gametime_esc(contents)
    $game_time = contents[:gametime]
  end
end


class Scene_Map < Scene_Base
  alias gametime_post_transfer post_transfer
  alias gametime_create_all_windows create_all_windows
  alias gametime_update_map update
  def post_transfer
    GameTime::tint(0)
    gametime_post_transfer
  end
  def create_all_windows
   
    gametime_create_all_windows
    @gametimeclock = GameTime::Window_Clock.new if USE_CLOCK
    @gametimeclock.opacity = 0
  end
  def update
    gametime_update_map
    @gametimeclock.update if @gametimeclock.nil? == false
    if Input.trigger?(CLOCK_TOGGLE) and @gametimeclock.nil? == false
      @gametimeclock.visible ? @gametimeclock.visible = false : @gametimeclock.visible = true
    end
  end
  def clock_visible?(set)
    @gametimeclock.visible = set
  end
end

class Scene_Base
  alias gametime_update update
  def update
    gametime_update
    GameTime::update
  end
end

GameTime::init
Después si gustas hago que tenga un fondo distinto porque ahorita estoy con mi proyecto chifla , total no es tan difícil (digo yo).

Y por favor evita hacer necropost, que este tema lleva unos meses inactivo
Recuerda que tenemos una zona para este tipo de soportes.
Un saludo.
Mike_182
Mike_182
Super Moderador
Super Moderador

Masculino

Edad 28

Cantidad de envíos 814

Maker Cash 1041

Reputación 150


Extras
Sobre mí::

Volver arriba Ir abajo

Script Dia/Noche + reloj Ace Empty Re: Script Dia/Noche + reloj Ace

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

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