Hello everyone.
Let me get straight to the point.
It seems that "Dynamic Actions" from YEP_BattleAiCore does not play well with the "speed" parameter from the default database. And by speed, I mean the box to the left of "success rate" and above the "hit type" on items and skills.
And as a quick explaination; "Dynamic Actions" means that any given enemy choses their skill at the start of their action instead of at the start of the turn.
Here is an example scenario that outlines the problem:
Starting conditions:
1 Enemy and 1 Actor, both having equal agility (10) and attack speed (0).
Turn 1: Both combatants use an ability X with speed 0 = it is random which one goes first
Turn 2: The enemy uses ability Y with speed 100 = the enemy goes first as expected
Turn 3: Both combatants use an ability X with speed 0 = for some reason, the enemy will still go first every time
Turn 4: Both combatants use an ability X with speed 0 = it is random which one goes first again
Now I need to say that I actually modified the function that calculated "speed", but I tested this phenomenon with both my modified function and the default function and the results are the same.
But to whom it may concern, here is the snippet of the modified function:
With this modification, I basically wanted to recreate a "priority" system similar to pokemon, whereas a higher "speed" number would essentially guarantee you going first even if your agility was lower than that of others.
I also repurposed the "attack speed" trait to modify the agility by an % amount instead of a flat amount.
So it seems that for some reason the "speed" of the enemy persists across one turn. Which does not only destroy consistency but also some of the gameplay mechanics I want to employ.
Does anyone know if there is some way to "fix" this?
Let me get straight to the point.
It seems that "Dynamic Actions" from YEP_BattleAiCore does not play well with the "speed" parameter from the default database. And by speed, I mean the box to the left of "success rate" and above the "hit type" on items and skills.
And as a quick explaination; "Dynamic Actions" means that any given enemy choses their skill at the start of their action instead of at the start of the turn.
Here is an example scenario that outlines the problem:
Starting conditions:
1 Enemy and 1 Actor, both having equal agility (10) and attack speed (0).
Turn 1: Both combatants use an ability X with speed 0 = it is random which one goes first
Turn 2: The enemy uses ability Y with speed 100 = the enemy goes first as expected
Turn 3: Both combatants use an ability X with speed 0 = for some reason, the enemy will still go first every time
Turn 4: Both combatants use an ability X with speed 0 = it is random which one goes first again
Now I need to say that I actually modified the function that calculated "speed", but I tested this phenomenon with both my modified function and the default function and the results are the same.
But to whom it may concern, here is the snippet of the modified function:
JavaScript:
Game_Action.prototype.speed = function() {
var speed = this.subject().agi * (1 + (Math.max((this.subject().attackSpeed() / 100), 0.05)));
if (this.item() && this.item().speed !== 0) {
speed += (this.item().speed * 50000);
}
return speed;
};
With this modification, I basically wanted to recreate a "priority" system similar to pokemon, whereas a higher "speed" number would essentially guarantee you going first even if your agility was lower than that of others.
I also repurposed the "attack speed" trait to modify the agility by an % amount instead of a flat amount.
So it seems that for some reason the "speed" of the enemy persists across one turn. Which does not only destroy consistency but also some of the gameplay mechanics I want to employ.
Does anyone know if there is some way to "fix" this?