The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Rogey on April 05, 2010, 07:11:24 PM

Title: [RESOLVED] Randomized Items/Weapons/Armors in shop?
Post by: Rogey on April 05, 2010, 07:11:24 PM
Hey everyone, wondering if anyone would help with an event that makes items randomly appear in shops, me and my friend are making a Phantasy Star Online style game, so we need some randumness in the shops lol. Can anyone throw some ideas my way?
Title: Re: Randomized Items/Weapons/Armors in shop?
Post by: Grafikal on April 05, 2010, 07:31:19 PM
The only way to do this via events would to create many different shops that contain different items. Then in the event to open the shop, make the event a conditional branch. At the beginning, set a variable at random from 0 through X (where X is one less than the number of shops you created). Then after that initial variable in the conditional branch, make each shop in there corresponding to a different number (0, 1, 2 ... X).

So for instance, the player talks to the shopkeeper. When the event starts, a random number will be chosen (via the variable) then the shop would open up. The shop that opens up would correspond with what number the variable landed on at the beginning of the event.

But yeah, the point is just that you need to make a lot of different shops.

You can't place items in a shop through events unless you make the shop. What I mean, is that if something happens in the game that would otherwise add a special item to a shop, you can't just add it into a shop that exists. You'd have to pre-make that shop and then when that even occurs, swap it out, in-game, with the secondary shop that has that special item.

You could with scripts though.
Title: Re: Randomized Items/Weapons/Armors in shop?
Post by: Rogey on April 05, 2010, 08:11:30 PM
Thanks grafikal, and as usual, the answer is simple. Though I rarely if ever work with variables so I never think to use them :\

I actually think I may start a small team thread to see if some people want to assist me and my friend on this game, because there's a lot of game left to do and we can't implement a lot of features from the original PSO into our game because we don't know how.

Ugh, makes me feel like crap saying all this despite working with XP for some years now. ;_;
Title: Re: Randomized Items/Weapons/Armors in shop?
Post by: Grafikal on April 05, 2010, 09:10:59 PM
good luck with the team. teams are hard to form on this site unless the game is extremely convincing and the leader is very motivational.
Title: Re: Randomized Items/Weapons/Armors in shop?
Post by: Rogey on April 05, 2010, 09:27:47 PM
Thanks lol, but real talk, I'd actually just want 1 maybe 2 people at most to just assist us in importing some of PSO's features through either clever events or big bad scripts. Perhaps I should've said squad rather than team.