A map group is a set of a single type of map in numerical order,
IE:- a mapgroup of "flat" maps would be...flat01, flat02, flat03 and so on

Which battle map group is used for a campaign battle depends on which type of three battles is taking place.

1- A Castle assault or defence,
in which case a castle map is used.
Castle maps can be from groups, or they can specifically designated in the campaign startpos file. (in the SetCastleMap section)
maps need to exist for each level of castle and for each upgrade,
castleflat01_1_0 is the first map in the set for castle level 1 with no upgrades.
castleflat03_1_2 is the third map in the set for castle level 1 with upgrade level 2.
The Switch "SetNumCastleMapGroups::" is not used and can be ignored. (it was dropped from release version)
The Switch "mapgroup =" is not used and can be ignored. (it was dropped from release version)

2- An internal strife or sally battle,
in which case the terrain type declared in SetAttributes
in the campaign start file is used by the game to select the map group used,

3- A Border Crossing assault,
in which case the terrain type declared in SetBorderInfo,
corresponding to the border between the province moving from and the province moving into,
in the campaign start file determines the map group used.
this is the SetBorder line between Satsuma and Osumi
the number set 2368 15328 0 is Not Used and can be ignored.
Temperate tells the game which Tiles to use on the map
AT_WESTERN_EUROPEAN tells the game which Model Subest to use on the map,
and COASTAL FLT2PLN NO_RIVER tells the game which MapGroup to use to generate the map
(in this case a Coastal map, with flat ground moving to plains, with no river,
Coastal maps are typically used for borders from sea regions to land (for seaborne invasions).

The same set of maps descriptions will work for SetAttributes (internal maps) and SetBorder (border maps),
even though SetAttributes states otherwise.

There are six basic attributes that describe the map,
is the map INLAND or COAST
is the map RIVER or NO_RIVER

There are TWO attributes that Do Not Work in campaign.
DESERT and STEPPE - they appear to have been ideas that were abandoned.

So a typical map in either SetBorder or SetAttributes will be declared like this
an inland map (with no sea borders), From flat moving to mountains, and no river.

The following Abbreviations will work for both SetAttributes and SetBorder.

FLAT - works using maps Flat
PLAINS - works using maps Plains
HILLY - works using maps Hilly
MOUNTAIN - works using maps Mountain

FLT2PLN - works using maps FlatToPlains
FLT2HLL - works using maps FlatToHills
FLT2MNT - works using maps FlatToMountain

PLN2FLT - is REVERSAL of start pos of FLT2PLN using maps FlatToPlains
PLN2HLL - works using maps PlainsToHills
PLN2MNT - works using maps PlainsToMountain

HLL2FLT - is REVERSAL of start pos of FLT2HLL using map FlatToHills
HLL2PLN - is REVERSAL of start pos of PLN2HLL using maps PlainsToHills
HLL2MNT - works using maps HillyToMountain

MNT2FLT - is REVERSAL of start pos of FLT2MNT using map FlatToMountain
MNT2PLN - is REVERSAL of start pos of PLN2MNT using map PlainsToMountain
MNT2HLL - is REVERSAL of start pos of HLL2MNT using map HillyToMountain

As you can see 6 of the Terrain types merely use reversed maps.

This only leaves us with 10 distinct types and 2 pairs of additional options for each map.
40 different map groups in all.

If you have a small mod you can declare a different map group for each province,
For Samurai Warlords we cannot do that. We have too many provinces.

Naming the maps that we put in the folder battle/maps/, is slightly different.
We do not declare No_River, only what the map has,
and we need to spell it out differently,

here is a list of all the allowable map group types
MountainInland		HillyInland		FlatInland
MountainInlandRiver	HillyInlandRiver	FlatInlandRiver
MountainCoastal		HillyCoastal		FlatCoastal
MountainCoastalRiver	HillyCoastalRiver	FlatCoastalRiver

PlainsInland		FlatToPlainsInland		FlatToHillsInland
PlainsInlandRiver	FlatToPlainsInlandRiver		FlatToHillsInlandRiver
PlainsCoastal		FlatToPlainsCoastal		FlatToHillsCoastal
PlainsCoastalRiver	FlatToPlainsCoastalRiver	FlatToHillsCoastalRiver

FlatToMountainInland		PlainsToHillsInland
FlatToMountainInlandRiver	PlainsToHillsInlandRiver
FlatToMountainCoastal		PlainsToHillsCoastal
FlatToMountainCoastalRiver	PlainsToHillsCoastalRiver

PlainsToMountainInland		HillyToMountainInland
PlainsToMountainInlandRiver	HillyToMountainInlandRiver
PlainsToMountainCoastal		HillyToMountainCoastal
PlainsToMountainCoastalRiver	HillyToMountainCoastalRiver

The game will work quite happily with only one map in each set,
but you may find life a bit dull fighting on the same ground over and again.

I would recommend at least 3 maps for each terrain type,
Some could be replica's without too much grief, flat 2 hilly and plains 2 hilly for example.

And the big thing about all this?

All these attributes do is describe the map so the game can find it inside the map folder.
It is all a set of pointers.

What we have are 40 different map types that you can declare (NOT counting castle maps),
and what you build Into the map does not matter one little bit.

You can put anything in the map, the game does not look at the map, it looks only at the name of the map.

Map Images - the images that display when you are given the option to fight or run, and what information is available about the other army,
they are another issue entirely. (and i will try to make a thread about them another day)