More Page Conditions

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,261
First Language
English
Primarily Uses
RMMV
More Page Conditions
2018.01.13
by Shaz

Introduction
This is a simple little plugin that allows you to add more page conditions via comments in the event commands list.

How to use
Add plugin to your js/plugins folder - name should be Shaz_MorePageConditions.js - and enable in plugin manager.
On your event page, enter a comment beginning with cond to add to the existing page conditions. Any script command that evaluates to a true or false value can be used (see Notes for caveat).

Shortcuts
\ss([1, 2, 'A']) will be converted to $gameSelfSwitches.value([1, 2, 'A'])
\s(15) will be converted to $gameSwitches.value(15)
\v(12) will be converted to $gameVariables.value(12)

Example
cond \s(15) && \v(8) >= 10 && \v(8) <= 15 - will evaluate to true if switch 15 is on and variable 8 is between 10 and 15 (inclusive)

Plugin
Download from pastebin
make sure to save it as Shaz_MorePageConditions.js

Credit
- Shaz

Terms
- free for use in commercial games
- do not post elsewhere - link back to this page

Notes
- Although you can add any script call that will evaluate to true/false as a condition, it may not cause an immediate change of pages. The map only evaluates page conditions when something has requested a refresh. By default, this only happens when things listed under the Conditions heading on the event page change - switches, self switches, variables, party members, items (items, weapons, armors). If you want to add a condition based on something else - for example, amount of gold, hp of party leader, etc), the condition will only be checked when one of those other things changes, requesting a refresh. Or you could add a script call on any event that might cause those new conditions to change: $gameMap.requestRefresh() to force event pages to be re-checked. Be careful not to do this too often - definitely not in a parallel process event, as refreshing event pages is a CPU-hungry activity and will cause lag if done too frequently.
 
Last edited:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
633
Reaction score
355
First Language
English
Primarily Uses
N/A
This seems very similar to Yanfly's new plugin that was just released. Are there any major differences in terms of functionality?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,261
First Language
English
Primarily Uses
RMMV
I don't know. I don't keep track of who releases what plugins. I just make what I need for my game and share it if I think it will be useful for others. I know someone else made a similar plugin in the early days of MV. Just use the one you find easiest to use, and that's the most compatible with your other plugins :)
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
633
Reaction score
355
First Language
English
Primarily Uses
N/A
Makes sense to me. Thanks for sharing! I'm using quite a few of your plugins already. :cutesmile:
 

Canini

Veteran
Veteran
Joined
Mar 29, 2016
Messages
1,015
Reaction score
679
First Language
Swedish
Primarily Uses
RMVXA
From my limited experiences Yanfly´s plugins have more far-reaching changes to the engine so if you use a lot of other plugins this one may be better to avoid plugin conflicts.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

When you discover great tileset resources that you completely forgot that you had. :kaomad3::kaopride:
Just got a better look at the MZ RTP. I'm very happy with it, especially the sci-fi tiles and sprites. Glad I pre-ordered.
I've just checked the VisuStella Plugins for MZ and there are already 11 plugins. The Yanfly team(perhaps a big one?) really works so effectively and efficiently that some MZ users can likely use tons of Yanfly plugins right after MZ's released (still 13 days from now). I wonder if any other plugin developer(or team) will try to compete with Yanfly this time, no matter how slim the chance to win is :)
Hello! :kaopride:I am new to RPG Maker, though I have been lurking the forums for a while. :kaoswt: Hope to make some friends and learn some stuff here! :kaothx:
And now since I've got the whole game parts working, the *contents* await.

Forum statistics

Threads
100,595
Messages
977,586
Members
132,194
Latest member
linkvaovn88com
Top