• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Day/Night System Tutorial

DarkMage31

RM2K(3) Master
1,981
Posts
20
Years
  • Here's a tutorial I wrote for someone today based on how I did day/night in Lunar.

    Open: Database>Common Events
    Go To: Array Size (lower left corner)
    Increase the number by 2
    Hit Okay
    Enter the name of the event as:
    Night>Day
    Meaning "from Night to Day."
    Under Trigger select Parallel Process
    Check: Trigger Switch and then press the |...| button
    Make a new switch and call it:
    [It will for the purposes of this tutorial be in the fifth slot, and will thus be referenced as [0005:Night]]

    Begin Coding:
    Code:
      <>Branch if Timer 1 is 0M 00S Less/Equal
      -<>Tint Screen: (R100,G100,B100,S100), 0.3 Sec
      -<>Timer 1 Operation: Set, 15M 00S
      -<>Switch Operation: [0004:Day] ON
      -<>Timer 1 Operation: Start
      -<>Switch Operation: [0005:Night] OFF
      -<>Variable Oper: [0111:Day Count] + , 1
      -<>
      :End
      <>
    The bold command sets how long a "Day" will be. It is 15 minutes in this model. The red statement requires a switch that has not yet been made. Make it :). The turquoise statement is optional. That variable keeps track of how many "days" you have been playing.

    [The above is just code as it should appear in RPG Maker 2003 translated by RPG Advocate. If you are unsure of how to do any of those commands, please let me know]

    That's the end of the common event.
    Hit Apply
    Select a new common event from the list on the left. Enter the name of the event as:
    Day>Night
    Meaning "from Day to Night."
    Under Trigger select Parallel Process
    Check: Trigger Switch and then press the |...| button
    Select the switch [0004:Day] that you made in the red command in the previous code.

    Begin Code:
    Code:
      <>Branch if Timer 1 is 0M 0S Less/Equal
      -<>Tint Screen: (R070,G070,B090,S100), 0.3 Sec
      -<>Timer 1 Operation: Set, 15 M 00S
      -<>Switch Operation: [0005:Night] ON
      -<>Timer 1 Operation: Start
      -<>Switch Operation: [0004: Day] OFF
      -<>
      :End
      <>
    Hit Okay, and you're done! Now let's make the part of the oak intro where he asks if it's day or night. Basically, just a Show Choice.
    Code:
      <>Show Choices: Day/Night
      : [Day] Handler
      -<>Message: It's day time!
      -<>Switch Operation: [0005:Night] ON
      -<>
      : [Night] Handler
      -<>Message: It's night time!
      -<>Switch Operation: [0004:Day] ON
      <>
      : End
    I know it seems weird, but I got those switches right. The reason is, if you want to make it Day time, you go from night to day, so by turning on night, you transition to day. And vice versa also.

    That's it! You've got a working Day/Night system!
     

    DarkMage31

    RM2K(3) Master
    1,981
    Posts
    20
    Years
  • It just changes the screen tone every given ammount of time to represent day/night and activates switches accordingly incase you want to do something else with it.
     

    Toothache

    Deepsea Toothache
    4,177
    Posts
    19
    Years
  • I've seen a Day/Night system implemented in an RM2k game, and it works very well if you incorporate other features like certain events only happen at night, and people go indoors etc.
     
    Back
    Top