With forces having been more fully implemented in 0.12.x and pvp, or any mp modes with multiple teams with separate tech etc - becoming viable (see klonan's start on a pvp mod
here), the question of multiple starting areas has begun to come up in earnest.
Last night I decided to start poking at RSO, to see how hard it would be to make it generate multiple starting areas. The answer, not hugely. Mostly it was straightforward, the one tricky bit was I had to delay generating starting area resources, since only the vanilla starting area's chunks can be counted on to be generated when on_init is called. Because it can't generate starting area resources until the chunks are generated, it requests the chunks to generate on init, watches chunk generation, and generates each starting area as their chunks are all generated. Players are currently informed by a message "Starting area generated for force <name>"
The latest version of my fork, which I've tested only in sp, seems to be working. The source can be found
on my github, and a usable zip of the mod can be obtained
here
words are wordy, so I'll pause for a screenshot of the map with it generating 4 starting areas with separation 2
The relevant info on using it currently:
Config Settings
There are two new config settings, starting_area_forces and starting_area_separation.
starting_area_forces is a list of strings, which are the names of the forces that should get their own starting areas. For normal single player this would just be {"player" } and the mod should work as before; for pvp it might be, say, {"blue","red"}, and it will create two starting areas (as well as forces "red" and "blue" if they don't exist already) equidistant from 0,0. All starting areas will be arranged on a circle centered on {0,0}, equal angles separating them (so 2 will be directly opposite 0,0; 4 will be arranged in a square, etc), but the rotation is offset by a random angle so they are not entirely predictable.
starting_area_separation is a factor that scales the radius of the circle on which the bases are placed. The radius of the circle will be starting_area_size * starting_area_separation, so the actual distance between bases will depend on the number of bases.
Remote methods
There are also some remote methods added, intended for use by pvp mods but usable in the console directly as well.
get_forces will return the starting_area_forces config value, just an array of the names of forces with starting areas.
get_force_spawn takes the name of a force as a parameter and returns the center of the starting area for that force, as {x=x,y=y}
------------------------
Now that I got it working, I thought I'd share it here; orzelek, you are of course welcome, encouraged even, to integrate this kind of functionality into the main RSO, whether you use my actual code or not. If you're not interested in doing so, I will likely maintain my fork, which I will try to keep sync'd with your latest main release, to provide this functionality.