In case you haven't heard, I'm making a technical demo explaining how to use a custom time system that I built. It's something that I crafted, then left in storage until I was ready to make a huge epic OMG RPG. I don't see myself making an epic RPG soon (or at all, for that matter), so I figure that maybe the community could benefit from this knowledge.
My tech demo will have examples of the featured time system, as well as basic switches and using items as switches. I'm going to release this to the Mag and the Pavilion at the same time sometime this August.
For those of you curious how the time system works, I'll explain it in full below, taken from my studio at the Mag.
--
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.
Don't worry if this doesn't make sense yet, I'll explain.
Now let's say, for example's sake, that we're in an outdoor area. Now, the first thing to do is 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.
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 (notice the bold? 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 1 7:00 AM item, the system treats it the same as if you have 100 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.
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.
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. 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 this will help inspire new games with more features to come out, and give players new ideas to break the boundaries of RPGM1, and other makers as well. This guide is not the bottomless pit of knowledge; rather, this is a new spin on how to use different coding to achieve impressive effects. What I'd love to see is not only players use this system in their games, but also mold it and expand it into something even better. I've only opened the floodgates; it's up to you to use this knowledge and perfect it, expand on the ideas here and create something even better.
My tech demo will have examples of the featured time system, as well as basic switches and using items as switches. I'm going to release this to the Mag and the Pavilion at the same time sometime this August.
For those of you curious how the time system works, I'll explain it in full below, taken from my studio at the Mag.
--
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.
Don't worry if this doesn't make sense yet, I'll explain.
Now let's say, for example's sake, that we're in an outdoor area. Now, the first thing to do is 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.
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 (notice the bold? 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 1 7:00 AM item, the system treats it the same as if you have 100 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.
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.
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. 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 this will help inspire new games with more features to come out, and give players new ideas to break the boundaries of RPGM1, and other makers as well. This guide is not the bottomless pit of knowledge; rather, this is a new spin on how to use different coding to achieve impressive effects. What I'd love to see is not only players use this system in their games, but also mold it and expand it into something even better. I've only opened the floodgates; it's up to you to use this knowledge and perfect it, expand on the ideas here and create something even better.




Comment