Day and Night Guide! Version 2.4

for RPG Maker 2000

By JanusX (janusx@hotmail.com)

---Introduction---

I got the idea for day and night after reading a guide on Day and Night for RPG Maker '95. I decided that Day and night would be much easier to pull off with RPG Maker 2000 more advanced features! I proved myself right after trying out a few ideas. Not only is it easier, it's much more user friendly and effiecient in RPG Maker 2000's new engine!

---What's New in this version?---

From Most Recent to Oldest
2.5 - Added more information to source codes to help avoid confusion. Also updated the first event directions to hopefuly avoid common problems.

2.3 - Added the Warewolf section! Also I will have a demo game for you to look at soon if you still are experiencing troubles.

2.2 - I've added a troubleshooting section and fixed a few miscellaneous bugs... Expect another update soon!!

2.0 - I've added alot of info along with some sample code.

1.0 - Original Version!

---Getting Started---

For this to be of much use to you, there's a few things you'll need to know:
1. How to work with events.
2. A knowlege on how switches work
3. Knowing how timers work is a plus!
If you don't meet one of the requirements you can probally figure out what I'm saying anyways ;-p If you want another tutorial go back to Don's page! Click here to go there now!

---The first few seconds---

Ok first of we need a starter event, something to get time rolling! I'd say in the first room that you have control of your character, create a new event. Make it have no graphics and auto-started. Create a new action - 'Timer Operations' Now select set from the operation box. Next where it says Set: _____ mins _____ secs put in the amount of time you want a 'day' to last. (not counting the night!) Click ok afterwards. Now create another action - 'Timer Operations' - again. This time do start from operations box. In the bottom box put a check next to anything that fits your ideas. Then create one more action that turns a switch entitled - 'Day' - On! Finally create a an action that turns on a new switch, "TimeStart". Now create a second page, (using the button NEAR the top-left corner) and set it to happen when the player pushes a key and when the switch "TimeStart" is ON. Leave this page blank.
[SAMPLE CODE]
[PAGE 1]
[SETUP]
Event Start Condition: Auto Start
[CODE]
<>Timer Operation:Cost Creat0m30s.
<>Timer Operation:StartTmr
<>Change Switch:  [0014:Day]-ON Set
<>Change Switch:  [0015:TimeStart]-ON Set
<>
[PAGE 2]
[SETUP]
Switch (1): [0015:TimeStart]-ON
Event Start Condition: Push Key
[CODE]
<>
[END OF SAMPLE]

---From Dawn to Dusk---

Ok this next step calls for the use of common events! Goto the database and select - "Common Events"! Select 0001 and give it the name Day Ending or the like. Set the event start cond. to Parallel Process. Put a check in the next box and select the day switch. Now create a new action - 'Fork Conditions...' (it's in the 3rd tab) Select the bubble next to timer. Fill in the blanks like so: '__0 mins __0 secs' Click OK. Between where it says 'FORK' and 'EXCEPTING' put a new action - 'Setscreen Tone' Adjust the sliders until the darkness meets your requirments. Now create a new action that sets the timer to how long you want the night to be. Next change a new switch "Night" to ON. Then make an action that starts the new timer. Finally Make a action that turns off the switch "Day". Remember all of this should go between 'FORK' and 'EXCEPTING'!
[SAMPLE CODE]
[SETUP]
Event Condition: Parralel Process
Switch: Checked, "DAY"
[CODE]
<>Fork Optn:Timer -  0m.00s.Less
  <>Set Screen Tone:(R000.G070.B070.S090).4.0sec(W)
  <>Time Operation:Cost Creat0m.30s.
  <>Change Switch: [0015:NIGHT]-ON Set
  <>Timer Operation:StartTmr
  <>Change Switch: [0014:DAY]-OFF Set
  <>
:Excepting Case
  <>
:End Case
<>
[END OF SAMPLE]

---The Sun rises once again!---

Now right click somewhere in the action box and click select all. Now right click and hit copy. Now create a new Common Event:
Name - Night Ending
Paralell Process
Switch - Night is on
Now that it is set-up, paste in the actions from the previous event into this new event. Now edit the Set Screen tone and put the values back to normal. Have the time set to the length of day. Now change the first switch modifier to change - Day on! (NOT NIGHT OFF ~ Personal experience warning, turning of the night or day switch is ALWAYS last.) Finally change the 2nd switch changer to turn off the night switch.
[SAMPLE CODE]
[SETUP]
Event Condition: Parralel Process
Switch: Checked, "NIGHT"
[CODE]
<>Fork Optn:Timer -  0m.00s.Less
  <>Set Screen Tone:(R100.G100.B100.S100).4.0sec(W)
  <>Time Operation:Cost Creat0m.45s.
  <>Change Switch: [0014:DAY]-ON Set
  <>Timer Operation:StartTmr
  <>Change Switch: [0015:NIGHT]-OFF Set
  <>
:Excepting Case
  <>
:End Case
<>
[END OF SAMPLE]

---Optional Enhancements

--Clock--

Ok to create a clock you need to start out by creating a new event that will occur on push key. The first action should be a fork that checks to see if switch 'day' is on. Now between where it says fork and excepting create another fork action! This time have it check the timer. My advice is to pick to check if it's above half way through the day (i.e. if your day lasts 50sec then set this to 25sec) Now you could stop the clock here (the day half of it at least) by putting a message above the new excepting line that says something like 'It's mid-morning!' and below it saying 'It's mid-afternoon!' Or you could take it a step further with 2 more forks one below and one above the timer forks exception line. To do the night half of the clock, do the same thing you did for the day half except put this below the day checking fork's exception.
[SAMPLE CODE]
[PAGE 1]
[SETUP]
Event Start Condition: Push Key
Switch [CODE]
<>Fork Optn:Switch [0014:DAY]- ON
<>Fork Optn:Timer - 0m.25.Over <>Messg:It's morning! <> :Excepting Case <>Messg:It's mid afternoon! <> :End Case <> :Excepting Case <>Fork Optn:Timer - 0m.20s.Over <>Messg:It's early in the night... :Excepting Case <>Messg:It's very early morning! <> :End Case <> :End Case <>

[END OF SAMPLE]

--Random Weather Effects--

Ok first goto your common events editor and goto your event called 'day'. Insert a new switch modifier right after the first 'Fork Optn.' Have it turn 'OFF' a new switch called 'rain!' (we'll get to how this switch turns on in just a second!) Right under that switch do a new action: 'Call Weather Effect.' Set it to none and then click ok. Next, insert a new switch action right between where it says 'change switch: [night]-on' and 'Timer Operation:StartTmr' Have it turn on a switch called 'Is it raining?' to on. Our new day event will look something like this:
[SAMPLE CODE]
[SETUP]
Start Condition: Parralel Process
Switch: Checked, "DAY"
[CODE]
<>Fork Optn:Timer -  0m.00s.Less
  <>Set Screen Tone:(R000.G070.B070.S090).4.0sec(W)
  <>Time Operation:Cost Creat0m.30s.
  <>Change Switch: [0015:NIGHT]-ON Set
  <>Timer Operation:StartTmr
  <>Change Switch: [0014:DAY]-OFF Set
  <>
:Excepting Case
  <>
:End Case
<>

[END OF SAMPLE]
Do these steps again to the common event: 'night'.

Now for the complicated part! Create a new common event called 'Rain?'. Set it to Parallel Proccess and to have a conditions switch of 'Is it raining?' Now create an action: 'Change Variable'. Under Create Variable pick 'one' and make a new variable called random rain. Set operation to set. For operand pick 'Rand.' and put __1__ * __100__. Click ok. Now create a 'fork conditions' that opperates off of a variable. Choose the rain variable and type in a number 1-100 in the blank. ( bigger number = less rain ) choose above in the other box. Now create an action that calls the weather effect (of your own choosing) in between where it says fork and Excepting. Then make a switch changer that turns on 'raining' right under it. Finally right under that create a trigger that turns off the switch 'raining?' You're done!
[SAMPLE CODE]
[SETUP]
Start Condition: Paralel Proccess
Switch: Checked, "Is it Raining?"
[CODE]

<>Variable Op:[0003:random rain] Set, Randm[1*100]
<>Fork Optn:Varbl[0003:random rain]-75Over
  <>Set Weather Effect:   Ra, Mi
  <>Change Switch:  [0040:rain!]-On Set
  <>Change Switch:  [0039:raining?]-OFF Set
  <>
:Excepting Case
  <>
:End Case
<>

--Warewolves--

Ok this is actually really simple, and I don't know why I didn't add it sooner! The only bad thing about the way I'm describing right now is that it treats both the cursed and the actual warewolf as seperate characters. Thus, they will have they're own levels.
Anyways, back to the point. First off make a new character, probally with the same name as the person who turns into it. Now setup up this character's stats, skills, ect. however you want the warewolf to act.

Now simply add a new action to your common event that turns day into night, right under the fading, that adds this new 'warewolf' to your group and one that takes away the character who turns into it.
Now, if you want some more 'flash' to the transformation, add a flash event before the party change event. If you want, you can also add a sound effect.
Finally on the night to day common event do the same thing except adds the human and takes away the wolf.
[SAMPLE CODE]
[SETUP]
Event Condition: Paralel Proccess
Switch: Checked, "Day"

<>Fork Optn:Timer -  0m.00s.Less
  <>Set Screen Tone:(R000.G070.B070.S090).4.0sec(W)
  <>Flash Character...:   Hero ,0.5s.(W)
  <>Play SE:   Beast
  <>Change Hero's Party:Alex(HUMAN)->Remv
  <>Change Hero's Party:Alex(WAREWOLF)->Add
  <>Time Operation:Cost Creat0m.30s.
  <>Change Switch: [0015:NIGHT]-ON Set
  <>Timer Operation:StartTmr
  <>Change Switch: [0014:DAY]-OFF Set
  <>
:Excepting Case
  <>
:End Case
<>
[END OF SAMPLE]

---Troubleshooting And FAQ---

Check here before e-mailing me!
Ok, I know alot of people have had troubles with this Guide so here I'm going to put some common questions and answers. I hope this section will help anyone having problems!

Question 1: I can't move!!!!

Answer: This is the most common problem people have with my guide. To fix this all you need to do is use switch in your auto-start event that causes it to occur only once. Simply add an action to the end of your auto-start event, 'Set Switch Whatever: ON'. Then add a second page to the event that is NOT an auto start event that occurs when switch 'Whatever' is set. I hope this helps everyone out there with this problem!

Q2: Why did you make this darn guide so complecated?! Couldn't you just use some "Wait" actions?

A: Yes, you COULD just use wait actions and your day/night process would still work pretty good. However the reason I chose timer actions to control the time is so that you can pause and unpause time at ANY TIME! One thing this is good for is let's say time freezes with 1 second til dawn. This is where timer management comes in! When time continues there will still be one second til dawn! Unfortunately I do not believe this can be done easily with wait actions.

Q3: WHEN ARE YOU GOING TO UPDATE?!

A: Hey this is an update isn't it? Don't worry I'm planning on adding a new section soon as well as answering more common questions!

I hope you enjoyed this faq! E-mail me with: comments, questions, suggestions, ect!