However, if both players have identical Trainer IDs and secret IDs (which is extremely unlikely), he will allow name changes. In Generation V, both players must also have the same name and gender as well.