Running a shop?

diablodevil2

Villager
Member
Joined
Aug 5, 2013
Messages
22
Reaction score
3
First Language
English
Primarily Uses
Heya, I'm pretty new to the recent RPG maker, though I played around with it a little waaaay back when on the Ps1. =p Anywho, I had a thought for making a game kinda comparable to Recettear. 

That is, a game where the focus is on selling things, building up your shop, expanding, etc.

Testing around a little, I was mostly able to get an NPC to appear after opening a shop, when his "hasn't bought yet today" variable was valid. I got him to walk to the player, though not really to the 'counter'. I'd have to have the player walk to him before he'd trigger the buying conversation. I was then able to get him to buy a potion, and leave a few steps before vanishing.

In Recettear, you'd have a bunch of NPC's checking your shop out, but not necessarily end up buying things. They'd also haggle, though I'm not so much heavily invested in making that work. 

I'd just like to be able to open a shop for a set time limit, with NPC's having a chance to walk to the player to buy things based on the price the player set for them. Attached are the three events I was tinkering with to try and get this affect, resulting in the NPC appearing when the time was right, walking close, but stopping when hitting the edge of one of the red-colored events. The player had to walk out to touch him to start the dialog. Not with the action button, but just walking next to him.

I'd really appreciate any suggestions or help with getting this idea to work, and if there's anything else I should put up information wise, I can do that. Thanks a bunch!

events.png
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I'd just like to be able to open a shop for a set time limit, with NPC's having a chance to walk to the player to buy things based on the price the player set for them.
You could create a parallel process event that recognizes when your shop is open.  Then use that to guide the relevant NPCs and have them walk over to your store and remove items and add gold to your inventory.  That should give the impression of someone randomly checking out your shop in real time, which seems to be the affect you're going for.  For a quick and simple example just to give you some idea:

When you open your shop turn on a Switch.  We'll call it Shop Open.  Then make a second switch and call it NPC Buy.

Create a parallel process event like this and stick it on your map.

Wait 60 frames (or however long you want to wait)

Condition: If Switch Shop Open = ON

Control Variables: [Random Variable] = 1 ? 4

Condition: If [Random Variable] = 4

Control Switches: Turn ON Switch NPC Buy.

Then on your NPC event create a new page and set the condition to switch NPC BUY is ON.  Set the page to parallel process, and in your event commands you can create a move route for the NPC to travel to your shop.  You can edit the move route based off variables that correspond to the current circumstances by using more conditions if you need to.

That should give the NPC roughly a 25% chance every second to move toward your shop.  You can use a similar process to make them leave your shop and go back to what they were doing.  And instead of using a random variable to trigger the NPC Buy event you can use variables that correspond to different prices the player has set for specific items if you like.  That would give you a basis for determining what items to decrease and how much gold to increase to the player's inventory.  You can also use this technique to have many NPCs come to your shop at once.

Not 100% sure this is what you were asking for.  So if it wasn't sorry and just ignore this.
 
Last edited by a moderator:

diablodevil2

Villager
Member
Joined
Aug 5, 2013
Messages
22
Reaction score
3
First Language
English
Primarily Uses
This worked fairly well! I have one error, though, where the NPC starts up the buying portion of the event before reaching the counter, and also keeps moving all around during it. Is there a branch to get the NPC to not start talking until they're at the counter, and stopped in place facing the player? 

Thanks a bunch for the help!
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
To your very first problem: events can't pass through other events, unless you set them to 'through on' in the set move route command.


Also, instead of surrounding your signpost with the same event, just make the signpost itself an event, then you don't need all those others around it, blocking the NPC in the first place.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
This worked fairly well! I have one error, though, where the NPC starts up the buying portion of the event before reaching the counter, and also keeps moving all around during it. Is there a branch to get the NPC to not start talking until they're at the counter, and stopped in place facing the player? 

Thanks a bunch for the help!
I'll echo Celianna and say to make sure you set your NPCs to through on at the beginning of their move routes.  That could be causing some of your issues.  You can set them back to through off at the end of the move route, that way you can't walk through them once they are done moving. 

Also, try setting the move route to wait for completion.  That may fix some of your problems also, not sure.  It's hard to say exactly since I can't see your event and what specifically is occurring, so I'm having to guess some here.

Another thing I'm going to add is make sure you turn Off the NPC Buy Switches that trigger the parallel process move route.  Otherwise they will keep moving and that may be what is causing them to keep moving around even when you don't want them to.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top