Is there a way to "seal" (disable) the attack command?

Premise:
I've created a skill that uses a "Pistol" weapon type & also requires ammo to use that skill.

Problem:

You can just click attack which just attacks using what ever you have equipped without requiring the user to have any ammo.

Question:

Is there a way to "seal" (disable) or remove the attack command without using any scripts?
I want this to be completely done with the database & events.

Summary:

Basically I want the attack command to be unusable if the user has a gun equipped.
Weapons -> Features -> Skills -> Seal Skill


It is pretty simple as that. However to disable it when you have no ammo you will indeed need a event or script.
without scripts - not that I know of, the base attack skill is set up to make sure that there is always a skill the enemies can use.

However, you might try a workaround with the skill's damage formula:

You can enter any ruby code in the damage formula field, including an IF to see what kind of weapon the current user as equipped.

And in that case reduce the ammo there.

Unfortunately this will result in a used up action if there is no ammo, and the coding in that field would be rather complex - I don't have it right now.
Weapons -> Features -> Skills -> Seal Skill
Oh my goodness, how did I overlook that... :blush:

lol, I was even about to make a script (but I really didn't want to have to, many thanks to you for the info) to do just that... like so:

Spoiler
class Scene_Battle < Scene_Base def command_attack on_enemy_cancel endend...of course I would've had to check to see what the player had equipped before calling "on_enemy_cancel"...
However to disable it when you have no ammo you will indeed need a event or script.
Yeah I believe I might be able to achieve the desired effect with an event or maybe some other database tricks. 😉

Spoiler
without scripts - not that I know of, the base attack skill is set up to make sure that there is always a skill the enemies can use.

However, you might try a workaround with the skill's damage formula:

You can enter any ruby code in the damage formula field, including an IF to see what kind of weapon the current user as equipped.

And in that case reduce the ammo there.

Unfortunately this will result in a used up action if there is no ammo, and the coding in that field would be rather complex - I don't have it right now.
Hmm... well I think I may be able to get it to work with what Clord mentioned above.

Thank you both so much for such quick replies!

Specially thank you Clord for that info, I just cannot believe I didn't think of that.

Edit: I believe I've figured it all out.

Thanks again for the help. This can now be closed.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-seal-disable-the-attack-command.15081/