Site Announcements

  • Account registration restricted. Email lord.ixzion AT gmail.com and I will get you set up. Thanks.
  • RPGMM Discord Channel - https://discord.gg/YJnAfVr

  • New to the site? Let us know!! - Check here.
  • RPGM Magazine Mission Statement. - Check here.
  • We now have a forum up specifically for the races, check it out. - Check here.


[Continue]

It is currently November 22nd, 2024, 7:35 am
View unanswered posts | View active topics


All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 29th, 2009, 4:51 pm 
Rank 6: Potent White Mage Rank 6: Potent White Mage
Keep it cool
Offline
User avatar

  Level 13
 

Joined: August 16th, 2005, 1:09 am

Posts: 2672

Location: Where am I?
This is the README2.txt file that comes with the Time System Tech Demo download.



Time System Technical Demo README2

Based on the file: Time System Tech Demo v3.1

Made by 1ce/Gitaroo
Quixotic Productions 2009

---

1. Introduction- An intro and my goals for this game
2. Time System- How it Works
3. Time system- Start from Scratch
4. The All Important Bed
5. Fun with Time
6. Scratching the Surface
7. Thanks and Conclusions

--


1. Introduction- An intro and my goals for this game

Hello. The name is 1ce. Thank you for downloading this game file and looking at this readme.

First, a little about myself. I started playing RPG Maker 1 around 2005 during the final year
of high school. Over the next couple of years I produced my first game, and today I have
four seperate games under my belt. It took me a long time to learn the in's and out's of the
system and how to make everything work. With hard work, you too can learn how to use RPGMaker
to your advantage and create things nobody thought possible. If I struggled with the game
and finally learned it, then so can you.

It's a bit of a fast intro, but I never like talking about myself much, heh.

And so I present one of my favorite custom coding jobs I've ever made; one that allows a
real-time passage of time to occur in a game. Take heed, though; this is not a system that
can easily be learned. If you're starting out with RPGMaker, I would recommend using the switch
levels to help get you started, and only come back when you have a good grasp on the
game mechanics. Copying the time system here is easy, but understanding it is much, much
harder. You'll have to sink some serious time into this if you wish to truly understand
what's going on. If you have the willpower and patience, you can do it.

I set out to create this game with several goals in mind. Setting goals for games you
create helps you focus on what your game should be, and help cut out unneeded elements.
Often I looked back at my goals for the project and they helped guide me when I didn't
know what to do next.

Here's the goals I set for myself:
1. Create a technical demo that is easy to access and user-friendly
2. Clearly explain and make the player understand how the time system works.
3. Spark imagination for new ideas from the player.


These goals have helped define exactly how the game ended up in it's final form. For example,
many events are set on top of set graphics for easy access during event edit mode. To
spark imagination from players, I have added many levels that use a creative form of the
time system to create interesting situations. And finally, I lay out clear instructions
on how events are made. In fact, the very reason this readme exists is to help you understand
the time system, a goal I have set out for myself to accomplish.

And with that, I think the introduction is finished. Now let's get into the meat and potatoes.


------


2. Time System- How it Works (Tech demo level- BasicTime Ex)

I'd recommend you be well versed in using both switches and items as switches before going
into this. Otherwise this will be fairly confusing.

First off, you go into the item creation menu and make time items, such as 7:00 AM, 8:00 AM,
1:00 PM, etc. Use as much as you'd like to implement. For this example, we'll be using items
with hour differences, so we make 17 items; 7am-11pm. We also want to set aside some
switches; in this case we're using 16 switches, roughly one per hour.

Now, the first thing to do:
Give the player the time items. Depending on how long you want the character to move
before time passes, you can give the player a little bit or a lot. For this example I'm
giving the player 2 of every time item. Now keep in mind the first step in an event won't
activate it until they walk into another, so 2 items will take 3 steps before time passes.

Don't worry if this doesn't make sense yet, I'll explain.

Now, let's create the event that will make the magic happen. Make an event, no graphic,
set to touch. We'll make a back page so we can use the page conditions (very important)
and leave the first page blank.

Here's what you do. On page 2, you set a page condition that the player must have the
first time item (7:00 AM in this example), and then in the event contents you have
the event remove one 7:00 AM. That way the game will be able to keep track of how many
items are going through.

Then you make another page, number 3. You set the condition to 7:00 AM No item, and then
you have a switch turn on (number 1 in this example).

We then make another page, number 4, and set the page conditions to the next
item event (8:00 AM) and more importantly, we add the page condition of switch 1 being on.

Make another page, 5. We have page conditions Switch 1 on and Item 8:00 AM No items
(This is very important). In the Event contents we'll turn off switch 1 and turn on switch 2.

From the we continue in a similiar cycle. One page will have the the requirement
of having an item and taking it away, while the next page will require the item not to
be there, turning off a previous switch and starting a new one to continue the cycle.

So what have you accomplished? You've given the player an inventory that runs out, and
when it does, a switch is activated that starts the next depletion of the next item.

You see, in RPGM1 there is no code to check how many of an item you have. If you have
one 7:00 AM item, the system treats it the same as if you have one hundred 7:00 AM items.
The only way to have the system recognize a change is to work backward, giving the
player items and taking them away. Then, when the item has run out, the system can
recognize that change and make a new code out of it. This is why having an item
page condition is so important. You have to have the system check to see if an item
is there or not, because it won't otherwise.

Then what about switches? What are they good for? Switches keep everything running in a
smooth order. Without switches all items would be removed, and keeping some form of control
would be fairly difficult. Switches also have a useful advantage; since each switch is
unique to each time item, you can use switches as a way to keep track of what time it is.
Suppose I only want a store to open at 5:00 PM. If I simply made the page condition that
the player have 5:00 PM, it would be open every hour earlier than 5, since the player
will have 5:00 PM in their inventory until after 6. So instead I could code the guy to
open his store to the switch corresponding to 5 PM, and I would get the exact result I wanted.

.

Once you get the hang of this system, there are many possibilities for you to use it. If
you're looking to use this for more than one time (or make a full-blown calendar system),
you'll need something to reset all the items and switches. I usually like making a bed,
and in that bed I code it something like this:

First, I remove all items and turn off every switch. Then, I add all the time items to
exactly how many I want and you are good to go.

You might be asking why I do a complete purge of all items and switches. Two reasons
really: 1. It saves time, and 2. It reduces the chances for bugs to pop up. Yes, I could
in theory make a bed with lots of page conditions to say something like "it's noon,
ready to go to bed?', but really, a one page bed event is a lot easier to code, and there
are far less chances of something going wrong (we'll go into further detail of the bed in section 4).

.

Another item to add when you get the hang of it is a clock. After all, you're dealing with
time, so being able to see what time it is is really needed, right? Clocks are actually
fairly simple. You simply set a page condition for the switch that the hour that's on, and
tell the player that in a message (the first time item won't have a switch corrosponding
to it, so you simply use the first page of the clock event for that. Page 1 is 7, Page 2
is 8 with a switch 1 page condition, etc.)

.

Once you really get good at it, you can add events to transition between times. I've added
a changing color screen to the No item pages, and the game looks dark in the morning, bright
at noon, and back to dark for night. You can also have a portable watch or some similiar
item. On the second page with the No item page, I made another page and added a requirement
for a stopwatch item. If the conditions are met, the player is told the time the exact moment
it happens. This might annoy some players, so I leave an option to remove the stopwatch,
and the game still works without it. (we'll discuss the clock and screen transition in section 5)

.

With this time system you're really only limited to your imagination and file constraints.
You can use switches for every day and have a full-blown calendar system. You can set items
for one minute for timing events like races. You can make Shenmue III, or a port of
Zelda: Ocarina of Time, or a new Harvest Moon. There are a lot of possibilities for what
you can do if you master this.

Having said all that though, there are some drawbacks. First and foremost are space
complaints. With 500 switches and 250 items, you're going to be hard pressed to find a
balance between story and time events. Although it all depends on how you balance that. You
could make a game follow the events of one year, and even in my example that takes
381 switches, which only leaves you with 119 switches for story events, and that may not
be enough. The other big problem comes from the limit of events in a given field. As I
remember, there are only 128 events in one given dungeon (can't remember the exact
number, but it's something close to this). Even if we use only 100 spaces for time events,
that means for a fully covered map area, there can only have 100 spaces you can step on
that produce a time effect. Your game is going to feel very small. One drawback that's
unavoidable is the jerky walking you'll encounter when walking over these events. While
some can put up with this, there is no way around it.

Hopefully that helped explain in text form what the time system I've built is. If you
still happen to be lost....

_________________
ImageImageImageImage
I'm 1ce (previously Gitaroo). Nice to meet you.

Image

My studio is Quixotic Productions! Check it!


Top
Profile  
 
PostPosted: August 29th, 2009, 4:53 pm 
Rank 6: Potent White Mage Rank 6: Potent White Mage
Keep it cool
Offline
User avatar

  Level 13
 

Joined: August 16th, 2005, 1:09 am

Posts: 2672

Location: Where am I?
---

3. Time system- Start from Scratch (Tech demo level- BasicTime Ex)

Okay, let's say that most of the mumbo jumbo in section two flew over your head. No big deal.
After all, nobody said this was gonna be easy. This section of the readme will take you from the
very beginning, starting with booting up the RPGMaker disk to coding every page to finishing up.

Alright, let's start. Pop in the RPG Maker 1 disk into your Playstation. Then, go to RPG MAKER and start editing data. First, I always go to configuration and set the cursor to 1 and the music off, but you can do what you'd like. You'll also want to make a basic character to control when we get to playtesting.

The first important thing to do is go into items. Here, we'll make our time items. It's important to label them as you'd like, since you'll be used to seeing them as you make your game. Make as many as you'd like for your system. In this example, I'm going from 7 am to 11 pm. So my item inventory looks like this:

1. 7:00 AM Other
2. 8:00 AM Other
3. 9:00 AM Other
4. 10:00 AM Other
5. 11:00 AM Other
6. 12:00 PM Other
7. 1:00 PM Other
8. 2:00 PM Other
9. 3:00 PM Other
10. 4:00 PM Other
11. 5:00 PM Other
12. 6:00 PM Other
13. 7:00 PM Other
14. 8:00 PM Other
15. 9:00 PM Other
16. 10:00 PM Other
17. 11:00 PM Other


The important thing to remember when making these items is to set them to Other, and make sure the items can't be broken or sold. Hide simply shows whether there's an item description, so they will show up in the inventory. This is useful for figuring out what time it is, or if there's a broken event, you can pull up the inventory and figure out what it's doing.

Next, we move on to events. But first, you must make a basic dungeon that's big enough to walk around in. Something small would be fine.

Now we can move to the events and make the magic happen. Select your level.

You can put the time event anywhere you'd like, but for my example I like putting time events on different grounds, so I have the time events on a small dirt spot when the rest of the map is grass.

The first thing we have to do is give the player the items. If the items aren't in the player's inventory, this whole time system won't work. Thankfully it's simple to do. You can easily use the intro event (press X on any empty space, the fourth option down) to add these items. Or, you can make an event that gives the player items if you're just playtesting. It's up to you. You can also give them as many items as you want, depending on how long you walk each hour to last. For playtesting purposes, I give the player two of each time item.

Now, we start making the time event itself. You'll be making one time event, and then using the duplicate feature to copy it to other spaces. We do this for many reasons; it reduces the amount of bugs our system can have, it's more memory efficent, and it's far quicker and easier to do things this way.

So, press X to bring up the menu, and select Create Event. Your event should start out something like this:

Page 1/1

Event Contents-None

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
-
-
-
-
-
-

Now, This first page is rather useless for our time system, but it has to be there. So, press triangle and Add Page (Back).

And here's our starting point. The first thing we're going to do is remove the first time item, in this case 7:00 am. If we only code the game to take away 7:00 am in the event code, the rpgmaker will take away the item whether the player has the item or not (don't ask my why the game acts this way), so we need to put a page condition that requires the game to check to see if the item is in the players inventory. So our second page will look something like this:


Page 2/2

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 1 7:00 AM Yes
-
-
-
-
-

----------

Page 2/2

00-Remove Item:No 1 7:00 AM
01-
02-
03-
04-
05-
06-

There. Perfect. As the player walks around, the item 7:00 am is being taken away, and until that happens, we can say it's 7:00 am.

Now for the second part of the plan. We need to make an event for what happens after all the 7:00 am items run out. After making another page behind 2, we make a page condition to see if there are no 7:00 am items, so when they do run out, the event will activate. It looks something like this:

Page 3/3

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 1 7:00 AM No
-
-
-
-
-

----------

Page 3/3

00-Switch On: 001
01-
02-
03-
04-
05-
06-

So, what have we done here? We've basically run out of an item, and a switch has been flicked on that starts the next chain of events. The system works in a cycle after this; one page event will look for an item and remove it, while the second page event sees there aren't any items anymore and turns on a switch (and turns one switch off, which I'll explain later), to start the cycle all over again.

THAT'S IT. THAT'S THE SECRET OF THE TIME SYSTEM. We start a chain of events where we remove items and keep removing items to track the progress of the time items. Once you understand this, everything will fall into place.

Let's continue, and you'll start to see what I mean. Make another behind 3, and it's going to look similiar to event 2, except for one key difference.


Page 4/4

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 2 8:00 AM Yes
Switch 001 On
-
-
-
-

----------

Page 4/4

00-Remove Item:No 2 8:00 AM
01-
02-
03-
04-
05-
06-


See the difference? We require the rpgmaker to look for that first switch. This way we can keep the time system going forward. If that switch wasn't there, it would continue to go to the 3rd page, where switch 001 would get turned on all the time. Switches help keep the time system in order, so don't underestimate their usefulness. And the other big change is we start removing 8:00 am from the players inventory. So as long as the player has one 8:00 am item, we can consider it to be 8:00 am.

Now, let's make another page, number 5.

Page 5/5

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 2 8:00 AM No
Switch 001 On
-
-
-
-

----------

Page 5/5

00-Switch On: 002
01-Switch Off: 001
02-
03-
04-
05-
06-

Now that we're out of the 8:00 am item, we turn on switch number 2 to continue the chain of events to begin taking away 9:00 am. Since we no longer need switch 1, we can turn it off.

From here, you basically continue with the same process. You check for the item in the players inventory, and with the right switch turned on, you remove that item you checked for. Then, on the second page, you see if you've run out of that item with the right switch turned on. You turn off the old switch, and turn on a new one.

If it's still confusing, I'll provide the rest of the time system below of my example. Even if all of this makes sense, I would still recommend looking at the entire event code below to get a feel for how it looks overall.

Page 6/6

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 3 9:00 AM Yes
Switch 002 On
-
-
-
-

----------

Page 6/6

00-Remove Item:No 3 9:00 AM
01-
02-
03-
04-
05-
06-

----------

Page 7/7

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 3 9:00 AM No
Switch 002 On
-
-
-
-

---------

Page 7/7

00-Switch On: 003
01-Switch Off: 002
02-
03-
04-
05-
06-

-----------

Page 8/8

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 4 10:00 AM Yes
Switch 003 On
-
-
-
-

----------

Page 8/8

00-Remove Item:No 4 10:00 AM
01-
02-
03-
04-
05-
06-

----------

Page 9/9

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 4 10:00 AM No
Switch 003 On
-
-
-
-

----------

Page 9/9

00-Switch On: 004
01-Switch Off: 003
02-
03-
04-
05-
06-

----------

Page 10/10

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 5 11:00 AM Yes
Switch 004 On
-
-
-
-

----------

Page 10/10

00-Remove Item:No 5 11:00 AM
01-
02-
03-
04-
05-
06-

----------

Page 11/11

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 5 11:00 AM No
Switch 004 On
-
-
-
-

----------

Page 11/11

00-Switch On: 005
01-Switch Off: 004
02-
03-
04-
05-
06-

----------

Page 12/12

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 6 12:00 PM Yes
Switch 005 On
-
-
-
-

----------

Page 12/12

00-Remove Item:No 6 11:00 AM
01-
02-
03-
04-
05-
06-

----------

Page 13/13

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 6 12:00 PM No
Switch 005 On
-
-
-
-

----------

Page 13/13

00-Switch On: 006
01-Switch Off: 005
02-
03-
04-
05-
06-

----------

Page 14/14

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 7 1:00 PM Yes
Switch 006 On
-
-
-
-

----------

Page 14/14

00-Remove Item:No 7 1:00 PM
01-
02-
03-
04-
05-
06-
----------

Page 15/15

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 7 1:00 PM No
Switch 006 On
-
-
-
-

----------

Page 15/15

00-Switch On: 007
01-Switch Off: 006
02-
03-
04-
05-
06-

----------

Page 16/16

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 8 2:00 PM Yes
Switch 007 On
-
-
-
-

----------

Page 16/16

00-Remove Item:No 8 2:00 PM
01-
02-
03-
04-
05-
06-

----------

Page 17/17

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 8 2:00 PM No
Switch 007 On
-
-
-
-

----------

Page 17/17

00-Switch On: 008
01-Switch Off: 007
02-
03-
04-
05-
06-

----------

Page 18/18

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 9 3:00 PM Yes
Switch 008 On
-
-
-
-

----------

Page 18/18

00-Remove Item:No 9 3:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 19/19

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 9 3:00 PM No
Switch 008 On
-
-
-
-

----------

Page 19/19

00-Switch On: 009
01-Switch Off: 008
02-
03-
04-
05-
06-

----------

Page 20/20

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 10 4:00 PM Yes
Switch 009 On
-
-
-
-

----------

Page 20/20

00-Remove Item:No 10 4:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 21/21

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 10 4:00 PM No
Switch 009 On
-
-
-
-

----------

Page 21/21

00-Switch On: 010
01-Switch Off: 009
02-
03-
04-
05-
06-

----------

Page 22/22

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 11 5:00 PM Yes
Switch 010 On
-
-
-
-

----------

Page 22/22

00-Remove Item:No 11 5:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 23/23

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 11 5:00 PM No
Switch 010 On
-
-
-
-

----------

Page 23/23

00-Switch On: 011
01-Switch Off: 010
02-
03-
04-
05-
06-

----------

Page 24/24

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 12 6:00 PM Yes
Switch 011 On
-
-
-
-

----------

Page 24/24

00-Remove Item:No 12 6:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 25/25

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 12 6:00 PM No
Switch 011 On
-
-
-
-

----------

Page 25/25

00-Switch On: 012
01-Switch Off: 011
02-
03-
04-
05-
06-

----------

Page 26/26

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 13 7:00 PM Yes
Switch 012 On
-
-
-
-

----------

Page 26/26

00-Remove Item:No 13 7:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 27/27

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 13 7:00 PM No
Switch 012 On
-
-
-
-

----------

Page 27/27

00-Switch On: 013
01-Switch Off: 012
02-
03-
04-
05-
06-

----------

Page 28/28

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 14 8:00 PM Yes
Switch 013 On
-
-
-
-

----------

Page 28/28

00-Remove Item:No 14 8:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 29/29

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 14 8:00 PM No
Switch 013 On
-
-
-
-

----------

Page 29/29

00-Switch On: 014
01-Switch Off: 013
02-
03-
04-
05-
06-

----------

Page 30/30

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 15 9:00 PM Yes
Switch 014 On
-
-
-
-

----------

Page 30/30

00-Remove Item:No 15 9:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 31/31

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 15 9:00 PM No
Switch 014 On
-
-
-
-

----------

Page 31/31

00-Switch On: 015
01-Switch Off: 014
02-
03-
04-
05-
06-

----------

Page 32/32

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 16 10:00 PM Yes
Switch 015 On
-
-
-
-

----------

Page 32/32

00-Remove Item:No 16 10:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 33/33

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 16 10:00 PM No
Switch 015 On
-
-
-
-

----------

Page 33/33

00-Switch On: 016
01-Switch Off: 015
02-
03-
04-
05-
06-

----------

Page 34/34

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 17 11:00 PM Yes
Switch 016 On
-
-
-
-

----------

Page 34/34

00-Remove Item:No 17 11:00 PM
01-
02-
03-
04-
05-
06-

---------

Page 35/35

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 17 11:00 PM No
Switch 016 On
-
-
-
-

----------

Page 35/35

00-Message: Ugh, I'm tired. Time to go to bed...
01-Move Location: Bed / Take Over: Bed
02-
03-
04-
05-
06-

You can end it in numerous ways, but I find this one to be the easiest. After you run out of time items, you basically stop time at 11 pm unless you do something. I either have the character automatically walk or warp to a bed event (covered in the next section), and have that event remove all items and restock the player with new ones. We'll cover this in the next section.

Once you finished, duplicate this event to every space you wish time to pass, and don't forget to playtest it!

I hope this example time system helped you better learn the in's and out's of the time system I've made. Feel free to copy this onto your own game and see how it works. If you mess around with it, you'll eventually understand how it works, so don't be afraid to mess around and make mistakes. The only way to learn the right way is to do it the wrong way.

Now even though we've done a lot, there's still one final piece we haven't gone over, and we'll discuss that next.

_________________
ImageImageImageImage
I'm 1ce (previously Gitaroo). Nice to meet you.

Image

My studio is Quixotic Productions! Check it!


Top
Profile  
 
PostPosted: August 29th, 2009, 4:54 pm 
Rank 6: Potent White Mage Rank 6: Potent White Mage
Keep it cool
Offline
User avatar

  Level 13
 

Joined: August 16th, 2005, 1:09 am

Posts: 2672

Location: Where am I?
---------

4. The All Important Bed

Now, I want you to read that title. All important, that's the part we need to focus on. Because it's one of the most critical pieces to making a time system. If we don't go full-circle and finish the cycle we start, then we run into all sorts of problems. Look at it like this; you wouldn't make a story with a beginning and a middle, but no end, would you? No, of course not. That would leave your story incomplete. The same thing applies here. We need to make an event that will reset all switches, start the player back at the beginning and restock all lost items. Thankfully, this is all very easy to do, and we only need one event to do it with.

A bed only makes sense, really. As time passes, our player sleeps, and starts the next day with renewed vigor and the entire day starts over. So, let's make a bed.

Like I mentioned earlier, this is simple. There are no page conditions to worry about, so we only need page 1 for everything. You simply make a bed with the create event function, and in the code we put this:

0. Sleep? If yes....
1. Remove Item: 7:00 AM
2. Remove Item: 7:00 AM
3. Remove Item: 8:00 AM
4. Remove Item: 8:00 AM
5. Remove Item: 9:00 AM
6. Remove Item: 9:00 AM
7. Remove Item: 10:00 AM
8. Remove Item: 10:00 AM
9. Remove Item: 11:00 AM
10. Remove Item: 11:00 AM
11. Remove Item: 12:00 PM
12. Remove Item: 1:00 PM
13. Remove Item: 1:00 PM
14. Remove Item: 2:00 PM
15. Remove Item: 2:00 PM
16. Remove Item: 3:00 PM
17. Remove Item: 3:00 PM
18. Remove Item: 4:00 PM
19. Remove Item: 4:00 PM
20. Remove Item: 5:00 PM
21. Remove Item: 5:00 PM
22. Remove Item: 6:00 PM
23. Remove Item: 6:00 PM
24. Remove Item: 7:00 PM
25. Remove Item: 7:00 PM
26. Remove Item: 8:00 PM
27. Remove Item: 8:00 PM
28. Remove Item: 9:00 PM
29. Remove Item: 9:00 PM
30. Remove Item: 10:00 PM
31. Remove Item: 10:00 PM
32. Remove Item: 11:00 PM
33. Remove Item: 11:00 PM
34. Add Item: 7:00 AM
35. Add Item: 7:00 AM
36. Add Item: 8:00 AM
37. Add Item: 8:00 AM
38. Add Item: 9:00 AM
39. Add Item: 9:00 AM
40. Add Item: 10:00 AM
41. Add Item: 10:00 AM
42. Add Item: 11:00 AM
43. Add Item: 11:00 AM
44. Add Item: 12:00 PM
45. Add Item: 12:00 PM
46. Add Item: 1:00 PM
47. Add Item: 1:00 PM
48. Add Item: 2:00 PM
49. Add Item: 2:00 PM
50. Add Item: 3:00 PM
51. Add Item: 3:00 PM
52. Add Item: 4:00 PM
53. Add Item: 4:00 PM
54. Add Item: 5:00 PM
55. Add Item: 5:00 PM
56. Add Item: 6:00 PM
57. Add Item: 6:00 PM
58. Add Item: 7:00 PM
59. Add Item: 7:00 PM
60. Add Item: 8:00 PM
61. Add Item: 8:00 PM
62. Add Item: 9:00 PM
63. Add Item: 9:00 PM
64. Add Item: 10:00 PM
65. Add Item: 10:00 PM
66. Add Item: 11:00 PM
67. Add Item: 11:00 PM
68. Switch Off: 001
69. Switch Off: 002
70. Switch Off: 003
71. Switch Off: 004
72. Switch Off: 005
73. Switch Off: 006
74. Switch Off: 007
75. Switch Off: 008
76. Switch Off: 009
77. Switch Off: 010
78. Switch Off: 011
79. Switch Off: 012
80. Switch Off: 013
81. Switch Off: 014
82. Switch Off: 015
83. Switch Off: 016
84. Switch Off: 017


Now, if you know a bit about rpgmaker you likely already know what I'm doing. This basically is a purge, as I like to call it. Or maybe a reboot, restart, refresh. I'm taking all the possible things that can change in the time system, and set them back to 0. That way, when the player gets back to playing, he'll restart at 7:00 AM and everything will run smoothly.

You might ask why I take all items away before adding new ones. Simply because without using page conditions, I have no idea how many items the player has. Which raises a very good point: you (and the rpgmaker) have no idea how many items the player has in his inventory when they go to bed, so if it's coded wrong, you could theorically give the player more items than should be allowed. And depending on how many items are not taken away, this could unbalance the game and give the player something to exploit to their advantage.

One could argue that a good setup of switches and page conditions could prevent such a thing from happening, and it's a valid point. But I ask; why do something complicated when you don't need to? My example above is a one event, one page simplified solution, and you could go and do complicated bed events, but it's a waste of time, and leaves you more prone to making mistakes. In this case, simple is better.

So now we have gone full circle, starting at the beginning, around the middle and to the end. So, what can you use this time system for, and what neat effect can you use with it? That is explained in detail in this next section.

------

5. Fun with Time

-Clock
-Stopwatch
-Change Screen

Layer upon layer make your mark now...Haste!

Err...ok, that's not what I had in mind.

So now you have a rough understanding of how the time system works. Now, it's time to bend the system to our will, and have it do whatever we want it to do. Like I said at the beginning, this readme and tech demo are more of a basic outline for what you can add to your games, and isn't the end-all be-all method. So let's mess around and get some more interesting results out of the system.

-Clock

A very basic yet nessecary item. After all, in a time system, we need to know what time it is at any given moment, right? One could look at the inventory, but if you're unfamiliar with how it works, it'll be difficult to deschiper. So a clock will help tell you the time, and it's fairly easy to make as well.

Every time item comes with a switch that keeps things in order. Basically, that switch is the stand-in for what time it is. After all, unless switch 1 is on, it's not 8am! So it's simply a matter of making an event with a clock graphic, and then making page conditions that require the switch to be on, and a message to tell you the time. Keep in mind that 7:00 am has no switch, so you can use page one for 7. Every other page and time needs it's corrosponding switch. For my example, it would work something like this:

No switch: 7:00 AM
1: 8:00 AM
2: 9:00 AM
3: 10:00 AM
4: 11:00 AM
5: 12:00 PM
6: 1:00 PM
7: 2:00 PM
8: 3:00 PM
9: 4:00 PM
10: 5:00 PM
11: 6:00 PM
12: 7:00 PM
13: 8:00 PM
14: 9:00 PM
15: 10:00 PM
16: 11:00 PM

So if I currently have switch 11 on, the clock would give me a message telling me it's 6:00 pm.

And if you'd like to take it one step further, continue reading the next section.

-Stopwatch (Tech Demo level- ClockTime Ex)

The name may be confusing, but it's easy to understand. This system let's the game recognize when the time has switched from one to another, and tells the player using the Main Character pop up bubble. So if your making a game that requires our character to be in certain places at certain times, this can be a nifty reminder of what time it is, right as the time changes. This does require a bit more programming than usual, because such a feature may start annoying players, so we'll also give the player a chance to turn it off.

First, we need a place to give the player the stopwatch and take it back. In the tech demo I use an angel statue for this purpose. We'll skip the first page and make two pages behind it. The second page will have a page condition requiring the player not have the stopwatch. In the event code we give the player the option of taking it or not, and if the player agrees we add the stopwatch to his inventory (Make sure not to let the player be able to sell this item!). On the third page we add a condition that the player owns the stopwatch and give him the option to return it. Simple, right?

Here's where we get tricky with this. Find your time system. Remember the page where we require there's no item before we flip a switch? Make a page behind that one, and then copy and paste the no item page to your new one. So we have two pages exactly the same. Now, on the new page, we change two things. We add a condition that the player has a stopwatch, and then we add an event that has a message appear over the main characters head. It would look something like this:

Page 4/34

Event Contents-Yes

No Graphic

Move Type-Don't Move

Start-From All
Touch

Page Conditions
Item No. 1 7:00 AM No
Item No. 20 Stopwatch Yes
-
-
-
-

----------

Page 4/34

00-Switch On: 001
01-Character Message:8:00 AM
02-
03-
04-
05-
06-

As you can see, while this isn't a particulary difficult code, it does take up a lot of time to make it all work, considering you have to add a second page to the back of some pages. Copying and pasting can make the work a bit quicker, and you'll have something pretty neat when you're finished.

-Change Screen (Tech demo level- LightTime Ex)

The change screen is the most immersive and fun addition I've come up with to compliment the time system. And it's the easiest to code, as well!

You simply go to the No item page (where you turn one switch off and turn on another), and simply change the screen to match the changing time. Like I said, very easy. If you are planning on changing the screen, be warned: you can lose the cool effect by switching the colors in different areas. Say you want the screen to return to default colors every time you go inside. Make sure the exits are coded properly so you return to the color accroding to the time. You can do that by making sure you use the page conditions matched with switches.

----

6. Scratching the surface

Remember back at the beginning of this readme where I listed my goals for developing this game and readme? One of those goals is to "spark imagination for new ideas from the player". That's what I'm discussing in this section.

Because, truth be told, I myself haven't dabbled in my own creation that long. When I first conceived the idea of my time system and finish every theory and finished it, I shelfed it, waiting for a chance to show it off in my next game. And I realized over time, that the chances that I would use this system in a glorious epic game, diminished over time. I have neither the time nor patience to make a proper game that utilizes the system I've made the way I want to. Which is why I decided to release this knowledge to the public; so that other users could possibly use it where I could not.

One thing I want you to not forget is that this is not the end. If and when you learn how to use the time system effectively, it's not the top of the mountain. This time system is what I'd like to call scratching the surface. It's an iceberg, where you have only seen the surface. There's so much more that you could do with this time system and it's components. I think it's possible to take the time system one step further, and make something even better. And with enough patience, I think you could do that. Never stop learning, and challenge yourself. I believe you can do it.

-----

7. Thanks and Conclusions

I'd like to take some time and thank the many people who helped me with this project, even if they did so indirectly.

-Thanks to Lantis and Mark Soukup; for making tech demos and having a foundation to build on for my own tech demo, to learn from your strengths and weaknesses.

-Thank you to everyone reading my frequent posts on the Quixotic Productions forum; you make my work worthwhile.

-Thanks to Ixzion, and Valkysas. Not just because I like you two or because you head up sites, but because you are there to motivate and help me.

-Thank...YOU. For reading my writing, and playing my game. It means a lot to me.




And with that, I feel the purpose of the readme is at an end. I wish you all luck in your game creations, and happy rpgmaking!

-1ce/Gitaroo, at Quixotic Productions

_________________
ImageImageImageImage
I'm 1ce (previously Gitaroo). Nice to meet you.

Image

My studio is Quixotic Productions! Check it!


Top
Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group