RPG Maker Forums

Description of the Feature:
Just as the thread suggests. I'm still surprised it actually hasn't been implemented yet, since conditional branch has it. And I don't think I'm the only one who would appreciate this.
The thing is, as it is now, if we want to activate an event based on some weird condition, for example if the party leader is dead, we need a workaround for it, for example a parallel process event that tracks if the hero is dead and turns a switch on or off accodingly.
Having a Script condition would simplify that a lot.

Code for Implementation:
in the rpg_objects:
Code:
Game_Event.prototype.meetsConditions = function(page) {
    var c = page.conditions;
    if (c.switch1Valid) {
        if (!$gameSwitches.value(c.switch1Id)) {
            return false;
        }
    }
    if (c.switch2Valid) {
        if (!$gameSwitches.value(c.switch2Id)) {
            return false;
        }
    }
    if (c.variableValid) {
        if ($gameVariables.value(c.variableId) < c.variableValue) {
            return false;
        }
    }
    if (c.selfSwitchValid) {
        var key = [this._mapId, this._eventId, c.selfSwitchCh];
        if ($gameSelfSwitches.value(key) !== true) {
            return false;
        }
    }
    if (c.itemValid) {
        var item = $dataItems[c.itemId];
        if (!$gameParty.hasItem(item)) {
            return false;
        }
    }
    if (c.actorValid) {
        var actor = $gameActors.actor(c.actorId);
        if (!$gameParty.members().contains(actor)) {
            return false;
        }
    }
  if (c.scriptValid) {
       if (!eval (c.scriptValue)) {
          return false;
      }
  }
    return true;

Mockups:
Screenshot_368.png
I made the script window too small, but whatever, the principle is the same.
Why is this feature good?
This feature is great because of the following:
  • Puppies will be happy (and me too :D)
  • User friendliness
  • It is easy to implement
  • Adds versatility to eventing and improves performance, because it won't require 3rd party plugins or other workarounds that waste precious processing power

Possible issues with this feature?
Issues that might arise from this feature:
  • Some 3rd party plugins that use custom conditions might become a bit redundant
  • The page editor space might be cramped

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top