Events are a collection of pages. Depending on which page is active, the event will appear and behave differently. To determine which page is active, a set of page conditions are used. If all page conditions are met, then that page can be activated.
By default, RPG Maker provides 5 different page conditions:
But if you wanted to have a different condition, you would need to find a way to accomplish that using only these 5 conditions. This may involve using parallel processes to check whether conditions are met, in order to turn on a switch or change a variable.
This plugin provides you with an easy way to define your own page conditions without having to come up with workarounds. If you want to check whether you have a certain weapon or armor, or whether a given combination of actors is in the party, you can directly specify this in your event.
By using custom page conditions, it improves productivity and makes it easier to manage your project. Need some more page conditions? Download the plugin and try it out!
Plugin: download here (right-click and save as)
- Want to read the motivation behind this plugin? Check out the dev log!
Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the Custom Page Conditions plugin.
Once it is in your list of plugins, turn the plugin on.
To create a custom page condition, in your event, start by creating a comment that reads
This tells the engine that you are now beginning a page condition.
Next, you can create any event commands as your page condition.
- You can use conditional branches to check whether certain conditions have been met.
- You can use Control Variables to set a variable to a random number, and check that value to see if the page should activate. This is random page activation!
Here is an example of an event page that will be activated only when two specific combinations of actors are in the party.
These commands are executed during the page selection process, which is done by checking the last page and working up to the first page. Any commands that are in the page condition will be processed like usual.
A page will only be considered active when this plugin command is executed
This gives you a lot of flexibility over when a page should be activated or not.
Finally, when you are done with your page condition commands, create another comment and write
Which will tell the engine that the page condition is complete.
Page conditions will not be executed as part of the normal event processing, so you should only have page condition logic in there.
Custom Troop Page Conditions
You can use these page conditions in troop events as well!
The instructions are the same as for a regular event: add the start comment, write your logic, and then add an end comment.
However, note that troop events require one of the default page conditions to be met. So for example, suppose you wanted an event to run the first time someone was poisoned and you wrote this:
This won’t actually acticate because the default condition is “Don’t Run”. If you want it to run at anytime, reserve a switch that will always be ON and then use that as the default troop page condition.