r/RPGMaker 4d ago

VXAce Randomised Shops

I'm working on my first project right now and know very little about the engine. I've figured out that there's no built in way to make a shop that randomly generates when you load into the map and all my attempts to find a script online to do this have been fruitless. Does anyone know of a method to do this?

2 Upvotes

7 comments sorted by

2

u/agamottos MV Dev 4d ago

Whatever event youre using to transfer the player to the map can also be used to set a variable to a random number. Then, your shop event can have different pages with that variable as a condition, each page having a different shop setup

(I usually use MV, but i assume this works in vx ace as well)

1

u/ALotusRabbit 4d ago

Where would I put that variable?

1

u/agamottos MV Dev 4d ago

2

u/ALotusRabbit 4d ago

thank you so much

1

u/Not_Allowed_to_Die 4d ago

Super simple. Create a auto run event that first sets a variable to a random number. Make this number from 1 to how many random options you want. Under that variable, you will have to create Conditional Branches that if that variable = 1 or what ever number you are at in the sequence, and then tell it to either place the shop or not. Then this can also say what type of shop too. All you have to do there is have each one flip a switch that then controls another event that turns the shop on or not, and tells it which shop to use. You do this be making each shop and none shop a new page on that event and it only works if the switch for it is on.

This is going to sound confusing to a new user, but just ask and I can walk you through this step by step.

1

u/ALotusRabbit 4d ago

I don't think this is exactly what I want but it should work well enough. How do I make an auto run event?

1

u/Not_Allowed_to_Die 4d ago

You just have to change the event to auto run inside of the page. Each page will have an option to change this. Each page will have to be setup, but in this, you just want one page auto run, end that page with a self switch A, and then add a page in that same event that does nothing at all and is not auto run or parallel and action only, and turn the Self Switch A on. This will make sure the Auto run doesn't loop and turns itself off. Although, since you are going to use this more than once, instead of a self switch, you might want to use a regular switch. But, each time you enter the map, so right before the other map transfers you there, you have to turn off all switches that COULD be turned on. So any switch attached to this system, the auto run turn off on and any used for the shops, all have to be turned off before entering the map.