- Joined
- Oct 28, 2019
- Messages
- 79
- Reaction score
- 64
- First Language
- Indonesian
- Primarily Uses
- RMMZ
The default RM MZ still has the same, head-scratching Area-of-Effect damage delay problem, already seen before in previous RPG Maker versions: if you use skill with All Enemies targeting and hit all enemies on the battlefield, the damage will be executed to the enemies one by one instead all at once. That few hundred milliseconds of significant delay between damage executions are small, but may ruin the immersion and battle pace in some games.
So, I'm trying to understand the function that determine the length of delay, and finally create plugin that removes that delay.
The problem is, I'm stuck on finding that root cause of delay. My search stopped in the meaning of this.updateLastTarget(target) in the following code:
How it was updated? How they set the value between target update? How the "apply" function is executed?
From there, I can't trace back where that delay come from, or why it was made.
Looks like there's some array/sequence execution ahead that code that I don't understand.
So, anyone can give me idea/clue? Any help will be appreciated
PS: And no, I won't use external plugins. Thank you. I'm using like active three dozens of self-made plugins. Any external plugin will mostly creates headache than helps.
Disclaimer: I actually don't know where to post this, since the plugin doesn't have any form yet, making it ineligible to ask/publish in "Plugin In Development" section. Hence I post this here.
So, I'm trying to understand the function that determine the length of delay, and finally create plugin that removes that delay.
The problem is, I'm stuck on finding that root cause of delay. My search stopped in the meaning of this.updateLastTarget(target) in the following code:
JavaScript:
Game_Action.prototype.apply = function(target) {
const result = target.result();
this.subject().clearResult();
result.clear();
result.used = this.testApply(target);
result.missed = result.used && Math.random() >= this.itemHit(target);
result.evaded = !result.missed && Math.random() < this.itemEva(target);
result.physical = this.isPhysical();
result.drain = this.isDrain();
if (result.isHit()) {
if (this.item().damage.type > 0) {
result.critical = Math.random() < this.itemCri(target);
const value = this.makeDamageValue(target, result.critical);
this.executeDamage(target, value);
}
for (const effect of this.item().effects) {
this.applyItemEffect(target, effect);
}
this.applyItemUserEffect(target);
}
this.updateLastTarget(target);
};
How it was updated? How they set the value between target update? How the "apply" function is executed?
From there, I can't trace back where that delay come from, or why it was made.
Looks like there's some array/sequence execution ahead that code that I don't understand.
So, anyone can give me idea/clue? Any help will be appreciated
PS: And no, I won't use external plugins. Thank you. I'm using like active three dozens of self-made plugins. Any external plugin will mostly creates headache than helps.
Disclaimer: I actually don't know where to post this, since the plugin doesn't have any form yet, making it ineligible to ask/publish in "Plugin In Development" section. Hence I post this here.