Help Creating an Item Trade/Craft System

I've been working on a project and have decided to incorporate an NPC who can fashion magical gems from shards of like gems (Example, 3 Ruby Shards =1 Blaze Gem) I know I could always use a conditional branch  that would flow similarly to

If player has:

3 Ruby Shards in inventory

then

-3 Ruby Shards

+ 1 Blaze Gem

But that system would only be convenient if I was only trading for one type of gem, I have several types plus I also want to have other NPCs craft other useful items such as Potions and Poisons if I can bring them the correct items.

I'm sure there is a script somewhere that allows for a currency other than gold to be used, but I don't know what it would be called or how to look for it. If anyone could give me insight I would greatly appreciate it.
There are some good crafting systems scripts available if you feel eventing it is too much. I am on my phone right now so I can't look them up. But if you go into the scripts section there is a thread with a link to a list of many scripts.
There are a lot of different crafting scripts that you can use. Here's one that I use often with my games:

http://mrbubblewand.wordpress.com/2013/02/06/tactics-ogre-psp-crafting-system-v1-11-update/
mlogan, I checked the script section but most of the scripts are for limited trade, I need something that would be infinite.

Uzuki, I looked at the script you recommended but it's not quite what I'm looking for. I'm looking for a script that would work only with an NPC and not available to use by the player in the field or anywhere else.

Thanks to both of you for responding to the thread, I'm still looking for more scripts to use and if either of you have more info I would welcome it 🙂
If I'm remembering it correctly the player can't accesse it in their menu. You have to set up a script call with an Event (AKA an NPC).
@Only - Unless you add a command to the menu that calls that scene, it's not accessible by the user from the menu


If you use that script, the only way the player can access it is via ways that you set-up yourself. There's actually no default way to show it, it's all up to you...
I've taken a good look at the Mr. Bubble script, and am finding its interface very confusing. The directions of how to program a crafting recipe seem easy enough, however I can't seem to find a specific place to put the custom recipe... I feel like it's a very simple mistake and I should be able to do it, but could someone explain the script interface to me? Or perhaps help me find a video that would show how to properly use the script?
The recipe is done via notetags on the item itself
It doe's look confusing when you first look at it. But once you successfully make your first crafting book, everything will be easy-peasy lemon squeezy! But to help you along I'll help you along step by step:

1. The first thing we're going to do is make an recipe book. For the intents of this short tutorial We'll be naming it "Codex of Weaponry". Go to the item menu and create the Codex of Weaponry. Now you add these lines in the notetag box:

<recipebook>
 setting
 setting
</recipebook>

See between the recipebook tags where it says setting? We're going to need to change that so the book will need to be able to create weapons. So let's change it to look like this:

<recipebook>
 weapon: 20, 21, 22
 armor: 20, 21, 22
</recipebook>

Okay now we have the weapons and armours that this book will make. The numbers are the IDs of the weapons & armours that this book will be able to make. So with that out of the way it's time to make the it to make the items needed to craft the weapons.

2. Next let's make weapon number 21, which I will list as "Steel Sword". Create the Steel Sword in the Weapon Section and put these tags in the notebox:

<ingredients>
 item: 10 x3

 weapon: 20

 gold: 300

</ingredients>

Now we have our Ingredient setup. In the item section 10 is the ID of the item and the x3 is number of them that will be needed to make the Steel Sword. Go to the item section and make Item number 10, which we will call "Steel Ore". Weapon 20 is the ID of the weapon that will also be needed to make the Steel Sword. Go to the wepon section and make number 20 and call it "Iron Sword". Gold is how much the you will pay to craft it.

3. Now it's time to make the crafting NPC. Make the event and add this Script Call: call_tocrafting_scene

4. Boot up your game and acquire all the items needed. Which will include three Steel Ores, an Iron Sword, and 300 gold. Talk to the crafting NPC and you'll be Swinging a newly made Steel Sword in no time!
To Uzuki: I was gonna jerry rig my own crafting system together, but after I saw the layout of this, and how it all works, I'm gonna go with Bubble's script. That's awesome, and rediculiously easy to set up.

After seeing your post, I thought to myself, it couldn't have been scripted to be that flexible/easy to work with right. Yea, then I saw his monster of a script(It's like over 2000 lines long), it must've took him months to come up with that.

Edit: Damn scripts are always so Tempermental. I tried puting it together to run a fast test on it, and I'm getting a error message sigh, that reads: line 1152 NameError occured

unitialized constant Object:Window_InfoPages
It now requires Mr. Bubble's Info Pages script you know... It was written on the script page (the one with the download)


Sometimes you really need to read everything first before trying to simply copy-paste a script
It now requires Mr. Bubble's Info Pages script you know... It was written on the script page (the one with the download)

Sometimes you really need to read everything first before trying to simply copy-paste a script
Hm ok(wow a 2000+ line script needs another, to run it, that's pretty funny), I suppose I was a bit hasty, I'll look into it, thanks.

Edit: lol yea all fixed, serves me right for not reading it.

This is awesome. You know what I'm gonna do, make a recipe book for each item that I want craftible, this way you need to find each book to make the items, more emphasis on treasure hunting ftw 🙂
It now requires Mr. Bubble's Info Pages script you know... It was written on the script page (the one with the download)

Sometimes you really need to read everything first before trying to simply copy-paste a script
Really? It's working perfectly fine on my front. Mind you I think I haven't updated it since last August I belive.
It's not funny, not a bit... Do you know that most programs out there are composed of LOTS of source files that are thousands of line long that require each other?


@Uzuki - he updated it after he released the info pages script. it does wonders. 🙂
Ahh. Looks like I got some updating to do then . 🙂
only if you want more pages though... that script is actually nice, + you can use it for other things too
Well sweet Mother Taresa on the hood of a freakin' Mercades Benz! This info script is great! Looks like I'm gonna need to go back and up date all my scripts.
I am so surprised at how many hits this thread has gotten since I've posted it, good lord!

Uzuki: Your step-by-step walk-through really helped me out. I'm sure with that now I'll be able to set up a crafting book and other things.

I finally managed to get a system that was very close to what I wanted, but only down side was it took me about two hours to get it to work properly. I ended up making the Gem Shards a consumable item, and when the item was consumed, it would register that you had collected one. I then used a conditional branch to look at how many of a certain type of shard you had collected. If ten or more were collected, you could trade them for another item. Once the trade was completed, the variable data for the ten shards needed for the trade would be erased.

Well, I believe I've gotten all the information I needed, thanks bunch to everyone who had input and advice for me. Could a moderator please close the thread?
You could have just checked the amount of Shards you have using Change Variables then a conditional branch, then if >= 10, reduce by 10 and give the new item.


Then use the crafting script in case you needs lots more item trades in 1 scene.
I'm just itching to say this before the thread's closed... so I will. Did you know that, in olden times, people thought gems had special powers? I'm not an expert on the subject, but what comes to mind is the ruby being able to stop a person from losing blood.

Might be interesting to research these superstitions and incorporate them into your game.

Tiger

Original thread: https://forums.rpgmakerweb.com/threads/help-creating-an-item-trade-craft-system.23543/