Quote: join: (RPGVirtuoso) (mv@whahay-56171450.sympatic...
blade2k » articles & tutorials

jump to:
Tutorials » Game Creation » RPG Maker 200x

Blacksmith System


Reading Article
Author: xtremedrummerguy
Posted on 02/15/2005
print :: back to list
How to make a simple Blacksmith System

:

:Black Smith Guide::

Need ::
Ingredients to make the item
The Item itself
1 Variable for each ingredient
Basic switch/variable knowledge

Making a blacksmith is a very simple, but unique tool. It allows players to collect items and make better items from them by combining them.

First off, make the event with any character set, making sure it's set "Same Layer As Hero." Next, add a variable operation and set a new variable to the number of the first ingredient ( i'll use potions ) you require from the player. Also, you can set a price on it too. Just set a new variable to your current money.

<>Variable Oper: [XXXX: ingredient1]Set, Potion Possessed
<>Variable Oper: [YYYY: ingredient2]Set, Ether Possessed
<>Variable Oper: [ZZZZ: money]Set, Money

Here comes the coding part. But before this, you should have a message explaining what ingredients you need and what item you will be making.

<>Message: I can make you an Elixer, but I require 20 Potions and 10 Ethers. Also a fee of 1000 G. Do you have them?
<>Show Choice: Yes/No
: [Yes] Handler

Here is the branch for making it. But first you have to signify that you have all the items. Here, make branch conditions for each one of your ingredients.

<>Branch: Var [XXXX: ingredient1] is 20 or more
**remember to make it "Greater than or equal to"
<>Branch: Var [YYYY: ingredient2] is 10 or more
<>Branch: Var [ZZZZ: money] is 1000 or more

Now, if all of these are true, you need to take away the ingredients and add the new item.

<>Change Items: Potion 20 Remove
**Do this with the Item Management button; first tab
<>Change Items: Ether 10 Remove
<>Change Money: 1000 Remove
<>Change Items: Elixer 1 Add

After all this, you need to make sure that the blacksmith can reject your player if he does not have all the required ingredients. Thus, after all the "Else Handler" branches, put a rejection message.

:Else Handler
<>Message: You have nothing I can make an Elixer with.

This should work everytime.

::xtremedrummerguy@hotmail.com::