I'm currently squirming over how to implement some new rules for spawning units over map areas (i e with a plot list). I don't wanna change the rules for any script already made and I don't wanna complicate matters for scenario makers.
I have come to realize, however, that it would be useful to be able to spawn units on random tiles inside foreign cultural borders. Namely rebel units.

But the current rules don't allow for this to happen.
So, I've experimented with changing the units() method to allow for something like this if both the iX and iY arguments are set -
and there is a plot list defined. In short, this double target would first check if the target tile (single tile) is valid according to all the rules. If it isn't, then it will check if any of the tiles defined in the plot list are valid (the right domain, not in the mountains, not a city tile, et cetera) but will allow for cultural borders. And, if all fails, the spawn will revert to the original tile - defined in the units() method and force the spawn anyway.
The problem with this is that it isn't very intuitive.

And its not very easy to document in a way that makes perfect sense.
So, one possible solution could be to add yet another units spawning method, like a
spawn() method. While units() is designed to be used for a single map tile - and garrison() is designed for cities - the spawn() method would be adapted to be used with plot lists. And the preset AI setting could be something like UNITAI_ATTACK.
The API could look something like this:
spawn( eType=None, iNum=1, bBorders=True )
Note that there are no iX/iY or tCoords argument(s), as there would have to be a plot list defined elsewhere with target() or tiles(). (Although a single tile or a plot list only consisting of one tile are still valid.) The default bBorders boolean setting could allow for spawning within any cultural borders.
Would you prefer one less method with overlapping usage, or should we really add another?
Another possible approach could be to rethink the whole setup for spawning units.

This is still in beta-testing, after all.
I suspect having two separate methods - units() and garrison() - is already confusing. Maybe replace both with a spawn() method with all the current settings - and some new ones? (All existing scripts would be backwards compatible, of course, as the old methods would still be in there. They would just be removed from the documentation as they aren't necessary any more.)
What do you think? Maybe just add a rebels() method instead, that spawns Barbarian units - but only within the target player's borders?

(There could be a setting for changing the owner though.) I'm at loss...
