Firstly, the hex terrains on the D2 map and what actually appears in a mission are completely independant. The mission script is solely responsible for what actually appears in a mission.
A client code passes a set map terrain paramaters to the mission script. There are three paramaters, terrain type, planet type and base type, as follows.
eTerrainTypes
{
kTerrainSpace1
kTerrainSpace2
kTerrainSpace3
kTerrainSpace4
kTerrainSpace5
kTerrainSpace6
kTerrainAsteroids1
kTerrainAsteroids2
kTerrainAsteroids3
kTerrainAsteroids4
kTerrainAsteroids5
kTerrainAsteroids6
kTerrainNebula1
kTerrainNebula2
kTerrainNebula3
kTerrainNebula4
kTerrainNebula5
kTerrainNebula6
kTerrainBlackHole1
kTerrainBlackHole2
kTerrainBlackHole3
kTerrainBlackHole4
kTerrainBlackHole5
kTerrainBlackHole6
kTerrainDustclouds
kTerrainShippingLane
kTerrainNone
}
ePlanetTypes
{
kPlanetNone
kPlanetHomeWorld1
kPlanetHomeWorld2
kPlanetHomeWorld3
kPlanetCoreWorld1
kPlanetCoreWorld2
kPlanetCoreWorld3
kPlanetColony1
kPlanetColony2
kPlanetColony3
kPlanetAsteroidBase1
kPlanetAsteroidBase2
kPlanetAsteroidBase3
}
eBaseTypes
{
kBaseNone
kBaseStarbase
kBaseBattleStation
kBaseBaseStation
kBaseWeaponsPlatform
kBaseListeningPost
}
From this, then, we can see that there is 26 x 11 x 6 = 1,716 possible different map combinations. These paramaters are passed to the mission script, and a function can be written by the coder to then select a particular map based on these paramaters within the script. What that map contains, however, can be absolutely anything, although traditionally, if say a 'nebula' parameter is passed to the script, the coder will write the function such that a map with a nebula is selected, but this is purely arbitrary.
A map in a mission script appears as follows. This is taken from Met_17Patrol, and shows the map that appears when an asteroid parameter is sent to the script.
"// Met_17Patrol Map -- Asteroids",
" +____1____2____3____4____5____6+",
" |..............................|",
" |...A..........................|",
" |.............a............a...|",
" |.................A............|",
"1|..a.....*..............a......|",
" |.................h.i..........|",
" |.......*.........g.......*....|",
" |..............................|",
" |...................a........A.|",
"2|..........*...................|",
" |............X.....W...........|",
" |...........................a..|",
" |...............Y..............|",
" |..............................|",
"3|..............................|",
" |...*................Z.........|",
" |............a.................|",
" |..............................|",
" |..A.............a.............|",
"4|..............................|",
" |...a.........G......A.........|",
" |..............................|",
" |......*...H.....I...a.........|",
" |...........................A..|",
"5|.......................*......|",
" |..A.......x w.................|",
" |...........y................a.|",
" |.....A........................|",
" |........................*.....|",
"6|............a.................|",
" +------------------------------+",
" 1 2 3 4 5 6",
The legend for creating maps is as follows...
/*
Legend:
Starting Positions Ending Positions Planets
Start1 --> G End1 --> g EarthOrgania) --> 1
Start2 --> H End2 --> h Ringed Earth --> 2
Start3 --> I End3 --> i Mars --> 3
Start4 --> J End4 --> j Jupiter --> 4
Start5 --> K End5 --> k Dark Earth --> 5
Start6 --> L End6 --> l Saturn --> 6
Start7 --> M End7 --> m Night City --> 7
Start8 --> N End8 --> n Fire --> 8
Start9 --> O End9 --> o Ice --> 9
Start10 --> P End10 --> p Gas --> 0
Start11 --> Q End11 --> q
Start12 --> R End12 --> r
Start13 --> S End13 --> s
Start14 --> T End14 --> t
Start15 --> U End15 --> u
Start16 --> V End16 --> v
Start17 --> W End17 --> w
Start18 --> X End18 --> x
Start19 --> Y End19 --> y
Start20 --> Z End20 --> z
Celestial Bodies Asteroids Black Holes
Moon --> @ SmallAsteroid --> [ SmallBlackHole --> :
Sun1 --> ( LargeAsteroid --> ] LargeBlackHole --> ,
Sun2 --> ) IceAsteroid --> *
Sun3 --> !
Nebulas Dust Clouds Other
Nebula1 --> & LightDustCloud --> < WormHole --> %
Nebula2 --> ? HeavyDustCloud --> > Fissure --> $
Corpse --> #
Organian --> ^
Pulsar --> ~
IonStorm --> {
*/Now, although you cannot place both an asteroid hex and a nebula hex together on the D2 map, from within a mission script, you can place both of these items on the mission map.
If, say for instance, we wanted kTerrainAsteroids6 to also have a nebula, then we need a mission script that will call a map that contains both asteroids and a nebula when the terraintype passed to the script from the client is kTerrainAsteroids6. It will still look like kTerrainAsteroids6 on the D2 map. ie. one of the asteroid variant hex graphics, but in mission, it will have a nebula and asteroids ONLY for that mission that is coded that way. For consistency, if you always wanted that hex to have asteroids and a nebula, then all the missions used would need to be coded that way.
Hope this helps.