24.1.06

Moo2v140b22 released

LordBrazen released a new version of his 1.40 patch. You can find it in his download section.

New features:

VESA.COM error fixed
Cloak or Phasing Cloak have the stealth feature now.
Phasing Cloak decloak bug fixed.
/noscan switch: scans in combat disabled
/nohousing switch: housing disabled, +150% bonus to basic population growth.
Added a cluster galaxy for single player games. More stars in a large galaxy.
/nonebula switch
/minstart switch: excludes rich/ultra rich large/huge race G planets now.

More details here.

2.1.06

The MOO2 map generator

Some time ago I collected a lot of statistics about the map generator used in Master of Orion 2. Using some custom tools to dump game map data, and a lot of savegames of just started games, I gathered some data that could be used to understand how it works.

This is mostly statistical analysis, made with several assumptions to simplify the math; my assumptions seem to match the collected data, but Im not completely sure they are valid. First, some basic premises:

  • I assume that the number of players in the game does not affect the map generation
  • I assume that information about players (race, color, whatever) does not affect the map generation, except for obvious things like homeworld climate, size and gravity.
  • I assume that game difficulty does not affect the map generation


OK. First step in the map generation seems to be star layout. Black holes are considered like another star kind for this purpose. The number of stars depends on the map size in this way:

  • small: 20 stars or bh
  • medium: 36 stars or bh
  • large: 54 stars or bh
  • huge: 71 stars or bh


The above are averages. I expected 72 for huge galazies, but the result was 71. The numbers above are averages. There is a small variation of 1 or 2 stars, but I didn't measure that. The galaxy map has a physical proportion of 1.4 to 1 (i.e., 10 parsecs tool for each 14 parsecs wide). I didn't have a tool to measure sizes, but from some gameplay I have the following approximations:

  • small: 20 parsecs wide
  • medium: 27 parsecs wide
  • large: 33 parsecs wide
  • huge: 38 parsecs wide


After that, I assumed that galactic size does not affect the map generation in any other way. I might be wrong on this. The following data were all collected in huge galaxies, with 8 player games.

MOO2 stars have a size which doesn't seem to affect gameplay or anything else about the star or its planets. It just gives some stars that look bigger or smaller in the game display. Anyway, the data is in the savegame, and I've got 26.5% small stars, 44.5% medium stars, and 29% large stars. That was a small sample, I'm guessing that the right numbers, assuming the developers used simple rules for random generation (they seem to have done that in several similar places) are 30%, 40% and 30%.

Stars are assigned specials (like pirate caches, wormholes, lost hero). Note that
each star can have at least one special, so you will never find a lost hero at the endpoint of a wormhole. One possible star special is the "Planet special", which means that one planet in the system will get something like artifacts, splinter colony, natives, etc. Note that only one planet will have this, and in this case the star will not get any other special. This can be deduced from the savegame format, it is not just statistical analysis

The probabilities for different kind of specials seems to be independent of any other consideration (this is half a guess, so might be wrong again). Assuming that, the vaules are:

  • 78% No special
  • 10% Any Planet special
  • 5% Wormhole
  • ~2% Ship Debris
  • ~2% Pirate cache
  • ~2% Lost hero


There is also the "Orion special" which will be set in exactly one star system called Orion, of course. I don't know if all planet specials have the same chance of appearing or not.

Another part of star generation is setting their colors (and setting some of them as blackholes). This depends on the galactic age. According to that, the chances are:

For average aged galaxies

  • Black hole: 4%
  • Blue-white: 10.5%
  • White: 14.5%
  • Yellow: 13.6%
  • Orange: 14.4%
  • Red: 40.4%
  • Brown: 2.6%


For organic rich galaxies

  • Black hole: 7%
  • Blue-white: 4%
  • White: 4%
  • Yellow: 30.5%
  • Orange: 19.5%
  • Red: 32.7%
  • Brown: 2.3%


For mineral rich galaxies

  • Black hole: 3%
  • Blue-white: 18.5%
  • White: 22%
  • Yellow: 9.7%
  • Orange: 8.9%
  • Red: 37.2%
  • Brown: 0.7%


After creating stars and setting their color and specials, planets are put around them. The chances of having something in a given orbit seems to depend only on the star kind. For each orbit, the chances of having something are independent. The "somethings" I am talking about are not just planets, but also asteroid fields and gas giants. For each orbit, you have the following chance of having something:

  • blue-white: 20%
  • white: 15%
  • yellow: 23%
  • orange: 25%
  • red: 15%
  • brown: 15%


Once you have something in orbit, there is 20% of getting an asteroid field, a 20% chance of getting a gas giant, and 60% of getting a planet.

If it is a planet, the size seems independant of other considerations (orbit, star kind, galactic age). Chances are:

  • tiny: 10%
  • small: 20%
  • medium: 40%
  • large: 20%
  • huge: 10%


I also assume that planet gravity and mineral richness depend only on the star color, which seems quite reasonable when checking the data. Notably, I verified that gravity appears to be quite independent of planet size. With that assumption we get the following table about chances of getting different levels of gravity:


low medium high
4.2 66.9 28.9 # Blue-white
10.6 70.1 19.3 # White
13.8 70.3 15.9 # Yellow
22.1 71.2 6.7 # Orange
29.6 66.2 4.2 # Red
13.6 77.3 9.1 # Brown


So, for example, planets at orange stars are 71.2% of the time of normal gravity, 22.1% low gravity, and 6.7% high gravity.

Update, Jan 12: hoserboy posted a comment noting that gravity is actually a function of planet size and richness. The gravity table is


Richness
UP P AVG R UR
Tiny l l l m m
S Small l l m m m
i Medium l m m m h
z Large m m m h h
e Huge m m h h h


The above table does not applies to homeworlds, orion, or other planets with monsters or specials.

There is a similar table for mineral richness:


upoor poor normal rich urich
0 0 39.7 41.6 18.5 # Blue-white
0 19.5 41.2 29.4 9.8 # White
0 30.3 40.4 20.7 8.5 # Yellow
10.4 40.2 39.0 10.3 0 # Orange
18.6 38.3 42.3 0 0 # Red
5.0 11.0 61.0 18.0 5.0 # Brown


The only missing aspect about planets is climate. Climate assignment depends on the galactic age, and on the kind of star. You can get probabilities for the different planet climates based on this table:

For average aged galaxies


# toxic radiated barren desert tundra ocean swamp arid terran gaia
16.3 48.6 27.2 6.9 0 0 0 0 0 0 # Blue-white
16.6 36.8 27.1 6.0 4.3 1.7 1.0 2.6 3.2 0.7 # White
12.7 26.8 30.2 5.9 7.7 4.4 3.8 3.1 4.2 1.2 # Yellow
16.7 17.4 22.8 8.2 7.1 5.7 6.9 6.3 7.5 1.4 # Orange
16.2 12.9 49.7 3.0 6.6 2.2 2.3 2.5 4.0 0.6 # Red
20.8 29.2 10.0 20.0 10.0 2.0 2.0 2.0 3.0 1.0 # Brown


For organic rich galaxies


# toxic radiated barren desert tundra ocean swamp arid terran gaia
13.0 37.0 22.2 26.7 .6 0 0 0 0 0 # Blue-white
7.1 25.5 20.6 21.3 6.3 2.2 3.5 6.4 6.4 .7 # White
8.8 17.5 17.6 15.9 13.8 6.4 5.8 6.2 6.0 2.0 # Yellow
7.0 10.7 15.0 11.9 17.3 9.2 7.9 10.0 8.1 2.9 # Orange
12.8 6.6 37.0 6.4 23.6 3.6 3.2 3.2 3.5 0 # Red
20.0 30.0 10.0 20.0 10.0 2.0 2.0 2.0 3.0 1.0 # Brown


For mineral rich galaxies


# toxic radiated barren desert tundra ocean swamp arid terran gaia
12.9 54.2 26.0 5.7 .7 0 0 0 0 0 # Blue-white
13.2 33.9 34.5 5.0 4.5 2.0 2.2 1.4 3.0 0 # White
13.5 23.0 30.9 6.7 7.0 4.9 3.0 4.0 6.3 .7 # Yellow
11.7 17.5 29.0 5.6 10.0 4.3 6.1 6.1 7.7 2.0 # Orange
17.4 14.0 45.2 4.1 8.7 2.8 2.0 1.8 3.7 0 # Red
20.8 29.2 10.0 20.0 10.0 2.0 2.0 2.0 3.0 1.0 # Brown


The last tables might be slightly biased because homeworlds were taken into account for the stats, and homeworld attributes are set after map generation. So probabilities for medium gravity, medium terran planets may be slightly higher than the real game values.