MV Sideview Actor Enemies not using weapon

Hello, so in the game I'm making, whenever you equip a weapon it uses YEP_WeaponUnleash to replace your attack skill with another skill with a proper name. This works fine with the party's actors. They use 'shoot' for example and they'll pull back their bow and attack like normal. However, this does not work with Sideview Enemies. I've set their weapon properly and whenever I give them the 'attack' command (renamed to punch) they will use their weapon properly. However if I give them the renamed skill (nearly identical to the normal attack) they will instead do a small cast animation. I've tried just duplicating the attack skill to see if that was the issue, it is not. It appears that it ONLY works if it's skill 1. I've tried the <Cast Animation: 0> note tag, but to no avail. I've also tried to use the <Replace Attack: x> notetag on the enemy, but that doesn't work. They just default to punch no matter what.
👋 From your post on my status feed:
Enderzombie24 said:
Hey, I'm using your attackGuardTag plugin and it looks like it does exactly what I need. However, whenever it's active, my game crashes. I'm also using Yanfly's Battle Core and several of his other plugins. I've tried placing your plugin above and below Battle Core, at the bottom of my plugin list, and at the top, but no luck. Any idea what the issue could be or how I might fix it?
Ideas:
  1. Does the plugin work by itself?

    • If not then you may have saved it incorrectly, e.g. by copy+pasting only part of the code, or all of the code plus extra stuff around it that is not code.

    • If it only causes an error when you use it with other plugins, then it is probably conflicting with something. Not sure why that would happen, though: my plugin is very simple.

  2. What, exactly, is the error? You can press F8 or F12 during playtest to show the dev tools window. Select the Console tab in that window and look for any red text (error messages). A screenshot of the error message from the console could be helpful.
Alternatively you could give each attack-replacer skill an action sequence:
E.g. motion attack: target from Action Sequence Pack 2?
1742680387191.png


The plugin seems to work on it's own. I tried to use Action Sequences but I'm going to be honest I just couldn't seem to figure it out. From what I was doing the Action Sequence Pack didn't seem to work.

Actually, just now I went in and tested it and it seems like your plugin works fine if I disable Turn Order Display. I do not know how your plugin would conflict with this. I'd prefer to not have to disable Turn Order Display if I could help it, so if you have any ideas I would appreciate it!
OK, based on that error message it looks like there's some action that hasn't been assigned a Skill or Item yet. You could try replacing this line of my plugin:
JavaScript:
let checkTag = function(action, name) { return action.item().meta[name]; };
...with this:
JavaScript:
let checkTag = function(action, name) {
  const item = action.item();
  return item ? item.meta[name] : false;
};
(I.e. if no item has been assigned to this action then don't try to check it for a notetag.)
That seems to have fixed the issue! Thank you my friend, you are a life saver!
Great, happy RPG Making! 😂

Original thread: https://forums.rpgmakerweb.com/threads/sideview-actor-enemies-not-using-weapon.176474/