The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Event Systems => Topic started by: VianoceGames on February 25, 2015, 09:40:47 PM

Title: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 25, 2015, 09:40:47 PM
Hello everyone.

I have here a 3 part (eventually 4 part) common event system that gives your game a sense of time! Ever wanted your games to turn from night to day as if by the flow of time? How about having your character look at a clock and see what the current time is in your imaginary world? Have you ever wanted shops to open and close at specific times, maybe even be closed all day during the weekend or because it is a holiday? Or even have NPCs lock their doors at night because the live in a shady part of town! Well with this Time Event system you can do just that! Don't just make the player think time passed, actually make it pass when you fade out the screen. :)

Art Credit: Dr. Mc -- Vianoce portrait

Eventually I'll be adding a calender system. Edit: The calender system is done. I am not going to add the screen shots for this one because it is kinda long and I am feeling lazy.

Instructions:
At the start of your game you will want to set the time you want it to be when your game begins and turn on the clock when you want time to start flowing. It'll look something like this.

(http://i.imgur.com/OupGcz7.jpg)

And when ever your character is outside you will need to turn on the N&Dsystem switch and turn it off once once they go inside. You will also have to make sure every interior map has an event that sets the appropriate screen tone.

This system uses 6 switches and 10 variables and takes up 4 common events.
Switches:
1. Clock
2. N&Dsystem
3. Dawn
4. Day
5. Dusk
6. Night

Variables:
1.   Secs
2.   Mins
3.   Hours
4.   Days
5.   Weeks
6.   Years
7.   FixTime
8.   DaysofWeek
9.   DaysofMonth
10. MonthText

Bugs:
1. There seems to be a bug when changing the time too rapidly. When this happens the FixTime variable will fail to be corrected. and the clock display will read in a 24 hour format instead of 12 hours. I am not sure why this happens because the FixTime variable is controlled by a separate event than the one that controls time. I have tried calling the variable in a msgbox to debug it but I get an error saying Octal digit error... whatever that means. This seems to be the only variable that does this.

2. When the time is midnight the clock reads 12pm instead of 12am... This should be an easy fix, but if too many people have a problem figuring out how to do it then I will update the demo.

Demo: My first demo!
Time System (http://www.mediafire.com/download/b7egl0l27z2rp5o/Time+System.zip)

First up: is the TimeSystem:
Note: I like to make my common events look like scripts for aesthetics.

(http://i.imgur.com/GG9LoAh.jpg)
(http://i.imgur.com/rIQJEN9.jpg)
(http://i.imgur.com/19cqTLU.jpg)
(http://i.imgur.com/1qPxlwi.jpg)

Next up: The N&Dsystem
(http://i.imgur.com/XHGO5Yz.jpg)
(http://i.imgur.com/9syLFLT.jpg)
(http://i.imgur.com/ROHRbHU.jpg)
(http://i.imgur.com/ATIKxvf.jpg)
(http://i.imgur.com/LDa8iKb.jpg)
(http://i.imgur.com/pCiIhhI.jpg)

And then:]/color] ShowTime
Note: I use a script for a naming box that uses \n{" "} in show text boxes. You will have to edit that out unless you happen to use the same script. This script is not part of the demo.


This event must be called from map events from objects such as clocks, or if you just want the time to be displayed.

(http://i.imgur.com/v3ZP0Bl.jpg)
(http://i.imgur.com/olQSZSH.jpg)
(http://i.imgur.com/6ZUjIYf.jpg)
(http://i.imgur.com/fYTYRoq.jpg)
Title: Re: [VXA]Time Event system
Post by: yuyu! on February 26, 2015, 02:13:28 AM
This is pretty cool! :D

Whenever you're done with part 4, is it possible to release a demo? :)
Title: Re: [VXA]Time Event system
Post by: VianoceGames on February 26, 2015, 02:21:20 AM
Yeah, I imagine a demo would be pretty easy. That would help the lazy just copy and paste the common events instead of typing it out. :P I really didn't even think about making a demo and I think it is a great idea.
Title: Re: [VXA]Time Event system
Post by: yuyu! on February 26, 2015, 02:49:59 AM
Right on! :-) Thanks again for sharing this!
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 26, 2015, 11:57:14 PM
Demo added
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: yuyu! on February 27, 2015, 01:01:24 AM
I tried out the demo. :-) The system is pretty cool!

I love how me and that girl spent 50 years together. ;~;
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 27, 2015, 02:26:40 AM
Ha ha, I didn't really give it much thought. I was just keeping it simple.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: Acolyte on February 27, 2015, 02:49:56 AM
Hey, nice work!

Maybe you could do a second version with seasons :yuyu:
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 27, 2015, 02:54:27 AM
O_O That is a good idea... Um... Hmmm... I wonder how I would do that. Maybe add weather in there too. The season event could control which version of a map loads? That way grass is a different color or there is snow on the ground. NPCs might be doing different things too, like a npc might be fishing during the spring, then the same npc be cutting wood in the fall.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 27, 2015, 03:21:22 AM
A season could make changes in weather, ecology, and hours of daylight. Maybe Even change the intensity of sun light. Some animals might disapear from maps because they have gone into hibernation or have migrated. This could cause a change to where some monsters attack you and maybe even their strength from it being mating season or something crazy. Some people might have projects that require their players to harvest herbs and this could cause plants to become dormant from being in winter.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 28, 2015, 09:27:09 PM
Ok, I made a really dumb mistake when I made the demo... When the day of the month is suppose to be the 20th It says the 23rd... I have no idea why I made this mistake but it is an easy fix and something I think you should be aware of if you copy and paste the events into your own project.

To fix it just go into the Calender event and scroll down to week 3 day 5 and edit the command.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on March 05, 2015, 12:30:24 AM
The Common Event Time System - Seasons Expansion project is still on going. It is proving difficult, but I'm not going to give up easily.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: yuyu! on March 05, 2015, 02:30:48 AM
Good luck, vianoce! We believe in you ;o;
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: Gaming Princess Luna on March 07, 2015, 02:22:22 AM
The demo is really cool and astonishing.
Amazing what you did with eventing. :D
Is it possible to show up the time in the down left corner? (\s/)
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on March 08, 2015, 01:28:16 AM
The demo is really cool and astonishing.
Amazing what you did with eventing. :D
Is it possible to show up the time in the down left corner? (\s/)

Thanks! I can try to see what I can do. Do you mean the bottom left of the map?

You gave me an idea though; I'll try making something that shows the time on the screen when you press a key. I'll call the event "WristWatch" or "PocketWatch". :o
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: yuyu! on March 08, 2015, 01:33:32 AM
This system is coming along nicely! o.o

Awesome work, vianoce! :)
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: Gaming Princess Luna on March 09, 2015, 12:30:26 AM
Thanks! I can try to see what I can do. Do you mean the bottom left of the map?
I allways got it in the bottom right, but guess left would be fine too. :D
I never expected, that game time is possible to do with eventing, amazing work. :) (\s/)
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on March 10, 2015, 01:17:29 AM
Thanks! I can try to see what I can do. Do you mean the bottom left of the map?
I allways got it in the bottom right, but guess left would be fine too. :D
I never expected, that game time is possible to do with eventing, amazing work. :) (\s/)

This is the idea I got:
(http://i.imgur.com/gZ1D6iA.jpg)

I'm thinking about making the appearance optional between a scroll, a pocket watch and maybe something else.
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: Gaming Princess Luna on March 10, 2015, 05:40:05 PM
That was exactly what I meant. :D
Sometimes I wished, I wasn't that noobish in eventing, so I could do it myself. :/ (\s/)
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: Zeriab on March 16, 2015, 12:27:25 PM
For time keeping I highly suggest you just keep the amount of total seconds in a single variable.
Conversion to hours count, week count and e.t.c. can done by Div and Mod control switch commands. Having such a single source of truth is just so much nicer.

*hugs*
 - Zeriab
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on January 30, 2016, 12:34:52 AM
Hello everyone, I am back! I haven't had much time for hobbies in a long time, but I am picking up my projects again.

For time keeping I highly suggest you just keep the amount of total seconds in a single variable.
Conversion to hours count, week count and e.t.c. can done by Div and Mod control switch commands. Having such a single source of truth is just so much nicer.

*hugs*
 - Zeriab

Secs are in a single variable...
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: yuyu! on January 30, 2016, 01:28:57 AM
missed u, vi~ ;o;
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on January 30, 2016, 02:35:04 AM
Thanks yuyu  :)
Title: Re: [VXA][Updated]Time Event system - Now with demo!
Post by: VianoceGames on February 08, 2016, 11:48:04 AM
So I finished eventing what I have so far here in the VXA version for the MV version and I started the project to make a new demo for MV when I realized I forgot to give credit where credit is due. My apologies Dr. Mc, you did a great job with the portraits you made for me and I didn't mean to forget to give you credit when I finally used one of them. Won't happen again. I edited my original post to give you credit.