Store used item in variable

Hullo, me again.
I have been working on a menu that is based only on the Item Select window, and it's working really well for what I want. Essentially, the way it works is with two variables:

Item select - player selects Item X which is stored in Var1

If Var1 =/= Var2:
Show choices: A = Equip, B = Cancel
If A = Equip:
Var2 = Var1
And some stuff happens.

If Var1 = Var2:
Show choices: A = Unequip, B = Cancel
If A = Unequip:
Var 2 = 0
And some stuff happens.

My problem is that it is incredibly difficult to find any plugins or other functions that affect what the Item Select window looks like. Most plugins that affect the Menu don't apply the same to the Item Select window either. So while it has the right functionality, I can't make it look the way I want at all.

Therefore, I am thinking of changing back to using the item menu. Ideally, I want to make a common event trigger on item use that will do exactly the same as the above. However, I can't find any script command that would set Var1 to the ID of Item X in the same way the Select Item function does.

Ideally what would happen is:
1. Player selects item in menu (for example, "Seed1") - the item would be set to Scope: None, Consumable: No
2. Seed1 ID is stored in Var1
3. Options appear to equip/unequip or cancel (as above)
3. If "equip", stuff happens

Does anyone have ideas for how to make Step 2 happen? Is there a script call to find the ID of the currently used item that I just haven't spotted yet?

I am purposefully avoiding using armor/weapons at the moment, unless it would be otherwise impossible to do what I want. Thanks!
If you're not using armor or weapons, then how do you "equip" your seed? Are you not actually using equipment slots, and that's just terminology?

It's frankly more straightforward to code this than it is to try to event it. Of course, depending on your knowledge set it might not be easier...

Of course, you can use coding (or possibly things like SRD's HUD Maker? Or Graphical Design Mode?) to change how the Item Select window looks, too.
You'd have to use a plugin like this (not free for commercial)

or you can do it with Triacontane Common Event in Menu plugin

If you use the Triacontane plugin you will have to do some scripting to get it to do what you want. Below will show different messages if the item selected is item id 1
Is there a script call to find the ID of the currently used item that I just haven't spotted yet?
Indeed there is: $gameParty.lastItem().
If you're not using armor or weapons, then how do you "equip" your seed? Are you not actually using equipment slots, and that's just terminology?
I didn't explain it very well - it's more of a terminology thing. I also use this to let the character "hold" items that are not seeds, like berries, rock, etc and then do stuff in the game depending on what the character is "holding" (based on the ID stored in the variable), for example.

Of course, you can use coding (or possibly things like SRD's HUD Maker? Or Graphical Design Mode?) to change how the Item Select window looks, too.
Graphical Design Mode sort of worked for this, but I need to look into it way more. I tried using SRD's HUD maker to add background images etc to the Select menu based on a variable I added to the event just before opening the select window, but very confusingly, it only seems to show up sometimes and not others with no clear pattern as to why that I can discern. I will continue to play around with both but that's my barrier at the moment.

Indeed there is: $gameParty.lastItem().
That seems to be working! Thank you very much!

@AquaEcho I had a look at the plugins you suggested and the one by Triacontane looks very promising in that I would love to have the text box or selection box show over the menu, without closing the menu for it. But I can't figure out how to translate the page into English (my browser extensions just aren't doing it for some reason). Is there a trick to it or is it a matter of using Google Translate on it? Thanks for your suggestions!

Either way I consider this solved for now.
@AquaEcho I had a look at the plugins you suggested and the one by Triacontane looks very promising in that I would love to have the text box or selection box show over the menu, without closing the menu for it. But I can't figure out how to translate the page into English (my browser extensions just aren't doing it for some reason). Is there a trick to it or is it a matter of using Google Translate on it? Thanks for your suggestions!
Chrome browser will autotranslate a page in a foreign language with Google Translate (you can right click the page and tell it to translate if it doesn't kick in automatically). Alternatively, I've found ChatGPT's translations are good enough for plugin instructions even though I get angry reactions every time I suggest using it for that.

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/store-used-item-in-variable.161206/