I was inspired by Ccoa's NPC topic, So I decided to do the same with a shop.
I want to find out more things with this, and this is the only thing I found out just yet, hope you find it useful
--------------------------------------------------------------------------
- Thankful shops. #New
- Moneycounting shops #New
- ...
- ...
--------------------------------------------------------------------------
Thankful shops "Thanks for buying/selling/coming!"
Let's say: You want a shop that is grateful if you buy something and gives a small gift in return? Now it's possible, but first: The base!
You start up by making an empty event, inserting a event graphic and then inserting a message like: "Welcome!"
Like this:
http://img411.imageshack.us/img411/4287/event013iz.png[/IMG]
Ok, you have this trader say something, now that isn't special. To calculate if you have spend or received money (by selling stuff) we're going to need a variable. So make a variable which checks the money the player currently has:
http://img119.imageshack.us/img119/9048/event026ya.png[/IMG]
That is a start, now, the shop list. List the things in the shop window you want the shopkeeper/trader to sell to you.
Here is what I choosed for:
http://img411.imageshack.us/img411/2916/event037jy.png[/IMG]
Ok, now we need another variable that also counts your money, only, this one checks áfter you bought/sold or anything. We need this variable to check if you bought/sold anything.
So here is the variable:
http://img102.imageshack.us/img102/7590/event040wi.png[/IMG]
Now the event says something, checks your money count, and then sells something to you. And then checks the money count again in another variable. What next?
Right, we are going to make the calculation to see if you have spend, sold something or just took a look what the shop offers.
How are we going to do that?
We're going to need conditional branches for this. The conditional branch checks wether your money count is great, less or the same before you entered the shop window.
Like this: (Sorry, the event window isn't big enough...':|)
http://img119.imageshack.us/img119/3074/event054qp.png[/IMG]
Alright! RMXP makes the calculation now if you have bought or sold anything. The only thing we need to insert now, is some text.
Here you go:
http://img411.imageshack.us/img411/3857/event068gf.png[/IMG]
Ok we're done here! I'm never going to buy at this trader, though...
Moneycounting shops "You've spend/earned ... Gold!"
We can change this a bit to make it some more interesting, now, this is still a pretty basic shop, we would like to know what we've spend at this shop or earned. Let's do that!
We want to know is: How much money we have spend, to do this, you need to to substract the MoneyCheck2 from the MoneyCheck1 variable. But where do we need to put this? First we need to know that MoneyCheck1 variable is great than the other one, so we put it under the conditional branch which says that the first variable is bigger then variable2:
http://img411.imageshack.us/img411/6125/event076lg.png[/IMG]
Now it calculated the amount of money you spend, but we still don't see that anywhere! Lets put that in the message. You need the code: \v[14] for this, because that show the number of variable 14. Here we go:
http://img161.imageshack.us/img161/2152/event088kt.png[/IMG]
Wow, he counts the amount of money we've given him, he sure is greedy...
Now lets do the same for if you sell something to him.
The thing we need to do is substract the MoneyCheck2 variable from the MoneyCheck1 variable because the second variable is bigger than the first one . Alright?:
http://img161.imageshack.us/img161/7733/event090wh.png[/IMG]
Now we know how much we've earned and how much the trader lost. But, we don't see the amount anywhere? I think you know what to do
That's right: We need to put \v[15] in the message to show the amount. So here is how to do it:
http://img276.imageshack.us/img276/2986/event109qk.png[/IMG]
Alright! We made a decent shop now!
I'll continue add more later. I would like to know what you all think of it. Seeya!
I want to find out more things with this, and this is the only thing I found out just yet, hope you find it useful
--------------------------------------------------------------------------
- Thankful shops. #New
- Moneycounting shops #New
- ...
- ...
--------------------------------------------------------------------------
Let's say: You want a shop that is grateful if you buy something and gives a small gift in return? Now it's possible, but first: The base!
You start up by making an empty event, inserting a event graphic and then inserting a message like: "Welcome!"
Like this:
http://img411.imageshack.us/img411/4287/event013iz.png[/IMG]
Ok, you have this trader say something, now that isn't special. To calculate if you have spend or received money (by selling stuff) we're going to need a variable. So make a variable which checks the money the player currently has:
http://img119.imageshack.us/img119/9048/event026ya.png[/IMG]
That is a start, now, the shop list. List the things in the shop window you want the shopkeeper/trader to sell to you.
Here is what I choosed for:
http://img411.imageshack.us/img411/2916/event037jy.png[/IMG]
Ok, now we need another variable that also counts your money, only, this one checks áfter you bought/sold or anything. We need this variable to check if you bought/sold anything.
So here is the variable:
http://img102.imageshack.us/img102/7590/event040wi.png[/IMG]
Now the event says something, checks your money count, and then sells something to you. And then checks the money count again in another variable. What next?
Right, we are going to make the calculation to see if you have spend, sold something or just took a look what the shop offers.
How are we going to do that?
We're going to need conditional branches for this. The conditional branch checks wether your money count is great, less or the same before you entered the shop window.
Like this: (Sorry, the event window isn't big enough...':|)
http://img119.imageshack.us/img119/3074/event054qp.png[/IMG]
Alright! RMXP makes the calculation now if you have bought or sold anything. The only thing we need to insert now, is some text.
Here you go:
http://img411.imageshack.us/img411/3857/event068gf.png[/IMG]
Ok we're done here! I'm never going to buy at this trader, though...
We can change this a bit to make it some more interesting, now, this is still a pretty basic shop, we would like to know what we've spend at this shop or earned. Let's do that!
We want to know is: How much money we have spend, to do this, you need to to substract the MoneyCheck2 from the MoneyCheck1 variable. But where do we need to put this? First we need to know that MoneyCheck1 variable is great than the other one, so we put it under the conditional branch which says that the first variable is bigger then variable2:
http://img411.imageshack.us/img411/6125/event076lg.png[/IMG]
Now it calculated the amount of money you spend, but we still don't see that anywhere! Lets put that in the message. You need the code: \v[14] for this, because that show the number of variable 14. Here we go:
http://img161.imageshack.us/img161/2152/event088kt.png[/IMG]
Wow, he counts the amount of money we've given him, he sure is greedy...
Now lets do the same for if you sell something to him.
The thing we need to do is substract the MoneyCheck2 variable from the MoneyCheck1 variable because the second variable is bigger than the first one . Alright?:
http://img161.imageshack.us/img161/7733/event090wh.png[/IMG]
Now we know how much we've earned and how much the trader lost. But, we don't see the amount anywhere? I think you know what to do
That's right: We need to put \v[15] in the message to show the amount. So here is how to do it:
http://img276.imageshack.us/img276/2986/event109qk.png[/IMG]
Alright! We made a decent shop now!
I'll continue add more later. I would like to know what you all think of it. Seeya!