MZ Keeping randomized values after saving

Hello!
I'd like to preface this by saying that I am a total newbie to scripting, in fact, I am making my very first plugin.
I saw someone talking about adapting the boardgame Clue to RPG Maker, and I thought that since the algorithm of Clue is quite simple, it would be a good plugin idea to practice with.
The plugin works fine, The 'hidden' cards are selected successfuly (randomly), and every suspect gets a set of three random cards from the deck. The player has to guess each of these cards and by process of elimination, guess the three hidden cards.
The problem I run into is that the script runs everytime the game is run, and only once. Meaning that when you run the game, the hidden cards and everyone's hand is selected, and it will remain the same whether you're playing a new game or a saved game. It also means that the saved game's cards change every time you re-run the game.
My first idea was to put the randomization in a plugin command, and run the command in an event that will only run once, but then the arrays containing the cards are said to not be defined. I'm not sure if the command is not running properly or what is the problem.
I tried to look it up in the docs but I couldn't find a solution,
any help will be welcome!
I initialize all my new game variables on an event in the first map with a self switch A at the end, then a blank self switch A page.

I guess if you were doing it in a plugin file you would just alias one of the methods that are run upon selecting a new game and append your code there.
It finally works!
I couldn't figure out quite how to append to an alias (Would love a tutorial for this, and how to find RMMZ methods if you have links) but what you said gave me an idea;
Instead of having the players' hands handeled in the plugin itself, which was a silly way of doing things in retrospect; I instead left the plugin with just a list of functions, then created the arrays containing the players' hands in a scripted event with a second blank self switch A page, and it seemed to work well enough once I tweeked it a bit.
For some reasons, I couldn't declare variables in the event script itself (which is what I was trying to do before), but declaring them empty in the plugin, then assigning the value with an event script seems to work fine!

EDIT: Never mind, under further testing, it seems whenever I exist and return to the game, the variables are reset in the save game to the empty ones declared in the plugin. *sigh*, I guess I have to look for the new game methods and learn how to append to that ...

Original thread: https://forums.rpgmakerweb.com/threads/keeping-randomized-values-after-saving.167713/