Gw Temp

Menu

Tutorial - 'Complete Time System' by TimberWolf

An item about RPGMaker 2000 posted on

Blurb

Yes, ANOTHER tutorial on making a time and day system in your RM2K game. TimberWolf did a good job, however!

Body

Okay here comes one of the lengthiest tuts I think I have seen. I am going to attemp to create a complete time system. Well enough of me and more tut explaining. WARNING, you can NOT just put this in your game. You must start a new project or you have got a hell of a lot of work cut out for you!

In this tut we are going to deal with:

1. Basic Timer
2. Diffrent Day Times


1. Basic Timer


Now I'm sure that most of you can do this on your own but for this system the basic timer has to be the exact same has I have got it or the whole thing won't work.

Lets start by making our variables. I will be using variables 2 through 8, that means you'll need 7 variables
v[0002]Main Timer Seconds
v[0003]Main Timer Minutes
v[0004]Main Timer Hours
v[0005]Main Timer Days
v[0006]Main Timer Weeks
v[0007]Main Timer Months
v[0008]Main Timer Years

Now thats done lets get onto the nitty gritty.
Make a common event, name it Main Timer or whatever suits you. In it put
Wait 1.0sec or whatever length you wish you seconds to be
Change variable, add 1 to Main Timer Seconds
Condition fork, if Main Timer Seconds equal 60, or whatever length your want a minute
Change variable, Main Timer Seconds replace 0
Change variable, Main Timer Mintues add 1
Condition fork, if Main Timer Minutes equal 60, or whatever length your want a hour
Change variable, Main Timer Mintues replace 0
Change variable, Main Timer Hours add 1
Condition fork, if Main Timer Hours equal 25
Change variable, Main Timer Hours replace 1
Change variable, Main Timer Days add 1
Condition fork, if Main Timer Days equal to 8
Change variable, Main Timer Days replace 1, one being Monday "You'll see later on"
Change variable, Main Timer Weeks add 1
Condition fork, if Main Timer Weeks equal to 4, or however long you want a month to be
Change variable, Main Timer Weeks replace 1
Change variable, Main Timer Months add 1
Condition fork, if Main Timer Months equal 13, or however long you want a yearto be
Change variable, Main Timer Months replace 1
Change variable, Main Timer Years add 1
FORK END:
FORK END:
FORK END:
FORK END:
FORK END:
FORK END:

There, that's the Basic Timer finished. Phew, that was a lot of typing! It might not make sense now but you will see later on why there are 25 hours in a day. On to Section 2

2. Different Day Times or DDT


This little function will add a huuge amount of realism to your game with out you even really trying. Ready? Lets go. There are no variables for this one just 5 switches, lets make our switches

Switch[****]Dawn
Switch[****]Morning
Switch[****]Midday
Switch[****]Afternoon
Switch[****]Night

Now onto the funnction itself. Make a new common event call it Day times or something like that.
We are going to start with Dawn and work our way through.

Condition fork, if Main Timer Hours equals 6
Switch change, Switch[****]Dawn ON
Switch change, Switch[****]Night OFF
Change Screen Color, (R040, G040, B040, C030) "This makes quite a nice dawn"
FORK END:

Condition fork, if Main Timer Hours equals 7
Switch change, Switch[****]Dawn ON
Switch change, Switch[****]Night OFF
Change Screen Color, (R040, G040, B040, C030) "This makes quite a nice dawn"
FORK END:

Condition fork, if Main Timer Hours equals 8
Switch change, Switch[****]Morning ON
Switch change, Switch[****]Dawn OFF
Change Screen Color, (R080, G080, B080, C080) "This makes quite a nice morning"
FORK END:

Condition fork, if Main Timer Hours equals 9
Switch change, Switch[****]Morning ON
Switch change, Switch[****]Dawn OFF
Change Screen Color, (R080, G080, B080, C080)
FORK END:

Condition fork, if Main Timer Hours equals 10
Switch change, Switch[****]Morning ON
Switch change, Switch[****]Dawn OFF
Change Screen Color, (R080, G080, B080, C080)
FORK END:

Condition fork, if Main Timer Hours equals 11
Switch change, Switch[****]Morning ON
Switch change, Switch[****]Dawn OFF
Change Screen Color, (R080, G080, B080, C080)
FORK END:

Condition fork, if Main Timer Hours equals 12
Switch change, Switch[****]Midday ON
Switch change, Switch[****]Morning OFF
Change Screen Color, (R100, G100, B100, C100) "This makes quite a nice Midday"
FORK END:

Condition fork, if Main Timer Hours equals 13
Switch change, Switch[****]Midday ON
Switch change, Switch[****]Morning OFF
Change Screen Color, (R100, G100, B100, C100)
FORK END:

Condition fork, if Main Timer Hours equals 14
Switch change, Switch[****]Midday ON
Switch change, Switch[****]Morning OFF
Change Screen Color, (R100, G100, B100, C100)
FORK END:

Condition fork, if Main Timer Hours equals 15
Switch change, Switch[****]Midday ON
Switch change, Switch[****]Morning OFF
Change Screen Color, (R100, G100, B100, C100)
FORK END:

Condition fork, if Main Timer Hours equals 16
Switch change, Switch[****]Afternoon ON
Switch change, Switch[****]Midday OFF
Change Screen Color, (R100, G060, B050, C070) "Makes a nice afternoon"
FORK END:

Condition fork, if Main Timer Hours equals 17
Switch change, Switch[****]Afternoon ON
Switch change, Switch[****]Midday OFF
Change Screen Color, (R100, G060, B050, C070)
FORK END:

Condition fork, if Main Timer Hours equals 17
Switch change, Switch[****]Afternoon ON
Switch change, Switch[****]Midday OFF
Change Screen Color, (R100, G060, B050, C070)
FORK END:

Condition fork, if Main Timer Hours equals 18
Switch change, Switch[****]Evening ON
Switch change, Switch[****]Afternoon OFF
Change Screen Color, (R040, G050, B070, C050) "Makes a nice Evening Darkened Color"
FORK END:

Condition fork, if Main Timer Hours equals 19
Switch change, Switch[****]Night ON
Switch change, Switch[****]Evening OFF
Change Screen Color, (R020, G030, B070, C030) "Makes a nice night"
FORK END:

Now just copy and past adding 1 to the hours part every time. When you get to hour 24 do this

Condition fork, if Main Timer Hours equals 24
Switch change, Switch[****]Night ON
Switch change, Switch[****]Evening OFF
Change Screen Color, (R020, G030, B070, C030)
FORK END:

Condition fork, if Main Timer Hours equals 1
Switch change, Switch[****]Night ON
Switch change, Switch[****]Evening OFF
Change Screen Color, (R020, G030, B070, C030)
FORK END:

This way the time of day system will know a new day has begun. Well that's it for the Different Day Times.

That's all I am going to do for now because my fingers are numb and my brain is sore. I will make other tutorialss that deal with things, like

  1. The Display of Time.

  2. Weekends

  3. Diffrent Days of the Week



TimberWolf signing off......