MZ wepon upgrade work around

i dont have any plugins for wepon upgrade so i want to make a work around.

i was thinking of making a check that searches your inventory for two materials commonly used for crafting then subtracts the material

talk to the blacksmith > activate the check > if you have enough for the first tier it will open a menu with all the wepon tiers > when you select a tier it will check again > once you made the purchace it will kick you out of the menu so you dont abuse and buy all the items in that list.

if you dont have enough material for tier 2 but you have enough for tier 1 and you select tier 2 it will kick you out and try again. im pretty sure this is all i need to find out because if there is anything else i need i can work it out myself

any idea how to make that?
that is basic eventing with variables

1) control variable - game data to get the number of item in inventory
2) conditional branch if it is enough
3) show choice as to what to do
4) change items to gain the new one and loose the old one
that is basic eventing with variables

1) control variable - game data to get the number of item in inventory
2) conditional branch if it is enough
3) show choice as to what to do
4) change items to gain the new one and loose the old one

0)ad a label on top of the variable check
.
.
.
5)once you do whatever transaction you wanted jump to the label to "kick out" of the transaction but not from the menu, re-talking to the blacksmith can get annoying if you want to do it several times in a row, its a QoL thing but in the long run its appreciated.
6)Be sure to add an "exit" option on the menu to not get stuck in label jumping 😴
i got it working after a while but i want it to check for two items instead of one.

if thats not possible then ill just make it check for one item per tier
i want it to check for two items instead of one.
that goes the same way as checking for one item (or checking for five items)
you need to use control variable to get the number of the items - either one after another with the same variable or with five different variables. If you're new to variables its usually better to use five different variables.
then you need to check the values with five conditional branch commands - and use the indention to chain the conditional branches if all conditions need to be true.

I STRONGLY suggest youwork through one of the eventing tutorials to learn how to use the conditional branch command and variables, because you will need this basic knowledge thousands of times when making your game.

Original thread: https://forums.rpgmakerweb.com/threads/mz-wepon-upgrade-work-around.129496/