[RMXP] Time script needed

Started by Sasquatch927, August 15, 2013, 09:05:01 pm

Previous topic - Next topic

Sasquatch927

Hi everyone. I'm a big fan of the database here, I love everyones work. Unfortunately I haven't been able to find a time script that suits my needs. I'd like to request a special one if someone has the time to make one. the features id like to have are

-Option to switch from military clock to standard clock

-I want 24 switches assigned to each hour to be turned on hourly. I want this so I can use common events to implement my own type of weather system

-I want a Toggleable HUD that displays the clock in this format:

[time of the day]
[Actor 1]-[Variable 1]-[Variable 2]
[Actor 2]

With the hourly switches being turned on, I can use events, variables and switches so the HUD and game recognize what day it is and day of the week. I can use these switches and variables to make conditional branches for enemies and encounters.

-I'd like it if it was possible to be able to constantly store the clock time as a variable. I'd like to have this so I can use a variable for time in conditional branches

-I also would like to be able to restart the clock at the time I specify upon activation. Another thing about this is if it can be done, is to use the variable I mentioned above to start the clock. If I have this feature, I can disable the clock while I'm talking with NPCs or during cutscenes. this is kinda necessary so the time doesn't keep flowing triggering switches when it doesn't need to be. afraid it might glitch something. Alternatively, if the clock could just be frozen and unfrozen, that would give me the same results. Another thing with tracking the time with a variable is that I can make quests with a time limit that either end the quest or fail it based on the time start.

I'd really appreciate whoever would make such a script. Its basically a clock that triggers common events and lets me see the time of the day, the month the day of the month, year and day of the week. If I forgot something ill repost, if anyone has any questions, let me know. I'm really not tooo good at composing messages, so I apologize if I didn't speak clearly. once again, thanks for the help, I hope to hear from someone soon! =)


Sasquatch927

I've already looked through all those. I'm kinda needing 24 switches instead of just 2

WhiteRose

Quote from: Sasquatch927 on August 15, 2013, 09:22:06 pm
I've already looked through all those. I'm kinda needing 24 switches instead of just 2


ForeverZer0's script (CCTS) should do what you need, if I'm understanding correctly. It will let you store the time in a variable, which you can then use for common events, setting weather, and so on. Though I'm not much of a scripter, I do have a knack for making things work. :) Maybe you can let me know a little bit more of what specifically you need the script to do, and we can figure out a way to use one of these scripts in a way that should work. Does that sound alright?

Sasquatch927

I appreciate that buddy!
storing the clock into a variable does add to a lot of what I can do, but the important thing is to have switches activate, specifically because common events can only trigger either by the use of an event, or when they're turned on with parallel  processing or auto start with a switch to activate. My weather changes every 6 hours (minutes) in game, the screen also changes tint depending on the hour, depending on wether your indoors, outside, might incorporate a little darker tint during a storm. the huge thing is having the 24 switches available so I can literally work on all of my night and day, month and year, weather systems inside the common events instead of the scripts

KK20

In parallel process, use this script call:

t = $game_variables[10]
$game_switches[t+1] = true
if t == 0
$game_switches[24] = false
else
$game_switches[t] = false
end
$game_map.need_refresh = true

You can change the 10 in $game_variables to whatever variable ID is holding the time. Switches used are 1-24. Now just make parallel process that trigger based on those switches.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sasquatch927

I actually took a second look at forever zeros time script, I'm gonna fiddle around and see what I can do.

Hey KK, do you mean accessing the database and setting a common event with a parallel process with that script call alone?
Another question, if that's true, since I may be using forever zeros CCTS script, will I have to alter the script command you gave me to match his script?

KK20

Yeah it should be a common event. And no, there shouldn't be any need to modify the code other than to change the $game_variables[10] to some other number, if you prefer.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sasquatch927

im having a problem with zeros clock, how do I change its position to the top right?

KK20


  # Default settings for the clock.
  # Set up using this pattern. [X, Y, OPACITY, FONTNAME, FONTSIZE]
  # All can be changed in-game with a script call at any time.
  CLOCK_FACE =  [0, 0, 160, 'Calibri', 15]

Just change the first zero to something large, like 464 or 540.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sasquatch927

August 16, 2013, 01:24:15 am #10 Last Edit: August 16, 2013, 02:28:00 am by KK20
omg, how did I miss that? I was looking in the wrong spot lol. Thanks

Edit: hey thanks for the help KK. Its coming together very well. All im gonna need to do now is disable all the weather and tints and extras I don't need. I appreciate your help