Opening a choice dialogue when inside the equip menu

Hey everyone, RMMV noob here. Currently playing around with some ideas I have in my head and one of them was to create
cursed weapons that would be powerful but have have a lasting detrimental effect on the player character (for example, while equipped, the weapon would slowly crush their soul, eventually causing a game over)
My question would be - is there a way of opening a choice dialogue in the middle of equip menu so I can give player an option to reconsider equipping the cursed weapon?

Ideally, if the player chooses to equip the cursed weapon, I would open a dialogue with something like:
"I am not sure I want to equip this sword..."
[ *reconsider*/ *carefully pull the sword out of it's scabbard* ]
If the player chooses reconsider, the equipping doesn't happen.

Ideally, this would involve javascript as I have some vague ideas of turning this into a plugin: if I would be able to add a menu to interact with some item in the inventory, this would enable all sorts of mechanics like sharpening the weapons with whetstone, inscribing it with magical runes to add temporary enchantments, enchanting an item if the player is a mage and so on.

Now, as I am still learning the platform, merely pointing me to the right direction would be great and would save me hefty amount of time!
You could check out these Plugins here:

https://forums.rpgmakerweb.com/index.php?threads/waynee95s-plugin-collection-newest-way_menubackgrounds.78979/

https://forums.rpgmakerweb.com/index.php?threads/equipment-common-events.57234/

The first one (WAY_CustomOnEquipEval in the list) allwos you to run code on equipping an item, the second one runs a common event right after the menu is closed. It's not exactly what you want, but maybe you can do something with it.
The On Equip Eval one should be able to do what you're looking for.

Just to quickly ask...is there a good gameplay reason to do this?

1) Traditionally, cursed items were put into RPGs and only do bad things when you equip them, it's a punishment for not spending the resources to identify the item before trying it.

2) Since then, many games have made more lenient versions of cursed items where they're better than normal but have a negative drawback in return.

If you're type 1, you wouldn't want to have that dialog pop up because the only answer is obviously "no don't equip it" and you're breaking the point of the surprise.

If you're type 2, I would suggest it makes more sense for the benefit and drawback to be visually obvious when looking at the item's description and stats than to have an ambiguous question pop up.

You should do what makes sense to you for your game, I'm just offering the viewpoint that it seems odd to me, personally 😉
You could check out these Plugins here:

https://forums.rpgmakerweb.com/index.php?threads/waynee95s-plugin-collection-newest-way_menubackgrounds.78979/

https://forums.rpgmakerweb.com/index.php?threads/equipment-common-events.57234/

The first one (WAY_CustomOnEquipEval in the list) allwos you to run code on equipping an item, the second one runs a common event right after the menu is closed. It's not exactly what you want, but maybe you can do something with it.
Awesome, thanks! I will take a look, hopefully I can minimize the coding work with those.
The On Equip Eval one should be able to do what you're looking for.

Just to quickly ask...is there a good gameplay reason to do this?

1) Traditionally, cursed items were put into RPGs and only do bad things when you equip them, it's a punishment for not spending the resources to identify the item before trying it.

2) Since then, many games have made more lenient versions of cursed items where they're better than normal but have a negative drawback in return.

If you're type 1, you wouldn't want to have that dialog pop up because the only answer is obviously "no don't equip it" and you're breaking the point of the surprise.

If you're type 2, I would suggest it makes more sense for the benefit and drawback to be visually obvious when looking at the item's description and stats than to have an ambiguous question pop up.

You should do what makes sense to you for your game, I'm just offering the viewpoint that it seems odd to me, personally 😉
I will try that, thanks!
1) Roguelike-style cursed items, yes, is a part of my reasoning. My ultimate goal is to create a roguelike with procedurally generated maps and content and one idea I am toying with is to have some sort of skills based minigame to remove the cursed armor that has debuffs, like encumbering the player or perhaps perventing spell casting since it is too bulky to make arcane gestures.
This kind of minigame I'd like to initiate from a popup when trying to unequip cursed armor
2) Another idea I am toying around is to add another button to equip/unequip menu to "act" on equipment parts. For example, an equipped sword could be sharpened with whetstone or equipped dagger can be poisoned with prepared poison.
1) Roguelike-style cursed items, yes, is a part of my reasoning.
Then, again, I'd suggest you reconsider it. After all, unless you're asking this question for every piece of equipment the player could put on, isn't it a dead giveaway? And at that point, what's the point of making the item and whatever its affects are if no person with two brain cells will ever equip it?

But, again, whatever you like best for your game!

Original thread: https://forums.rpgmakerweb.com/threads/opening-a-choice-dialogue-when-inside-the-equip-menu.141130/