Gw Temp

Menu

Tutorial - 'Complete Time System' by Fallen_Spades

An item about RPGMaker 2000 posted on

Blurb

How to create a system which shows hours, days, weeks, months, time and weather! HOORAY!

Body

Ok this tutorial is aimed on new and mildy experienced people of RM2k but this can also be used by PROs to improve thier games DRASTICALY!!! If you're a newbie you should read this tutorial from HEAD to TOE understand? And don't go skipping on lines!!!














If youre a newbie, read this as a newbie and finish this as an experienced programer.












Contents:
Chap1:The Starters
....switches
....variables
....forks

Chap2:The days
.... with the day/night detailed version


Chap3:The weeks
.... with week display you could use


Chap4:The months
... with month display for game improvements

Chap5:The weather
... with a cloud buildup system!!!

Chap6:The timebar
... this will serve as a new unique day/night time bar instead of the boring clock)

Chap7:the weatherbar
... this will display if it is raining or not(for additional game points)


Chap8:A simple day/night system(for those very new to Rm2k which doesn't know anything about variables(or are just plain lazy)A very great Day/Night System For you!!!
(only composes of 1 common event and less that seven lines!!)
... a must read for all newbies*RECOMMENDED


Chap9:Read this after the tutorials. Very Important reminders and How to make the events start!
(things won't work if you don't read Chap9)
... MUST READ after the tutorials or your time systems won't work










Now here goes the tutorial:



First we will have a short tutorial on switches, variables and forks. Experts and Pros You can skip this one, n00bs bear with me:

Switches:
They are as what thier name implies!! Switches!!
What is it really, they can make events start, when mixed with right knowledge, to understand more clearly, lets have this. They are like switches on the lights that make the lights go on
as mentioned in one tutorial that I read.
You want you game to rain when your char. steps on some button, so what you do is make an event on that specific button then make a switch go on.
eg.
the conditions will:
Start Condition:On Hero Touch
switch 001:gonnarain- is On

then make another event on the same map

but make the event conditions to:
Start conditions: Parallel Process(parallel processes will work continously without disturbing the players, and is ideal for rain effects)

001:gonnarain, and have the body of the event as
Call weather effect: rain

now you've just done a simple event with switches!!When 001:gonnarain was switched on, the event which called the rain will workwasn't that easy

Variables:
They are things that can hold a value, can't understand much? well here's another example

make an event and name it potiongiver or something like that now in his event's body:

message:talk to me five times and i will give you a potion

(now here's the variable part . . .)
create a variable called \variable[0001]talked#
now back to the programming part.

\v[0001]talked#+1(choose the varaible talked# and choose the + and set it to 1)
now the v[0001]talked# is equal to 1

The next is to have him give you potions when you talked to him more that 5 times. And that can be done by tada!!!!FORKS

Forks:
Forks are things wich can be considered as If statements
Take a look at this:
"If my bag has 10 apples I will go to grandmas house" now look at that statement carefully, now what will happen if she has 7 apples? then she will not go to grandmas house . . . But with
ELSE: then if I have 9 or less apples I will just go to the supermarket to buy some!!
Now here's how they work in RM2k

message:talk to me five times and i will give you a potion
\v[0001]talked#+1


now add forks:
go to Fork Conditions and set it as variable \v[0001]talked#,5 (equal, set to 5)
now at its events



If:\v[0001]talked#,5
Add/Remove Item:Potion,1
End Case:



now here's our complete code



message:talk to me five times and i will give you a potion
\v[0001]talked#+1
If:\v[0001]talked#,5
Add/Remove Item:Potion,1
End Case:












NOW BACK TO THE MAIN PURPOSE OF THIS TUTORIALS









For days and nights






First Open the iDraw, then make the name of your days using 200x50 size and using text(found in the tools). Then save them to your pictures folder.

Now for the switches(dont worry n00bs its very easy!!,trust me)
create a switch called (XXXday)<---Your name of day
another which is called (xxxafternoon), then another (xxxnight),then another called(xxxmorning).
another which is the (xx2day) and so on with the third etc.
another which (xx2afternoon) and etc.
create a variable which is called days


Now go to common events found in the database and make an common event, (Parrallel process) called Monday or whatever your first day is called.

Make its Starting condition to the switch [xxxmorning]--on

Make a fork condition which is when variable \v[0001]day,0 (equal,set to 0)
If:\v[0001]day,0
Show Picture- reduced 75% pic.no1 (you're picture of the first day's name, you can also make it ripple or rotate by using additional options for really cool day pictures) (70,27)<---This is located at the upper left hand corner *skip if you don't want to use these beautiful pictures!!!

Change switch[xxxmorning]-off
Change switch[xxxday]-on(this is for those things you like to appear only at certain times, like some mushrooms who only appears during daytime perhaps!)


Set Screen Tone: (100,100,100,100) (aw, come on don't tell me you don't know this one!!)

Wait 50.0 (depends on how long you want your day to last, you could always change this but I reccomend 50.0 seconds)

Change switch[xxxday]off(aw the mushrooms will now disappear, unless you make another event page in it's event, make its Condition to switch[xxxafternoon] then put a graphic of the rotten mushroom,<---EWWW!!! )

Change switch[xxxafternoon]-On(so its already an afternoon switch, now you really understand how switches work!!!)

Set Screen Tone: (100,100,10,10) or something that will look like orangey(hey did I just invent a new word?)

Wait 50.0(now this will determine how long afternoons are gonna be, and this will be my last comment for this topic cause I know you'll understand the rest )

Change switch[xxxafternoon]-off
Change switch[xxxnight]-on
Set Screen Tone (20,40,90,20) or something dark
Wait 50.0

Change switch[xx2morning]-on (did I say that i will not make comments anymore? Well I guess I can't stand to see you confused. changing this will give way to the second day after 50 seconds |
|
Wait 50.0(yes after this) <---------------------------------------------------------------------

Change variable \v[0001]day+1(this will give way to the next day, just wait and see the Fork conditions in the next common event)

Change Switch[xxxnight]-off(this will make the special effects like rippling work)!!


Now make another common event and make its Start Conditions to [xx2morning]-on
Copy all from above except this time change all xxx's to xx2's understand and remember
to make the last parts into change switch[xx3morning]-on and make the starting condition as [xx2morning]-on

now repeat as to how many days as desired.
and remember to make the last day to have [xxxmorning]-on as thier ending conditions






For Weeks




first things first: the requirements
Create a switch called [xxx]gamestart
Create a switch called [xxxnameofweek1]
Create a switch called [xxxnameofweek2]
Create a switch called [xxxnameofweek3] (etc. depending on how many weeks you're planning to have!)
200x50 sized text pictures of the weeks

Create a dummy week (which will be used only once, in the beggining, of the game make sure it will be the first week found in your game)

Create Common event named after the first week and make its start conditions [xxxgamestart]-on

Change variable \v[0001]day,0
Create a fork condition
If\v[xxxx]day,0
Show Picture:pic.no2 (the picture of the week reduced to 65%, You could make this rotate or ripple too!!!)
Change Switch[xxxnameofweek1]-on
Wait 100.00(depends on how long half of you day is, change this if neccesary)
Wait 100.00(this is the other half of one day)

Change Switch[xxxnameofweek3]-off (in order for the ripple or rotate to appear you could change this according to your total number of weeks, the last number of course)


END Case

now create the second week
you can copy the following from above
but this time the start condition will be [xxxnameofweek1]-on
and the [xxxnameofweek1] will be [xxxnameofweek2]
and also the [xxxnameofweek3] will be [xxxnameofmonth1]
and the fork will be if:\v[xxxx]day,5(or on how many days you have+1)
and now add a new variable called \v[xxxx]months+1

then repeat for more weeks and be sure to make a real first week which will be connecty with the last one (And if you don't know how to connect it, refer back to making days, I'm sure you'll find the way on making these)

now create a common event called Week Span, Parallel, and will be on by [xxx]gamestart
Inside it will be
Fork Condition If:\v[xxxx]day,9<--- or the last number of days you have in one week +1





For Months




again for the requirements:
create a variable called \v[xxx]months,0
create a switch called [xxxxnameofmonth1]
create a switch called [xxxxnameofmonth2] (etc. depending on the number of months you're planning to have)
200x50 text pictures of names of the Months

Create a common event and make it parallel, with the start condition of [xxxxnameofmonth2]<--(The
last month, change this according to you last month)
Inside it is:


If:\v[xxx]months,0
Show picture: pic by 65% pic.no.3(this will be you're first month's picture,as usual you can make this ripple or rotate)
change switch[xxxnameofmonth1]-on

Wait 100.00(put as many as these depending on how many days 1 month has in your game)
Wait 100.00(remember, two of these is only one day)

change switch[xxxnameofmonth2](can change this depending on how many months you have, be sure it is the last month)


Create another common event
you can copy the things above but be sure to change the switches and variables!(Cause I'm sure you're pretty experienced by now.)











For The Weather





Create variable \v[xxxx]cloudgather,0
Create variable \v[xxxx]gonnarain,0
Create variable \v[xxxx]howstrong,0

This is pretty easy

Create a common event, parallel, and startup is

Wait 1.0sec
Change var \v[xxxx]cloudgather+1
If: \v[xxxx]cloudgather,120(you could change this to make this weather-check more realistic)
change var \v[xxxx]gonnarain(random 1 to 3)
End Case

If: \v[xxxx]gonnarain,2
change var \v[xxxx]howstrong(random 1 to 3)
End Case

If: \v[xxxx]howstrong,1
call weather effect: rain. low
change var \v[xxxx]cloudgather=0
End Case

If: \v[xxxx]howstrong,2
call weather effect: rain. med
change var \v[xxxx]cloudgather=0
End Case

If: \v[xxxx]howstrong,3
call weather effect: rain. high
change var \v[xxxx]cloudgather=0
End Case

call weather effect:none/off

That's it!! Easy Right? Now this will be your game's rain!!








Now for a time bar





create a graphic of your time (from day to night to midnight etc.) using iDraw with 200x30 name it daybar
and
Make it look loke this:

legend: []- this will be the color of the current part of the day, example:
Night
[][][][][]-These will be colored with a black to blueish tone.

Got that!?


Night Afternoon Day Dawn
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

Now make another graphic of the bar you will have, put it on 200x30 and locate it on the rightmost side. Name it Daycursor

legend: v- the cursor,

[------------------------------------------------------------]
| V |
|____________________________________________________________]


now for the coding


Make a common event, parallel, with the starting condition of [xxxgamestart]-on

Show picture: Daybar(222,227) magnification 100% and transparency 15%

Make another common event, parallel *as usual*, with the starting condition [xxxgamestart]-on

Show picture: Daycursor(this will determine what part of the day you are now!!!)(225,227) magni.100% trans.15%
Move Picture: Daycursor(this will make it look like a clock with style ;) ) 100.00sec (depends on how long half of a day is in your game!) (Wait until done!)-on (125,277)

Move Picture: Daycursor(now for the other half!!) 100.00sec (once again depend on the other hals of your day) (wait until done)-on (25,277)


Now that's another addition to your game!!!












The Weather Bar(be sure to have already made a weather program in your common events, It must be the same as what is in the tutorial*It will not work if you havent :( )





Create 2 pictures( or depending on how many weather types you're going to have)Sunny And Rainy with iDraw's text Editor And again you can make these rotate or ripple!!


make a parralel common event with gamestart as the switch

If:\v[xxxx]cloudgather!=(not equal to)120<---depends on what you have put in the if statement
Show Picture:(your sunny text pic) (89,227)
Wait 100.00( This )
Wait 20.00 (is equal to the 120 above)

End Case


If:\v[xxxx]gonnarain,1(this will be sunny again cause the rain is [xxxx]gonnarain,2)
Show Picture:(your sunny text pic) (89,227)
Wait 100.00( This )
Wait 20.00 (is equal to the 120 above)

End Case


If:\v[xxxx]gonnarain,2(this will be the rain)
Show Picture:(your rainy text pic) (89,227)
Wait 100.00( This )
Wait 20.00 (is equal to the 120 above)

End Case


If:\v[xxxx]gonnarain,3(this will be sunny again cause the rain is [xxxx]gonnarain,2)
Show Picture:(your sunny text pic) (89,227)
Wait 100.00( This )
Wait 20.00 (is equal to the 120 above)

End Case


That's It!!! The whole Weather Bar!!!









The very simple day/night system( I recommend this for beginners)




make a common event called day/night system or something like that, make the start conditions to
[xxxxgamestart]-on


Inside put this

Set Switch [xxxday]-on
Set Switch [xxxnight]-off
Set Screen Tone (100,100,100,100) ( this will give the dark evenings, and light days effect!!!)
Wait 100.00(depends on how long you want your day to last)
Set Switch [xxxnight]-on
Set Switch [xxxday]-off
Set Screen Tone (10,40,90,20)
Wait 100.00(again depends on how long your night is gonna last!!



Now that's it the whole day night system for begginers!!!












THE LAST REMINDERS


Well, this will be my finishing touches, first if you're planning on using any of this then I don't mind except that if you have space could you put a special thanks for me!?Oh and be sure to put the switch [xxxxgamestart]-on after your intro okay!!!




Well til next time!!