MV No Animation On Skill Use

I am using side view battles and at various points I want to reduce the limited uses of skills globally. Currently, I am using a skill with notetags that is triggered by a common event. When it triggers, I want the player to notice this as little as possible, which means skipping SV motions/animation and removing the text at the top of the screen.

For this, I am using the Yanfly plugins Battle Engine Core and Limited Skill Uses. Below is the note tag I have:

<Global Limited Uses: -1>

<Setup Action>
break action
</Setup Action>

<target action>
break action
</target action>


When I run the game, with just "global limited uses" and/or "Setup action" it will reduce the limited uses of other skills while also preventing the text for the skill from displaying at the top of the screen.

The problem comes when I add "Target action" because the skill will not display an animation nor will it display text at the top of the screen (which is what I want), but the "Global limited uses" gets ignored. I have tried removing the break action line and global limted uses still is ignored. It appears the addition of "target action" is causing a problem. Any ideas on how to achieve what I am looking for?

Perhaps there is an easier way to do this. I don't have to do it through a skill, it can be through a common event, I just can't figure out how to achieve what I'm looking for any other way.
1657297600179.png
1657297621984.png


I want "fire gun" to show empty ammo, but when I add the "target action" lines, the "global limited uses" line is ignored and I get "1/1" instead of "empty."
Welcome!

What is the point of having multiple action sequence sections and break action in each? Only one of those will ever be seen.

My assumption is that Yanfly put the functionality for the limited skill stuff into the default target action, so you specifying one overwrites it.

I just took a brief poke at the plugin code, try doing this:
Code:
Eval: user.alterLimitedUses(item, user);
Welcome!

What is the point of having multiple action sequence sections and break action in each? Only one of those will ever be seen.

My assumption is that Yanfly put the functionality for the limited skill stuff into the default target action, so you specifying one overwrites it.

I just took a brief poke at the plugin code, try doing this:
Code:
Eval: user.alterLimitedUses(item, user);
Thank you so much for the quick response! Your code worked and I now have exactly what I needed! Did you find that on the Yanfly.moe page?

As to your questions: if I only do the setup action lines, then the SV animation will still play, but I won't see the text. If I only do the target action lines, then the text will appear and the SV animation will not play. I have to do both to get rid of the text box at the top and the SV animation. As for using break action in each, perhaps that is unnecessary, but I was unsure how to proceed otherwise. The intention of the skill is to essentially "unload" a gun without the player realizing a skill was being employed in the background to do so.

But again, thank you so much! For anyone looking at this in the future, what I now have is:


Code:
<Global Limited Uses: -1>

<Setup Action>
break action
</Setup Action>

<target action>
Eval: user.alterLimitedUses(item, user);
break action
</target action>
Thank you so much for the quick response! Your code worked and I now have exactly what I needed! Did you find that on the Yanfly.moe page?
No, it was in the plugin code.
As to your questions: if I only do the setup action lines, then the SV animation will still play, but I won't see the text. If I only do the target action lines, then the text will appear and the SV animation will not play. I have to do both to get rid of the text box at the top and the SV animation. As for using break action in each, perhaps that is unnecessary, but I was unsure how to proceed otherwise.
I'm actually surprised that works, given the description of break action. Maybe it means that it skips the action sequence to the next section, which still makes it pointless if you have no other commands in there. Just put blank sections, except for your code for the skill uses in one of them.

Original thread: https://forums.rpgmakerweb.com/threads/no-animation-on-skill-use.149293/