Let me guess: you didn't remove the player number hardcoding when you moved the code over.
That code assumes it's running on the scenario; as such, it hardcoded the player numbers. It doensn't take Earth, Vulcan, Andor, and Tellar and make them one team; it takes players 0-3 and makes them into one team. In the scenario, where everyone is hardcoded in the scenario file, this is fine. On a random map, players are picked at random, and the human is always player 0. As such, you're on that team. There are two ways to fix this: rewrite the code or use a custom game to set up the appropriate civ order for players 0-3.
The probe stuff is in the python map script StarTrek. SpiralGalaxy borrows many functions from StarTrek and the starting city and unit is one of them. It's near the bottom. Btw, I used the SpiralGalaxyManyCivs to create the galaxy map instead of the vanilla SpiralGalaxy.