Understanding and Surpassing Event Page Limits

This article discusses (what I consider to be) a major limitation in the RPG Maker event system: page conditions. I will then discuss a script that allows you to work around this limitation, allowing you to build even more complex events. The contents are based on RPG Maker VX Ace but the same concepts can be applied to VX and XP.

Event overview

Here’s a general idea of what you have to work with in events

OnEventsAndPageConditions0

What we are interested in are the event pages.

Checking whether a page is active

For an event, at most one page is ever active at any time. In this example, page 1 has a graphic of a kitty, and page 2 has an empty graphic. When page 1 is active, you will see a kitty. When page 2 is active, you will not see a kitty.

A page is active if all of the page conditions have been met. So in our kitty page, there is one condition: Switch 24 must be ON. If the switch is ON, then the condition is met, and the page will be activated. If it is not met, then the engine looks at another page and checks whether it can be activated.

Pages are checked in reverse order

This is probably the most important thing you have to remember.

In our kitty event, the engine starts by checking page 2 first, and then it checks page 1. In general, it starts by checking the last page, and then works its way backwards. This means that if the last page has no conditions, then it will be activated, even if the first page has no conditions.

Do not forget the order of page checking.

Different types of page conditions

You have 6 page conditions available to work with. Here is what they look like:

OnEventsAndPageConditions1

The conditions should be self-explanatory, provided you know what they mean. But if you are confused you may leave a comment.

Page Condition Limitations

While you have 6 conditions, it is pretty limiting. Here’s a list of issues I see:

  • Only 2 switches?
  • You can’t check if a variable is less than a certain number
  • You can’t check if a variable is equal to a certain number
  • There are only 4 self-switches to choose from.

And of course, you’re given the option to check whether an item exists in the inventory, or whether an actor is in your party.

But what about everything else that you might want to use as conditions? For example:

  • Armors or Weapons in inventory?
  • Whether something is equipped?
  • Whether a state is applied (or not applied)?
  • Whether two specific actors are in the party?
  • Whether you have 5 potions and 10 hi-potions?

What about a conditional branch?

For all of the other conditions I’ve proposed, you might argue that we can just use a conditional branch for this. Indeed, the conditional branch event command does support all of them, and more. And it supports formulas, so you can basically condition on absolutely anything you can think of.

But this doesn’t work. It just isn’t the same.

A page condition is used to determine whether a page is active or not. A conditional branch is used to control the flow of the event logic when it is running.

Simple example: you have a kitty event. When “White Armor” is in your inventory,the event graphic will show a white kitty. When “Black Armor” is in your inventory, the event graphic will show a black kitty. When both armors are in your inventory, the event graphic will show a white kitty with black spots.

How do you accomplish this with a conditional branch? Can it be done?

Using the conditional branch as a page condition

The answer to the question I proposed above is, in fact, yes. It is possible to use the conditional branch as an event. The trick is to convert your conditional branch into a page condition. This is not supported by the editor, but we can accomplish this using scripts.

Custom Page Conditions

I introduce a small script called Custom Page Conditions. Insert the script, add a comment, then add a conditional branch. It looks like this:

event_PageConditions0

Just like that, you’ve added a page condition that checks whether a particular weapon is in your inventory. Need another condition? Repeat the process until you have all the conditions you need. Now we can tap into the conditional branch’s power and use all of the conditions that it supports, and if there’s something you need that it doesn’t support, use a formula in the script call.

Extending custom page commands to troops

At this point you might be thinking “well that’s cool, can I do the same for troop conditions?” After all, troop conditions are just as limited The answer is, of course, yes. Just do the same thing in the troop event editor:

event_PageConditions2

And common events?

We can extend this idea to even common events. If you recall, a common event only have one condition, and that’s a switch. But there are potentially so many other conditions that you want to use. Again, we use a conditional branch as the page condition:

event_PageConditions3

Closing

In the beginning, we looked at the event editor and the options that they provide you for page conditions, and we realized that it is quite limiting. I then showed you a script that allows you to surpass this limitation, using tools that you are already familiar with. Finally, I extended it to all of the other kinds of events that you might be working with, creating a very versatile tool set and enabling you to implement all kinds of complex logic without having to resort to additional scripts just to prevent a page from activating for trivial reasons.

Spread the Word

If you liked the post and feel that others could benefit from it, consider tweeting it or sharing it on whichever social media channels that you use. You can also follow @HimeWorks on Twitter or like my Facebook page to get the latest updates or suggest topics that you would like to read about.

You may also like...

13 Responses

  1. Marla says:

    I believe everything published was actually very reasonable.
    But, consider this, what if you were to write a awesome title?
    I ain’t suggesting your content is not good., but
    what if you added something to maybe grab people’s
    attention? I mean Understanding and Surpassing Event Page Limits –
    姫HimeWorks is a little boring. You could peek at Yahoo’s front
    page and note how they write post headlines to get viewers to open the links.
    You might add a related video or a related pic or two
    to get people excited about what you’ve written.
    Just my opinion, it could bring your posts a little bit more interesting.

  2. Luvia says:

    When I initially left a comment I seem to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment
    is added I recieve 4 emails with the same
    comment. Is there an easy method you are able to remove
    me from that service? Kudos!

  3. Caresse says:

    I am sure this paragraph has touched all the internet people, its really really fastidious
    post on building up new website.

  4. Johnathn says:

    Heya! I’m at work browsing your blog from my new apple iphone!
    Just wanted to say I love reading through your blog and
    look forward to all your posts! Carry on the superb work!

  5. Banesa says:

    I’m gone to tell my little brother, that he should also go to see this
    webpage on regular basis to get updated from most up-to-date news update.

  6. Titiana says:

    I read this post fully on the topic of the difference of hottest and previous technologies, it’s amazing article.

  7. Adine says:

    Wow! Finally I got a website from where I know how to truly obtain helpful
    facts concerning my study and knowledge.

  8. Herschel says:

    You can certainly see your expertise within the article you write.
    The sector hopes for even more passionate writers like you who are not afraid to mention how they believe.

    At all times follow your heart.

  9. Derell says:

    Hello would you mind sharing which blog platform you’re using?
    I’m planning to start my own blog in the near future but
    I’m having a hard time deciding between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your layout seems
    different then most blogs and I’m looking for something
    completely unique. P.S Apologies for being
    off-topic but I had to ask!

  10. Kaytie says:

    Good day! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe
    guest writing a blog article or vice-versa?
    My website covers a lot of the same subjects as yours and I believe we could greatly benefit
    from each other. If you happen to be interested feel free to shoot me an e-mail.

    I look forward to hearing from you! Great blog by the way!

  11. Chaney says:

    I would like to thank you for the efforts you’ve put
    in penning this blog. I am hoping to view the same high-grade blog
    posts from you in the future as well. In truth, your creative writing abilities has encouraged me to get
    my own blog now 😉

  12. Desere says:

    Everything is very open with a really clear explanation of the challenges.

    It was really informative. Your website is
    extremely helpful. Many thanks for sharing!

  13. Akio Touka says:

    I like the script. I’ll definitely be using it. I noticed the event limitations, too. I’ve been trying to figure out a edit the game editor.

Leave a Reply

Your email address will not be published. Required fields are marked *