RMMV Run Common Event when selecting weapon from menu?

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
706
Reaction score
620
First Language
German
Primarily Uses
RMMV
By default, RMMV allows the player to scroll through their weapons and armor in the inventory, but doesn't allow any actions from there. I would like to run a Common Event when the player presses the Action Button on a weapon in the item menu, just like it is possible for regular items.
Does a plugin for this already exist somewhere? (All I could find was for running a Common Event upon equipping a weapon/armor, which doesn't quite work for my purposes.)
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
1,187
Reaction score
809
First Language
Polish
Primarily Uses
RMMZ
Didn't see something like this. Maybe yo ucan make it an item instead of weapon?
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
706
Reaction score
620
First Language
German
Primarily Uses
RMMV
That would be possible, but not ideal, since the weapons in question should still be equippable and appear in a separate inventory tab from the regular items.

Edited to add: I can look into coding this myself if it hasn't been done, I was just hoping I could save myself some work if a plugin already exists.
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
706
Reaction score
620
First Language
German
Primarily Uses
RMMV
@ThreeSixNine That link leads to the MV damage formula thread, which I assume is not what you meant to link? :rswt
 

LadyBaskerville

Hell-poodle
Veteran
Joined
Sep 12, 2016
Messages
706
Reaction score
620
First Language
German
Primarily Uses
RMMV
That makes more sense! Unfortunately, that's still not what I'm looking for and it doesn't seem to be easily adaptable for my needs - I need to run the Common Event when the weapon is selected from the inventory, i.e. this scene:1641921108556.png
independent from whether or not it is being equipped. (Although come to think of it, I would also need that inventory screen to display the currently equipped weapons as well - I hadn't realized that wasn't the default behavior.)

I may need to be a bit more specific:
By default, the player can only move the cursor over the weapons the party has in their inventory (not including equipment) to read the description; all weapons are greyed out and give the buzzer sound when the action button is pressed on them.
I would like to assign (ideally via notetag) a Common Event to specific weapons that runs when the action button is pressed in this inventory scene; those weapons should not be greyed out in the inventory.
I also need the "Weapon" tab of the inventory to display weapons that are currently equipped.
(For consistency's sake, the same should probably be true for armor.)
 

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
469
Reaction score
387
First Language
English
Primarily Uses
RMMV
This plugin give the notetag box of equipment the ability to run custom code, which will allow you to call a common event, which I'm sure you already know.

iirc, the code to call a common event is something along the lines of:
$gameSystem.reserveCommonEvent...

The important part being reserve meaning its waiting for something before it actually runs the event commands.

If you could figure out what its waiting for, maybe you could force it to load from the menu.


-EDIT-
I apologize, I just reread through your description and realized that your looking for the common event to be called just from selecting the item.

-EDIT 2-
I'm not familiar with a plugin like this already in existence.
Having recently gotten into making my own menus, I believe your answer lies in the ok handler function for the equip window.

Using notetags still might be an easier setup because you won't have to add any hardcoded properties to your equipment.

The contents of the notebox of the current selection could be checked through the okay handler.

Did I read correctly that you have previous coding experience?
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

[Literally everything] is not defined.
Some neat things I made.
Shown to you in the form of an awful Windows Movie Maker Video.
1653453172179.png
Another amazing plugin by Dsiver! Thank you!

Salvage plugin. Craft something you decide you no longer need, or find an item you have no interest in, salvage it for scrap and resources. As you salvage items, gain EXP and level up. The higher your level, the better odds you have at succeeding, and the more material you'll actually acquire.
Harold Jam 2022: Dark Universe game jam is live! https://itch.io/jam/haroldjam22

Forum statistics

Threads
122,110
Messages
1,146,569
Members
160,400
Latest member
shipwill422
Top