Is there a way to have items created by codes?

First off, I hope this is the right forum to post this in and if it's not I'm really sorry, please move it to the correct place.

Secondly, what I mean is, if someone were to find a code early on in the game then input that code into a machine later on to create that item. So for example:

Player finds a book in a library about axes and within that book is a code like A1Df6a.
They find a note elsewhere within the game with the code 5Tg9XQ for a bow.

Later on in the game they find a machine that you can input codes into. When the player enters A1Df6a it comes up saying something like - "You will receive Axe of Strength. Cost = 10 Hardwood, 15 Iron. Would you like you to make it?". If the player chooses yes and has enough materials they receive an Axe of Strength. If they choose yes and don't have the mats required it will tell them something like - "Not enough materials." They can then type in 5Tg9XQ and the same thing will happen but for a bow instead, again only possible if they have the required mats. The player can input the codes as many times as they would like to get as many of the item as they want, but only if they have enough mats to do so.

I was thinking it might be possible through conditional branches and variables, but then I couldn't work out how to allow the input for a code. I could also be talking complete rubbish and something like this isn't even possible.
Name Input into a dummy actor - don't remember if that's just letters or numbers as well
I haven't used this before, but if you need a plug-in, this might work for you: LINK
Any particular reason for the player enter the code?
I mean, trying to memorize or take real notes of the codes would be really annoying for me as a player.
While I agree that having to memorise and enter codes for things like getting a regular new piece of equipment is rather annoying and tedious, I've seen reasonable use of it in games like Golden Sun (for transferring data from one game to the other), and a few games like Megaman: Command Mission X (where you input specific codes into a machine for special items you can't get anywhere else). It all depends on how it's used, I guess.
@Susan Yeah I grew up memorizing codes and commands.
For instance, lot's of games used passwords instead of save files, but I guess it's just because the hardware was very limited back then, there are lots of other tricks the developers used to work around those limitations. That's probably the reason why this approach is mostly dead.

Of course we still have cases of modern games using this kind of codes for some features, but in general they are not part of the actual game play, for instance, unlocking content (characters, costumes...) or sharing something between friends that play the same game.
The difference is, for what I can see, @Shikitsune wants to use it for some sort of crafting, and it seems to be repeatable.
Thank you all for the messages!

I tried the plugin @Susan linked but alas it kept coming up with an error. 🙁

I then tried @Shaz 's method with the dummy actors and it's worked exactly how I was hoping it would, thank you so much!

@Lantiz The system idea I had in mind was something similar to Shin Megami Tensei: Strange Journey for example. Where you had the ability to put in a password to get demons, the password was different for even the same demon but depended on their stats, so people could share codes for their demons with particular skill sets and stats etc. Of course you needed to be either the same level or higher than the demon, and have enough gold to summon them so you couldn't just use a beefed up max level demon at the start of the game and faceroll the whole thing.

I'm trying to do something similar with armor and weapons, but more simplified. The code will only be for the base item, so for example if you got the code for Axe of Strength, then upgraded it to say +4. There will not be a code for a +4 version and you can only craft the base item. The reason for the material costs too is to limit the ability to craft the top end armor at the start.

The craft system is not vital for the gameplay, you can acquire most items through the usual means. However in case you accidentally discard, sell or even use an item in a synthesis, you can then regain the original item back or if you know the code for the synthesized item, you can just create it (mats allowing) without using up one of your items. Like with Final Fantasy VIII, you could turn the Triple Triad Cards into items, however with the character cards you could only acquire one of them. So if you refined it into items, you'd lost it forever. This is a way to allow the player to regain the used item if they wish. There will also be some things that can only be gained through finding the code such as special armor or vanity items, but it isn't required. It's just something fun.
I prefer Shaz's suggestion as well. If I had seen it before posting the link, I wouldn't have suggested the plug-in. In my opinion, it's better to try to event something rather than add scripts that could do the exact same thing. Sorry the plug-in didn't work, though. It must have broke with one of MV's updates. Good luck with your game. 🙂
@Shikitsune sounds a lot better [:

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-have-items-created-by-codes.83165/