When you don't have enough money for the inn...

Status
Not open for further replies.

Iamaperson

Villager
Member
Joined
Jan 28, 2018
Messages
29
Reaction score
4
First Language
English
Primarily Uses
RMMV
EDIT: This issue has already been solved. Thank you everyone for the help.

Hi, so... I have another question now. Keeping in mind that I am a complete beginner with RPG Maker software so I don't know things that more experienced rpg makers probably understand well.

I have a magic tutor in my game who I want teaching one of my party members cura (an upgrade of cure - a healing spell). I want him to do this for a price because I don't want it to be that easy to get this new spell so easy early on in the game. But even when you don't have enough gold to buy the spell, he will still teach it to you regardless. This happens in my inns and shops as well and I have no idea how to fix it.

So I was wondering if someone with more expertise will be able to tell me how to fix this issue? Thanks!
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,518
Reaction score
12,052
First Language
English
Primarily Uses
RMMV
If you are doing it through regular shop processing, the player shouldn't be able to buy anything they can't afford.

But if all your inns and shops are evented, you've got to check the gold amount first, and make sure the gold amount is greater than the price. You can create an inn using a quick event (right-click on an unused tile and choose Quick Events from the popup menu, then Inn). Enter the price, and take a look at the event that it creates as a result. You'll see things like this ...

Putting the amount of gold the player has into a variable
Doing a Conditional Branch to check that the amount of gold (in the variable) is equal to or greater than the cost for the service or item
Reducing the party's gold by the cost of the service or item
A message if they don't have enough gold

If you create an inn quick event, you will be able to apply the same logic to evented shops, inns, or your magic tutor.
 

Iamaperson

Villager
Member
Joined
Jan 28, 2018
Messages
29
Reaction score
4
First Language
English
Primarily Uses
RMMV
If you are doing it through regular shop processing, the player shouldn't be able to buy anything they can't afford.

But if all your inns and shops are evented, you've got to check the gold amount first, and make sure the gold amount is greater than the price. You can create an inn using a quick event (right-click on an unused tile and choose Quick Events from the popup menu, then Inn). Enter the price, and take a look at the event that it creates as a result. You'll see things like this ...

Putting the amount of gold the player has into a variable
Doing a Conditional Branch to check that the amount of gold (in the variable) is equal to or greater than the cost for the service or item
Reducing the party's gold by the cost of the service or item
A message if they don't have enough gold

If you create an inn quick event, you will be able to apply the same logic to evented shops, inns, or your magic tutor.
I struggled to understand some of what you just said, but when I used the quick event strategy you mentioned and had a look at the event page of that, I think that gives me a pretty good understanding. Plus I can just use that quick event to implement the magic tutor. Thanks for the help!

And about what you said about shops, you're right. They do stop you from buying things you cant afford. I wasn't even thinking about what I was saying, lol.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,518
Reaction score
12,052
First Language
English
Primarily Uses
RMMV
I just assumed you had a shopkeeper where you were eventing the buying/selling manually. Sometimes you do that, especially if you only want the player to be able to get one of something.

I didn't even think about creating an inn quick event and changing it to be your magic tutor. Excellent idea!
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,633
Reaction score
10,931
First Language
English
Primarily Uses
RMVXA
I would like to strongly recommend that you check out Andar's compilation of info for new users. Among the many excellent things there, you will see links to 2 playable tutorials, one on Event Commands and one on Switches and Variables. Playing through those 2 will give you a firm foundation in them and save you a huge amount of time and frustration in the future.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,518
Reaction score
12,052
First Language
English
Primarily Uses
RMMV
I suggest you change your thread title back to what it originally was. That way, people who have a similar question can find it easily, along with the solution. Imagine you were looking for some help with something, and all you could find in the forum was a heap of threads called "SOLVED".
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,151
Reaction score
7,803
First Language
English
Primarily Uses
RMMV
@Iamaperson Please do as Shaz says and change the title back to something meaningful. You can then report your original post and let us know you are for it to be closed. Thanks!
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,151
Reaction score
7,803
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Werewolf cons: you lose control of yourself once a month and could accidentally kill your friends. Vampire cons: no garlic bread. The choice is simple. Werewolf for sure.
2 huge market drops in 2 days. So glad I sold my non-dividend stocks about 2 weeks ago. And if the dividend ones drop heavily, hey more cheap stocks for me!
My tutorial is live! It covers using Yanfly's weapon unleash to replace the basic attack skill with a more dynamic version depending on which weapon type the actor has equipped. It also includes how to import a custom function used to generate a random number within supplied minimum and maximum values, used in the replaced skills, to give weapons a set damage range.
What can I sing for my sisters birthday...?

>.<'
Well, I'll have you know that I'm still around, looking for opportunity to resurface with some stuffs.

Forum statistics

Threads
94,512
Messages
921,530
Members
124,370
Latest member
epicgamerstyle932983829
Top