Interesting idea.Sounds like what you want is best achieved by making a python mapscript that always make the same map based on the scenario file in question.
Then starting positions would be entirely randomized; and the number of civs, and what civs specifically, will be customizable.
So basically, when called, get a mapscript to read corresponding parts of a WB file, fill an iterable and return it to dll.