I'm working on a personal project in RMXP, a maze-style game. In the first level, there are five chests. One of them has a key, one has a power-up, the rest are empty. I know how to make these things work, but I'm trying to randomise which chests have what without repeats or missing things out.
I've tried setting up a variable for the key with a random number between 1 and 5, and having each chest check for a different number in that range, only giving a key if it matches. However, I don't want to have a chest give more than one thing, for example a key AND a power-up (and/or a spell, which appears in later levels) from the same chest. I can't think of a way to set this up without having a mess of commands that is impossible to keep track of and keep free from errors.
Ideally, what I'd like to do is to set each level with a list of numbers to determine what is in a chest (1 = key, 2 = power-up, 3 = empty, etc.). Then I want each chest in the room to randomly select a number from that list, but without any repeats or missing numbers. It's the second part I'm having trouble with. Is there a way? Am I missing something? Any help with this would be appreciated!