How can I define an "area" using
only the .map file?
I have thought of something like this:
1. Choose a province.
2. Choose one of its neightbours.
3. Choose a province that is next to two provinces that were chosen before it. Skip over provinces already chosen. Abort if no suitable province is found.
4. Repeat 3 until you have X provinces, generally 5-8 is enough.
Take the one with most inter-connections inside the area. This is the capital of the area. It will get suitable poptype (e.g. barbarians) and map-added defenders (barbarians, tribal warriors, few horse brother commanders, Barbarian Lord with randomequip 3...). The other provinces of the area have poptypes that suite the "theme" of the area, e.g. Tribal Warriors, Tribal Cavalry, Horse Brothers & Horse's Vale, Barbarians with normal defenders), possibly with some special commanders (Barbarian Chief with randomequip 1) added in for fun.
Could a Java program working among these lines work? Any suggestions for better-working definitions of "the area", that could be a kingdom, a tribal nation, something along those lines.
Is there any easy way to discover "areas" with the same terrain type, e.g. 5 Wastes next to each other, or 8 mainly Forest and/or Mountain provinces?
Would it unbalance the game to have "areas" with similar defender types, where someone would start near barbarians/tribals inhabiting waste/plains and someone else near HI&X-bow, Knights&Longbow (only capital) etc. on plains/farmlands? Would this possibly screw someone over, while giving another easy start?
If you could add more provinces, area types, special things etc. with "script language" that would be map editing commands with few additions, would you do that? How many special provinces, area types, special things etc. would there have to be for a "random map" to be interesting?
The additions would be fairly simple, adding '#if Nbr' (Nbr is possibility of few following map commands, in %) and commands for choosing different defender types for poptypes. Like: Militia and Light Infantry with Javelins from 1-15, some Shortbows and some Heavy Infantry from 10-25, then a Knight commander with few longbows and more bows & HI with 2:1 relation from that point on.
I wonder what Gandalf, High Priest of the Random Map Cult, will say about this post...

Don't have your hopes too high. This is just an idea, and I might be able to get it to work, but I won't start it for a week, atleast. I have three exams left, and will start playing Morrowind after that. And I'm going to Germany in a Month. And then there is always school and life and little things like that.
