Time Variable Question

mylafter

I’m a creep... I’m a weirdo...
Veteran
Joined
Dec 30, 2012
Messages
196
Reaction score
176
First Language
English
Primarily Uses
N/A
I'm currently using this script that sets up a time system with variables.
You can find the thread of the script here.
You can find the actual script here.

On line 81, it says, "FRAMES_TIL_UPDATE = 60". So it takes 60 frames(1 second) for time to update/change to the next minute. I was wondering if there were a way to change the frame mid-way throughout the game. (Maybe through a script call or something, I don't know.)

An example to help further explain, I have a day and night system going on. So from 6AM-7PM the frames go at 200. But from 8PM and onward I want the frames to increase to 300 frames. The script only allows you to have one specified number for the frames throughout the entire game. Is there a way to change it midway, is my question. Hopefully that made sense. If you have any questions or of you're confused, please let me know.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Would you be against controlling it through another game variable? If not, then replace def self.time_manager with this:
Code:
  #-----------------------------------------------------------------------------
  #Start of Time Manager--------------------------------------------------------
  #-----------------------------------------------------------------------------
  def self.time_manager
    init_var
    unless time_stop?
      if $sel_time_frame == $game_variables[FRAMES_TIL_UPDATE]
        prog_minute
        prog_hour if $game_variables[MIN] >= 60
        prog_day if $game_variables[HOUR] >= 24 && $game_variables[MIN] == 0
      end
      $sel_time_frame += 1
    end
  end
  #-----------------------------------------------------------------------------
Haven't tested if it works, though.
If you want to quickly initialize the variable in the script, you want to add a line in def self.init_var above show_tint and show_weather:
$game_variables[FRAMES_TIL_UPDATE] = valuehere
upload_2019-4-28_3-2-10.png
 

mylafter

I’m a creep... I’m a weirdo...
Veteran
Joined
Dec 30, 2012
Messages
196
Reaction score
176
First Language
English
Primarily Uses
N/A
Would you be against controlling it through another game variable? If not, then replace def self.time_manager with this:
Code:
  #-----------------------------------------------------------------------------
  #Start of Time Manager--------------------------------------------------------
  #-----------------------------------------------------------------------------
  def self.time_manager
    init_var
    unless time_stop?
      if $sel_time_frame == $game_variables[FRAMES_TIL_UPDATE]
        prog_minute
        prog_hour if $game_variables[MIN] >= 60
        prog_day if $game_variables[HOUR] >= 24 && $game_variables[MIN] == 0
      end
      $sel_time_frame += 1
    end
  end
  #-----------------------------------------------------------------------------
Haven't tested if it works, though.
If you want to quickly initialize the variable in the script, you want to add a line in def self.init_var above show_tint and show_weather:
$game_variables[FRAMES_TIL_UPDATE] = valuehere
View attachment 114467
I'm sorry, but I don't understand how that answers my question. I think you interpreted my post wrong. Or maybe I just don't understand. What exactly does "$game_variables[FRAMES_TIL_UPDATE]" do differently from what it originally was before? It seems to be doing the same thing as the original script. It only gives me one option for the frame amount. I want a way to change the amount of frames updating the time mid-way through the game.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I'm sorry, but I don't understand how that answers my question. I think you interpreted my post wrong. Or maybe I just don't understand. What exactly does "$game_variables[FRAMES_TIL_UPDATE]" do differently from what it originally was before? It seems to be doing the same thing as the original script. It only gives me one option for the frame amount. I want a way to change the amount of frames updating the time mid-way through the game.
You can control the amount of frames by controlling the number of a set variable.
ex:
upload_2019-4-28_3-52-7.png
So now, you can change it anytime during the game. That's if my code edits work, at least.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
EDIT
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top