Xyphien Forums

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Equipped Weapon Overriding Skill Notetag

MugenDraco

Villager
Xy$
0.11
Hello, everyone. I have a seemingly small bug, but it's driving me nuts on how to fix it. I have over 200 unique weapons in my game, and each require Notetags from Yanfly's Weapon Animation plugin to each have their own weapon image and attack motion. However, I also have a "Hadoken" type energy blast skill that requires its own weapon image and attack motion. Yanfly's plugin doesn't work on Skills, so I'm using DreamX's Skill Motion plugin for it. I didn't know there was a problem for the longest time, because the player doesn't get this skill until entering a cave where you have to drop all your weapons and use only magic. The skill worked perfectly in the cave. However, once the player comes out and picks up their weapons, anytime this skill is activated, the weapon sprite and attack motion for the currently equipped weapon plays out instead of the one for the skill itself. So I've got the character swinging a sword to fire this energy blast, which shouldn't happen. If I take the Weapon Image notetag off of a weapon, it will work correctly, but I absolutely need the notetags for any weapon beyond the default 24, which is a lot. I even have a slot in the Weapons tab specifically for the energy blast, but the equipped weapon overrides any other references in the skill itself. So basically what's happening is the Weapon Image notetag from Yanfly's Weapon Animation plugin is taking priority over the DreamX SkillMotion notetag in the skill, even though it's the skill being activated. Since it works correctly without an equipped weapon, I've even attempted some JavaScript to unequip the current weapon, save it in a variable, play the skill, then re-equip the weapon, but haven't had any luck. It either just doesn't work, or completely crashes the game. I'm still not very good at scripting inside RPG Maker MV. Any and all help would be appreciated. Thanks.
 

MugenDraco

Villager
Xy$
0.11
This probably isn't the best solution, but I finally found a way to do it. Since Skills are low on the totem pole of priority, and Yanfly's Weapon Animation plugin works on States, but not Skills, here's a fix. Make a State with the <Weapon Image: x> and <Weapon Motion: x> notetags. Then put the following action sequence in the Skill notes, replacing each x with the appropriate Skill or State number. And adjust the numbers in the wait tags to make your skill look right.

<whole action>
add state x: user, show
perform start
motion standby: user
wait for movement
face user: targets
wait: 10
</whole action>

<target action>
motion attack: user
wait: 30
animation x: target
wait: 30
action effect
Immortal: targets, false
wait: 30
</target action>

<follow action>
wait for animation
<follow action>

remove state x: user
 

Attachments

Top