global.rng = game.create_random_generator()
-- Creates a deterministic standalone random generator with the given seed or if a seed is not provided the initial map seed is used.
-- rng()
-- If no parameters are given a number in the [0, 1) range is returned.
-- If a single parameter is given a floored number in the [0, N] range is returned.
-- If 2 parameters are given a floored number in the [N1, N2] range is returned.
------------------------------------------------------------------------------
. . .
Universe.planet_max_radius = 10000
-- average is 4000
-- moon max_radius is 50% of it's own planet's actual radius
-- average is 1600
-- NOTE: there are limited numbers of names so more moons means less planets
planet.radius_multiplier = 0.4 + 0.6 * math.pow(global.rng(), 2)
planet.radius = Universe.planet_max_radius * planet.radius_multiplier
moon.radius_multiplier = 0.2 + 0.8 * math.pow(global.rng(), 2)
moon.radius = planet.radius / 2 * moon.radius_multiplier
오호 수치로는 알고 있었는데 코드로 보니 재밌네