Hi,
I was testing my game, and discovered something about the design of MV's engine : The turn order is battler based.
This is bad. Because of two mechanics : Speed and Action Times +
Skill priority is a mechanic that I use in my game : Wind attacks have high priority, Basic attacks have higher priority, and Guard have the highest priority.
But right now, a battler with Action Times+ doesn't benefit from guard priority, as the makeSpeed() function takes the lowest speed. I tried to invert and pick the highest speed instead, but then the battlers hacks the system by guarding first then inputting two extra slow actions before everyone.
What I want is that if A does [Guard, Attack, Attack], B does [Attack,Wind,Fire] and C does [Fire,Attack,Attack], and that in terms of AGI we have C>B>A, then the turn order should be ACCBAABCB
But right now it's AAABBBCCC and this is very bad, strategically speaking and gamedesign wise.
Do you happen to know a solution to setup a proper per-action order system ? Maybe a plugin already exists ? Couldn't find it.
================== MORE INFORMATION ====================
I tried coding it myself :
The idea was to allow duplicates in the BattleManager._actionBattlers array, so it should work with Yanfly's Turn Order Display (like showing the battlers multiple times on the track if they have more than one action)
I also barely edited BattleManager.processTurn so it changes subject at the end of each action
And finally, I edited Yanfly's BattleManager.getNextSubject to get rid of the performedBattlers stuff preventing duplicates in the battlers order.
You guess that if I'm posting, it's because it doesn't work. For some reason, my method messes with Window_BattleLog.performActionStart, called all the way down from Yanfly's updateActionList
PS : No ATB, I don't want a tick-based battle system
I was testing my game, and discovered something about the design of MV's engine : The turn order is battler based.
This is bad. Because of two mechanics : Speed and Action Times +
Skill priority is a mechanic that I use in my game : Wind attacks have high priority, Basic attacks have higher priority, and Guard have the highest priority.
But right now, a battler with Action Times+ doesn't benefit from guard priority, as the makeSpeed() function takes the lowest speed. I tried to invert and pick the highest speed instead, but then the battlers hacks the system by guarding first then inputting two extra slow actions before everyone.
What I want is that if A does [Guard, Attack, Attack], B does [Attack,Wind,Fire] and C does [Fire,Attack,Attack], and that in terms of AGI we have C>B>A, then the turn order should be ACCBAABCB
But right now it's AAABBBCCC and this is very bad, strategically speaking and gamedesign wise.
Do you happen to know a solution to setup a proper per-action order system ? Maybe a plugin already exists ? Couldn't find it.
================== MORE INFORMATION ====================
I tried coding it myself :
The idea was to allow duplicates in the BattleManager._actionBattlers array, so it should work with Yanfly's Turn Order Display (like showing the battlers multiple times on the track if they have more than one action)
JavaScript:
BattleManager.makeActionOrders = function() {
var battlers = [];
var order = [];
this._sortedActions = [];
if (!this._surprise) {
battlers = battlers.concat($gameParty.members());
}
if (!this._preemptive) {
battlers = battlers.concat($gameTroop.members());
}
battlers.forEach(function(battler) {
battler.makeSpeed(); //makeSpeed is edited to just push the battler's actions into this._sortedActions
});
this._sortedActions.sort(function(a, b) {
return b.speed() - a.speed(); // I sort the actions by speed
});
this._sortedActions.forEach(function(action) {
order.push(action.subject()); // I create the turn order, allowing duplicates, based on the sorted actions
});
this._actionBattlers = order;
};
I also barely edited BattleManager.processTurn so it changes subject at the end of each action
And finally, I edited Yanfly's BattleManager.getNextSubject to get rid of the performedBattlers stuff preventing duplicates in the battlers order.
You guess that if I'm posting, it's because it doesn't work. For some reason, my method messes with Window_BattleLog.performActionStart, called all the way down from Yanfly's updateActionList
PS : No ATB, I don't want a tick-based battle system