The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: shane2243 on December 24, 2009, 07:13:29 AM

Title: (tut)crafting in a shop without scripts....
Post by: shane2243 on December 24, 2009, 07:13:29 AM
I tried to use scripts to create a synthesis shop in my game, but every error ever popped up when i tried, so i decided to make one using events, it's not perfect, and it's probably obvious to most people, but I wanted to help if I could.

Ok so first make an event square, can be anything, from a chest to a dead bird.

Then think of something you would synthesize, my examples are hi-potions and bronze swords. Next you need to think of the ingredients, and whether you want to charge your players for the service. For a bronze sword i used 1 bronze bar and 10g, the bronze bar is an item i needed to make myself (as I'm sure you're aware).

Then go to the event, and you need to make the event go to some sort of menu, i've kept all of mine in the message box.
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi112.photobucket.com%2Falbums%2Fn167%2Fshane2243%2FUntitled.png&hash=c9b0ff06e8d0bce317fb95ac9a6cde004029c0ae)


As you can see the even is unfinished, but it is tested.
To keep this in the message box, I i kept it all based on choices, the first being "synthesize or no?" after I chose which category, weapons or armor, I kept it to this because I am located this in a weapons shop, I plan to add an alchemist to the inn. In this event I went down one path, but it shows all options clearly, after the categories, we place items in it, again through choices, mine reads "Bronze sword, Bronze knife, Bronze spear, Leave"
since you can only have 4 choices at once, you must either limit the amount each person can make, or add extra pages, in which case you would replace "Leave" with "Next page", in having a next page, this does bring up other difficulties, such as "do I have items, and scroll through every page to exit, or two items per page and be able to leave?" this is entirely up to you.

Now say you want to know what you need to make an item and choose if its worth it before making it? Easy, again through choices, after the bronze sword is chosen set up some text, e.g. "1 bronze bar and 10g needed to make this, continue?" and then another choice "yes/no" after yes we need a conditional branch, this will check if we have the items before it just makes it for us, so select conditional and go to page 4, items, bronze bar and select 1 needed. after that we need to check if we have enough gold or not, so another conditional branch underneath the "yes" section of the previous branch, page 4, gold, 10 needed.

under the no sections of those branches a simple "not enough [insert item name here]" message should suffice.

Then after those we have events to take the money and item out and place the sword in.

I hope this helps at least one person, as I found it hard to have a working creation system in my game.

screenshots of working event:
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi112.photobucket.com%2Falbums%2Fn167%2Fshane2243%2FUntitled1-1.png&hash=1467ec332c40ec99a5677b3519f71a3972893940)



[edit]---I have just noticed that it doesn't allow for 2 or more of the same item to be required, I am working on that now though.
Title: Re: (tut)crafting in a shop without scripts....
Post by: Grafikal on December 24, 2009, 07:40:27 AM
It'll be tricky and -a lot- of work. If you get this working completely, I'll move it to the database.
Title: Re: (tut)crafting in a shop without scripts....
Post by: shane2243 on December 24, 2009, 07:56:03 AM
my photobucket isn't working right now so I cant add a screenshot but I will when I can,

I have a kind of fix, one that would satisfy me anyway.

the even screen reads like this:
Spoiler for:
:   When [bronze armor]
    @>Text:You need 2 bronze bars and 25G
:              :Continue?
@>Show choices:Yes, No
:    When [Yes}
@>Conditional branch: [bronze bar] in inventory
@change items: [bronze bar], -1
@>conditional branch: [bronze bar] in inventory
   @>conditional branch: Gold 25 or more
      @>change gold: -25
      @>change items: [Bronze bar], -1(added with the one before, total of 2)
      @>change armor:[bronze armor], +1
      @>play ME: '011-item02', 100, 100
      @>
     :  Else
      @>text: Sorry you lack the funds
      @>
     :  Branch End
    @>
   :  Else
    @>Text: you dont have enough bronze bars
    @>
   :  Else
    @>Text: you dont have enough bronze bars
    @>Change items: [bronze bar], +1 (giving back the one taken away earlier)
    @>
   :  Branch end.



[edit] screenshot
Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi112.photobucket.com%2Falbums%2Fn167%2Fshane2243%2Fbronzebars.png&hash=1104b0ccbe15a78d2bc895a1492f26cb164e533c)
I realize this way will involve a long event, so i am working on making it smaller and easier to create.

that said, it only took me 5 mins to make this one, so it's not overly time consuming
Title: Re: (tut)crafting in a shop without scripts....
Post by: zane203 on December 27, 2009, 05:55:05 PM
Oh man this is simple and nice, congratz.

might i suggest though, that this can be taken to a whole nother level with variables?

it would be a lot of issues trying to fit all craft able items in an event page. all though possible, it'd be better to send to a "map" menu dealing with variables =D

I may just do this for my next project.

But food for thought ^^
Title: Re: (tut)crafting in a shop without scripts....
Post by: shane2243 on December 28, 2009, 10:31:30 PM
Oh man this is simple and nice, congratz.

might i suggest though, that this can be taken to a whole nother level with variables?

it would be a lot of issues trying to fit all craft able items in an event page. all though possible, it'd be better to send to a "map" menu dealing with variables =D

I may just do this for my next project.

But food for thought ^^


thats a good idea actually, but atm im a bit of a retard with variables, so i'll need to teach myself to use them properly, thanks for the advice =]]