Help Creating an Item Trade/Craft System

OnlySlightlySane

Villager
Member
Joined
Aug 4, 2013
Messages
20
Reaction score
0
First Language
English
Primarily Uses
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.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV
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.
 

OnlySlightlySane

Villager
Member
Joined
Aug 4, 2013
Messages
20
Reaction score
0
First Language
English
Primarily Uses
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 :)
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
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).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@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...
 
Last edited by a moderator:

OnlySlightlySane

Villager
Member
Joined
Aug 4, 2013
Messages
20
Reaction score
0
First Language
English
Primarily Uses
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
The recipe is done via notetags on the item itself
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
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!
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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
 
Last edited by a moderator:

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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 :)
 
Last edited by a moderator:

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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. :)
 
Last edited by a moderator:

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Ahh. Looks like I got some updating to do then . :)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
only if you want more pages though... that script is actually nice, + you can use it for other things too
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
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.
 

OnlySlightlySane

Villager
Member
Joined
Aug 4, 2013
Messages
20
Reaction score
0
First Language
English
Primarily Uses
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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.
 
Last edited by a moderator:

Tigersong

Furry Fellow
Veteran
Joined
Oct 22, 2012
Messages
452
Reaction score
44
First Language
English
Primarily Uses
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top