[Suggestion] "Script" option for event page conditions

Description of the Feature:
  • In addition to the current event page condition checkboxes, add one for "script"
  • This would have a similar input box to the ones that are currently available to Control Variables and Conditional Branch

Mockups:
1598625020628.png


Why is this feature good?
This feature is great because of the following:
  • Complete control over the criteria for activating an event page
  • Far lesser need to add more checkboxes in the future as script will cover anything anyone could possibly need
  • This could even allow for removing the other "Switch" box as for multiple switches you could just script an if statement

Possible issues with this feature?
Issues that might arise from this feature:
  • None that I can think of
Yes, please. This would be so great.
Also implementing it shouldn't require much, if anything, more than adding a scriptValid and script property to page conditions in the editor and amending Game_Event's meetsConditions function with an additional check:

Code:
if (c.scriptValid) {
        return !!eval(c.script);
    }
@Trihan, I guess it is nice to call the script and check script. Whatever you are suggesting I think it is going to useful.
This would fix soooo many issues!

This would allow things like (Var=X or Var!=X) not to mention (VarX=Y || VarY!=X) and (VarX=Y && VarY!=X)
It would be super powerful for the right user, allowing them to bypass a lot of the limitations given by the current system, at a minimal risk/cost.
I disagree, due to performance issues: most page conditions are checked only when necessary. A script condition would have to be checked every frame. 👋

(Also, scripting is usually intimidating for those unfamiliar with it. RPG Maker is designed to be usable for game creation with no scripting at all - removing existing page conditions because there's a scriptable one is counter to that philosophy. 😅)

"More page conditions" has already been suggested and officially rejected:
This feature can be implemented by plugins if need be (I think I've seen at least one such plugin for MZ already). As I see it: you're already using scripting, plugins are just a streamlined version of that. 😮‍💨
I disagree, due to performance issues: most page conditions are checked only when necessary. A script condition would have to be checked every frame. 👋

(Also, scripting is usually intimidating for those unfamiliar with it. RPG Maker is designed to be usable for game creation with no scripting at all - removing existing page conditions because there's a scriptable one is counter to that philosophy. 😅)

"More page conditions" has already been suggested and officially rejected:
This feature can be implemented by plugins if need be (I think I've seen at least one such plugin for MZ already). As I see it: you're already using scripting, plugins are just a streamlined version of that. 😮‍💨

Yeah, Archeia's just explained to me why this doesn't work due to the map refresh requirement.
Well they could atleast give you the option to activate an event page, if any condition is true.
I'd be happy with that.
Just took a look at the http://www.yanfly.moe/wiki/Events_and_Movement_Core_VisuStella_MZ plugin.
It has a <JS> tag you can give to variables, meaning that you can basically use variables to achive what was suggested here.

Help file quote:


"Switches and variables can now run JavaScript code and return values

instantly. While at first glance, this may seem no different from using

the Control Variables event command's Script option, this can be used to

instantly set up Switch and/or Variable conditions for Parallel Common

Events, Event Page Conditions, Enemy Skill Conditions, and Troop Page

Conditions instantly without needing to make an event command to do so.



---



<JS> code </JS>

- Used for: Switch and Variable names

- Replace 'code' with JavaScript code on what value to return."

End of quote

Thought this information was relevant.
Locking this too because it's already been in rejected features sticky.

Original thread: https://forums.rpgmakerweb.com/threads/suggestion-script-option-for-event-page-conditions.126306/