MZ Visustella edit needed for limited 'attack'

Right now I am using these three plugins:




I am using weapon swap to let my character use varying guns during combat.

I am using weapon unleash to change the default attack skill.

And in combination with states and skill cote alongside limited skill usage i have created ammunition requirements and magazine sizes.

The issue? The limited skill usage does not work for anything considered a basic attack. I thought because I changed the skill being used for each weapon that, that would not be the case. But unfortunately it is.

Is there anyone who can help me modify the plugin to allow limited usage on basic attacks?
Perhaps some kind soul will come along and prove me wrong, but I think that you would probably need to post a paid commission request in order to have any hope of getting someone to do this for you.

In and of itself, having someone edit third-party plugins for you is already kind of a big ask. But when those plugins are VisuStella plugins, it's especially problematic, because their plugins are all obfuscated--meaning that the code has been intentionally screwed up in order to make it difficult to read/edit. Getting around the obfuscation isn't impossible, but it adds extra layers of difficulty and hassle to what was already kind of a big ask. So even if you find someone with the knowledge/skills required to do it, it's unlikely that they'd be willing to do it for a complete stranger for free. The fact that the plugins in question are paid plugins also further limits the number of people who could maybe help you.

If you don't want to commission someone to edit those plugins, then you might have better luck asking for help getting your system working without those plugins. There are ways to limit skill usage without using the Limited Skill Uses plugin. And based on what you've said, I also don't understand why you're using the Weapon Unleash plugin (are you actually using the Weapon Unleash mechanic, or are you just trying to make it so that different weapons have different attack skills?).
Perhaps some kind soul will come along and prove me wrong, but I think that you would probably need to post a paid commission request in order to have any hope of getting someone to do this for you.

In and of itself, having someone edit third-party plugins for you is already kind of a big ask. But when those plugins are VisuStella plugins, it's especially problematic, because their plugins are all obfuscated--meaning that the code has been intentionally screwed up in order to make it difficult to read/edit. Getting around the obfuscation isn't impossible, but it adds extra layers of difficulty and hassle to what was already kind of a big ask. So even if you find someone with the knowledge/skills required to do it, it's unlikely that they'd be willing to do it for a complete stranger for free. The fact that the plugins in question are paid plugins also further limits the number of people who could maybe help you.

If you don't want to commission someone to edit those plugins, then you might have better luck asking for help getting your system working without those plugins. There are ways to limit skill usage without using the Limited Skill Uses plugin. And based on what you've said, I also don't understand why you're using Weapon Unleash plugin.
I'm not sure if one would need to actually edit the plugins or simply create a small patch that forces it to apply to anything designated a basic attack.

The reason I am using weapon unleash is because it let's me change the basic attack skill. For example, with multi weapons all of them would use the basic attack naturally, right? It serves as just the default attack.

But I have a sword, pistol, shotgun, and rifle equipped. The basic attack for each needs go be different. Pistol uses 9mm rounds while shotgun uses slugs. So weapon unleash has a note code that let's me change what skill is being used for each weapon. This means when I switch go pistol it uses the pistol note tags for the skill that requires 9mm bullets. Ideally this would also limit the number of shots I can use before I reload. But that doesn't apply to any skill being used for basic attacks.
In RPG Maker MZ you can add a trait 'Attack skill' to your weapons in the database ("Changes the skill used as a normal attack"). Not sure if that solves all your problems, but just mentioning.
I'm not sure if one would need to actually edit the plugins or simply create a small patch that forces it to apply to anything designated a basic attack.
The problem isn't necessarily the amount of editing required. It's moreso that editing/patching a plugin often requires you to understand how the plugin works. Writing even a very small patch might require you to understand the entirety of the plugin, and maybe also any other plugins that that plugin is dependent upon. So even if the amount of typing that you wind up having to do is very negligible, the work required to get to that point can be deceptively large.

Even under good conditions, trying to wrap your head around another programmer's code can be a pain in the butt. But when that code has been intentionally run through a shredder, solely for the purpose of preventing you from being able to read it, it becomes more than just a pain in the butt.

I'm not trying to be mean or to discourage you. This thread just struck me as one that probably wouldn't receive any favorable responses, so I thought I'd point out the reason and suggest some alternative courses of action.

The reason I am using weapon unleash is because it let's me change the basic attack skill. For example, with multi weapons all of them would use the basic attack naturally, right? It serves as just the default attack.

But I have a sword, pistol, shotgun, and rifle equipped. The basic attack for each needs go be different. Pistol uses 9mm rounds while shotgun uses slugs. So weapon unleash has a note code that let's me change what skill is being used for each weapon. This means when I switch go pistol it uses the pistol note tags for the skill that requires 9mm bullets. Ideally this would also limit the number of shots I can use before I reload. But that doesn't apply to any skill being used for basic attacks.
MZ has a built in "Attack Skill" trait that can be applied to the weapons in your database. It allows you to change the default attack skill while that weapon is being wielded.
Though I tested it just for fun, and it seems that an actor wielding a weapon with that trait removes the limited skill uses condition on the skill (it can even be used from the skill type menu an unlimited times). Which I think is exactly the OPs problem.

But one suggestion is to count your ammo without that plugin with common events or something. You can use that weapon unleash plugin <JS Replace Attack> to switch the basic attack skill if you have ammo and show "empty" or something if your ammo variable for that weapon is 0.
Though I tested it just for fun, and it seems that an actor wielding a weapon with that trait removes the limited skill uses condition on the skill (it can even be used from the skill type menu an unlimited times). Which I think is exactly the OPs problem.

But one suggestion is to count your ammo without that plugin with common events or something. You can use that weapon unleash plugin <JS Replace Attack> to switch the basic attack skill if you have ammo and show "empty" or something if your ammo variable for that weapon is 0.
The Limited Skill Uses plugin seems like overkill for an ammo system. The core VisuStella plugins already include different ways that one could use to limit the usage of the skill.

For example, Battle Core has note tags that allow you to adjust which commands and skills are visible in the actor command window. You could use that to hide the regular Attack command, and instead show a command to execute the weapon skill directly. You could then use the <JS Command Visible> note tag to make it so that the command is only visible while the player has ammo.

Alternatively, Skills and States Core could also be used to disable or hide certain skills under conditions that you specify. One could use that with a bit of JS to whip up some type of ammo system.

Skills and States Core also has options that allow you to make it so that a skill costs items to use. Another alternative would be to make it so that bullets are real items, and then tie those items to the skill cost.

Another alternative would be to use Skills and States Core to create a passive state that activates when the user is out of ammo, and have that state apply the <Seal Attack> Battle Core note tag to disable the attack command. Or said state could change the Attack Skill trait, so it uses a Reload skill or something instead.

The possibilities are numerous. It just kinda depends on the specifics of how the OP's system is supposed to work.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-edit-needed-for-limited-attack.163062/