RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Randomized Items/Weapons/Armors in shop?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 88
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?
« Last Edit: April 10, 2010, 12:39:23 AM by Rogey »

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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.

**
Rep:
Level 88
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. ;_;

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
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.

**
Rep:
Level 88
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.