RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
(tut)crafting in a shop without scripts....

0 Members and 2 Guests are viewing this topic.

**
Rep:
Level 82
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:


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:



[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.
« Last Edit: December 24, 2009, 07:18:31 AM by shane2243 »

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
It'll be tricky and -a lot- of work. If you get this working completely, I'll move it to the database.

**
Rep:
Level 82
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:
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
« Last Edit: December 24, 2009, 08:00:41 AM by shane2243 »

**
Rep: +0/-0Level 82
Gami Shin ZenOokami
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 ^^

**
Rep:
Level 82
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 =]]