How to create a Tarot card reading event, need advice

So I am working on making an NPC in game that gives full tarot readings. Everything is pretty simple except for the actual random selection of the cards. I am wondering if this can be done simply with just an event and few variables/switches or is it something that might work better by having a plugin made that uses a script.

I believe there are about 78 cards in a tarot deck, what I need to do is have the event pick a card at random (easy) but then NOT pick that card again during the current reading. Each reading will choose 10 cards out of the potential 78 to present to the player.

So more or less I just need to know how to pick 10 numbers out of 78 using a random generator without picking the same number twice. Then reset that event after it is done so next time it will choose from the full 78 again.

Any insight into this would be greatly appreciated, thanks!
Well..you could create 78 different switches...make the picked card trigger a switch on, and then put a conditional branch that says: (let's say the event picked "death" card.)
"When "death" is on..." then you just need to make the card picking event again when that switch is already on...
@Binder28 sorry, your idea doesn't work as easy as it sounds, because it will need too many conditionals and there is no way to easily handle that with events.

@Snarkyfork
I can think of a way to make this work, but unfortunately my javascript is too old and limited to give you the code you'll need.
Basically you'll build an array of all card numbers, then select one random element from the array. After that you remove that element from the array and repeat for the next card with the reduced array.
There are commands to make this easy in almost every programming language, but as said my programming skills are a bit rusty and unused - my master in computer engineering is thirty years old.
this is simple combination of script call and event command...
to make array [1 -> 78] then shuffle it (simple shuffle though) and then grab 10 number from it...
it can be then accessed by this._tarotarr[0] -> this._tarotarr[9]
0 -> first number
9 -> 10th number
1607914619696.png

but to make it full tarot card reading... you need 78 conditional FOR EACH DRAW... which will be quite a work...
OR... to make it easier you can use script call to create an object containing "data" of the tarot.
below is example object containing tarot name and description
ex:
Code:
this._tarotDeck = {};
this._tarotDeck[1] = {};
this._tarotDeck[1].name = "Death";
this._tarotDeck[1].desc = "This is Death Card Description";
this._tarotDeck[2] = {};
this._tarotDeck[2].name = "Joker";
this._tarotDeck[2].desc = "This is Joker Card Description";
this._tarotDeck[3] = {};
this._tarotDeck[3].name = "King";
this._tarotDeck[3].desc = "This is King Card Description";
.... until card 78
then you can access the card name combined with random draw above using:
Code:
this._tarotDeck[this._tarotarr[0]].name
this._tarotDeck[this._tarotarr[0]].desc
0 -> first drawn card
1 -> second drawn card
...
9 -> 10th drawn card

example event using 6 example card (did not have time to create 78 card 😀)... and drawing two card from the pool:
example-tarrot.jpg


if you're confused about above example... you can try downloading my plugin demo... and go to map002 there... i put the example event there (event005)... there's also the simple number drawing (1-78) version i mentioned above event too (event004)
hope this help...
Thanks for the feedback, I will try giving Estriole's event a shot. I am not so great with javascript so I may have to pop into the classifieds and see if someone might be willing to commission a plugin that makes it simple for me.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-create-a-tarot-card-reading-event-need-advice.130963/