This mod also allows the use of TMXs out of battle without teaching them (you only need to have obtained the TM and the necessary badge) this is absolutely not because I kind of forgot to use a vanilla scripts.rxdata or because it's not simple to remove that now. You'll get a warning if instead you manually choose an unavailable mon (or likely a crash if you choose one that is not even implemented). Rolling a random starter will always net a legally available unevolved form. (Its stats will be slightly off until after your first battle with Cain.
The command is only available in the room where you choose your starter. I've made this mod, which allows you to change your starter pokemon you can either choose one or roll it at random.