Is it just me or does the RPG Maker engine sometimes "bend the rules"?

I have noticed loud and clear, clear as a cloudless sunny day, that RPG Maker will do whatever it takes to get a kill on a party member. It often seemingly ignores things like turn order, target rate, etc. Like if it can get a kill, it will get a kill.


I have seen it countless times. The enemy will target an actor that is about to be healed, and kill it. Or it will kill the healer who is about to do an AoE heal. It seemingly ignores speed, target rate, and other factors just so it can get a kill.


This became blatantly obvious during a major boss fight in Moltres Rider's RPG. The Giant Galarian Articuno.



Now, there is a dragon party member that is pretty OP—especially if you do the side quests involving her. She learns a powerful heal + regen attack during a side story, and she learns a resurrection spell by leveling up.


Being that this is a dragon, her stats match that of a dragon. She is basically a solid tank.

Her speed has not been match by anything the game threw at her. She went first ever since she joined the party. Not a single time has a monster or another actor has gone before her except when I initiate a priority move with another actor.

The same was true for the Giant Galarian Articuno fight. Even when the dragon has max stacks of speed debuffs and the Giant Galarian Articuno's speed was buffed to max, this dragon, named Beautiful Dragon always went first.

That was until about two hours into the fight and I was seeing the Giant Galarian Articuno's 30% phase.

During that phase, I had a few bad patterns with the Giant Galarian Articuno that left the entire party dead and Beautiful Dragon frozen solid leaving her defenseless. Thankfully she had the effect of Dragon Medica for part of the frozen period receiving a regen effect.

By the time that the frozen status wore off, Beautiful Dragon was at a mere 23 HP.

I am like, "Good! She goes first, use her massive heal to get herself at max and then resurrect everybody."

That did not happen.

For the first time in that entire two hour fight, and for the first time in the entire game, the enemy went before Beautiful Dragon and wound up killing her. Beautiful Dragon had no debuffs or other status effects inflicted at this point and even if the Giant Galarian Articuno was all buffed up on speed, in a normal situation, Beautiful Dragon would still be guaranteed to go first.

Except the engine seemingly "bent the rules" just to finish Beautiful Dragon off and cause a party wipe.


Is it just me or is this the nature of the engine? I noticed it in the PS1 version too, but not to this degree.
Yes, it is you.
I'd say that it's your impression and nothing else. Even so, there's another factor to take in consideration like that dragon being the first hero in your party. I guess that being placed in another position things might not end up the same way. It's just a hypothesis so don't take it seriously. Or it was just bad luck because the skill your enemy used was a simple attack (skill #1) that's not supposed to take a long time to perform it.

The battle scripts are relatively simple so there's no real way to come up with reasons or excuses like an overly complex AI for enemies or anything the like.
The code for the battle AI is openly available for you to look at, so there's not really any room for speculation or conspiracy theories.

Supposing that none of your scripts have modified it, turn order in VX Ace is decided like this:
Ruby:
def self.make_action_orders
    @action_battlers = []
    @action_battlers += $game_party.members unless @surprise
    @action_battlers += $game_troop.members unless @preemptive
    @action_battlers.each {|battler| battler.make_speed }
    @action_battlers.sort! {|a,b| b.speed - a.speed }
end

What it does is create an array, add all party members to that array (unless it's a surprise attack), and then add all enemies to that array (unless it's a preemptive attack), and then it sorts that array by each battler's speed. The result after sorting will be the turn order.

However, a battler's speed is not just their agility. It is the speed of the slowest action that they have queued up--which usually is whatever skill/item they are using. The speed of an action is determined like this:
Ruby:
def speed
    speed = subject.agi + rand(5 + subject.agi / 4)
    speed += item.speed if item
    speed += subject.atk_speed if attack?
    speed
end

What that does is it takes the battler's agility, and adds to it a random number between 0 and (4 + agility / 4). Then it adds the skill/item's invocation speed from the database, and then if an attack skill is being used, it also adds any "Attack Speed" traits that the battler is affected by.

That's all there is to it. There's no code that specifically tries to screw you over. What probably happened to you is that you got bit by the random variance (you rolled really low and the enemy rolled really high) at an inconvenient time.
Contrary to common beleif, RPG Maker is not a demon or something. Possesed RPG Maker can't hurt you.

There's probably a lot of psychology that goes into this.
in a normal situation, Beautiful Dragon would still be guaranteed to go first.
how did you determine this?

Original thread: https://forums.rpgmakerweb.com/threads/is-it-just-me-or-does-the-rpg-maker-engine-sometimes-bend-the-rules.164584/