Hi. I think I'm just using the default settings for the attack skill (although I might have changed them a while ago), but for some reason during battles, only the player's attack deal damage - enemies do nothing. I just says "[enemy name] attacks!" and then the screen shakes a little and the player doesn't take any damage. It doesn't say the attack missed or anything like that. I've also checked, and it doesn't appear the formula is stopping the attack from dealing damage. Any help would be greatly appreciated, thanks in advance.
Enemy Attacks Do Nothing
RPG Maker MV SupportIs your player's defense high enough to make the connected hit only deal 0 damage?
Man I had this exact same problem last night cept in reverse (player's attacks did 0, enemy's atks did dmg). My issue prolly isn't related to yours tho... But check your elemental resistances just in case. Or try changing the monster's attack element from "normal attack" to something else.
That means that you don't know how the element system works.
As long as the attack skill is set to "normal attack" the enemy will never use an element
and the attack skill HAS TO BE "normal attack", because it is also used by actors, and changing it to something else will remove weapon elements - because "normal attack element" means "use element assigned to equipped weapon" - and the enemies have no equipment.
Open your debug console (F8) when the attacks happen and make sure it isn't vomiting a cascade of errors because of some plugin/setting/etc.
I simply meant to try it, since OP might have plugins that give enemies equipment or something. It was merely a means of the process of elimination to see where the problem was. I am quite aware "normal attack" means to use the weapon's element. Like in my case, I've modified the core js files, so many default assumptions are thrown out the window in my case. I just didn't want to assume anything for OP's case and go thru every possibility just in case. Obviously, you should keep skill #1 attack with the normal attack element, but changing it temporarily will let you cross off yet another possibility that might be causing the issue.
It seems like this forum has a habit of assuming everyone is using stock/default everything, which breeds a culture of not thinking outside the box imo... Why constrain yourself to what's given to you when you hit "New Project" when RPG Maker can do so much more if you just tinker around a bit?
I get the impression that several people have a big misconception here. Setting the element to Normal Attack doesn't mean it will use the element assigned to your equipment. It means it will use elements gained by an Attack Element traits, taking the one that the victim has the highest resistance to.
Equipment can have Attack Element traits, of course, so Normal Attak will use elements from your equipment. But enemies can also have Attack Element traits. So it's not true that an enemy will never use an element if the skill is set to use the Normal Attack element, even without a plugin that gives enemies equipment.
Equipment can have Attack Element traits, of course, so Normal Attak will use elements from your equipment. But enemies can also have Attack Element traits. So it's not true that an enemy will never use an element if the skill is set to use the Normal Attack element, even without a plugin that gives enemies equipment.
Wait it picks the one that the victim has the highest resistance to? I'm using Yanfly's element plugin so is this still the case? I was under the assumption the element was added to an array.
I have no idea whether it's changed with Yanfly's core engine or any other Yanfly plugin. With vanilla MV though, it definitely picks the highest one... but I appear to have misspoken about what is the highest. It takes the one with the highest rate, not the highest resistance - in other words, the target's lowest resistance. Apologies for the confusion.
These are the relevant functions in rpg_objects.js:
These are the relevant functions in rpg_objects.js:
JavaScript:
Game_Action.prototype.calcElementRate = function(target) {
if (this.item().damage.elementId < 0) {
return this.elementsMaxRate(target, this.subject().attackElements());
} else {
return target.elementRate(this.item().damage.elementId);
}
};
Game_Action.prototype.elementsMaxRate = function(target, elements) {
if (elements.length > 0) {
return Math.max.apply(null, elements.map(function(elementId) {
return target.elementRate(elementId);
}, this));
} else {
return 1;
}
};
Ah, that makes much more sense. I had it flipped around in my head.
Hi. No the player's defence isn't high enough to do that, I checked and the formula should work fine. I even disabled the Yanfly enemy levels plugin and it still does nothing even when both the player and enemy are the same level.
I haven't actually started using elements yet, so it can't be that. Thanks for the suggestion though.
please show us screenshots of actor and class that isn't damaged.
There are quite a number of special traits that can modify damage or defense, and if that skill does not do any damage then there are only two possible reasons:
1) somehow the defense calculation for the actor ends on higher values than you think
2) the entire battlesystem is changed or broken by plugin
and 2 is rather unlikely because you would have other effects and error messages in addition to this if that were to happen.
Best way to deal with this problem is to use in skill formula a JS Math.max() method and see what happens. E.g:
if it deals 10 damage (or around it due the variance set to 20%) that means target has higher defense, or some other traits are raising it's def.
Anyway, Math.max() is generaly a best way to deal with concerns regarding atk - def relations
Code:
Math.max( 10, ( a.atk * 2 ) - b.def );
if it deals 10 damage (or around it due the variance set to 20%) that means target has higher defense, or some other traits are raising it's def.
Anyway, Math.max() is generaly a best way to deal with concerns regarding atk - def relations
that does look as if your defense is simply too high for that enemy - especially if you count two default armors. What is the def value if you go to status inside the game?
Original thread: https://forums.rpgmakerweb.com/threads/enemy-attacks-do-nothing.123114/