Anyone had luck making a player run stall?

One of the key elements in my game will be the ability to open a stall and sell to passing NPC characters.

I need to be able to set the event up so the player is standing in one spot and customers spawn and walk up to the player initiating an interaction to buy products from them, based on what the player currently is holding.

Hoping to have the system run entirely in engine using events, as i cant code in Java or HTML.

I'm unsure how to go about this, i have spent some time scratching my head and trying to find a system online for use in MV but found nothing.

The system i want is inspired by games like HM:Grand bazzar and Recettear.
I know you will need a TON of conditional checks to have any shot of this. You can use a conditional check if player has item x in inventory, then (do whatever you want the NPC to do about it).

I highly doubt you can make it also have random NPC's, but you can probably go for pseudo random by having the engine check for a random # from 1 - 10 (or higher if you have more than 10 NPC's that can spawn), and depending on what # it rolls, that is the NPC that approaches.

That's my off the cuff idea of how to make it. Start by seeing if you can get NPC's to spawn to approach the stall (you'll probably have to do it one at a time, though I think you can put in random ones that just walk by with no issue), then once that is going maybe work on the conditional checks for if player has this, then do (whatever you want them to do).
i figured it would require heaps of conditionals.

I was going to do like a dice roll (random number generator) to determine after X amount of time if a NPC event spawns, and then one for what NPC it is, Handled by a common event.

But HOW to spawn them is the main thing i am stuck on.

I have an event tile i want them to spawn on, but i dont know what process i need to use to make it spawn, and how to store information about the NPC's

I'm hoping that can be done in engine, rather then needing plugins.
i figured it would require heaps of conditionals.

I was going to do like a dice roll (random number generator) to determine after X amount of time if a NPC event spawns, and then one for what NPC it is, Handled by a common event.

But HOW to spawn them is the main thing i am stuck on.

I have an event tile i want them to spawn on, but i dont know what process i need to use to make it spawn, and how to store information about the NPC's

I'm hoping that can be done in engine, rather then needing plugins.
Use variables to store information about them, it would be a lot of variables probably but outside of scripting this is the only way I can think of. To spawn them in, just have another event somewhere on the map that isn't ran until a switch is active, when the switch is active move the event with one of the event commands that let you move an event or player to X/Y coordinates.
Use variables to store information about them, it would be a lot of variables probably but outside of scripting this is the only way I can think of. To spawn them in, just have another event somewhere on the map that isn't ran until a switch is active, when the switch is active move the event with one of the event commands that let you move an event or player to X/Y coordinates.

I could potentially make an event that triggers a page to show a specific NPC that walks to the player, makes a purchase then moves to the exit then resets state to invisible.

How can i make an even set a random number to a variable within a number range?
That's under the command to set a variable to a value. One of the choices is random, and you put the range in there.
That's under the command to set a variable to a value. One of the choices is random, and you put the range in there.
.... well so it is, i feel kinda stupid 😛

I have spent about 8 hours over the last couple days messing with variables and missed it completely.
Cheers!

I have run into another issue, is there a way to lock player movement when a switch is on? was planning on setting it in a common event, its so the player doesn't move around while the store is open.

UPDATE:
I got the event running the bare basics now, when i am in the selling location, it turns on a switch that activates the selling common event, the even checks to see if there is an active customer, if not it rolls a number, the result is set to a variable that calls on a corresponding conditional branch, that sets one of the customer spawn events to a specific value that activates a specific page of the event, that causes it to walk towards the player.

When it encounters the player on contact it opens a placeholder conversation, when the conversation is done, it moves along a set path to the exit, then resets its page to 0 resetting it, and deactivating the active customer switch, making it looks as if the customer left, and resetting the common event that spawns customers so a new one spawns.

Its rudimentary but will work well as a foundation.

I worked around the need to lock the player in place, by placing event tiles around the player so if he tries to leave the spot it asks if he wants to stop selling, if not moves him back, if he does it resets everything.

Original thread: https://forums.rpgmakerweb.com/threads/anyone-had-luck-making-a-player-run-stall.85593/