All the Pokemon in my part were obtained (and partially trained) legally. I edited their IV, EV, moves, natures, and ability on Chadelure (it had flame body). As far as I can tell things should line up. I regenerated their PID to match their new natures (in both Pokesav and Pokegen, the save file is the results from Pokesav, because that file has the least amount of tampering). For the life of me I can't figure out why they aren't allowed in random battle, but this is the first time doing this so there could be something obvious I'm overlooking.